diff -u /gd/gnu/sendmail/8.8.5/src/READ_ME src/READ_ME --- /gd/gnu/sendmail/8.8.5/src/READ_ME Tue Jan 21 10:47:03 1997 +++ src/READ_ME Tue Feb 25 17:11:37 1997 @@ -295,6 +295,9 @@ HASWAITPID Define this if you have the waitpid(2) syscall. HASGETDTABLESIZE Define this if you have the getdtablesize(2) syscall. +HASSTRERROR Define this if you have the libc strerror function (which + should be declared in ), and it should be used + instead of sys_errlist. NEEDGETOPT Define this if you need a reimplementation of getopt(3). On some systems, getopt does very odd things if called to scan the arguments twice. This flag will ask sendmail @@ -409,6 +412,8 @@ SPT_PSTAT (3) -- Use the PSTAT_SETCMD option to pstat(2) to set the process title; this is used by HP-UX. SPT_PSSTRINGS (4) -- Use the magic PS_STRINGS pointer (4.4BSD). + SPT_CHANGEARGV (7) -- Write pointers to our own strings into + the existing argv vector. SPT_PADCHAR Character used to pad the process title; if undefined, the space character (0x20) is used. This is ignored if SPT_TYPE != SPT_REUSEARGV diff -u /gd/gnu/sendmail/8.8.5/src/conf.c src/conf.c --- /gd/gnu/sendmail/8.8.5/src/conf.c Tue Jan 21 10:47:33 1997 +++ src/conf.c Tue Feb 25 17:11:40 1997 @@ -2180,6 +2180,7 @@ #define SPT_PSSTRINGS 4 /* use PS_STRINGS->... */ #define SPT_SYSMIPS 5 /* use sysmips() supported by NEWS-OS 6 */ #define SPT_SCO 6 /* write kernel u. area */ +#define SPT_CHANGEARGV 7 /* write our own strings into argv[] */ #ifndef SPT_TYPE # define SPT_TYPE SPT_REUSEARGV @@ -2204,7 +2205,7 @@ # endif # endif -# if SPT_TYPE == SPT_PSSTRINGS +# if SPT_TYPE == SPT_PSSTRINGS || SPT_TYPE == SPT_CHANGEARGV # define SETPROC_STATIC static # else # define SETPROC_STATIC @@ -2355,6 +2356,10 @@ *p++ = SPT_PADCHAR; Argv[1] = NULL; # endif +# if SPT_TYPE == SPT_CHANGEARGV + Argv[0] = buf; + Argv[1] = 0; +# endif # endif /* SPT_TYPE != SPT_NONE */ } @@ -4385,7 +4390,7 @@ ** Loads $=w with the names of all the interfaces. */ -#ifdef SIOCGIFCONF +#if defined(SIOCGIFCONF) && !defined(SIOCGIFCONF_IS_BOGUS) struct rtentry; struct mbuf; # include @@ -4398,7 +4403,7 @@ void load_if_names() { -#ifdef SIOCGIFCONF +#if defined(SIOCGIFCONF) && !defined(SIOCGIFCONF_IS_BOGUS) int s; int i; struct ifconf ifc; diff -u /gd/gnu/sendmail/8.8.5/src/conf.h src/conf.h --- /gd/gnu/sendmail/8.8.5/src/conf.h Fri Jan 17 18:54:22 1997 +++ src/conf.h Tue Feb 25 17:14:01 1997 @@ -624,7 +624,7 @@ ** See also BSD defines. */ -#if defined(BSD4_4) && !defined(__bsdi__) +#if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) # include # define HASUNSETENV 1 /* has unsetenv(3) call */ # define USESETEUID 1 /* has useable seteuid(2) call */ @@ -737,7 +737,7 @@ ** For mt Xinu's Mach386 system. */ -#if defined(MACH) && defined(i386) +#if defined(MACH) && defined(i386) && !defined(__GNU__) # define MACH386 1 # define HASUNSETENV 1 /* has unsetenv(3) call */ # define HASINITGROUPS 1 /* has initgroups(3) call */ @@ -760,6 +760,40 @@ # endif #endif +/* GNU OS; largely BSD & posix compatible. */ +#ifdef __GNU__ +#define SIOCGIFCONF_IS_BOGUS 1 +#define IP_SRCROUTE 0 +#define HASFCHMOD 1 +#define HASFLOCK 1 +#define HASUNAME 1 +#define HASUNSETENV 1 +#define HASSETSID 1 +#define HASINITGROUPS 1 +#define HASSETVBUF 1 +#define HASSETREUID 1 +#define USESETEUID 1 +#define HASLSTAT 1 +#define HASSETRLIMIT 1 +#define HASWAITPID 1 +#define HASGETDTABLESIZE 1 +#define HASSTRERROR 1 +/* #define NEEDGETOPT 1 */ +#define HASGETUSERSHELL 1 +#define GIDSET_T gid_t +#define LA_TYPE LA_MACH +/* GNU uses mach[34], which renames some rpcs from mach2.x. */ +#define host_self mach_host_self +#define SFS_TYPE SFS_STATFS +#define SPT_TYPE SPT_CHANGEARGV +#define ERRLIST_PREDEFINED 1 +#define BSD4_4_SOCKADDR 1 +/* GNU has no MAXPATHLEN; ideally the code should be changed to not use it. */ +#define MAXPATHLEN 2048 +/* Define device num frobbing macros. */ +#define major(x) ((x)>>8) +#define minor(x) ((x)&0xFF) +#endif /* GNU */ /* ** 4.3 BSD -- this is for very old systems diff -u /gd/gnu/sendmail/8.8.5/src/err.c src/err.c --- /gd/gnu/sendmail/8.8.5/src/err.c Sun Dec 1 13:47:02 1996 +++ src/err.c Tue Feb 25 17:16:26 1997 @@ -627,7 +627,7 @@ char *dnsmsg; char *bp; static char buf[MAXLINE]; -# ifndef ERRLIST_PREDEFINED +# if !defined(HASSTRERROR) && !defined(ERRLIST_PREDEFINED) extern char *sys_errlist[]; extern int sys_nerr; # endif @@ -648,7 +648,11 @@ case ETIMEDOUT: case ECONNRESET: bp = buf; +#ifdef HASSTRERROR + snprintf(bp, SPACELEFT(buf, bp), "%s", strerror (errnum)); +#else snprintf(bp, SPACELEFT(buf, bp), "%s", sys_errlist[errnum]); +#endif bp += strlen(bp); if (CurHostName != NULL) { @@ -731,9 +735,13 @@ return buf; } +#ifdef HASSTRERROR + return strerror (errnum); +#else if (errnum > 0 && errnum < sys_nerr) return (sys_errlist[errnum]); (void) snprintf(buf, sizeof buf, "Error %d", errnum); return (buf); +#endif }