From d67d0b8f82a55d52c799aeb088a65927bc9aecf7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 7 Aug 1997 20:55:08 +0000 Subject: Interactive UNIX System V/386 Release 3.2 port. svn path=/trunk/; revision=1245 --- NEWS | 1 + acconfig.h | 3 +++ configure.in | 8 ++++++-- fetchmail.c | 11 ++++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ad54d873..64714889 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ fetchmail-4.0.8 () * Fixed core dump bug in UID handling introduced by the 4.0.6 change. * Retrieval code for POP3 & older IMAP versions now skips X-IMAP message used by UW IMAP4rev1 server to store UIDs. +* Port to Interactive UNIX System V/386 Release 3.2. There are 260 people on the fetchmail-friends list. diff --git a/acconfig.h b/acconfig.h index 89ccc555..c7ceaf43 100644 --- a/acconfig.h +++ b/acconfig.h @@ -41,6 +41,9 @@ /* Define if you have atexit */ #undef HAVE_ATEXIT +/* Define if you have on_exit */ +#undef HAVE_ON_EXIT + /* Define to help us deduce a 32-bit type (required for Kerberos) */ #undef SIZEOF_INT #undef SIZEOF_SHORT diff --git a/configure.in b/configure.in index 4118e93b..df1b5f02 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ dnl AC_INIT(fetchmail.h) dnl A distinctive file to look for in srcdir. AC_CONFIG_HEADER(config.h) -# We want these before the checks, so the checks can modify their values. +dnl We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-O AC_SUBST(CFLAGS) test -z "$LDFLAGS" && LDFLAGS=-s AC_SUBST(LDFLAGS) @@ -35,7 +35,11 @@ AC_CHECK_LIB(nsl,inet_addr) AC_CHECK_LIB(socket,socket) AC_CHECK_LIB(inet,socket) AC_CHECK_LIB(opie,opiegenerator) -AC_CHECK_LIB(cposix, strchr) dnl Interactive UNIX System V/386 Release 3.2 + +dnl Port hack for Interactive UNIX System V/386 Release 3.2 +AC_CHECK_LIB(cposix, strchr, + [DEFS="$DEFS -D_SYSV3" + LIBS="$LIBS -lcposix"]) AC_CHECK_FUNC(strstr, AC_DEFINE(HAVE_STRSTR), [EXTRASRC="$EXTRASRC \$(srcdir)/strstr.c" diff --git a/fetchmail.c b/fetchmail.c index bf866a97..65c196b2 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -45,6 +45,10 @@ #define DROPDEAD 6 /* maximum bad socket opens */ +#ifndef ENETUNREACH +#define ENETUNREACH 128 /* Interactive doesn't know this */ +#endif /* ENETUNREACH */ + /* prototypes for internal functions */ static int load_params(int, char **, int); static void dump_params (struct query *); @@ -331,7 +335,8 @@ int main (int argc, char **argv) #ifdef HAVE_ATEXIT atexit(unlockit); -#else +#endif +#ifdef HAVE_ON_EXIT on_exit(unlockit, (char *)NULL); #endif } @@ -739,6 +744,10 @@ void termhook(int sig) if (!check_only) write_saved_lists(querylist, idfile); +#if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT) + unlockit(); +#endif + exit(successes ? PS_SUCCESS : querystatus); } -- cgit v1.2.3