]> Pileus Git - ~andy/fetchmail/commitdiff
Improved configuration and compilation.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 8 May 1997 20:25:25 +0000 (20:25 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 8 May 1997 20:25:25 +0000 (20:25 -0000)
svn path=/trunk/; revision=985

NEWS
acconfig.h
configure.in
daemon.c
fetchmail.c
rcfile_y.y

diff --git a/NEWS b/NEWS
index 876d8bc86c9f04d2114f3fe8d0fe596292b6808f..ff1accac0da7cdd2d1a6befd3da1d1aaf6d16b68 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,13 +13,6 @@ every user entry in a multi-user poll declaration.
   form "foo"@bar.com are not parsed correctly, even though they are
   technically RFC822 legal. The general problem is mentioned on the man page.
 
-* Rich Kulawiec <rsk@itw.com> writes: fetchmail 3.9 seems to work fine when
-  run from a tty or pty,  but not when run from cron or at. [...]  It looks
-  like the problem is that fetchmail is having difficulty opening an SMTP
-  connection to push mail to, but I'm somewhat baffled as to why that might be.
-  (I guess a better way of saying that is that I'm having trouble figuring
-  why it wouldn't just break *all* the time.)
-
 * fetchmail has been reported to break when processing 0-length (bodyless)
   messages retrieved via IMAP.  It is not clear whether this is a fetchmail
   bug or a glitch in some specific IMAP server.  (Such messages are sometimes 
@@ -34,6 +27,12 @@ every user entry in a multi-user poll declaration.
 
 ------------------------------------------------------------------------------
 
+pl 3.9.4 ():
+* Fixed a compilation glitch for systems like SunOS & others without atexit(3).
+* Fixed a compilation glitch in daemonize for HP-UX.
+
+------------------------------------------------------------------------------
+
 pl 3.9.3 (Wed May  7 11:40:47 EDT 1997):
 * Fix for -I option from George Sipe.
 * Finally got error.c to compile under AIX, thanks to Dave Vinish.
index 9bc690e34029dd684258f2ba9897c329b14df15d..21a38dfac732217a982c6f37438f953d26008c53 100644 (file)
@@ -38,6 +38,9 @@
 /* Define if you have vsyslog */
 #undef HAVE_VSYSLOG
 
+/* Define if you have atexit */
+#undef HAVE_ATEXIT
+
 \f
 /* Leave that blank line there!!  Autoheader needs it.
    If you're adding to this file, keep in mind:
index afc148eacd31d67267de375462dbb998f3960c05..399f74852e030cd30f6452385dd8ddcb4442473f 100644 (file)
@@ -80,7 +80,7 @@ AC_SUBST(EXTRASRC)
 AC_SUBST(EXTRAOBJ)
 
 AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \
-  strrchr strstr strerror setlinebuf syslog snprintf vsnprintf vsyslog)
+  strrchr strstr strerror setlinebuf syslog snprintf vsnprintf vsyslog atexit)
 
 dnl AC_FUNC_SETVBUF_REVERSED
 
index 8e270237d00359c4f907cdfbcc0b286f6eab29d7..a08477314228eac4b8330c929196faa72bf26a74 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -50,7 +50,11 @@ sigchld_handler (int sig)
 #endif
 
 #if    defined(HAVE_WAIT3)
+#ifdef hpux
+  while ((pid = wait3(&status, WNOHANG, (int *) 0)) > 0)
+#else
   while ((pid = wait3(&status, WNOHANG, (struct rusage *) 0)) > 0)
+#endif
     ; /* swallow 'em up. */
 #elif  defined(HAVE_WAITPID)
   while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
index f94ba8eef0687c6ccfc5187fb73971be56994e8d..152b7f28f6528d31052f20c720f2e2ca68b6bc07 100644 (file)
@@ -81,7 +81,11 @@ static void termhook();              /* forward declaration of exit hook */
 
 RETSIGTYPE donothing(sig) int sig; {signal(sig, donothing); lastsig = sig;}
 
+#ifdef HAVE_ATEXIT
 static void unlockit(void)
+#else  /* use on_exit(), e.g. on SunOS */
+static void unlockit(int n, void *p)
+#endif
 /* must-do actions for exit (but we can't count on being able to do malloc) */
 {
     unlink(lockfile);
@@ -364,7 +368,12 @@ int main (int argc, char **argv)
        if (poll_interval)
            fprintf(lockfp," %d", poll_interval);
        fclose(lockfp);
+
+#ifdef HAVE_ATEXIT
        atexit(unlockit);
+#else
+       on_exit(unlockit, (char *)NULL);
+#endif
     }
 
     /*
index bbab87e3811c6e3a8b321573ab18b5a292298748..28ca4c8e7c4880c894d8ca7dfd7314f9fca5df42 100644 (file)
@@ -260,7 +260,7 @@ const char *pathname;               /* pathname for the configuration file */
     }
 
     if (statbuf.st_mode & ~(S_IFREG | S_IREAD | S_IWRITE)) {
-       fprintf(stderr, "File %s must have no more than -rw------ permissions.\n", 
+       fprintf(stderr, "File %s must have no more than -rw------ (0600) permissions.\n", 
                pathname);
        return(PS_AUTHFAIL);
     }