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*68236Seric * @(#)conf.h 8.131 (Berkeley) 02/06/95 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 */ 4167729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 4267729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 4357143Seric 4457143Seric # ifndef QUEUESIZE 4557143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 4657143Seric # endif 4757143Seric 4863902Seric /********************************************************************** 499147Seric ** Compilation options. 5025673Seric ** 5125673Seric ** #define these if they are available; comment them out otherwise. 5263902Seric **********************************************************************/ 539147Seric 5425673Seric # define LOG 1 /* enable logging */ 5525673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 5664813Seric # define NETUNIX 1 /* include unix domain support */ 5758778Seric # define NETINET 1 /* include internet support */ 5853735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 5963753Seric # define XDEBUG 1 /* enable extended debugging */ 6056337Seric # ifdef NEWDB 6156337Seric # define USERDB 1 /* look in user database (requires NEWDB) */ 6256337Seric # endif 6356337Seric 6466334Seric /********************************************************************** 6566334Seric ** 0/1 Compilation options. 6666334Seric ** #define these to 1 if they are available; 6766334Seric ** #define them to 0 otherwise. 6866334Seric **********************************************************************/ 6966334Seric 7066334Seric # ifndef NAMED_BIND 7166334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7266334Seric # endif 7366334Seric 7464032Seric /* 7564944Seric ** Most systems have symbolic links today, so default them on. You 7664944Seric ** can turn them off by #undef'ing this below. 7764944Seric */ 7864944Seric 7964944Seric # define HASLSTAT 1 /* has lstat(2) call */ 8064944Seric 8164962Seric /* 8264962Seric ** General "standard C" defines. 8364962Seric ** 8464962Seric ** These may be undone later, to cope with systems that claim to 8564962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 8664962Seric ** doesn't realize that the library is part of the language. 8764962Seric ** 8864962Seric ** Life would be much easier if we could get rid of this sort 8964962Seric ** of bozo problems. 9064962Seric */ 9164962Seric 9264962Seric #ifdef __STDC__ 9364962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 9464962Seric #endif 9564962Seric 9663902Seric /********************************************************************** 9759023Seric ** Operating system configuration. 9859023Seric ** 9959023Seric ** Unless you are porting to a new OS, you shouldn't have to 10059023Seric ** change these. 10163902Seric **********************************************************************/ 10256823Seric 10363787Seric /* 10463787Seric ** Per-Operating System defines 10563787Seric */ 10663787Seric 10764314Seric 10863902Seric /* 10965565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 11063902Seric */ 11163902Seric 11267626Seric #ifdef __hpux 11364727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */ 11464727Seric # undef m_flags 11563787Seric # define SYSTEM5 1 /* include all the System V defines */ 11664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 11764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 11865982Seric # define setreuid(r, e) setresuid(r, e, -1) 11963962Seric # define LA_TYPE LA_FLOAT 12065749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 12165354Seric # define GIDSET_T gid_t 12263962Seric # define _PATH_UNIX "/hp-ux" 12365354Seric # ifndef _PATH_SENDMAILCF 12465354Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 12565354Seric # endif 12665167Seric # ifndef IDENTPROTO 12765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 12856823Seric # endif 12965581Seric # ifndef HASGETUSERSHELL 13065581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13165581Seric # endif 13265504Seric # define syslog hard_syslog 13365581Seric # ifdef __STDC__ 13465581Seric extern int syslog(int, char *, ...); 13565167Seric # endif 13667626Seric #endif 13756823Seric 13864314Seric 13963902Seric /* 14063902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 14163902Seric */ 14263902Seric 14367626Seric #ifdef _AIX3 14464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14564840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 14665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 14760219Seric # define FORK fork /* no vfork primitive available */ 14865749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 14967771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 15068145Seric # define LA_TYPE LA_INT 15167626Seric #endif 15260219Seric 15364314Seric 15463902Seric /* 15563902Seric ** Silicon Graphics IRIX 15663902Seric ** 15763965Seric ** Compiles on 4.0.1. 15867967Seric ** 15967967Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX. 16067967Seric ** 16167967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 16263902Seric */ 16363902Seric 16467967Seric #ifdef IRIX64 16567967Seric # define IRIX 16667967Seric #endif 16767967Seric 16867626Seric #ifdef IRIX 16966763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 17064035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 17164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 17265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 17363753Seric # define FORK fork /* no vfork primitive available */ 174*68236Seric # ifndef IRIX64 /* IRIX 6.0 */ 17568225Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 17668225Seric # endif 17764155Seric # define setpgid BSDsetpgrp 17863937Seric # define GIDSET_T gid_t 17965749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 18066763Seric # define LA_TYPE LA_INT 18167967Seric # ifdef IRIX64 18267967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 18367967Seric # else 18467967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 18567967Seric # endif 18667626Seric #endif 18763753Seric 18863902Seric 18963902Seric /* 19064813Seric ** SunOS and Solaris 19164813Seric ** 19264813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 19364813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 19463902Seric */ 19563902Seric 19663787Seric #if defined(sun) && !defined(BSD) 19759074Seric 19864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 19964813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 20065211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 20165749Seric # define LA_TYPE LA_INT 20260564Seric 20364842Seric # ifdef SOLARIS_2_3 20464842Seric # define SOLARIS 20564842Seric # endif 20664842Seric 20760602Seric # ifdef SOLARIS 20863902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 20965222Seric # ifndef __svr4__ 21065222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 21165222Seric # endif 21263787Seric # include <sys/time.h> 21364832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 21464832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 21565172Seric # define GIDSET_T gid_t 21665189Seric # ifndef _PATH_UNIX 21767129Seric # define _PATH_UNIX "/dev/ksyms" 21865189Seric # endif 21963962Seric # ifndef _PATH_SENDMAILCF 22063962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 22164072Seric # endif 22264072Seric # ifndef _PATH_SENDMAILPID 22363962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 22463962Seric # endif 22566022Seric # ifndef SYSLOG_BUFSIZE 22666022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 22766022Seric # endif 22863787Seric 22960602Seric # else 23065105Seric /* SunOS 4.0.3 or 4.1.x */ 23165189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 23265830Seric # ifndef HASFLOCK 23365830Seric # define HASFLOCK 1 /* has flock(2) call */ 23465830Seric # endif 23565749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 23660564Seric # include <vfork.h> 23763787Seric 23865105Seric # ifdef SUNOS403 23965105Seric /* special tweaking for SunOS 4.0.3 */ 24065105Seric # include <malloc.h> 24165105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 24265105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 24365105Seric # undef WIFEXITED 24465105Seric # undef WEXITSTATUS 24565105Seric # undef HASUNAME 24665105Seric # define setpgid setpgrp 24765105Seric typedef int pid_t; 24865105Seric extern char *getenv(); 24965105Seric 25066732Seric # else 25166732Seric /* 4.1.x specifics */ 25266732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 25366732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 25466732Seric 25565105Seric # endif 25660564Seric # endif 25759023Seric #endif 25859023Seric 25964718Seric /* 26064813Seric ** DG/UX 26164813Seric ** 26267427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 26367427Seric ** older support. 26467427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 26564718Seric */ 26664314Seric 26767427Seric #ifdef DGUX_5_4_2 26867427Seric # define DGUX 1 26967427Seric #endif 27067427Seric 27164718Seric #ifdef DGUX 27264718Seric # define SYSTEM5 1 27364718Seric # define LA_TYPE LA_SUBR 27464718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 27564718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 27664718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 27764718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 27866036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 27965167Seric # ifndef IDENTPROTO 28065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 28165167Seric # endif 28267771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 28365749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 28464813Seric 28564813Seric /* these include files must be included early on DG/UX */ 28664813Seric # include <netinet/in.h> 28764813Seric # include <arpa/inet.h> 28864813Seric 28967427Seric # ifdef DGUX_5_4_2 29067427Seric # define inet_addr dgux_inet_addr 29164718Seric extern long dgux_inet_addr(); 29267427Seric # endif 29364718Seric #endif 29464718Seric 29564718Seric 29663902Seric /* 29763902Seric ** Digital Ultrix 4.2A or 4.3 29864264Seric ** 29964264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 30064264Seric ** not dropped when the process exits. This causes major problems, 30164264Seric ** so flock is the only alternative. 30263902Seric */ 30363902Seric 30460564Seric #ifdef ultrix 30564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 30663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 30764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 30866242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 30965830Seric # ifndef HASFLOCK 31065830Seric # define HASFLOCK 1 /* has flock(2) call */ 31165830Seric # endif 31265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 31366318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 31465135Seric # ifdef vax 31565135Seric # define LA_TYPE LA_FLOAT 31665135Seric # else 31765135Seric # define LA_TYPE LA_INT 31865135Seric # define LA_AVENRUN "avenrun" 31965135Seric # endif 32065749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 32165167Seric # ifndef IDENTPROTO 32265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 32365167Seric # endif 32460564Seric #endif 32560564Seric 32664314Seric 32763902Seric /* 32868072Seric ** OSF/1 for Intel Paragon. 32968072Seric ** 33068082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 33168082Seric ** of Intel Scalable Systems Divison. 33268072Seric */ 33368072Seric 33468072Seric #ifdef __PARAGON__ 33568072Seric # define __osf__ 1 /* get OSF/1 defines below */ 33668072Seric # ifndef _PATH_SENDMAILCF 33768072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 33868072Seric # endif 33968072Seric #endif 34068072Seric 34168072Seric 34268072Seric /* 34363902Seric ** OSF/1 (tested on Alpha) 34463902Seric */ 34563902Seric 34663787Seric #ifdef __osf__ 34763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 34864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 34964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 35066226Seric # ifndef HASFLOCK 35165830Seric # define HASFLOCK 1 /* has flock(2) call */ 35265830Seric # endif 35363962Seric # define LA_TYPE LA_INT 35465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 35564813Seric # ifndef _PATH_SENDMAILPID 35665504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 35764813Seric # endif 35859287Seric #endif 35959287Seric 36064314Seric 36163902Seric /* 36263902Seric ** NeXTstep 36363902Seric */ 36463902Seric 36564076Seric #ifdef NeXT 36664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 36765830Seric # ifndef HASFLOCK 36865830Seric # define HASFLOCK 1 /* has flock(2) call */ 36965830Seric # endif 37064125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 37164563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 37263753Seric # define sleep sleepX 37364155Seric # define setpgid setpgrp 37464295Seric # ifndef LA_TYPE 37564295Seric # define LA_TYPE LA_MACH 37664295Seric # endif 37765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 37864500Seric # ifndef _POSIX_SOURCE 37964035Seric typedef int pid_t; 38064500Seric # undef WEXITSTATUS 38164500Seric # undef WIFEXITED 38264500Seric # endif 38364072Seric # ifndef _PATH_SENDMAILCF 38464072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 38564072Seric # endif 38664072Seric # ifndef _PATH_SENDMAILPID 38764072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 38864072Seric # endif 38959288Seric #endif 39059288Seric 39164314Seric 39263902Seric /* 39363962Seric ** 4.4 BSD 39464831Seric ** 39564831Seric ** See also BSD defines. 39663902Seric */ 39763902Seric 39860568Seric #ifdef BSD4_4 39964072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 40060568Seric # include <sys/cdefs.h> 40163838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 40264072Seric # ifndef LA_TYPE 40364072Seric # define LA_TYPE LA_SUBR 40464072Seric # endif 40565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 40667771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 40760568Seric #endif 40860568Seric 40964314Seric 41063902Seric /* 41165982Seric ** BSD/386 (all versions) 41265982Seric ** From Tony Sanders, BSDI 41365982Seric */ 41465982Seric 41565982Seric #ifdef __bsdi__ 41665982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 41765982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 41866843Seric # include <sys/cdefs.h> 41966843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 42066030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 42166843Seric # ifndef LA_TYPE 42266843Seric # define LA_TYPE LA_SUBR 42366843Seric # endif 42465982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 42566843Seric /* version 1.1 or later */ 42667771Seric # undef SPT_TYPE 42767771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 42866843Seric # else 42966843Seric /* version 1.0 or earlier */ 43066843Seric # ifndef OLD_NEWDB 43166843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 43266843Seric # endif 43367771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 43465982Seric # endif 43565982Seric #endif 43665982Seric 43765982Seric 43865982Seric 43965982Seric /* 44065049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 44164733Seric ** 44264733Seric ** 4.3BSD clone, closer to 4.4BSD 44364831Seric ** 44464831Seric ** See also BSD defines. 44564733Seric */ 44664733Seric 44765049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 44864733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 44964733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 45066754Seric # ifdef __NetBSD__ 45166754Seric # define HASUNAME 1 /* has uname(2) syscall */ 45266754Seric # endif 45364733Seric # include <sys/cdefs.h> 45464733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 45564733Seric # ifndef LA_TYPE 45664733Seric # define LA_TYPE LA_SUBR 45764733Seric # endif 45865749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 45964733Seric #endif 46064733Seric 46164733Seric 46264733Seric /* 46364813Seric ** Mach386 46464813Seric ** 46564813Seric ** For mt Xinu's Mach386 system. 46664813Seric */ 46764813Seric 46864813Seric #if defined(MACH) && defined(i386) 46964813Seric # define MACH386 1 47064813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 47164813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 47266226Seric # ifndef HASFLOCK 47365830Seric # define HASFLOCK 1 /* has flock(2) call */ 47465830Seric # endif 47564813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 47664813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 47764813Seric # define setpgid setpgrp 47864813Seric # ifndef LA_TYPE 47964813Seric # define LA_TYPE LA_FLOAT 48064813Seric # endif 48165749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 48264962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 48364813Seric # undef WEXITSTATUS 48464813Seric # undef WIFEXITED 48564813Seric # ifndef _PATH_SENDMAILCF 48664813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 48764813Seric # endif 48864813Seric # ifndef _PATH_SENDMAILPID 48964813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 49064813Seric # endif 49164813Seric #endif 49264813Seric 49364813Seric 49464813Seric /* 49563969Seric ** 4.3 BSD -- this is for very old systems 49663969Seric ** 49765949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 49865949Seric ** 49963969Seric ** You'll also have to install a new resolver library. 50063969Seric ** I don't guarantee that support for this environment is complete. 50163969Seric */ 50263969Seric 50365949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 50463969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 50563969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 50663970Seric # define ARBPTR_T char * 50764155Seric # define setpgid setpgrp 50863969Seric # ifndef LA_TYPE 50963969Seric # define LA_TYPE LA_FLOAT 51063969Seric # endif 51163969Seric # ifndef _PATH_SENDMAILCF 51263969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 51363969Seric # endif 51465167Seric # ifndef IDENTPROTO 51565167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 51665167Seric # endif 51764834Seric # undef WEXITSTATUS 51864834Seric # undef WIFEXITED 51964834Seric typedef short pid_t; 52064834Seric extern int errno; 52163969Seric #endif 52263969Seric 52364314Seric 52463969Seric /* 52563902Seric ** SCO Unix 52665087Seric ** 52765087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 52865087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 52965087Seric ** The second is, I believe, for an older version. 53063902Seric */ 53163902Seric 53265087Seric #ifdef _SCO_unix_4_2 53365087Seric # define _SCO_unix_ 53465087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 53566757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 53665087Seric # define _PATH_UNIX "/unix" 53765087Seric # ifndef _PATH_SENDMAILCF 53865087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 53965087Seric # endif 54065087Seric # ifndef _PATH_SENDMAILPID 54165087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 54265087Seric # endif 54365087Seric #endif 54465087Seric 54563838Seric #ifdef _SCO_unix_ 54663838Seric # define SYSTEM5 1 /* include all the System V defines */ 54764035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 54865212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 54963838Seric # define FORK fork 55063838Seric # define MAXPATHLEN PATHSIZE 55164718Seric # define LA_TYPE LA_SHORT 55267812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 55367608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 55464813Seric # undef NETUNIX /* no unix domain socket support */ 55563838Seric #endif 55663838Seric 55764314Seric 55863962Seric /* 55968040Seric ** Altos System V. 56068040Seric ** Contributed by Tim Rice <timr@crl.com>. 56168040Seric */ 56268040Seric 56368040Seric #ifdef ALTOS_SYS_V 56468040Seric # include <limits.h> 56568040Seric # define SYSTEM5 1 /* include all the System V defines */ 56668040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 56768040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 56868040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 56968040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 57068040Seric # define FORK fork 57168040Seric # define MAXPATHLEN PATHSIZE 57268040Seric # define LA_TYPE LA_SHORT 57368040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 57468040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 57568040Seric # undef NETUNIX /* no unix domain socket support */ 57668040Seric # undef WIFEXITED 57768040Seric # undef WEXITSTATUS 57868040Seric # define strtoul strtol /* gcc library bogosity */ 57968040Seric 58068040Seric typedef unsigned short uid_t; 58168040Seric typedef unsigned short gid_t; 58268040Seric typedef short pid_t; 58368040Seric #endif 58468040Seric 58568040Seric 58668040Seric /* 58763962Seric ** ConvexOS 11.0 and later 58865949Seric ** 58965949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 59065949Seric ** works on 9.1 as well. 59163962Seric */ 59263962Seric 59363962Seric #ifdef _CONVEX_SOURCE 59463977Seric # define BSD 1 /* include all the BSD defines */ 59563977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 59663962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 59763977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 59863962Seric # define LA_TYPE LA_FLOAT 59965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 60065949Seric # ifndef _PATH_SENDMAILCF 60165949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 60265949Seric # endif 60365949Seric # ifndef S_IREAD 60465949Seric # define S_IREAD _S_IREAD 60565949Seric # define S_IWRITE _S_IWRITE 60665949Seric # define S_IEXEC _S_IEXEC 60765949Seric # define S_IFMT _S_IFMT 60865949Seric # define S_IFCHR _S_IFCHR 60965949Seric # define S_IFBLK _S_IFBLK 61065949Seric # endif 61165167Seric # ifndef IDENTPROTO 61265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 61365167Seric # endif 61463962Seric #endif 61563962Seric 61664314Seric 61763962Seric /* 61864999Seric ** RISC/os 4.52 61963962Seric ** 62064999Seric ** Gives a ton of warning messages, but otherwise compiles. 62163962Seric */ 62263962Seric 62363965Seric #ifdef RISCOS 62464999Seric 62563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 62666226Seric # ifndef HASFLOCK 62765830Seric # define HASFLOCK 1 /* has flock(2) call */ 62865830Seric # endif 62964999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 63064999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 63163962Seric # define LA_TYPE LA_INT 63263962Seric # define LA_AVENRUN "avenrun" 63363962Seric # define _PATH_UNIX "/unix" 63464999Seric # undef WIFEXITED 63564999Seric 63664999Seric # define setpgid setpgrp 63764999Seric 63864999Seric extern int errno; 63964999Seric typedef int pid_t; 64064999Seric #define SIGFUNC_DEFINED 64164999Seric typedef int (*sigfunc_t)(); 64264999Seric extern char *getenv(); 64364999Seric extern void *malloc(); 64464999Seric 64563962Seric #endif 64663962Seric 64764314Seric 64864155Seric /* 64964155Seric ** Linux 0.99pl10 and above... 65066300Seric ** 65166300Seric ** Thanks to, in reverse order of contact: 65266300Seric ** 65368093Seric ** John Kennedy <warlock@csuchico.edu> 65467885Seric ** Andrew Pam <avatar@aus.xanadu.com> 65566300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 65666300Seric ** Karl London <karl@borg.demon.co.uk> 65766300Seric ** 65868093Seric ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 65968093Seric ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 66068093Seric ** gcc 2.6.2 libc.so.4.6.20 66168093Seric ** slackware 2.1.0 linux 1.1.70 66264155Seric */ 66364155Seric 66464770Seric #ifdef __linux__ 66566298Seric # define BSD 1 /* include BSD defines */ 66664155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 66766298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 66864380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 66966298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 67066300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 67167885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 67264155Seric # ifndef LA_TYPE 67366301Seric # define LA_TYPE LA_PROCSTR 67464155Seric # endif 67566300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 67668093Seric # ifndef _PATH_SENDMAILPID 67768093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 67868093Seric # endif 67968093Seric # define TZ_TYPE TZ_TNAME 68064763Seric # include <sys/sysmacros.h> 68166300Seric # undef atol /* wounded in <stdlib.h> */ 68264155Seric #endif 68364155Seric 68464155Seric 68564345Seric /* 68664345Seric ** DELL SVR4 Issue 2.2, and others 68764345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 68864345Seric ** 68964345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 69064345Seric ** defined, and the definitions conflict. 69164924Seric ** 69264924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 69364924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 69464924Seric ** (SVR4.0/386 version 3.0). 69564345Seric */ 69664345Seric 69764345Seric #ifdef DELL_SVR4 69865189Seric /* no changes necessary */ 69965189Seric /* see general __svr4__ defines below */ 70064345Seric #endif 70164345Seric 70264345Seric 70364380Seric /* 70464380Seric ** Apple A/UX 3.0 70564380Seric */ 70664345Seric 70764380Seric #ifdef _AUX_SOURCE 70864729Seric # include <sys/sysmacros.h> 70964380Seric # define BSD /* has BSD routines */ 71064380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 71164380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 71264561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 71365167Seric # ifndef IDENTPROTO 71465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 71565167Seric # endif 71664380Seric # define FORK fork 71764380Seric # ifndef _PATH_SENDMAILCF 71864380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 71964380Seric # endif 72064380Seric # ifndef LA_TYPE 72164380Seric # define LA_TYPE LA_ZERO 72264380Seric # endif 72365749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 72464560Seric # undef WIFEXITED 72564560Seric # undef WEXITSTATUS 72664380Seric #endif 72764380Seric 72864380Seric 72964705Seric /* 73064705Seric ** Encore UMAX V 73164705Seric ** 73264705Seric ** Not extensively tested. 73364705Seric */ 73464380Seric 73564705Seric #ifdef UMAXV 73664705Seric # include <limits.h> 73764705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 73864705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 73964705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 74065211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 74164705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 74264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 74364705Seric # define FORK fork /* no vfork(2) primitive available */ 74465749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 74564705Seric # define MAXPATHLEN PATH_MAX 74664705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 74764705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 74864705Seric # undef WIFEXITED 74964705Seric # undef WEXITSTATUS 75064705Seric #endif 75164705Seric 75264705Seric 75364939Seric /* 75464939Seric ** Stardent Titan 3000 running TitanOS 4.2. 75564939Seric ** 75664939Seric ** Must be compiled in "cc -43" mode. 75764939Seric ** 75864944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 75964939Seric ** 76064939Seric ** Note the tweaking below after the BSD defines are set. 76164939Seric */ 76264705Seric 76364939Seric #ifdef titan 76464939Seric # define setpgid setpgrp 76564939Seric typedef int pid_t; 76664939Seric # undef WIFEXITED 76764939Seric # undef WEXITSTATUS 76864939Seric #endif 76964939Seric 77064939Seric 77164962Seric /* 77264962Seric ** Sequent DYNIX 3.2.0 77364962Seric ** 77464962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 77564962Seric */ 77664939Seric 77764962Seric #ifdef sequent 77866038Seric 77964962Seric # define BSD 1 78064962Seric # define HASUNSETENV 1 78164962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 78264962Seric # define WAITUNION 1 78364962Seric # define LA_TYPE LA_FLOAT 78464962Seric # ifdef _POSIX_VERSION 78564962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 78664962Seric # endif 78764962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 78864962Seric # define setpgid setpgrp 78964962Seric 79064962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 79164962Seric # undef WIFEXITED 79264962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 79364962Seric ((union wait*)&(s))->w_termsig == 0) 79464962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 79564962Seric typedef int pid_t; 79664962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 79764962Seric 79866144Seric # ifndef IDENTPROTO 79966144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 80066144Seric # endif 80166144Seric 80264962Seric # ifndef _PATH_UNIX 80364962Seric # define _PATH_UNIX "/dynix" 80464962Seric # endif 80564962Seric # ifndef _PATH_SENDMAILCF 80664962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 80764962Seric # endif 80864962Seric 80964962Seric #endif 81064962Seric 81164962Seric 81265748Seric /* 81366038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 81466038Seric ** 81566038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 81666038Seric ** 81766038Seric ** From Tim Wright <timw@sequent.com>. 81866038Seric */ 81966038Seric 82066038Seric #ifdef _SEQUENT_ 82166038Seric # define SYSTEM5 1 /* include all the System V defines */ 82266038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 82366038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 82466038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 82566038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 82666038Seric # define GIDSET_T gid_t 82766038Seric # define LA_TYPE LA_INT 82866038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 82967771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 83066144Seric # ifndef IDENTPROTO 83166144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 83266144Seric # endif 83366038Seric # ifndef _PATH_SENDMAILCF 83466038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 83566038Seric # endif 83666038Seric # ifndef _PATH_SENDMAILPID 83766038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 83866038Seric # endif 83966038Seric #endif 84066038Seric 84166038Seric 84266038Seric /* 84365748Seric ** Cray Unicos 84465748Seric ** 84565748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 84665748Seric */ 84764962Seric 84865748Seric #ifdef UNICOS 84965748Seric # define SYSTEM5 1 /* include all the System V defines */ 85065748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 85165748Seric # define MAXPATHLEN PATHSIZE 85265748Seric # define LA_TYPE LA_ZERO 85365749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 85465748Seric #endif 85564962Seric 85665748Seric 85765820Seric /* 85865820Seric ** Apollo DomainOS 85965820Seric ** 86065820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 86165982Seric ** 86265820Seric ** 15 Jan 1994 86365820Seric ** 86465820Seric */ 86565748Seric 86665820Seric #ifdef apollo 86765820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 86865820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 86967771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 87065820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 87166044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 87265820Seric # ifndef _PATH_SENDMAILCF 87365820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 87465820Seric # endif 87565820Seric # ifndef _PATH_SENDMAILPID 87665820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 87765820Seric # endif 87865820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 87965820Seric # undef S_IFIFO 88065820Seric # define S_IFIFO 0010000 88165820Seric # ifndef IDENTPROTO 88265820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 88365820Seric # endif 88465982Seric #endif 88565820Seric 88665820Seric 88766748Seric /* 88867745Seric ** UnixWare 1.1.2. 88966752Seric ** 89066752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 89166752Seric */ 89266752Seric 89366752Seric #ifdef UNIXWARE 89466752Seric # define SYSTEM5 1 89567745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 89667745Seric # define HASGETDTABLESIZE 1 89767745Seric # define HASSETREUID 1 89867745Seric # define HASSETSID 1 89967745Seric # define HASINITGROUPS 1 90067745Seric # define GIDSET_T gid_t 90167745Seric # define SLEEP_T unsigned 90266752Seric # define SFS_TYPE SFS_STATVFS 90366752Seric # define LA_TYPE LA_ZERO 90466752Seric # undef WIFEXITED 90566752Seric # undef WEXITSTATUS 90666752Seric # define _PATH_UNIX "/unix" 90766752Seric # ifndef _PATH_SENDMAILCF 90866752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 90966752Seric # endif 91066752Seric # ifndef _PATH_SENDMAILPID 91166752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 91266752Seric # endif 91366752Seric # define SYSLOG_BUFSIZE 128 91466752Seric #endif 91566752Seric 91666752Seric 91766752Seric /* 91866748Seric ** Intergraph CLIX 3.1 91966748Seric ** 92066748Seric ** From Paul Southworth <pauls@locust.cic.net> 92166748Seric */ 92265820Seric 92366748Seric #ifdef CLIX 92466748Seric # define SYSTEM5 1 /* looks like System V */ 92566752Seric # ifndef HASGETUSERSHELL 92666752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 92766752Seric # endif 92866748Seric # define DEV_BSIZE 512 /* device block size not defined */ 92966748Seric # define GIDSET_T gid_t 93066748Seric # undef LOG /* syslog not available */ 93166748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 93266748Seric # define GETSHORT _getshort 93366748Seric #endif 93465820Seric 93566748Seric 93666776Seric /* 93766776Seric ** NCR 3000 Series (SysVr4) 93866776Seric ** 93967434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 94066776Seric */ 94166748Seric 94266776Seric #ifdef NCR3000 94366776Seric # define __svr4__ 94466776Seric # undef BSD 94566776Seric # define LA_AVENRUN "avenrun" 94666776Seric #endif 94766748Seric 94866776Seric 94967434Seric /* 95067434Seric ** Tandem NonStop-UX SVR4 95167434Seric ** 95267434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 95367434Seric */ 95466776Seric 95567434Seric #ifdef NonStop_UX_BXX 95667434Seric # define __svr4__ 95767434Seric #endif 95866776Seric 95967434Seric 96067488Seric /* 96167488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 96267488Seric ** 96367488Seric ** Tested for 1.04 and 1.03 96467488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 96567488Seric */ 96667434Seric 96767488Seric #ifdef __H3050R 96867488Seric # define SYSTEM5 1 /* include all the System V defines */ 96967488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 97067488Seric # define setreuid(r, e) setresuid(r, e, -1) 97167488Seric # define LA_TYPE LA_FLOAT 97267488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 97367488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 97467488Seric # ifndef GIDSET_T 97567488Seric # define GIDSET_T gid_t 97667488Seric # endif 97767488Seric # ifndef _PATH_UNIX 97867488Seric # define _PATH_UNIX "/HI-UX" 97967488Seric # endif 98067488Seric # ifndef _PATH_SENDMAILCF 98167488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 98267488Seric # endif 98367488Seric # ifndef IDENTPROTO 98467488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 98567488Seric # endif 98667488Seric # ifndef HASGETUSERSHELL 98767488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 98867488Seric # endif 98967488Seric 99067488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 99167488Seric # undef m_flags 99267488Seric 99367488Seric # ifdef __STDC__ 99467488Seric extern int syslog(int, char *, ...); 99567488Seric # endif 99667488Seric 99767488Seric #endif 99867488Seric 99967488Seric 100068099Seric /* 100168099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 100268099Seric ** 100368099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 100468099Seric */ 100567488Seric 100668099Seric #ifdef _UTS 100768099Seric # include <sys/sysmacros.h> 100868099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 100968099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 101068099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 101168099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 101268099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 101368099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 101468099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 101568099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 101668099Seric # ifndef HASGETUSERSHELL 101768099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 101868099Seric # endif 101968099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 102068099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 102168099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 102268099Seric # define _PATH_UNIX "/unix" 102368099Seric # ifndef _PATH_SENDMAILCF 102468099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 102568099Seric # endif 102668099Seric #endif 102768099Seric 102868099Seric 102968099Seric 103068099Seric 103163902Seric /********************************************************************** 103263787Seric ** End of Per-Operating System defines 103363902Seric **********************************************************************/ 103463787Seric 103563949Seric /********************************************************************** 103663949Seric ** More general defines 103763949Seric **********************************************************************/ 103863949Seric 103963962Seric /* general BSD defines */ 104063962Seric #ifdef BSD 104164035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 104264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 104367742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 104467430Seric # ifndef HASSETRLIMIT 104567430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 104667430Seric # endif 104765830Seric # ifndef HASFLOCK 104865830Seric # define HASFLOCK 1 /* has flock(2) call */ 104965830Seric # endif 105067602Seric # ifndef TZ_TYPE 105167608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 105267602Seric # endif 105363962Seric #endif 105463962Seric 105565189Seric /* general System V Release 4 defines */ 105665189Seric #ifdef __svr4__ 105765189Seric # define SYSTEM5 1 105865189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 105967742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 106067742Seric # ifndef HASSETRLIMIT 106167742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 106267742Seric # endif 106365211Seric # ifndef HASGETUSERSHELL 106465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 106565210Seric # endif 106665189Seric # define setreuid(r, e) seteuid(e) 106765189Seric 106865189Seric # ifndef _PATH_UNIX 106965189Seric # define _PATH_UNIX "/unix" 107065189Seric # endif 107165189Seric # ifndef _PATH_SENDMAILCF 107265189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 107365189Seric # endif 107465189Seric # ifndef _PATH_SENDMAILPID 107565189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 107665189Seric # endif 107765189Seric # ifndef SYSLOG_BUFSIZE 107865189Seric # define SYSLOG_BUFSIZE 128 107965189Seric # endif 108067159Seric # ifndef SFS_TYPE 108167159Seric # define SFS_TYPE SFS_STATVFS 108267159Seric # endif 108365189Seric #endif 108465189Seric 108563787Seric /* general System V defines */ 108666298Seric #ifdef SYSTEM5 108764813Seric # include <sys/sysmacros.h> 108863949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 108964705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 109064962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 109167430Seric # ifndef HASULIMIT 109267430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 109367430Seric # endif 109463962Seric # ifndef LA_TYPE 109565749Seric # define LA_TYPE LA_INT /* assume integer load average */ 109663962Seric # endif 109765749Seric # ifndef SFS_TYPE 109865749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 109965749Seric # endif 110067602Seric # ifndef TZ_TYPE 110167608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 110267602Seric # endif 110368040Seric # ifndef ALTOS_SYS_V 110468040Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 110568040Seric # define bzero(d, l) (memset((d), '\0', (l))) 110668040Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 110768040Seric # endif 110866298Seric #endif 110963787Seric 111063949Seric /* general POSIX defines */ 111163949Seric #ifdef _POSIX_VERSION 111264718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 111364718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 111463949Seric #endif 111563949Seric 111663787Seric /* 111763937Seric ** If no type for argument two of getgroups call is defined, assume 111863937Seric ** it's an integer -- unfortunately, there seem to be several choices 111963937Seric ** here. 112063937Seric */ 112163937Seric 112263937Seric #ifndef GIDSET_T 112363937Seric # define GIDSET_T int 112463937Seric #endif 112563937Seric 112664939Seric /* 112764939Seric ** Tweaking for systems that (for example) claim to be BSD but 112864939Seric ** don't have all the standard BSD routines (boo hiss). 112964939Seric */ 113064439Seric 113164939Seric #ifdef titan 113264939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 113364939Seric #endif 113464939Seric 113565830Seric 113665167Seric /* 113765167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 113865167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 113965167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 114065167Seric ** are closed. Some firewalls return this error if you try to connect 114165167Seric ** to the IDENT port (113), so you can't receive email from these hosts 114265167Seric ** on these systems. The firewall really should use a more specific 114365167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 114465167Seric ** not explicitly set to zero above, default it on. 114565167Seric */ 114664939Seric 114765167Seric #ifndef IDENTPROTO 114865167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 114965167Seric #endif 115065167Seric 115165211Seric #ifndef HASGETUSERSHELL 115265211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 115365210Seric #endif 115465167Seric 115565830Seric #ifndef HASFLOCK 115665830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 115765830Seric #endif 115865210Seric 115967430Seric #ifndef HASSETRLIMIT 116067430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 116167430Seric #endif 116267430Seric 116367430Seric #ifndef HASULIMIT 116467430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 116567430Seric #endif 116667430Seric 116766843Seric #ifndef OLD_NEWDB 116866843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 116966843Seric #endif 117065830Seric 117168099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 117268099Seric #ifndef HASSIGSETMASK 117368099Seric # ifdef SIGVTALRM 117468099Seric # define HASSETSIGMASK 1 117568099Seric # else 117668099Seric # define HASSETSIGMASK 0 117768099Seric # endif 117868099Seric #endif 117966843Seric 118068099Seric 118164439Seric /********************************************************************** 118259023Seric ** Remaining definitions should never have to be changed. They are 118359023Seric ** primarily to provide back compatibility for older systems -- for 118459287Seric ** example, it includes some POSIX compatibility definitions 118564439Seric **********************************************************************/ 118659023Seric 118759388Seric /* System 5 compatibility */ 118859388Seric #ifndef S_ISREG 118964944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 119059388Seric #endif 119164944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 119264944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 119364944Seric #endif 119459388Seric #ifndef S_IWGRP 119559388Seric #define S_IWGRP 020 119659388Seric #endif 119759388Seric #ifndef S_IWOTH 119859388Seric #define S_IWOTH 002 119959388Seric #endif 120059388Seric 120159023Seric /* 120250537Seric ** Older systems don't have this error code -- it should be in 120350537Seric ** /usr/include/sysexits.h. 120450537Seric */ 120550537Seric 120650537Seric # ifndef EX_CONFIG 120750537Seric # define EX_CONFIG 78 /* configuration error */ 120850537Seric # endif 120956852Seric 121064718Seric /* pseudo-code used in server SMTP */ 121164718Seric # define EX_QUIT 22 /* drop out of server immediately */ 121264718Seric 121364718Seric 121463993Seric /* 121563993Seric ** These are used in a few cases where we need some special 121663993Seric ** error codes, but where the system doesn't provide something 121763993Seric ** reasonable. They are printed in errstring. 121863993Seric */ 121963993Seric 122063993Seric #ifndef E_PSEUDOBASE 122163993Seric # define E_PSEUDOBASE 256 122263993Seric #endif 122363993Seric 122463993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 122563993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 122663993Seric 122763970Seric /* type of arbitrary pointer */ 122863970Seric #ifndef ARBPTR_T 122963970Seric # define ARBPTR_T void * 123063970Seric #endif 123163970Seric 123260568Seric #ifndef __P 123360568Seric # include "cdefs.h" 123460568Seric #endif 123560568Seric 123667421Seric #if NAMED_BIND 123767421Seric # include <arpa/nameser.h> 123867434Seric # ifdef __svr4__ 123967434Seric # ifdef NOERROR 124067434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 124167434Seric # endif 124267434Seric # endif 124367421Seric #endif 124467421Seric 124556852Seric /* 124667419Seric ** The size of an IP address -- can't use sizeof because of problems 124767419Seric ** on Crays, where everything is 64 bits. This will break if/when 124867419Seric ** IP addresses are expanded to eight bytes. 124967419Seric */ 125067419Seric 125167421Seric #ifndef INADDRSZ 125267421Seric # define INADDRSZ 4 125367421Seric #endif 125467419Seric 125567419Seric /* 125667421Seric ** The size of various known types -- for reading network protocols. 125767421Seric ** Again, we can't use sizeof because of compiler randomness. 125867421Seric */ 125967421Seric 126067421Seric #ifndef INT16SZ 126167421Seric # define INT16SZ 2 126267421Seric #endif 126367421Seric #ifndef INT32SZ 126467421Seric # define INT32SZ 4 126567421Seric #endif 126667421Seric 126767421Seric /* 126858778Seric ** Do some required dependencies 126958778Seric */ 127058778Seric 127158778Seric #if defined(NETINET) || defined(NETISO) 127259107Seric # define SMTP 1 /* enable user and server SMTP */ 127359107Seric # define QUEUE 1 /* enable queueing */ 127459107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 127558778Seric #endif 127658778Seric 127758778Seric 127858778Seric /* 127956852Seric ** Arrange to use either varargs or stdargs 128056852Seric */ 128156852Seric 128256852Seric # ifdef __STDC__ 128356852Seric 128456852Seric # include <stdarg.h> 128556852Seric 128656852Seric # define VA_LOCAL_DECL va_list ap; 128756852Seric # define VA_START(f) va_start(ap, f) 128856852Seric # define VA_END va_end(ap) 128956852Seric 129056852Seric # else 129156852Seric 129256852Seric # include <varargs.h> 129356852Seric 129456852Seric # define VA_LOCAL_DECL va_list ap; 129556852Seric # define VA_START(f) va_start(ap) 129656852Seric # define VA_END va_end(ap) 129756852Seric 129856852Seric # endif 129957631Seric 130057943Seric #ifdef HASUNAME 130157631Seric # include <sys/utsname.h> 130257631Seric # ifdef newstr 130357631Seric # undef newstr 130457631Seric # endif 130557943Seric #else /* ! HASUNAME */ 130657631Seric # define NODE_LENGTH 32 130757631Seric struct utsname 130857631Seric { 130957631Seric char nodename[NODE_LENGTH+1]; 131057631Seric }; 131157943Seric #endif /* HASUNAME */ 131257642Seric 131368040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 131463838Seric # define MAXHOSTNAMELEN 256 131557735Seric #endif 131658153Seric 131758153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 131858153Seric # define SIGCHLD SIGCLD 131958153Seric #endif 132058153Seric 132158153Seric #ifndef STDIN_FILENO 132258153Seric #define STDIN_FILENO 0 132358153Seric #endif 132458153Seric 132558153Seric #ifndef STDOUT_FILENO 132658153Seric #define STDOUT_FILENO 1 132758153Seric #endif 132858153Seric 132958153Seric #ifndef STDERR_FILENO 133058153Seric #define STDERR_FILENO 2 133158153Seric #endif 133258689Seric 133364072Seric #ifndef LOCK_SH 133464035Seric # define LOCK_SH 0x01 /* shared lock */ 133564035Seric # define LOCK_EX 0x02 /* exclusive lock */ 133664035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 133764035Seric # define LOCK_UN 0x08 /* unlock */ 133864035Seric #endif 133958692Seric 134064035Seric #ifndef SIG_ERR 134164035Seric # define SIG_ERR ((void (*)()) -1) 134258689Seric #endif 134358702Seric 134464500Seric #ifndef WEXITSTATUS 134564500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 134664500Seric #endif 134764500Seric #ifndef WIFEXITED 134864500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 134964500Seric #endif 135064500Seric 135164561Seric #ifndef SIGFUNC_DEFINED 135264561Seric typedef void (*sigfunc_t) __P((int)); 135364561Seric #endif 135464561Seric 135565053Seric /* size of syslog buffer */ 135665053Seric #ifndef SYSLOG_BUFSIZE 135765053Seric # define SYSLOG_BUFSIZE 1024 135865053Seric #endif 135965053Seric 136058702Seric /* 136158702Seric ** Size of tobuf (deliver.c) 136258702Seric ** Tweak this to match your syslog implementation. It will have to 136358702Seric ** allow for the extra information printed. 136458702Seric */ 136558702Seric 136658702Seric #ifndef TOBUFSIZE 136765053Seric # if (SYSLOG_BUFSIZE) > 512 136865053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 136965053Seric # else 137065053Seric # define TOBUFSIZE 256 137165053Seric # endif 137258702Seric #endif 137360219Seric 137465015Seric /* 137565015Seric ** Size of prescan buffer. 137665015Seric ** Despite comments in the _sendmail_ book, this probably should 137765015Seric ** not be changed; there are some hard-to-define dependencies. 137865015Seric */ 137965015Seric 138065015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 138160219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 138260219Seric # ifndef FORK 138360219Seric # define FORK vfork /* function to call to fork mailer */ 138460219Seric # endif 138565955Seric 138665955Seric /* 138765955Seric ** If we are going to link scanf anyway, use it in readcf 138865955Seric */ 138965955Seric 139065955Seric #if !defined(HASUNAME) && !defined(SCANF) 139165955Seric # define SCANF 1 139265955Seric #endif 1393