aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-05-08 20:25:25 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-05-08 20:25:25 +0000
commite17f8194cadc0f11a53cd9ed6d4291dc6732a2f2 (patch)
tree8d9a6cc8d4d1f9190e8b3dbaed6f366c7f9cb11e
parent225b32b70c44288111f6229a61c0040e2f032082 (diff)
downloadfetchmail-e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2.tar.gz
fetchmail-e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2.tar.bz2
fetchmail-e17f8194cadc0f11a53cd9ed6d4291dc6732a2f2.zip
Improved configuration and compilation.
svn path=/trunk/; revision=985
-rw-r--r--NEWS13
-rw-r--r--acconfig.h3
-rw-r--r--configure.in2
-rw-r--r--daemon.c4
-rw-r--r--fetchmail.c9
-rw-r--r--rcfile_y.y2
6 files changed, 24 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 876d8bc8..ff1accac 100644
--- 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.
diff --git a/acconfig.h b/acconfig.h
index 9bc690e3..21a38dfa 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -38,6 +38,9 @@
/* Define if you have vsyslog */
#undef HAVE_VSYSLOG
+/* Define if you have atexit */
+#undef HAVE_ATEXIT
+
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
diff --git a/configure.in b/configure.in
index afc148ea..399f7485 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/daemon.c b/daemon.c
index 8e270237..a0847731 100644
--- 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)
diff --git a/fetchmail.c b/fetchmail.c
index f94ba8ee..152b7f28 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -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
}
/*
diff --git a/rcfile_y.y b/rcfile_y.y
index bbab87e3..28ca4c8e 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -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);
}