19147Seric /* 234920Sbostic * Copyright (c) 1983 Eric P. Allman 362522Sbostic * Copyright (c) 1988, 1993 462522Sbostic * The Regents of the University of California. All rights reserved. 533728Sbostic * 642825Sbostic * %sccs.include.redist.c% 733728Sbostic * 8*66754Seric * @(#)conf.h 8.100 (Berkeley) 04/12/94 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1322726Sdist */ 149147Seric 1557232Seric # include <sys/param.h> 1664705Seric # include <sys/types.h> 1759389Seric # include <sys/stat.h> 1864380Seric # include <sys/file.h> 1964500Seric # include <sys/wait.h> 2058689Seric # include <fcntl.h> 2164035Seric # include <signal.h> 2257232Seric 2363902Seric /********************************************************************** 249147Seric ** Table sizes, etc.... 259147Seric ** There shouldn't be much need to change these.... 2663902Seric **********************************************************************/ 279147Seric 2859303Seric # define MAXLINE 2048 /* max line length */ 2924945Seric # define MAXNAME 256 /* max length of a name */ 309147Seric # define MAXPV 40 /* max # of parms to mailers */ 3159303Seric # define MAXATOM 200 /* max atoms per address */ 329147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3357143Seric # define MAXRWSETS 100 /* max # of sets of rewriting rules */ 349147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3557143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 3652106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 3757232Seric # define MAXKEY 128 /* maximum size of a database key */ 3857232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 3959056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4059667Seric # define MAXALIASDB 12 /* max # of alias databases */ 4157143Seric 4257143Seric # ifndef QUEUESIZE 4357143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4457143Seric # endif 4557143Seric 4663902Seric /********************************************************************** 479147Seric ** Compilation options. 4825673Seric ** 4925673Seric ** #define these if they are available; comment them out otherwise. 5063902Seric **********************************************************************/ 519147Seric 5225673Seric # define LOG 1 /* enable logging */ 5325673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5464813Seric # define NETUNIX 1 /* include unix domain support */ 5558778Seric # define NETINET 1 /* include internet support */ 5625673Seric # define SETPROCTITLE 1 /* munge argv to display current status */ 5753735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 5863753Seric # define XDEBUG 1 /* enable extended debugging */ 5956337Seric # ifdef NEWDB 6056337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6156337Seric # endif 6256337Seric 6366334Seric /********************************************************************** 6466334Seric ** 0/1 Compilation options. 6566334Seric ** #define these to 1 if they are available; 6666334Seric ** #define them to 0 otherwise. 6766334Seric **********************************************************************/ 6866334Seric 6966334Seric # ifndef NAMED_BIND 7066334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7166334Seric # endif 7266334Seric 7364032Seric /* 7464944Seric ** Most systems have symbolic links today, so default them on. You 7564944Seric ** can turn them off by #undef'ing this below. 7664944Seric */ 7764944Seric 7864944Seric # define HASLSTAT 1 /* has lstat(2) call */ 7964944Seric 8064962Seric /* 8164962Seric ** General "standard C" defines. 8264962Seric ** 8364962Seric ** These may be undone later, to cope with systems that claim to 8464962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 8564962Seric ** doesn't realize that the library is part of the language. 8664962Seric ** 8764962Seric ** Life would be much easier if we could get rid of this sort 8864962Seric ** of bozo problems. 8964962Seric */ 9064962Seric 9164962Seric #ifdef __STDC__ 9264962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 9364962Seric #endif 9464962Seric 9563902Seric /********************************************************************** 9659023Seric ** Operating system configuration. 9759023Seric ** 9859023Seric ** Unless you are porting to a new OS, you shouldn't have to 9959023Seric ** change these. 10063902Seric **********************************************************************/ 10156823Seric 10263787Seric /* 10363787Seric ** Per-Operating System defines 10463787Seric */ 10563787Seric 10664314Seric 10763902Seric /* 10865565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 10963902Seric */ 11063902Seric 11159348Seric # ifdef __hpux 11264727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 11364727Seric # undef m_flags 11463787Seric # define SYSTEM5 1 /* include all the System V defines */ 11564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11664035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 11765982Seric # define setreuid(r, e) setresuid(r, e, -1) 11863962Seric # define LA_TYPE LA_FLOAT 11965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 12065354Seric # define GIDSET_T gid_t 12163962Seric # define _PATH_UNIX "/hp-ux" 12265354Seric # ifndef _PATH_SENDMAILCF 12365354Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 12465354Seric # endif 12565167Seric # ifndef IDENTPROTO 12665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 12756823Seric # endif 12865581Seric # ifndef HASGETUSERSHELL 12965581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13065581Seric # endif 13165504Seric # define syslog hard_syslog 13265581Seric # ifdef __STDC__ 13365581Seric extern int syslog(int, char *, ...); 13465167Seric # endif 13565581Seric # endif 13656823Seric 13764314Seric 13863902Seric /* 13963902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 14063902Seric */ 14163902Seric 14260224Seric # ifdef _AIX3 14364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14464840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 14565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 14660219Seric # define FORK fork /* no vfork primitive available */ 14764494Seric # undef SETPROCTITLE /* setproctitle confuses AIX */ 14865749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 14960219Seric # endif 15060219Seric 15164314Seric 15263902Seric /* 15363902Seric ** Silicon Graphics IRIX 15463902Seric ** 15563965Seric ** Compiles on 4.0.1. 15663902Seric */ 15763902Seric 15863753Seric # ifdef IRIX 15964727Seric # include <sys/sysmacros.h> 16064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 16164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 16265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 16363753Seric # define FORK fork /* no vfork primitive available */ 16464562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 16564155Seric # define setpgid BSDsetpgrp 16663937Seric # define GIDSET_T gid_t 16765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 16863753Seric # endif 16963753Seric 17063902Seric 17163902Seric /* 17264813Seric ** SunOS and Solaris 17364813Seric ** 17464813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 17564813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 17663902Seric */ 17763902Seric 17863787Seric #if defined(sun) && !defined(BSD) 17959074Seric 18064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18164813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18265211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 18365749Seric # define LA_TYPE LA_INT 18460564Seric 18564842Seric # ifdef SOLARIS_2_3 18664842Seric # define SOLARIS 18764842Seric # endif 18864842Seric 18960602Seric # ifdef SOLARIS 19063902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 19165222Seric # ifndef __svr4__ 19265222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 19365222Seric # endif 19463787Seric # include <sys/time.h> 19564832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 19664832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 19765172Seric # define GIDSET_T gid_t 19865189Seric # ifndef _PATH_UNIX 19965189Seric # define _PATH_UNIX "/kernel/unix" 20065189Seric # endif 20163962Seric # ifndef _PATH_SENDMAILCF 20263962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 20364072Seric # endif 20464072Seric # ifndef _PATH_SENDMAILPID 20563962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 20663962Seric # endif 20766022Seric # ifndef SYSLOG_BUFSIZE 20866022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 20966022Seric # endif 21063787Seric 21160602Seric # else 21265105Seric /* SunOS 4.0.3 or 4.1.x */ 21365189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21465830Seric # ifndef HASFLOCK 21565830Seric # define HASFLOCK 1 /* has flock(2) call */ 21665830Seric # endif 21765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 21860564Seric # include <vfork.h> 21963787Seric 22065105Seric # ifdef SUNOS403 22165105Seric /* special tweaking for SunOS 4.0.3 */ 22265105Seric # include <malloc.h> 22365105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 22465105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 22565105Seric # undef WIFEXITED 22665105Seric # undef WEXITSTATUS 22765105Seric # undef HASUNAME 22865105Seric # define setpgid setpgrp 22965105Seric typedef int pid_t; 23065105Seric extern char *getenv(); 23165105Seric 23266732Seric # else 23366732Seric /* 4.1.x specifics */ 23466732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 23566732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 23666732Seric 23765105Seric # endif 23860564Seric # endif 23959023Seric #endif 24059023Seric 24164718Seric /* 24264813Seric ** DG/UX 24364813Seric ** 24464813Seric ** Tested on 5.4.2 24564718Seric */ 24664314Seric 24764718Seric #ifdef DGUX 24864718Seric # define SYSTEM5 1 24964718Seric # define LA_TYPE LA_SUBR 25064718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 25164718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 25264718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 25364718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 25466036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 25565167Seric # ifndef IDENTPROTO 25665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 25765167Seric # endif 25864718Seric # undef SETPROCTITLE 25965749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 26064813Seric 26164813Seric /* these include files must be included early on DG/UX */ 26264813Seric # include <netinet/in.h> 26364813Seric # include <arpa/inet.h> 26464813Seric 26564718Seric # define inet_addr dgux_inet_addr 26664718Seric extern long dgux_inet_addr(); 26764718Seric #endif 26864718Seric 26964718Seric 27063902Seric /* 27163902Seric ** Digital Ultrix 4.2A or 4.3 27264264Seric ** 27364264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 27464264Seric ** not dropped when the process exits. This causes major problems, 27564264Seric ** so flock is the only alternative. 27663902Seric */ 27763902Seric 27860564Seric #ifdef ultrix 27964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 28063962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 28164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 28266242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 28365830Seric # ifndef HASFLOCK 28465830Seric # define HASFLOCK 1 /* has flock(2) call */ 28565830Seric # endif 28665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 28766318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 28865135Seric # ifdef vax 28965135Seric # define LA_TYPE LA_FLOAT 29065135Seric # else 29165135Seric # define LA_TYPE LA_INT 29265135Seric # define LA_AVENRUN "avenrun" 29365135Seric # endif 29465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 29565167Seric # ifndef IDENTPROTO 29665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 29765167Seric # endif 29860564Seric #endif 29960564Seric 30064314Seric 30163902Seric /* 30263902Seric ** OSF/1 (tested on Alpha) 30363902Seric */ 30463902Seric 30563787Seric #ifdef __osf__ 30663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 30764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 30864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 30966226Seric # ifndef HASFLOCK 31065830Seric # define HASFLOCK 1 /* has flock(2) call */ 31165830Seric # endif 31263962Seric # define LA_TYPE LA_INT 31365749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 31464813Seric # ifndef _PATH_SENDMAILPID 31565504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 31664813Seric # endif 31759287Seric #endif 31859287Seric 31964314Seric 32063902Seric /* 32163902Seric ** NeXTstep 32263902Seric */ 32363902Seric 32464076Seric #ifdef NeXT 32564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 32665830Seric # ifndef HASFLOCK 32765830Seric # define HASFLOCK 1 /* has flock(2) call */ 32865830Seric # endif 32964125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 33064563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 33163753Seric # define sleep sleepX 33264155Seric # define setpgid setpgrp 33364295Seric # ifndef LA_TYPE 33464295Seric # define LA_TYPE LA_MACH 33564295Seric # endif 33665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 33764500Seric # ifndef _POSIX_SOURCE 33864035Seric typedef int pid_t; 33964500Seric # undef WEXITSTATUS 34064500Seric # undef WIFEXITED 34164500Seric # endif 34264072Seric # ifndef _PATH_SENDMAILCF 34364072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 34464072Seric # endif 34564072Seric # ifndef _PATH_SENDMAILPID 34664072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 34764072Seric # endif 34859288Seric #endif 34959288Seric 35064314Seric 35163902Seric /* 35263962Seric ** 4.4 BSD 35364831Seric ** 35464831Seric ** See also BSD defines. 35563902Seric */ 35663902Seric 35760568Seric #ifdef BSD4_4 35864072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 35960568Seric # include <sys/cdefs.h> 36063838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 36164072Seric # ifndef LA_TYPE 36264072Seric # define LA_TYPE LA_SUBR 36364072Seric # endif 36465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 36560568Seric #endif 36660568Seric 36764314Seric 36863902Seric /* 36965982Seric ** BSD/386 (all versions) 37065982Seric ** From Tony Sanders, BSDI 37165982Seric */ 37265982Seric 37365982Seric #ifdef __bsdi__ 37465982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 37565982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 37666030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 37765982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 37865982Seric # define HASSETPROCTITLE 1 /* setproctitle is in libc */ 37966732Seric # undef SETPROCTITLE /* so don't redefine it in conf.c */ 38065982Seric # endif 38165982Seric # include <sys/cdefs.h> 38265982Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 38365982Seric # ifndef LA_TYPE 38465982Seric # define LA_TYPE LA_SUBR 38565982Seric # endif 38665982Seric #endif 38765982Seric 38865982Seric 38965982Seric 39065982Seric /* 39165049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 39264733Seric ** 39364733Seric ** 4.3BSD clone, closer to 4.4BSD 39464831Seric ** 39564831Seric ** See also BSD defines. 39664733Seric */ 39764733Seric 39865049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 39964733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 40064733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 401*66754Seric # ifdef __NetBSD__ 402*66754Seric # define HASUNAME 1 /* has uname(2) syscall */ 403*66754Seric # endif 40464733Seric # include <sys/cdefs.h> 40564733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 40664733Seric # ifndef LA_TYPE 40764733Seric # define LA_TYPE LA_SUBR 40864733Seric # endif 40965749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 41064733Seric #endif 41164733Seric 41264733Seric 41364733Seric /* 41464813Seric ** Mach386 41564813Seric ** 41664813Seric ** For mt Xinu's Mach386 system. 41764813Seric */ 41864813Seric 41964813Seric #if defined(MACH) && defined(i386) 42064813Seric # define MACH386 1 42164813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 42264813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 42366226Seric # ifndef HASFLOCK 42465830Seric # define HASFLOCK 1 /* has flock(2) call */ 42565830Seric # endif 42664813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 42764813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 42864813Seric # define setpgid setpgrp 42964813Seric # ifndef LA_TYPE 43064813Seric # define LA_TYPE LA_FLOAT 43164813Seric # endif 43265749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 43364962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 43464813Seric # undef WEXITSTATUS 43564813Seric # undef WIFEXITED 43664813Seric # ifndef _PATH_SENDMAILCF 43764813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 43864813Seric # endif 43964813Seric # ifndef _PATH_SENDMAILPID 44064813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 44164813Seric # endif 44264813Seric #endif 44364813Seric 44464813Seric 44564813Seric /* 44663969Seric ** 4.3 BSD -- this is for very old systems 44763969Seric ** 44865949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 44965949Seric ** 45063969Seric ** You'll also have to install a new resolver library. 45163969Seric ** I don't guarantee that support for this environment is complete. 45263969Seric */ 45363969Seric 45465949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 45563969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 45663969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 45763970Seric # define ARBPTR_T char * 45864155Seric # define setpgid setpgrp 45963969Seric # ifndef LA_TYPE 46063969Seric # define LA_TYPE LA_FLOAT 46163969Seric # endif 46263969Seric # ifndef _PATH_SENDMAILCF 46363969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 46463969Seric # endif 46565167Seric # ifndef IDENTPROTO 46665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 46765167Seric # endif 46864834Seric # undef WEXITSTATUS 46964834Seric # undef WIFEXITED 47064834Seric typedef short pid_t; 47164834Seric extern int errno; 47263969Seric #endif 47363969Seric 47464314Seric 47563969Seric /* 47663902Seric ** SCO Unix 47765087Seric ** 47865087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 47965087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 48065087Seric ** The second is, I believe, for an older version. 48163902Seric */ 48263902Seric 48365087Seric #ifdef _SCO_unix_4_2 48465087Seric # define _SCO_unix_ 48565087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 48665087Seric # define _PATH_UNIX "/unix" 48765087Seric # ifndef _PATH_SENDMAILCF 48865087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 48965087Seric # endif 49065087Seric # ifndef _PATH_SENDMAILPID 49165087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 49265087Seric # endif 49365087Seric #endif 49465087Seric 49563838Seric #ifdef _SCO_unix_ 49663838Seric # define SYSTEM5 1 /* include all the System V defines */ 49764035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 49865212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 49963838Seric # define FORK fork 50063838Seric # define MAXPATHLEN PATHSIZE 50164718Seric # define LA_TYPE LA_SHORT 50265749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 50364813Seric # undef NETUNIX /* no unix domain socket support */ 50463838Seric #endif 50563838Seric 50664314Seric 50763962Seric /* 50863962Seric ** ConvexOS 11.0 and later 50965949Seric ** 51065949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 51165949Seric ** works on 9.1 as well. 51263962Seric */ 51363962Seric 51463962Seric #ifdef _CONVEX_SOURCE 51563977Seric # define BSD 1 /* include all the BSD defines */ 51663977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 51763962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 51863977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 51963962Seric # define LA_TYPE LA_FLOAT 52065749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 52165949Seric # ifndef _PATH_SENDMAILCF 52265949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 52365949Seric # endif 52465949Seric # ifndef S_IREAD 52565949Seric # define S_IREAD _S_IREAD 52665949Seric # define S_IWRITE _S_IWRITE 52765949Seric # define S_IEXEC _S_IEXEC 52865949Seric # define S_IFMT _S_IFMT 52965949Seric # define S_IFCHR _S_IFCHR 53065949Seric # define S_IFBLK _S_IFBLK 53165949Seric # endif 53265167Seric # ifndef IDENTPROTO 53365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 53465167Seric # endif 53563962Seric #endif 53663962Seric 53764314Seric 53863962Seric /* 53964999Seric ** RISC/os 4.52 54063962Seric ** 54164999Seric ** Gives a ton of warning messages, but otherwise compiles. 54263962Seric */ 54363962Seric 54463965Seric #ifdef RISCOS 54564999Seric 54663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 54766226Seric # ifndef HASFLOCK 54865830Seric # define HASFLOCK 1 /* has flock(2) call */ 54965830Seric # endif 55064999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 55164999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 55263962Seric # define LA_TYPE LA_INT 55363962Seric # define LA_AVENRUN "avenrun" 55463962Seric # define _PATH_UNIX "/unix" 55564999Seric # undef WIFEXITED 55664999Seric 55764999Seric # define setpgid setpgrp 55864999Seric 55964999Seric extern int errno; 56064999Seric typedef int pid_t; 56164999Seric #define SIGFUNC_DEFINED 56264999Seric typedef int (*sigfunc_t)(); 56364999Seric extern char *getenv(); 56464999Seric extern void *malloc(); 56564999Seric 56663962Seric #endif 56763962Seric 56864314Seric 56964155Seric /* 57064155Seric ** Linux 0.99pl10 and above... 57166300Seric ** 57266300Seric ** Thanks to, in reverse order of contact: 57366300Seric ** 57466300Seric ** John Kennedy <warlock@csuchico.edu> 57566300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 57666300Seric ** Karl London <karl@borg.demon.co.uk> 57766300Seric ** 57866300Seric ** Last compiled against: [03/02/94 @ 05:34 PM (Wednesday)] 57966300Seric ** sendmail 8.6.6.b9 named 4.9.2-931205-p1 db-1.73 58066300Seric ** gcc 2.5.8 libc.so.4.5.19 58166300Seric ** slackware 1.1.2 linux 0.99.15 58264155Seric */ 58364155Seric 58464770Seric #ifdef __linux__ 58566298Seric # define BSD 1 /* include BSD defines */ 58664155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 58766298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 58864380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 58966298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 59066300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 59164155Seric # ifndef LA_TYPE 59266301Seric # define LA_TYPE LA_PROCSTR 59364155Seric # endif 59466300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 59564763Seric # include <sys/sysmacros.h> 59666300Seric # undef atol /* wounded in <stdlib.h> */ 59764155Seric #endif 59864155Seric 59964155Seric 60064345Seric /* 60164345Seric ** DELL SVR4 Issue 2.2, and others 60264345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 60364345Seric ** 60464345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 60564345Seric ** defined, and the definitions conflict. 60664924Seric ** 60764924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 60864924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 60964924Seric ** (SVR4.0/386 version 3.0). 61064345Seric */ 61164345Seric 61264345Seric #ifdef DELL_SVR4 61365189Seric /* no changes necessary */ 61465189Seric /* see general __svr4__ defines below */ 61564345Seric #endif 61664345Seric 61764345Seric 61864380Seric /* 61964380Seric ** Apple A/UX 3.0 62064380Seric */ 62164345Seric 62264380Seric #ifdef _AUX_SOURCE 62364729Seric # include <sys/sysmacros.h> 62464380Seric # define BSD /* has BSD routines */ 62564380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 62664380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 62764561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 62865167Seric # ifndef IDENTPROTO 62965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 63065167Seric # endif 63164380Seric # define FORK fork 63264380Seric # ifndef _PATH_SENDMAILCF 63364380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 63464380Seric # endif 63564380Seric # ifndef LA_TYPE 63664380Seric # define LA_TYPE LA_ZERO 63764380Seric # endif 63865749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 63964560Seric # undef WIFEXITED 64064560Seric # undef WEXITSTATUS 64164380Seric #endif 64264380Seric 64364380Seric 64464705Seric /* 64564705Seric ** Encore UMAX V 64664705Seric ** 64764705Seric ** Not extensively tested. 64864705Seric */ 64964380Seric 65064705Seric #ifdef UMAXV 65164705Seric # include <limits.h> 65264705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 65364705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 65464705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 65565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 65664705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 65764705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 65864705Seric # define FORK fork /* no vfork(2) primitive available */ 65965749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 66064705Seric # define MAXPATHLEN PATH_MAX 66164705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 66264705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 66364705Seric # undef WIFEXITED 66464705Seric # undef WEXITSTATUS 66564705Seric #endif 66664705Seric 66764705Seric 66864939Seric /* 66964939Seric ** Stardent Titan 3000 running TitanOS 4.2. 67064939Seric ** 67164939Seric ** Must be compiled in "cc -43" mode. 67264939Seric ** 67364944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 67464939Seric ** 67564939Seric ** Note the tweaking below after the BSD defines are set. 67664939Seric */ 67764705Seric 67864939Seric #ifdef titan 67964939Seric # define setpgid setpgrp 68064939Seric typedef int pid_t; 68164939Seric # undef WIFEXITED 68264939Seric # undef WEXITSTATUS 68364939Seric #endif 68464939Seric 68564939Seric 68664962Seric /* 68764962Seric ** Sequent DYNIX 3.2.0 68864962Seric ** 68964962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 69064962Seric */ 69164939Seric 69264962Seric #ifdef sequent 69366038Seric 69464962Seric # define BSD 1 69564962Seric # define HASUNSETENV 1 69664962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 69764962Seric # define WAITUNION 1 69864962Seric # define LA_TYPE LA_FLOAT 69964962Seric # ifdef _POSIX_VERSION 70064962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 70164962Seric # endif 70264962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 70364962Seric # define setpgid setpgrp 70464962Seric 70564962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 70664962Seric # undef WIFEXITED 70764962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 70864962Seric ((union wait*)&(s))->w_termsig == 0) 70964962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 71064962Seric typedef int pid_t; 71164962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 71264962Seric 71366144Seric # ifndef IDENTPROTO 71466144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 71566144Seric # endif 71666144Seric 71764962Seric # ifndef _PATH_UNIX 71864962Seric # define _PATH_UNIX "/dynix" 71964962Seric # endif 72064962Seric # ifndef _PATH_SENDMAILCF 72164962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 72264962Seric # endif 72364962Seric 72464962Seric #endif 72564962Seric 72664962Seric 72765748Seric /* 72866038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 72966038Seric ** 73066038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 73166038Seric ** 73266038Seric ** From Tim Wright <timw@sequent.com>. 73366038Seric */ 73466038Seric 73566038Seric #ifdef _SEQUENT_ 73666038Seric # define SYSTEM5 1 /* include all the System V defines */ 73766038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 73866038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 73966038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 74066038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 74166038Seric # define GIDSET_T gid_t 74266038Seric # define LA_TYPE LA_INT 74366038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 74466038Seric # undef SETPROCTITLE 74566144Seric # ifndef IDENTPROTO 74666144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 74766144Seric # endif 74866038Seric # ifndef _PATH_SENDMAILCF 74966038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 75066038Seric # endif 75166038Seric # ifndef _PATH_SENDMAILPID 75266038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 75366038Seric # endif 75466038Seric #endif 75566038Seric 75666038Seric 75766038Seric /* 75865748Seric ** Cray Unicos 75965748Seric ** 76065748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 76165748Seric */ 76264962Seric 76365748Seric #ifdef UNICOS 76465748Seric # define SYSTEM5 1 /* include all the System V defines */ 76565748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 76665748Seric # define MAXPATHLEN PATHSIZE 76765748Seric # define LA_TYPE LA_ZERO 76865749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 76965748Seric #endif 77064962Seric 77165748Seric 77265820Seric /* 77365820Seric ** Apollo DomainOS 77465820Seric ** 77565820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 77665982Seric ** 77765820Seric ** 15 Jan 1994 77865820Seric ** 77965820Seric */ 78065748Seric 78165820Seric #ifdef apollo 78265820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 78365820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 78465820Seric # undef SETPROCTITLE 78565820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 78666044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 78765820Seric # ifndef _PATH_SENDMAILCF 78865820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 78965820Seric # endif 79065820Seric # ifndef _PATH_SENDMAILPID 79165820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 79265820Seric # endif 79365820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 79465820Seric # undef S_IFIFO 79565820Seric # define S_IFIFO 0010000 79665820Seric # ifndef IDENTPROTO 79765820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 79865820Seric # endif 79965982Seric #endif 80065820Seric 80165820Seric 80266748Seric /* 80366752Seric ** UnixWare 80466752Seric ** 80566752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 80666752Seric */ 80766752Seric 80866752Seric #ifdef UNIXWARE 80966752Seric # define SYSTEM5 1 81066752Seric # ifndef HASGETUSERSHELL 81166752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 81266752Seric # endif 81366752Seric # define GIDSET_T int 81466752Seric # define SLEEP_T int 81566752Seric # define SFS_TYPE SFS_STATVFS 81666752Seric # define LA_TYPE LA_ZERO 81766752Seric # undef WIFEXITED 81866752Seric # undef WEXITSTATUS 81966752Seric # define _PATH_UNIX "/unix" 82066752Seric # ifndef _PATH_SENDMAILCF 82166752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 82266752Seric # endif 82366752Seric # ifndef _PATH_SENDMAILPID 82466752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 82566752Seric # endif 82666752Seric # define SYSLOG_BUFSIZE 128 82766752Seric #endif 82866752Seric 82966752Seric 83066752Seric /* 83166748Seric ** Intergraph CLIX 3.1 83266748Seric ** 83366748Seric ** From Paul Southworth <pauls@locust.cic.net> 83466748Seric */ 83565820Seric 83666748Seric #ifdef CLIX 83766748Seric # define SYSTEM5 1 /* looks like System V */ 83866752Seric # ifndef HASGETUSERSHELL 83966752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 84066752Seric # endif 84166748Seric # define DEV_BSIZE 512 /* device block size not defined */ 84266748Seric # define GIDSET_T gid_t 84366748Seric # undef LOG /* syslog not available */ 84466748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 84566748Seric # define GETSHORT _getshort 84666748Seric #endif 84765820Seric 84866748Seric 84966748Seric 85066748Seric 85163902Seric /********************************************************************** 85263787Seric ** End of Per-Operating System defines 85363902Seric **********************************************************************/ 85463787Seric 85563949Seric /********************************************************************** 85663949Seric ** More general defines 85763949Seric **********************************************************************/ 85863949Seric 85963962Seric /* general BSD defines */ 86063962Seric #ifdef BSD 86164035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 86264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 86364035Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 86465830Seric # ifndef HASFLOCK 86565830Seric # define HASFLOCK 1 /* has flock(2) call */ 86665830Seric # endif 86763962Seric #endif 86863962Seric 86965189Seric /* general System V Release 4 defines */ 87065189Seric #ifdef __svr4__ 87165189Seric # define SYSTEM5 1 87265189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 87365211Seric # ifndef HASGETUSERSHELL 87465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 87565210Seric # endif 87665189Seric # define setreuid(r, e) seteuid(e) 87765189Seric 87865189Seric # ifndef _PATH_UNIX 87965189Seric # define _PATH_UNIX "/unix" 88065189Seric # endif 88165189Seric # ifndef _PATH_SENDMAILCF 88265189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 88365189Seric # endif 88465189Seric # ifndef _PATH_SENDMAILPID 88565189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 88665189Seric # endif 88765189Seric # ifndef SYSLOG_BUFSIZE 88865189Seric # define SYSLOG_BUFSIZE 128 88965189Seric # endif 89065189Seric #endif 89165189Seric 89263787Seric /* general System V defines */ 89366298Seric #ifdef SYSTEM5 89464813Seric # include <sys/sysmacros.h> 89563949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 89664705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 89764962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 89863962Seric # ifndef LA_TYPE 89965749Seric # define LA_TYPE LA_INT /* assume integer load average */ 90063962Seric # endif 90165749Seric # ifndef SFS_TYPE 90265749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 90365749Seric # endif 90463949Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 90563949Seric # define bzero(d, l) (memset((d), '\0', (l))) 90663949Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 90766298Seric #endif 90863787Seric 90963949Seric /* general POSIX defines */ 91063949Seric #ifdef _POSIX_VERSION 91164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 91264718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 91363949Seric #endif 91463949Seric 91563787Seric /* 91663937Seric ** If no type for argument two of getgroups call is defined, assume 91763937Seric ** it's an integer -- unfortunately, there seem to be several choices 91863937Seric ** here. 91963937Seric */ 92063937Seric 92163937Seric #ifndef GIDSET_T 92263937Seric # define GIDSET_T int 92363937Seric #endif 92463937Seric 92564939Seric /* 92664939Seric ** Tweaking for systems that (for example) claim to be BSD but 92764939Seric ** don't have all the standard BSD routines (boo hiss). 92864939Seric */ 92964439Seric 93064939Seric #ifdef titan 93164939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 93264939Seric #endif 93364939Seric 93465830Seric 93565167Seric /* 93665167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 93765167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 93865167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 93965167Seric ** are closed. Some firewalls return this error if you try to connect 94065167Seric ** to the IDENT port (113), so you can't receive email from these hosts 94165167Seric ** on these systems. The firewall really should use a more specific 94265167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 94365167Seric ** not explicitly set to zero above, default it on. 94465167Seric */ 94564939Seric 94665167Seric #ifndef IDENTPROTO 94765167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 94865167Seric #endif 94965167Seric 95065211Seric #ifndef HASGETUSERSHELL 95165211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 95265210Seric #endif 95365167Seric 95465830Seric #ifndef HASFLOCK 95565830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 95665830Seric #endif 95765210Seric 95865830Seric 95964439Seric /********************************************************************** 96059023Seric ** Remaining definitions should never have to be changed. They are 96159023Seric ** primarily to provide back compatibility for older systems -- for 96259287Seric ** example, it includes some POSIX compatibility definitions 96364439Seric **********************************************************************/ 96459023Seric 96559388Seric /* System 5 compatibility */ 96659388Seric #ifndef S_ISREG 96764944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 96859388Seric #endif 96964944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 97064944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 97164944Seric #endif 97259388Seric #ifndef S_IWGRP 97359388Seric #define S_IWGRP 020 97459388Seric #endif 97559388Seric #ifndef S_IWOTH 97659388Seric #define S_IWOTH 002 97759388Seric #endif 97859388Seric 97959023Seric /* 98050537Seric ** Older systems don't have this error code -- it should be in 98150537Seric ** /usr/include/sysexits.h. 98250537Seric */ 98350537Seric 98450537Seric # ifndef EX_CONFIG 98550537Seric # define EX_CONFIG 78 /* configuration error */ 98650537Seric # endif 98756852Seric 98864718Seric /* pseudo-code used in server SMTP */ 98964718Seric # define EX_QUIT 22 /* drop out of server immediately */ 99064718Seric 99164718Seric 99263993Seric /* 99363993Seric ** These are used in a few cases where we need some special 99463993Seric ** error codes, but where the system doesn't provide something 99563993Seric ** reasonable. They are printed in errstring. 99663993Seric */ 99763993Seric 99863993Seric #ifndef E_PSEUDOBASE 99963993Seric # define E_PSEUDOBASE 256 100063993Seric #endif 100163993Seric 100263993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 100363993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 100463993Seric 100563970Seric /* type of arbitrary pointer */ 100663970Seric #ifndef ARBPTR_T 100763970Seric # define ARBPTR_T void * 100863970Seric #endif 100963970Seric 101060568Seric #ifndef __P 101160568Seric # include "cdefs.h" 101260568Seric #endif 101360568Seric 101456852Seric /* 101558778Seric ** Do some required dependencies 101658778Seric */ 101758778Seric 101858778Seric #if defined(NETINET) || defined(NETISO) 101959107Seric # define SMTP 1 /* enable user and server SMTP */ 102059107Seric # define QUEUE 1 /* enable queueing */ 102159107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 102258778Seric #endif 102358778Seric 102458778Seric 102558778Seric /* 102656852Seric ** Arrange to use either varargs or stdargs 102756852Seric */ 102856852Seric 102956852Seric # ifdef __STDC__ 103056852Seric 103156852Seric # include <stdarg.h> 103256852Seric 103356852Seric # define VA_LOCAL_DECL va_list ap; 103456852Seric # define VA_START(f) va_start(ap, f) 103556852Seric # define VA_END va_end(ap) 103656852Seric 103756852Seric # else 103856852Seric 103956852Seric # include <varargs.h> 104056852Seric 104156852Seric # define VA_LOCAL_DECL va_list ap; 104256852Seric # define VA_START(f) va_start(ap) 104356852Seric # define VA_END va_end(ap) 104456852Seric 104556852Seric # endif 104657631Seric 104757943Seric #ifdef HASUNAME 104857631Seric # include <sys/utsname.h> 104957631Seric # ifdef newstr 105057631Seric # undef newstr 105157631Seric # endif 105257943Seric #else /* ! HASUNAME */ 105357631Seric # define NODE_LENGTH 32 105457631Seric struct utsname 105557631Seric { 105657631Seric char nodename[NODE_LENGTH+1]; 105757631Seric }; 105857943Seric #endif /* HASUNAME */ 105957642Seric 106063838Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) 106163838Seric # define MAXHOSTNAMELEN 256 106257735Seric #endif 106358153Seric 106458153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 106558153Seric # define SIGCHLD SIGCLD 106658153Seric #endif 106758153Seric 106858153Seric #ifndef STDIN_FILENO 106958153Seric #define STDIN_FILENO 0 107058153Seric #endif 107158153Seric 107258153Seric #ifndef STDOUT_FILENO 107358153Seric #define STDOUT_FILENO 1 107458153Seric #endif 107558153Seric 107658153Seric #ifndef STDERR_FILENO 107758153Seric #define STDERR_FILENO 2 107858153Seric #endif 107958689Seric 108064072Seric #ifndef LOCK_SH 108164035Seric # define LOCK_SH 0x01 /* shared lock */ 108264035Seric # define LOCK_EX 0x02 /* exclusive lock */ 108364035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 108464035Seric # define LOCK_UN 0x08 /* unlock */ 108564035Seric #endif 108658692Seric 108764035Seric #ifndef SIG_ERR 108864035Seric # define SIG_ERR ((void (*)()) -1) 108958689Seric #endif 109058702Seric 109164500Seric #ifndef WEXITSTATUS 109264500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 109364500Seric #endif 109464500Seric #ifndef WIFEXITED 109564500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 109664500Seric #endif 109764500Seric 109864561Seric #ifndef SIGFUNC_DEFINED 109964561Seric typedef void (*sigfunc_t) __P((int)); 110064561Seric #endif 110164561Seric 110265053Seric /* size of syslog buffer */ 110365053Seric #ifndef SYSLOG_BUFSIZE 110465053Seric # define SYSLOG_BUFSIZE 1024 110565053Seric #endif 110665053Seric 110758702Seric /* 110858702Seric ** Size of tobuf (deliver.c) 110958702Seric ** Tweak this to match your syslog implementation. It will have to 111058702Seric ** allow for the extra information printed. 111158702Seric */ 111258702Seric 111358702Seric #ifndef TOBUFSIZE 111465053Seric # if (SYSLOG_BUFSIZE) > 512 111565053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 111665053Seric # else 111765053Seric # define TOBUFSIZE 256 111865053Seric # endif 111958702Seric #endif 112060219Seric 112165015Seric /* 112265015Seric ** Size of prescan buffer. 112365015Seric ** Despite comments in the _sendmail_ book, this probably should 112465015Seric ** not be changed; there are some hard-to-define dependencies. 112565015Seric */ 112665015Seric 112765015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 112860219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 112960219Seric # ifndef FORK 113060219Seric # define FORK vfork /* function to call to fork mailer */ 113160219Seric # endif 113265955Seric 113365955Seric /* 113465955Seric ** If we are going to link scanf anyway, use it in readcf 113565955Seric */ 113665955Seric 113765955Seric #if !defined(HASUNAME) && !defined(SCANF) 113865955Seric # define SCANF 1 113965955Seric #endif 1140