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*68384Seric * @(#)conf.h 8.134 (Berkeley) 02/20/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 */ 33*68384Seric # define MAXRWSETS 200 /* 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) 11968294Seric # define LA_TYPE LA_SUBR 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 */ 17468236Seric # 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 102868357Seric /* 102968357Seric ** Cray Computer Corporation's CSOS 103068357Seric ** 103168357Seric ** Contributed by Scott Bolte <scott@craycos.com>. 103268357Seric */ 103368099Seric 103468357Seric #ifdef _CRAYCOM 103568357Seric # define SYSTEM5 1 /* include all the System V defines */ 103668357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 103768357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 103868357Seric # define MAXPATHLEN PATHSIZE 103968357Seric # define LA_TYPE LA_ZERO 104068357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 104168357Seric # define _POSIX_CHOWN_RESTRICTED -1 104268357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 104368357Seric #endif 104468099Seric 104568099Seric 104663902Seric /********************************************************************** 104763787Seric ** End of Per-Operating System defines 104863902Seric **********************************************************************/ 104963787Seric 105063949Seric /********************************************************************** 105163949Seric ** More general defines 105263949Seric **********************************************************************/ 105363949Seric 105463962Seric /* general BSD defines */ 105563962Seric #ifdef BSD 105664035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 105764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 105867742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 105967430Seric # ifndef HASSETRLIMIT 106067430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 106167430Seric # endif 106265830Seric # ifndef HASFLOCK 106365830Seric # define HASFLOCK 1 /* has flock(2) call */ 106465830Seric # endif 106567602Seric # ifndef TZ_TYPE 106667608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 106767602Seric # endif 106863962Seric #endif 106963962Seric 107065189Seric /* general System V Release 4 defines */ 107165189Seric #ifdef __svr4__ 107265189Seric # define SYSTEM5 1 107365189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 107467742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 107567742Seric # ifndef HASSETRLIMIT 107667742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 107767742Seric # endif 107865211Seric # ifndef HASGETUSERSHELL 107965211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 108065210Seric # endif 108165189Seric # define setreuid(r, e) seteuid(e) 108265189Seric 108365189Seric # ifndef _PATH_UNIX 108465189Seric # define _PATH_UNIX "/unix" 108565189Seric # endif 108665189Seric # ifndef _PATH_SENDMAILCF 108765189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 108865189Seric # endif 108965189Seric # ifndef _PATH_SENDMAILPID 109065189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 109165189Seric # endif 109265189Seric # ifndef SYSLOG_BUFSIZE 109365189Seric # define SYSLOG_BUFSIZE 128 109465189Seric # endif 109567159Seric # ifndef SFS_TYPE 109667159Seric # define SFS_TYPE SFS_STATVFS 109767159Seric # endif 109865189Seric #endif 109965189Seric 110063787Seric /* general System V defines */ 110166298Seric #ifdef SYSTEM5 110264813Seric # include <sys/sysmacros.h> 110363949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 110464705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 110564962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 110667430Seric # ifndef HASULIMIT 110767430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 110867430Seric # endif 110963962Seric # ifndef LA_TYPE 111065749Seric # define LA_TYPE LA_INT /* assume integer load average */ 111163962Seric # endif 111265749Seric # ifndef SFS_TYPE 111365749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 111465749Seric # endif 111567602Seric # ifndef TZ_TYPE 111667608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 111767602Seric # endif 111868040Seric # ifndef ALTOS_SYS_V 111968040Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 112068040Seric # define bzero(d, l) (memset((d), '\0', (l))) 112168040Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 112268040Seric # endif 112366298Seric #endif 112463787Seric 112563949Seric /* general POSIX defines */ 112663949Seric #ifdef _POSIX_VERSION 112764718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 112864718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 112963949Seric #endif 113063949Seric 113163787Seric /* 113263937Seric ** If no type for argument two of getgroups call is defined, assume 113363937Seric ** it's an integer -- unfortunately, there seem to be several choices 113463937Seric ** here. 113563937Seric */ 113663937Seric 113763937Seric #ifndef GIDSET_T 113863937Seric # define GIDSET_T int 113963937Seric #endif 114063937Seric 114164939Seric /* 114268357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 114368357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 114464939Seric */ 114564439Seric 114664939Seric #ifdef titan 114764939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 114864939Seric #endif 114964939Seric 115068357Seric #ifdef _CRAYCOM 115168357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 115268357Seric #endif 115365830Seric 115468357Seric 115565167Seric /* 115665167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 115765167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 115865167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 115965167Seric ** are closed. Some firewalls return this error if you try to connect 116065167Seric ** to the IDENT port (113), so you can't receive email from these hosts 116165167Seric ** on these systems. The firewall really should use a more specific 116265167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 116365167Seric ** not explicitly set to zero above, default it on. 116465167Seric */ 116564939Seric 116665167Seric #ifndef IDENTPROTO 116765167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 116865167Seric #endif 116965167Seric 117065211Seric #ifndef HASGETUSERSHELL 117165211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 117265210Seric #endif 117365167Seric 117465830Seric #ifndef HASFLOCK 117565830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 117665830Seric #endif 117765210Seric 117867430Seric #ifndef HASSETRLIMIT 117967430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 118067430Seric #endif 118167430Seric 118267430Seric #ifndef HASULIMIT 118367430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 118467430Seric #endif 118567430Seric 118666843Seric #ifndef OLD_NEWDB 118766843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 118866843Seric #endif 118965830Seric 119068099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 119168099Seric #ifndef HASSIGSETMASK 119268099Seric # ifdef SIGVTALRM 119368099Seric # define HASSETSIGMASK 1 119468099Seric # else 119568099Seric # define HASSETSIGMASK 0 119668099Seric # endif 119768099Seric #endif 119866843Seric 119968099Seric 120064439Seric /********************************************************************** 120159023Seric ** Remaining definitions should never have to be changed. They are 120259023Seric ** primarily to provide back compatibility for older systems -- for 120359287Seric ** example, it includes some POSIX compatibility definitions 120464439Seric **********************************************************************/ 120559023Seric 120659388Seric /* System 5 compatibility */ 120759388Seric #ifndef S_ISREG 120864944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 120959388Seric #endif 121064944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 121164944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 121264944Seric #endif 121359388Seric #ifndef S_IWGRP 121459388Seric #define S_IWGRP 020 121559388Seric #endif 121659388Seric #ifndef S_IWOTH 121759388Seric #define S_IWOTH 002 121859388Seric #endif 121959388Seric 122059023Seric /* 122150537Seric ** Older systems don't have this error code -- it should be in 122250537Seric ** /usr/include/sysexits.h. 122350537Seric */ 122450537Seric 122550537Seric # ifndef EX_CONFIG 122650537Seric # define EX_CONFIG 78 /* configuration error */ 122750537Seric # endif 122856852Seric 122964718Seric /* pseudo-code used in server SMTP */ 123064718Seric # define EX_QUIT 22 /* drop out of server immediately */ 123164718Seric 123264718Seric 123363993Seric /* 123463993Seric ** These are used in a few cases where we need some special 123563993Seric ** error codes, but where the system doesn't provide something 123663993Seric ** reasonable. They are printed in errstring. 123763993Seric */ 123863993Seric 123963993Seric #ifndef E_PSEUDOBASE 124063993Seric # define E_PSEUDOBASE 256 124163993Seric #endif 124263993Seric 124363993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 124463993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 124563993Seric 124663970Seric /* type of arbitrary pointer */ 124763970Seric #ifndef ARBPTR_T 124863970Seric # define ARBPTR_T void * 124963970Seric #endif 125063970Seric 125160568Seric #ifndef __P 125260568Seric # include "cdefs.h" 125360568Seric #endif 125460568Seric 125567421Seric #if NAMED_BIND 125667421Seric # include <arpa/nameser.h> 125767434Seric # ifdef __svr4__ 125867434Seric # ifdef NOERROR 125967434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 126067434Seric # endif 126167434Seric # endif 126267421Seric #endif 126367421Seric 126456852Seric /* 126567419Seric ** The size of an IP address -- can't use sizeof because of problems 126667419Seric ** on Crays, where everything is 64 bits. This will break if/when 126767419Seric ** IP addresses are expanded to eight bytes. 126867419Seric */ 126967419Seric 127067421Seric #ifndef INADDRSZ 127167421Seric # define INADDRSZ 4 127267421Seric #endif 127367419Seric 127467419Seric /* 127567421Seric ** The size of various known types -- for reading network protocols. 127667421Seric ** Again, we can't use sizeof because of compiler randomness. 127767421Seric */ 127867421Seric 127967421Seric #ifndef INT16SZ 128067421Seric # define INT16SZ 2 128167421Seric #endif 128267421Seric #ifndef INT32SZ 128367421Seric # define INT32SZ 4 128467421Seric #endif 128567421Seric 128667421Seric /* 128758778Seric ** Do some required dependencies 128858778Seric */ 128958778Seric 129058778Seric #if defined(NETINET) || defined(NETISO) 129159107Seric # define SMTP 1 /* enable user and server SMTP */ 129259107Seric # define QUEUE 1 /* enable queueing */ 129359107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 129458778Seric #endif 129558778Seric 129658778Seric 129758778Seric /* 129856852Seric ** Arrange to use either varargs or stdargs 129956852Seric */ 130056852Seric 130156852Seric # ifdef __STDC__ 130256852Seric 130356852Seric # include <stdarg.h> 130456852Seric 130556852Seric # define VA_LOCAL_DECL va_list ap; 130656852Seric # define VA_START(f) va_start(ap, f) 130756852Seric # define VA_END va_end(ap) 130856852Seric 130956852Seric # else 131056852Seric 131156852Seric # include <varargs.h> 131256852Seric 131356852Seric # define VA_LOCAL_DECL va_list ap; 131456852Seric # define VA_START(f) va_start(ap) 131556852Seric # define VA_END va_end(ap) 131656852Seric 131756852Seric # endif 131857631Seric 131957943Seric #ifdef HASUNAME 132057631Seric # include <sys/utsname.h> 132157631Seric # ifdef newstr 132257631Seric # undef newstr 132357631Seric # endif 132457943Seric #else /* ! HASUNAME */ 132557631Seric # define NODE_LENGTH 32 132657631Seric struct utsname 132757631Seric { 132857631Seric char nodename[NODE_LENGTH+1]; 132957631Seric }; 133057943Seric #endif /* HASUNAME */ 133157642Seric 133268040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 133363838Seric # define MAXHOSTNAMELEN 256 133457735Seric #endif 133558153Seric 133658153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 133758153Seric # define SIGCHLD SIGCLD 133858153Seric #endif 133958153Seric 134058153Seric #ifndef STDIN_FILENO 134158153Seric #define STDIN_FILENO 0 134258153Seric #endif 134358153Seric 134458153Seric #ifndef STDOUT_FILENO 134558153Seric #define STDOUT_FILENO 1 134658153Seric #endif 134758153Seric 134858153Seric #ifndef STDERR_FILENO 134958153Seric #define STDERR_FILENO 2 135058153Seric #endif 135158689Seric 135264072Seric #ifndef LOCK_SH 135364035Seric # define LOCK_SH 0x01 /* shared lock */ 135464035Seric # define LOCK_EX 0x02 /* exclusive lock */ 135564035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 135664035Seric # define LOCK_UN 0x08 /* unlock */ 135764035Seric #endif 135858692Seric 135964035Seric #ifndef SIG_ERR 136064035Seric # define SIG_ERR ((void (*)()) -1) 136158689Seric #endif 136258702Seric 136364500Seric #ifndef WEXITSTATUS 136464500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 136564500Seric #endif 136664500Seric #ifndef WIFEXITED 136764500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 136864500Seric #endif 136964500Seric 137064561Seric #ifndef SIGFUNC_DEFINED 137164561Seric typedef void (*sigfunc_t) __P((int)); 137264561Seric #endif 137364561Seric 137465053Seric /* size of syslog buffer */ 137565053Seric #ifndef SYSLOG_BUFSIZE 137665053Seric # define SYSLOG_BUFSIZE 1024 137765053Seric #endif 137865053Seric 137958702Seric /* 138058702Seric ** Size of tobuf (deliver.c) 138158702Seric ** Tweak this to match your syslog implementation. It will have to 138258702Seric ** allow for the extra information printed. 138358702Seric */ 138458702Seric 138558702Seric #ifndef TOBUFSIZE 138665053Seric # if (SYSLOG_BUFSIZE) > 512 138765053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 138865053Seric # else 138965053Seric # define TOBUFSIZE 256 139065053Seric # endif 139158702Seric #endif 139260219Seric 139365015Seric /* 139465015Seric ** Size of prescan buffer. 139565015Seric ** Despite comments in the _sendmail_ book, this probably should 139665015Seric ** not be changed; there are some hard-to-define dependencies. 139765015Seric */ 139865015Seric 139965015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 140060219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 140160219Seric # ifndef FORK 140260219Seric # define FORK vfork /* function to call to fork mailer */ 140360219Seric # endif 140465955Seric 140565955Seric /* 140665955Seric ** If we are going to link scanf anyway, use it in readcf 140765955Seric */ 140865955Seric 140965955Seric #if !defined(HASUNAME) && !defined(SCANF) 141065955Seric # define SCANF 1 141165955Seric #endif 1412