AC_CACHE_CHECK(whether compiler supports -Wextra, nmh_cv_wextra,
[nmh_saved_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -Wextra"
- AC_TRY_COMPILE([],[],nmh_cv_wextra=' -Wextra',echo -n no)
+ CFLAGS="$CFLAGS -Wextra -Wno-clobbered"
+ AC_TRY_COMPILE([],[],nmh_cv_wextra=' -Wextra -Wno-clobbered',echo -n no)
CFLAGS="$nmh_saved_cflags"])
AC_CACHE_CHECK(whether compiler supports -Wno-pointer-sign, nmh_cv_has_noptrsign,
char *m_mktemp(const char *, int *, FILE **);
char *m_mktemp2(const char *, const char *, int *, FILE **);
void m_unknown(FILE *);
-pid_t m_vfork ();
int makedir (char *);
char *nmh_getpass(const char *);
char *norm_charmap(char *);
fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c \
fmt_scan.c lock_file.c m_atoi.c m_backup.c \
m_convert.c m_draft.c m_getfld.c m_gmprot.c \
- m_maildir.c m_name.c m_setjmp.c m_vfork.c \
+ m_maildir.c m_name.c m_setjmp.c \
makedir.c mts.c norm_charmap.c \
path.c peekc.c pidwait.c pidstatus.c \
print_help.c print_sw.c print_version.c push.c \
if ((hook = context_find(hook_name)) == (char *)0)
return (OK);
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case -1:
status = NOTOK;
advise(NULL, "external database may be out-of-date.");
fflush (stdout);
vec[0] = r1bindex (rmmproc, '/');
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case -1:
advise ("fork", "unable to");
return -1;
+++ /dev/null
-
-/*
- * m_vfork.c -- Wraps vfork(), to help prevent warnings about arguments
- * -- and variables that might be clobbered by a vfork call
- * -- with gcc -Wclobbered.
- *
- * This code is Copyright (c) 2012, by the authors of nmh. See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-
-pid_t
-m_vfork() {
- return vfork();
-}
nested directories like the above code can.
-- Dan Harkless <dan-nmh@dilvish.speed.net> */
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case -1:
advise ("fork", "unable to");
return 0;
context_save(); /* save the context file */
fflush(stdout);
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case -1:
advise ("fork", "unable to");
return -1;
if (!strcmp (r1bindex (lproc, '/'), "mhl"))
lproc = mhlproc;
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case -1:
/* fork error */
advise ("fork", "unable to");
if ((out = fopen (ce->ce_file, "w")) == NULL)
adios (ce->ce_file, "unable to open for writing");
- for (i = 0; (child_id = m_vfork()) == NOTOK && i > 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i > 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
return NOTOK;
}
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
if (pipe (pd) == NOTOK)
adios ("pipe", "unable to");
- switch (m_pid = m_vfork()) {
+ switch (m_pid = vfork()) {
case NOTOK:
adios ("fork", "unable to");
fflush (stdout);
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
vec[vecp++] = e->eb_body;
vec[vecp] = NULL;
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
fflush (stdout);
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
fflush (stdout);
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)));
unlink (tmpfil);
- if ((child_id = m_vfork()) == NOTOK) {
+ if ((child_id = vfork()) == NOTOK) {
/* fork error */
close (fd);
return header_fd ();
rewind (in);
lseek (fileno(in), (off_t) 0, SEEK_SET);
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case NOTOK:
adios ("fork", "unable to");
done (1);
vec[vecp] = NULL;
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
if (pushflg && !(watch || verbose)) {
/* fork to a child to run sendmail */
- for (i=0; (pid = m_vfork()) == NOTOK && i < 5; i++)
+ for (i=0; (pid = vfork()) == NOTOK && i < 5; i++)
sleep(5);
switch (pid) {
case NOTOK:
else {
vec[0] = r1bindex (mhlproc, '/');
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
printf ("%sFcc: %s\n", msgstate == resent ? "Resent-" : "", folder);
fflush (stdout);
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
context_save (); /* save the context file */
fflush (stdout);
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case NOTOK:
advise ("fork", "unable to");
status = NOTOK;
context_save (); /* save the context file */
fflush (stdout);
- for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
case NOTOK:
context_save (); /* save the context file */
fflush (stdout);
- switch (pid = m_vfork()) {
+ switch (pid = vfork()) {
case NOTOK:
advise ("fork", "unable to");
return 1;