From 03f13c24a8a9ec87db38b4f319d46dd88e64a508 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 16 Jan 1997 21:12:29 +0000 Subject: Philippe de Muyter's Motorola fixes. svn path=/trunk/; revision=781 --- NEWS | 10 +++++----- configure.in | 4 ++++ daemon.c | 4 ++-- driver.c | 5 +++++ fetchmail.c | 4 ++-- imap.c | 2 ++ netrc.c | 6 +----- pop3.c | 2 ++ 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index ca47efe6..e92796e7 100644 --- a/NEWS +++ b/NEWS @@ -11,10 +11,10 @@ features -- * RFC822 header continuation for long address lists is is now handled properly. -Note: These changes mean that older .fetchmailrc files using the `set' -syntax for these options will cause fetchmail to die with a parse -error at initialization time. Conversion is trivial -- for details, -see the FAQ. +Note: The first two changes mean that older .fetchmailrc files using +the `set' syntax for these options will cause fetchmail to die with a +parse error at initialization time. Conversion is trivial -- for +details, see the FAQ. bugs -- @@ -38,7 +38,7 @@ Note: the RFC subdirectory is no longer included with the distribution (this cut its size in half!) Instead, applicable RFCs are listed on the manual page. -There are 192 people on the fetchmail-friends list. +There are 193 people on the fetchmail-friends list. ------------------------------------------------------------------------------ fetchmail-2.8 (Sat Jan 11 15:48:33 EST 1997) diff --git a/configure.in b/configure.in index ae45d083..e98a70e3 100644 --- a/configure.in +++ b/configure.in @@ -40,6 +40,10 @@ AC_CHECK_LIB(nsl,inet_addr) # library. So don't add -lresolv to the link list unless it's necessary AC_CHECK_FUNC(res_search,, AC_CHECK_LIB(resolv,res_search)) +AC_CHECK_FUNC(strstr, AC_DEFINE(HAVE_STRSTR), + [EXTRASRC="$EXTRASRC \$(srcdir)/strstr.c" + EXTRAOBJ="$EXTRAOBJ strstr.o"]) + AC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP), [EXTRASRC="$EXTRASRC \$(srcdir)/strcasecmp.c" EXTRAOBJ="$EXTRAOBJ strcasecmp.o"]) diff --git a/daemon.c b/daemon.c index 9256af93..aa3917db 100644 --- a/daemon.c +++ b/daemon.c @@ -32,7 +32,7 @@ #endif /* BSD portability hack */ -#if !defined(SIGCHLD) && defined(SICHLD) +#if !defined(SIGCHLD) && defined(SIGCLD) #define SIGCHLD SIGCLD #endif @@ -124,7 +124,7 @@ daemonize (const char *logfile, void (*termhook)(int)) /* lose controlling tty */ signal(SIGHUP, SIG_IGN); - if ((childpid = fork) < 0) { + if ((childpid = fork()) < 0) { error(0, errno, "fork"); return(PS_IOERR); } diff --git a/driver.c b/driver.c index 5c87df08..2ab5f6f9 100644 --- a/driver.c +++ b/driver.c @@ -52,6 +52,8 @@ #define SMTP_PORT 25 /* standard SMTP service port */ +extern char *strstr(); /* needed on sysV68 R3V7.1. */ + int batchlimit; /* how often to tear down the delivery connection */ int fetchlimit; /* how often to tear down the server connection */ int batchcount; /* count of messages sent in current batch */ @@ -884,6 +886,9 @@ const struct method *proto; /* protocol method table */ if (!(sockfp = SockOpen(ctl->server.names->id, ctl->server.port ? ctl->server.port : protocol->port))) { +#ifndef EHOSTUNREACH +#define EHOSTUNREACH (-1) +#endif if (errno != EHOSTUNREACH) error(0, errno, "connecting to host"); ok = PS_SOCKET; diff --git a/fetchmail.c b/fetchmail.c index 728f7d61..1f090146 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -199,7 +199,7 @@ int main (int argc, char **argv) fprintf(stderr,"fetchmail: removing stale lockfile\n"); pid = -1; bkgd = FALSE; - remove(lockfile); + unlink(lockfile); } fclose(lockfp); } @@ -222,7 +222,7 @@ int main (int argc, char **argv) { fprintf(stderr,"fetchmail: %s fetchmail at %d killed.\n", bkgd ? "background" : "foreground", pid); - remove(lockfile); + unlink(lockfile); exit(0); } } diff --git a/imap.c b/imap.c index b7c20753..3640fb81 100644 --- a/imap.c +++ b/imap.c @@ -16,6 +16,8 @@ #include "fetchmail.h" #include "socket.h" +extern char *strstr(); /* needed on sysV68 R3V7.1. */ + static int count, seen, recent, unseen, imap4, deletecount; int imap_ok (FILE *sockfp, char *argbuf) diff --git a/netrc.c b/netrc.c index 9ae773ea..a56dfd7b 100644 --- a/netrc.c +++ b/netrc.c @@ -21,11 +21,7 @@ #include #include #include -#ifdef HAVE_STRING_H -# include -#else -# include -#endif +#include #include "config.h" #include "fetchmail.h" diff --git a/pop3.c b/pop3.c index 9a37a328..b8f67bb5 100644 --- a/pop3.c +++ b/pop3.c @@ -21,6 +21,8 @@ #define PROTOCOL_ERROR {error(0, 0, "protocol error"); return(PS_ERROR);} +extern char *strstr(); /* needed on sysV68 R3V7.1. */ + static int last; int pop3_ok (FILE *sockfp, char *argbuf) -- cgit v1.2.3