From 49c069a9b1b02e44d9e7bfcd349d80273d1e01d5 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Tue, 23 Feb 1993 17:00:04 -0800 Subject: [PATCH] more System V compatibility changes (ugh) SCCS-vsn: usr.sbin/sendmail/src/conf.h 6.9 SCCS-vsn: usr.sbin/sendmail/src/daemon.c 6.9 SCCS-vsn: usr.sbin/sendmail/src/deliver.c 6.24 SCCS-vsn: usr.sbin/sendmail/src/conf.c 6.26 --- usr/src/usr.sbin/sendmail/src/conf.c | 21 +++++++++++++++++++-- usr/src/usr.sbin/sendmail/src/conf.h | 18 +++++++++++++++++- usr/src/usr.sbin/sendmail/src/daemon.c | 7 +++---- usr/src/usr.sbin/sendmail/src/deliver.c | 4 ++-- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/conf.c b/usr/src/usr.sbin/sendmail/src/conf.c index a61c6ceee1..f85647a05d 100644 --- a/usr/src/usr.sbin/sendmail/src/conf.c +++ b/usr/src/usr.sbin/sendmail/src/conf.c @@ -7,11 +7,12 @@ */ #ifndef lint -static char sccsid[] = "@(#)conf.c 6.25 (Berkeley) %G%"; +static char sccsid[] = "@(#)conf.c 6.26 (Berkeley) %G%"; #endif /* not lint */ # include # include +# include # include # include "sendmail.h" # include "pathnames.h" @@ -1037,7 +1038,13 @@ initgroups(name, basegid) # if defined(sun) || defined(hpux) # include # else -# include +# if defined(HASUSTAT) +# include +# include +# include ustat.h> +# else +# include +# endif # endif # endif #endif @@ -1050,7 +1057,13 @@ enoughspace() struct fs_data fs; # define f_bavail fd_bfreen # else +# if defined(HASUSTAT) + struct ustat fs; + struct stat statbuf; +# define f_bavail f_tfree +# else struct statfs fs; +# endif # endif extern int errno; extern char *errstring(); @@ -1067,7 +1080,11 @@ enoughspace() # if defined(ultrix) if (statfs(QueueDir, &fs) > 0) # else +# if defined(HASUSTAT) + if (stat(QueueDir, &statbuf) == 0 && ustat(statbuf.st_dev, &fs) == 0) +# else if (statfs(QueueDir, &fs) == 0) +# endif # endif # endif { diff --git a/usr/src/usr.sbin/sendmail/src/conf.h b/usr/src/usr.sbin/sendmail/src/conf.h index 5cfdace732..5bf7dd8872 100644 --- a/usr/src/usr.sbin/sendmail/src/conf.h +++ b/usr/src/usr.sbin/sendmail/src/conf.h @@ -5,7 +5,7 @@ * * %sccs.include.redist.c% * - * @(#)conf.h 6.8 (Berkeley) %G% + * @(#)conf.h 6.9 (Berkeley) %G% */ /* @@ -135,3 +135,19 @@ struct utsname #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 #endif + +#if !defined(SIGCHLD) && defined(SIGCLD) +# define SIGCHLD SIGCLD +#endif + +#ifndef STDIN_FILENO +#define STDIN_FILENO 0 +#endif + +#ifndef STDOUT_FILENO +#define STDOUT_FILENO 1 +#endif + +#ifndef STDERR_FILENO +#define STDERR_FILENO 2 +#endif diff --git a/usr/src/usr.sbin/sendmail/src/daemon.c b/usr/src/usr.sbin/sendmail/src/daemon.c index f6d5ea5599..780cc513b9 100644 --- a/usr/src/usr.sbin/sendmail/src/daemon.c +++ b/usr/src/usr.sbin/sendmail/src/daemon.c @@ -7,24 +7,23 @@ */ #include +#include #include "sendmail.h" # include #ifndef lint #ifdef DAEMON -static char sccsid[] = "@(#)daemon.c 6.8 (Berkeley) %G% (with daemon mode)"; +static char sccsid[] = "@(#)daemon.c 6.9 (Berkeley) %G% (with daemon mode)"; #else -static char sccsid[] = "@(#)daemon.c 6.8 (Berkeley) %G% (without daemon mode)"; +static char sccsid[] = "@(#)daemon.c 6.9 (Berkeley) %G% (without daemon mode)"; #endif #endif /* not lint */ #ifdef DAEMON # include -# include # include # include -# include /* ** DAEMON.C -- routines to use when running as a daemon. diff --git a/usr/src/usr.sbin/sendmail/src/deliver.c b/usr/src/usr.sbin/sendmail/src/deliver.c index 6c208d4833..319430cd30 100644 --- a/usr/src/usr.sbin/sendmail/src/deliver.c +++ b/usr/src/usr.sbin/sendmail/src/deliver.c @@ -7,11 +7,11 @@ */ #ifndef lint -static char sccsid[] = "@(#)deliver.c 6.23 (Berkeley) %G%"; +static char sccsid[] = "@(#)deliver.c 6.24 (Berkeley) %G%"; #endif /* not lint */ #include "sendmail.h" -#include +#include #include #include #include -- 2.20.1