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*68072Seric * @(#)conf.h 8.125 (Berkeley) 12/10/94 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1322726Sdist */ 149147Seric 1557232Seric # include <sys/param.h> 1664705Seric # include <sys/types.h> 1759389Seric # include <sys/stat.h> 1864380Seric # include <sys/file.h> 1964500Seric # include <sys/wait.h> 2058689Seric # include <fcntl.h> 2164035Seric # include <signal.h> 2257232Seric 2363902Seric /********************************************************************** 249147Seric ** Table sizes, etc.... 259147Seric ** There shouldn't be much need to change these.... 2663902Seric **********************************************************************/ 279147Seric 2859303Seric # define MAXLINE 2048 /* max line length */ 2924945Seric # define MAXNAME 256 /* max length of a name */ 309147Seric # define MAXPV 40 /* max # of parms to mailers */ 3159303Seric # define MAXATOM 200 /* max atoms per address */ 329147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3357143Seric # define MAXRWSETS 100 /* max # of sets of rewriting rules */ 349147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3557143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 3652106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 3757232Seric # define MAXKEY 128 /* maximum size of a database key */ 3857232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 3959056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4059667Seric # define MAXALIASDB 12 /* max # of alias databases */ 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 */ 15067626Seric #endif 15160219Seric 15264314Seric 15363902Seric /* 15463902Seric ** Silicon Graphics IRIX 15563902Seric ** 15663965Seric ** Compiles on 4.0.1. 15767967Seric ** 15867967Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX. 15967967Seric ** 16067967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 16163902Seric */ 16263902Seric 16367967Seric #ifdef IRIX64 16467967Seric # define IRIX 16567967Seric #endif 16667967Seric 16767626Seric #ifdef IRIX 16866763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 16964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 17064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 17165211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 17263753Seric # define FORK fork /* no vfork primitive available */ 17364562Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 17464155Seric # define setpgid BSDsetpgrp 17563937Seric # define GIDSET_T gid_t 17665749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 17766763Seric # define LA_TYPE LA_INT 17867967Seric # ifdef IRIX64 17967967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 18067967Seric # else 18167967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 18267967Seric # endif 18367626Seric #endif 18463753Seric 18563902Seric 18663902Seric /* 18764813Seric ** SunOS and Solaris 18864813Seric ** 18964813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 19064813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 19163902Seric */ 19263902Seric 19363787Seric #if defined(sun) && !defined(BSD) 19459074Seric 19564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 19664813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 19765211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 19865749Seric # define LA_TYPE LA_INT 19960564Seric 20064842Seric # ifdef SOLARIS_2_3 20164842Seric # define SOLARIS 20264842Seric # endif 20364842Seric 20460602Seric # ifdef SOLARIS 20563902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 20665222Seric # ifndef __svr4__ 20765222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 20865222Seric # endif 20963787Seric # include <sys/time.h> 21064832Seric # define gethostbyname solaris_gethostbyname /* get working version */ 21164832Seric # define gethostbyaddr solaris_gethostbyaddr /* get working version */ 21265172Seric # define GIDSET_T gid_t 21365189Seric # ifndef _PATH_UNIX 21467129Seric # define _PATH_UNIX "/dev/ksyms" 21565189Seric # endif 21663962Seric # ifndef _PATH_SENDMAILCF 21763962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 21864072Seric # endif 21964072Seric # ifndef _PATH_SENDMAILPID 22063962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 22163962Seric # endif 22266022Seric # ifndef SYSLOG_BUFSIZE 22366022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 22466022Seric # endif 22563787Seric 22660602Seric # else 22765105Seric /* SunOS 4.0.3 or 4.1.x */ 22865189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 22965830Seric # ifndef HASFLOCK 23065830Seric # define HASFLOCK 1 /* has flock(2) call */ 23165830Seric # endif 23265749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 23360564Seric # include <vfork.h> 23463787Seric 23565105Seric # ifdef SUNOS403 23665105Seric /* special tweaking for SunOS 4.0.3 */ 23765105Seric # include <malloc.h> 23865105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 23965105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 24065105Seric # undef WIFEXITED 24165105Seric # undef WEXITSTATUS 24265105Seric # undef HASUNAME 24365105Seric # define setpgid setpgrp 24465105Seric typedef int pid_t; 24565105Seric extern char *getenv(); 24665105Seric 24766732Seric # else 24866732Seric /* 4.1.x specifics */ 24966732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 25066732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 25166732Seric 25265105Seric # endif 25360564Seric # endif 25459023Seric #endif 25559023Seric 25664718Seric /* 25764813Seric ** DG/UX 25864813Seric ** 25967427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 26067427Seric ** older support. 26167427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 26264718Seric */ 26364314Seric 26467427Seric #ifdef DGUX_5_4_2 26567427Seric # define DGUX 1 26667427Seric #endif 26767427Seric 26864718Seric #ifdef DGUX 26964718Seric # define SYSTEM5 1 27064718Seric # define LA_TYPE LA_SUBR 27164718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 27264718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 27364718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 27464718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 27566036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 27665167Seric # ifndef IDENTPROTO 27765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 27865167Seric # endif 27967771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 28065749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 28164813Seric 28264813Seric /* these include files must be included early on DG/UX */ 28364813Seric # include <netinet/in.h> 28464813Seric # include <arpa/inet.h> 28564813Seric 28667427Seric # ifdef DGUX_5_4_2 28767427Seric # define inet_addr dgux_inet_addr 28864718Seric extern long dgux_inet_addr(); 28967427Seric # endif 29064718Seric #endif 29164718Seric 29264718Seric 29363902Seric /* 29463902Seric ** Digital Ultrix 4.2A or 4.3 29564264Seric ** 29664264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 29764264Seric ** not dropped when the process exits. This causes major problems, 29864264Seric ** so flock is the only alternative. 29963902Seric */ 30063902Seric 30160564Seric #ifdef ultrix 30264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 30363962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 30464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 30566242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 30665830Seric # ifndef HASFLOCK 30765830Seric # define HASFLOCK 1 /* has flock(2) call */ 30865830Seric # endif 30965211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 31066318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 31165135Seric # ifdef vax 31265135Seric # define LA_TYPE LA_FLOAT 31365135Seric # else 31465135Seric # define LA_TYPE LA_INT 31565135Seric # define LA_AVENRUN "avenrun" 31665135Seric # endif 31765749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 31865167Seric # ifndef IDENTPROTO 31965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 32065167Seric # endif 32160564Seric #endif 32260564Seric 32364314Seric 32463902Seric /* 325*68072Seric ** OSF/1 for Intel Paragon. 326*68072Seric ** 327*68072Seric ** Contributed by Jeff A. Earickson <jeff@ithaca.ccs.ornl.gov> 328*68072Seric ** of Oak Ridge National Lab. 329*68072Seric */ 330*68072Seric 331*68072Seric #ifdef __PARAGON__ 332*68072Seric # define __osf__ 1 /* get OSF/1 defines below */ 333*68072Seric # ifndef _PATH_SENDMAILCF 334*68072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 335*68072Seric # endif 336*68072Seric #endif 337*68072Seric 338*68072Seric 339*68072Seric /* 34063902Seric ** OSF/1 (tested on Alpha) 34163902Seric */ 34263902Seric 34363787Seric #ifdef __osf__ 34463962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 34564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 34664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 34766226Seric # ifndef HASFLOCK 34865830Seric # define HASFLOCK 1 /* has flock(2) call */ 34965830Seric # endif 35063962Seric # define LA_TYPE LA_INT 35165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 35264813Seric # ifndef _PATH_SENDMAILPID 35365504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 35464813Seric # endif 35559287Seric #endif 35659287Seric 35764314Seric 35863902Seric /* 35963902Seric ** NeXTstep 36063902Seric */ 36163902Seric 36264076Seric #ifdef NeXT 36364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 36465830Seric # ifndef HASFLOCK 36565830Seric # define HASFLOCK 1 /* has flock(2) call */ 36665830Seric # endif 36764125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 36864563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 36963753Seric # define sleep sleepX 37064155Seric # define setpgid setpgrp 37164295Seric # ifndef LA_TYPE 37264295Seric # define LA_TYPE LA_MACH 37364295Seric # endif 37465749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 37564500Seric # ifndef _POSIX_SOURCE 37664035Seric typedef int pid_t; 37764500Seric # undef WEXITSTATUS 37864500Seric # undef WIFEXITED 37964500Seric # endif 38064072Seric # ifndef _PATH_SENDMAILCF 38164072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 38264072Seric # endif 38364072Seric # ifndef _PATH_SENDMAILPID 38464072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 38564072Seric # endif 38659288Seric #endif 38759288Seric 38864314Seric 38963902Seric /* 39063962Seric ** 4.4 BSD 39164831Seric ** 39264831Seric ** See also BSD defines. 39363902Seric */ 39463902Seric 39560568Seric #ifdef BSD4_4 39664072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 39760568Seric # include <sys/cdefs.h> 39863838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 39964072Seric # ifndef LA_TYPE 40064072Seric # define LA_TYPE LA_SUBR 40164072Seric # endif 40265749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 40367771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 40460568Seric #endif 40560568Seric 40664314Seric 40763902Seric /* 40865982Seric ** BSD/386 (all versions) 40965982Seric ** From Tony Sanders, BSDI 41065982Seric */ 41165982Seric 41265982Seric #ifdef __bsdi__ 41365982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 41465982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 41566843Seric # include <sys/cdefs.h> 41666843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 41766030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 41866843Seric # ifndef LA_TYPE 41966843Seric # define LA_TYPE LA_SUBR 42066843Seric # endif 42165982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 42266843Seric /* version 1.1 or later */ 42367771Seric # undef SPT_TYPE 42467771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 42566843Seric # else 42666843Seric /* version 1.0 or earlier */ 42766843Seric # ifndef OLD_NEWDB 42866843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 42966843Seric # endif 43067771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 43165982Seric # endif 43265982Seric #endif 43365982Seric 43465982Seric 43565982Seric 43665982Seric /* 43765049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 43864733Seric ** 43964733Seric ** 4.3BSD clone, closer to 4.4BSD 44064831Seric ** 44164831Seric ** See also BSD defines. 44264733Seric */ 44364733Seric 44465049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 44564733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 44664733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 44766754Seric # ifdef __NetBSD__ 44866754Seric # define HASUNAME 1 /* has uname(2) syscall */ 44966754Seric # endif 45064733Seric # include <sys/cdefs.h> 45164733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 45264733Seric # ifndef LA_TYPE 45364733Seric # define LA_TYPE LA_SUBR 45464733Seric # endif 45565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 45664733Seric #endif 45764733Seric 45864733Seric 45964733Seric /* 46064813Seric ** Mach386 46164813Seric ** 46264813Seric ** For mt Xinu's Mach386 system. 46364813Seric */ 46464813Seric 46564813Seric #if defined(MACH) && defined(i386) 46664813Seric # define MACH386 1 46764813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 46864813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 46966226Seric # ifndef HASFLOCK 47065830Seric # define HASFLOCK 1 /* has flock(2) call */ 47165830Seric # endif 47264813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 47364813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 47464813Seric # define setpgid setpgrp 47564813Seric # ifndef LA_TYPE 47664813Seric # define LA_TYPE LA_FLOAT 47764813Seric # endif 47865749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 47964962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 48064813Seric # undef WEXITSTATUS 48164813Seric # undef WIFEXITED 48264813Seric # ifndef _PATH_SENDMAILCF 48364813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 48464813Seric # endif 48564813Seric # ifndef _PATH_SENDMAILPID 48664813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 48764813Seric # endif 48864813Seric #endif 48964813Seric 49064813Seric 49164813Seric /* 49263969Seric ** 4.3 BSD -- this is for very old systems 49363969Seric ** 49465949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 49565949Seric ** 49663969Seric ** You'll also have to install a new resolver library. 49763969Seric ** I don't guarantee that support for this environment is complete. 49863969Seric */ 49963969Seric 50065949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 50163969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 50263969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 50363970Seric # define ARBPTR_T char * 50464155Seric # define setpgid setpgrp 50563969Seric # ifndef LA_TYPE 50663969Seric # define LA_TYPE LA_FLOAT 50763969Seric # endif 50863969Seric # ifndef _PATH_SENDMAILCF 50963969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 51063969Seric # endif 51165167Seric # ifndef IDENTPROTO 51265167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 51365167Seric # endif 51464834Seric # undef WEXITSTATUS 51564834Seric # undef WIFEXITED 51664834Seric typedef short pid_t; 51764834Seric extern int errno; 51863969Seric #endif 51963969Seric 52064314Seric 52163969Seric /* 52263902Seric ** SCO Unix 52365087Seric ** 52465087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 52565087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 52665087Seric ** The second is, I believe, for an older version. 52763902Seric */ 52863902Seric 52965087Seric #ifdef _SCO_unix_4_2 53065087Seric # define _SCO_unix_ 53165087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 53266757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 53365087Seric # define _PATH_UNIX "/unix" 53465087Seric # ifndef _PATH_SENDMAILCF 53565087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 53665087Seric # endif 53765087Seric # ifndef _PATH_SENDMAILPID 53865087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 53965087Seric # endif 54065087Seric #endif 54165087Seric 54263838Seric #ifdef _SCO_unix_ 54363838Seric # define SYSTEM5 1 /* include all the System V defines */ 54464035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 54565212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 54663838Seric # define FORK fork 54763838Seric # define MAXPATHLEN PATHSIZE 54864718Seric # define LA_TYPE LA_SHORT 54967812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 55067608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 55164813Seric # undef NETUNIX /* no unix domain socket support */ 55263838Seric #endif 55363838Seric 55464314Seric 55563962Seric /* 55668040Seric ** Altos System V. 55768040Seric ** Contributed by Tim Rice <timr@crl.com>. 55868040Seric */ 55968040Seric 56068040Seric #ifdef ALTOS_SYS_V 56168040Seric # include <limits.h> 56268040Seric # define SYSTEM5 1 /* include all the System V defines */ 56368040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 56468040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 56568040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 56668040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 56768040Seric # define FORK fork 56868040Seric # define MAXPATHLEN PATHSIZE 56968040Seric # define LA_TYPE LA_SHORT 57068040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 57168040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 57268040Seric # undef NETUNIX /* no unix domain socket support */ 57368040Seric # undef WIFEXITED 57468040Seric # undef WEXITSTATUS 57568040Seric # define strtoul strtol /* gcc library bogosity */ 57668040Seric 57768040Seric typedef unsigned short uid_t; 57868040Seric typedef unsigned short gid_t; 57968040Seric typedef short pid_t; 58068040Seric #endif 58168040Seric 58268040Seric 58368040Seric /* 58463962Seric ** ConvexOS 11.0 and later 58565949Seric ** 58665949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 58765949Seric ** works on 9.1 as well. 58863962Seric */ 58963962Seric 59063962Seric #ifdef _CONVEX_SOURCE 59163977Seric # define BSD 1 /* include all the BSD defines */ 59263977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 59363962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 59463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 59563962Seric # define LA_TYPE LA_FLOAT 59665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 59765949Seric # ifndef _PATH_SENDMAILCF 59865949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 59965949Seric # endif 60065949Seric # ifndef S_IREAD 60165949Seric # define S_IREAD _S_IREAD 60265949Seric # define S_IWRITE _S_IWRITE 60365949Seric # define S_IEXEC _S_IEXEC 60465949Seric # define S_IFMT _S_IFMT 60565949Seric # define S_IFCHR _S_IFCHR 60665949Seric # define S_IFBLK _S_IFBLK 60765949Seric # endif 60865167Seric # ifndef IDENTPROTO 60965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 61065167Seric # endif 61163962Seric #endif 61263962Seric 61364314Seric 61463962Seric /* 61564999Seric ** RISC/os 4.52 61663962Seric ** 61764999Seric ** Gives a ton of warning messages, but otherwise compiles. 61863962Seric */ 61963962Seric 62063965Seric #ifdef RISCOS 62164999Seric 62263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 62366226Seric # ifndef HASFLOCK 62465830Seric # define HASFLOCK 1 /* has flock(2) call */ 62565830Seric # endif 62664999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 62764999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 62863962Seric # define LA_TYPE LA_INT 62963962Seric # define LA_AVENRUN "avenrun" 63063962Seric # define _PATH_UNIX "/unix" 63164999Seric # undef WIFEXITED 63264999Seric 63364999Seric # define setpgid setpgrp 63464999Seric 63564999Seric extern int errno; 63664999Seric typedef int pid_t; 63764999Seric #define SIGFUNC_DEFINED 63864999Seric typedef int (*sigfunc_t)(); 63964999Seric extern char *getenv(); 64064999Seric extern void *malloc(); 64164999Seric 64263962Seric #endif 64363962Seric 64464314Seric 64564155Seric /* 64664155Seric ** Linux 0.99pl10 and above... 64766300Seric ** 64866300Seric ** Thanks to, in reverse order of contact: 64966300Seric ** 65067885Seric ** Andrew Pam <avatar@aus.xanadu.com> 65166300Seric ** John Kennedy <warlock@csuchico.edu> 65266300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 65366300Seric ** Karl London <karl@borg.demon.co.uk> 65466300Seric ** 65566300Seric ** Last compiled against: [03/02/94 @ 05:34 PM (Wednesday)] 65666300Seric ** sendmail 8.6.6.b9 named 4.9.2-931205-p1 db-1.73 65766300Seric ** gcc 2.5.8 libc.so.4.5.19 65866300Seric ** slackware 1.1.2 linux 0.99.15 65964155Seric */ 66064155Seric 66164770Seric #ifdef __linux__ 66266298Seric # define BSD 1 /* include BSD defines */ 66364155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 66466298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 66564380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 66666298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 66766300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 66867885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 66964155Seric # ifndef LA_TYPE 67066301Seric # define LA_TYPE LA_PROCSTR 67164155Seric # endif 67266300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 67364763Seric # include <sys/sysmacros.h> 67466300Seric # undef atol /* wounded in <stdlib.h> */ 67564155Seric #endif 67664155Seric 67764155Seric 67864345Seric /* 67964345Seric ** DELL SVR4 Issue 2.2, and others 68064345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 68164345Seric ** 68264345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 68364345Seric ** defined, and the definitions conflict. 68464924Seric ** 68564924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 68664924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 68764924Seric ** (SVR4.0/386 version 3.0). 68864345Seric */ 68964345Seric 69064345Seric #ifdef DELL_SVR4 69165189Seric /* no changes necessary */ 69265189Seric /* see general __svr4__ defines below */ 69364345Seric #endif 69464345Seric 69564345Seric 69664380Seric /* 69764380Seric ** Apple A/UX 3.0 69864380Seric */ 69964345Seric 70064380Seric #ifdef _AUX_SOURCE 70164729Seric # include <sys/sysmacros.h> 70264380Seric # define BSD /* has BSD routines */ 70364380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 70464380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 70564561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 70665167Seric # ifndef IDENTPROTO 70765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 70865167Seric # endif 70964380Seric # define FORK fork 71064380Seric # ifndef _PATH_SENDMAILCF 71164380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 71264380Seric # endif 71364380Seric # ifndef LA_TYPE 71464380Seric # define LA_TYPE LA_ZERO 71564380Seric # endif 71665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 71764560Seric # undef WIFEXITED 71864560Seric # undef WEXITSTATUS 71964380Seric #endif 72064380Seric 72164380Seric 72264705Seric /* 72364705Seric ** Encore UMAX V 72464705Seric ** 72564705Seric ** Not extensively tested. 72664705Seric */ 72764380Seric 72864705Seric #ifdef UMAXV 72964705Seric # include <limits.h> 73064705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 73164705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 73264705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 73365211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 73464705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 73564705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 73664705Seric # define FORK fork /* no vfork(2) primitive available */ 73765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 73864705Seric # define MAXPATHLEN PATH_MAX 73964705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 74064705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 74164705Seric # undef WIFEXITED 74264705Seric # undef WEXITSTATUS 74364705Seric #endif 74464705Seric 74564705Seric 74664939Seric /* 74764939Seric ** Stardent Titan 3000 running TitanOS 4.2. 74864939Seric ** 74964939Seric ** Must be compiled in "cc -43" mode. 75064939Seric ** 75164944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 75264939Seric ** 75364939Seric ** Note the tweaking below after the BSD defines are set. 75464939Seric */ 75564705Seric 75664939Seric #ifdef titan 75764939Seric # define setpgid setpgrp 75864939Seric typedef int pid_t; 75964939Seric # undef WIFEXITED 76064939Seric # undef WEXITSTATUS 76164939Seric #endif 76264939Seric 76364939Seric 76464962Seric /* 76564962Seric ** Sequent DYNIX 3.2.0 76664962Seric ** 76764962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 76864962Seric */ 76964939Seric 77064962Seric #ifdef sequent 77166038Seric 77264962Seric # define BSD 1 77364962Seric # define HASUNSETENV 1 77464962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 77564962Seric # define WAITUNION 1 77664962Seric # define LA_TYPE LA_FLOAT 77764962Seric # ifdef _POSIX_VERSION 77864962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 77964962Seric # endif 78064962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 78164962Seric # define setpgid setpgrp 78264962Seric 78364962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 78464962Seric # undef WIFEXITED 78564962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 78664962Seric ((union wait*)&(s))->w_termsig == 0) 78764962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 78864962Seric typedef int pid_t; 78964962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 79064962Seric 79166144Seric # ifndef IDENTPROTO 79266144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 79366144Seric # endif 79466144Seric 79564962Seric # ifndef _PATH_UNIX 79664962Seric # define _PATH_UNIX "/dynix" 79764962Seric # endif 79864962Seric # ifndef _PATH_SENDMAILCF 79964962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 80064962Seric # endif 80164962Seric 80264962Seric #endif 80364962Seric 80464962Seric 80565748Seric /* 80666038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 80766038Seric ** 80866038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 80966038Seric ** 81066038Seric ** From Tim Wright <timw@sequent.com>. 81166038Seric */ 81266038Seric 81366038Seric #ifdef _SEQUENT_ 81466038Seric # define SYSTEM5 1 /* include all the System V defines */ 81566038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 81666038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 81766038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 81866038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 81966038Seric # define GIDSET_T gid_t 82066038Seric # define LA_TYPE LA_INT 82166038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 82267771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 82366144Seric # ifndef IDENTPROTO 82466144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 82566144Seric # endif 82666038Seric # ifndef _PATH_SENDMAILCF 82766038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 82866038Seric # endif 82966038Seric # ifndef _PATH_SENDMAILPID 83066038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 83166038Seric # endif 83266038Seric #endif 83366038Seric 83466038Seric 83566038Seric /* 83665748Seric ** Cray Unicos 83765748Seric ** 83865748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 83965748Seric */ 84064962Seric 84165748Seric #ifdef UNICOS 84265748Seric # define SYSTEM5 1 /* include all the System V defines */ 84365748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 84465748Seric # define MAXPATHLEN PATHSIZE 84565748Seric # define LA_TYPE LA_ZERO 84665749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 84765748Seric #endif 84864962Seric 84965748Seric 85065820Seric /* 85165820Seric ** Apollo DomainOS 85265820Seric ** 85365820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 85465982Seric ** 85565820Seric ** 15 Jan 1994 85665820Seric ** 85765820Seric */ 85865748Seric 85965820Seric #ifdef apollo 86065820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 86165820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 86267771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 86365820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 86466044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 86565820Seric # ifndef _PATH_SENDMAILCF 86665820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 86765820Seric # endif 86865820Seric # ifndef _PATH_SENDMAILPID 86965820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 87065820Seric # endif 87165820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 87265820Seric # undef S_IFIFO 87365820Seric # define S_IFIFO 0010000 87465820Seric # ifndef IDENTPROTO 87565820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 87665820Seric # endif 87765982Seric #endif 87865820Seric 87965820Seric 88066748Seric /* 88167745Seric ** UnixWare 1.1.2. 88266752Seric ** 88366752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 88466752Seric */ 88566752Seric 88666752Seric #ifdef UNIXWARE 88766752Seric # define SYSTEM5 1 88867745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 88967745Seric # define HASGETDTABLESIZE 1 89067745Seric # define HASSETREUID 1 89167745Seric # define HASSETSID 1 89267745Seric # define HASINITGROUPS 1 89367745Seric # define GIDSET_T gid_t 89467745Seric # define SLEEP_T unsigned 89566752Seric # define SFS_TYPE SFS_STATVFS 89666752Seric # define LA_TYPE LA_ZERO 89766752Seric # undef WIFEXITED 89866752Seric # undef WEXITSTATUS 89966752Seric # define _PATH_UNIX "/unix" 90066752Seric # ifndef _PATH_SENDMAILCF 90166752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 90266752Seric # endif 90366752Seric # ifndef _PATH_SENDMAILPID 90466752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 90566752Seric # endif 90666752Seric # define SYSLOG_BUFSIZE 128 90766752Seric #endif 90866752Seric 90966752Seric 91066752Seric /* 91166748Seric ** Intergraph CLIX 3.1 91266748Seric ** 91366748Seric ** From Paul Southworth <pauls@locust.cic.net> 91466748Seric */ 91565820Seric 91666748Seric #ifdef CLIX 91766748Seric # define SYSTEM5 1 /* looks like System V */ 91866752Seric # ifndef HASGETUSERSHELL 91966752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 92066752Seric # endif 92166748Seric # define DEV_BSIZE 512 /* device block size not defined */ 92266748Seric # define GIDSET_T gid_t 92366748Seric # undef LOG /* syslog not available */ 92466748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 92566748Seric # define GETSHORT _getshort 92666748Seric #endif 92765820Seric 92866748Seric 92966776Seric /* 93066776Seric ** NCR 3000 Series (SysVr4) 93166776Seric ** 93267434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 93366776Seric */ 93466748Seric 93566776Seric #ifdef NCR3000 93666776Seric # define __svr4__ 93766776Seric # undef BSD 93866776Seric # define LA_AVENRUN "avenrun" 93966776Seric #endif 94066748Seric 94166776Seric 94267434Seric /* 94367434Seric ** Tandem NonStop-UX SVR4 94467434Seric ** 94567434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 94667434Seric */ 94766776Seric 94867434Seric #ifdef NonStop_UX_BXX 94967434Seric # define __svr4__ 95067434Seric #endif 95166776Seric 95267434Seric 95367488Seric /* 95467488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 95567488Seric ** 95667488Seric ** Tested for 1.04 and 1.03 95767488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 95867488Seric */ 95967434Seric 96067488Seric #ifdef __H3050R 96167488Seric # define SYSTEM5 1 /* include all the System V defines */ 96267488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 96367488Seric # define setreuid(r, e) setresuid(r, e, -1) 96467488Seric # define LA_TYPE LA_FLOAT 96567488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 96667488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 96767488Seric # ifndef GIDSET_T 96867488Seric # define GIDSET_T gid_t 96967488Seric # endif 97067488Seric # ifndef _PATH_UNIX 97167488Seric # define _PATH_UNIX "/HI-UX" 97267488Seric # endif 97367488Seric # ifndef _PATH_SENDMAILCF 97467488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 97567488Seric # endif 97667488Seric # ifndef IDENTPROTO 97767488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 97867488Seric # endif 97967488Seric # ifndef HASGETUSERSHELL 98067488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 98167488Seric # endif 98267488Seric 98367488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 98467488Seric # undef m_flags 98567488Seric 98667488Seric # ifdef __STDC__ 98767488Seric extern int syslog(int, char *, ...); 98867488Seric # endif 98967488Seric 99067488Seric #endif 99167488Seric 99267488Seric 99367488Seric 99463902Seric /********************************************************************** 99563787Seric ** End of Per-Operating System defines 99663902Seric **********************************************************************/ 99763787Seric 99863949Seric /********************************************************************** 99963949Seric ** More general defines 100063949Seric **********************************************************************/ 100163949Seric 100263962Seric /* general BSD defines */ 100363962Seric #ifdef BSD 100464035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 100564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 100667742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 100767430Seric # ifndef HASSETRLIMIT 100867430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 100967430Seric # endif 101065830Seric # ifndef HASFLOCK 101165830Seric # define HASFLOCK 1 /* has flock(2) call */ 101265830Seric # endif 101367602Seric # ifndef TZ_TYPE 101467608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 101567602Seric # endif 101663962Seric #endif 101763962Seric 101865189Seric /* general System V Release 4 defines */ 101965189Seric #ifdef __svr4__ 102065189Seric # define SYSTEM5 1 102165189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 102267742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 102367742Seric # ifndef HASSETRLIMIT 102467742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 102567742Seric # endif 102665211Seric # ifndef HASGETUSERSHELL 102765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 102865210Seric # endif 102965189Seric # define setreuid(r, e) seteuid(e) 103065189Seric 103165189Seric # ifndef _PATH_UNIX 103265189Seric # define _PATH_UNIX "/unix" 103365189Seric # endif 103465189Seric # ifndef _PATH_SENDMAILCF 103565189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 103665189Seric # endif 103765189Seric # ifndef _PATH_SENDMAILPID 103865189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 103965189Seric # endif 104065189Seric # ifndef SYSLOG_BUFSIZE 104165189Seric # define SYSLOG_BUFSIZE 128 104265189Seric # endif 104367159Seric # ifndef SFS_TYPE 104467159Seric # define SFS_TYPE SFS_STATVFS 104567159Seric # endif 104665189Seric #endif 104765189Seric 104863787Seric /* general System V defines */ 104966298Seric #ifdef SYSTEM5 105064813Seric # include <sys/sysmacros.h> 105163949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 105264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 105364962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 105467430Seric # ifndef HASULIMIT 105567430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 105667430Seric # endif 105763962Seric # ifndef LA_TYPE 105865749Seric # define LA_TYPE LA_INT /* assume integer load average */ 105963962Seric # endif 106065749Seric # ifndef SFS_TYPE 106165749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 106265749Seric # endif 106367602Seric # ifndef TZ_TYPE 106467608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 106567602Seric # endif 106668040Seric # ifndef ALTOS_SYS_V 106768040Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 106868040Seric # define bzero(d, l) (memset((d), '\0', (l))) 106968040Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 107068040Seric # endif 107166298Seric #endif 107263787Seric 107363949Seric /* general POSIX defines */ 107463949Seric #ifdef _POSIX_VERSION 107564718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 107664718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 107763949Seric #endif 107863949Seric 107963787Seric /* 108063937Seric ** If no type for argument two of getgroups call is defined, assume 108163937Seric ** it's an integer -- unfortunately, there seem to be several choices 108263937Seric ** here. 108363937Seric */ 108463937Seric 108563937Seric #ifndef GIDSET_T 108663937Seric # define GIDSET_T int 108763937Seric #endif 108863937Seric 108964939Seric /* 109064939Seric ** Tweaking for systems that (for example) claim to be BSD but 109164939Seric ** don't have all the standard BSD routines (boo hiss). 109264939Seric */ 109364439Seric 109464939Seric #ifdef titan 109564939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 109664939Seric #endif 109764939Seric 109865830Seric 109965167Seric /* 110065167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 110165167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 110265167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 110365167Seric ** are closed. Some firewalls return this error if you try to connect 110465167Seric ** to the IDENT port (113), so you can't receive email from these hosts 110565167Seric ** on these systems. The firewall really should use a more specific 110665167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 110765167Seric ** not explicitly set to zero above, default it on. 110865167Seric */ 110964939Seric 111065167Seric #ifndef IDENTPROTO 111165167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 111265167Seric #endif 111365167Seric 111465211Seric #ifndef HASGETUSERSHELL 111565211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 111665210Seric #endif 111765167Seric 111865830Seric #ifndef HASFLOCK 111965830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 112065830Seric #endif 112165210Seric 112267430Seric #ifndef HASSETRLIMIT 112367430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 112467430Seric #endif 112567430Seric 112667430Seric #ifndef HASULIMIT 112767430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 112867430Seric #endif 112967430Seric 113066843Seric #ifndef OLD_NEWDB 113166843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 113266843Seric #endif 113365830Seric 113466843Seric 113564439Seric /********************************************************************** 113659023Seric ** Remaining definitions should never have to be changed. They are 113759023Seric ** primarily to provide back compatibility for older systems -- for 113859287Seric ** example, it includes some POSIX compatibility definitions 113964439Seric **********************************************************************/ 114059023Seric 114159388Seric /* System 5 compatibility */ 114259388Seric #ifndef S_ISREG 114364944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 114459388Seric #endif 114564944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 114664944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 114764944Seric #endif 114859388Seric #ifndef S_IWGRP 114959388Seric #define S_IWGRP 020 115059388Seric #endif 115159388Seric #ifndef S_IWOTH 115259388Seric #define S_IWOTH 002 115359388Seric #endif 115459388Seric 115559023Seric /* 115650537Seric ** Older systems don't have this error code -- it should be in 115750537Seric ** /usr/include/sysexits.h. 115850537Seric */ 115950537Seric 116050537Seric # ifndef EX_CONFIG 116150537Seric # define EX_CONFIG 78 /* configuration error */ 116250537Seric # endif 116356852Seric 116464718Seric /* pseudo-code used in server SMTP */ 116564718Seric # define EX_QUIT 22 /* drop out of server immediately */ 116664718Seric 116764718Seric 116863993Seric /* 116963993Seric ** These are used in a few cases where we need some special 117063993Seric ** error codes, but where the system doesn't provide something 117163993Seric ** reasonable. They are printed in errstring. 117263993Seric */ 117363993Seric 117463993Seric #ifndef E_PSEUDOBASE 117563993Seric # define E_PSEUDOBASE 256 117663993Seric #endif 117763993Seric 117863993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 117963993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 118063993Seric 118163970Seric /* type of arbitrary pointer */ 118263970Seric #ifndef ARBPTR_T 118363970Seric # define ARBPTR_T void * 118463970Seric #endif 118563970Seric 118660568Seric #ifndef __P 118760568Seric # include "cdefs.h" 118860568Seric #endif 118960568Seric 119067421Seric #if NAMED_BIND 119167421Seric # include <arpa/nameser.h> 119267434Seric # ifdef __svr4__ 119367434Seric # ifdef NOERROR 119467434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 119567434Seric # endif 119667434Seric # endif 119767421Seric #endif 119867421Seric 119956852Seric /* 120067419Seric ** The size of an IP address -- can't use sizeof because of problems 120167419Seric ** on Crays, where everything is 64 bits. This will break if/when 120267419Seric ** IP addresses are expanded to eight bytes. 120367419Seric */ 120467419Seric 120567421Seric #ifndef INADDRSZ 120667421Seric # define INADDRSZ 4 120767421Seric #endif 120867419Seric 120967419Seric /* 121067421Seric ** The size of various known types -- for reading network protocols. 121167421Seric ** Again, we can't use sizeof because of compiler randomness. 121267421Seric */ 121367421Seric 121467421Seric #ifndef INT16SZ 121567421Seric # define INT16SZ 2 121667421Seric #endif 121767421Seric #ifndef INT32SZ 121867421Seric # define INT32SZ 4 121967421Seric #endif 122067421Seric 122167421Seric /* 122258778Seric ** Do some required dependencies 122358778Seric */ 122458778Seric 122558778Seric #if defined(NETINET) || defined(NETISO) 122659107Seric # define SMTP 1 /* enable user and server SMTP */ 122759107Seric # define QUEUE 1 /* enable queueing */ 122859107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 122958778Seric #endif 123058778Seric 123158778Seric 123258778Seric /* 123356852Seric ** Arrange to use either varargs or stdargs 123456852Seric */ 123556852Seric 123656852Seric # ifdef __STDC__ 123756852Seric 123856852Seric # include <stdarg.h> 123956852Seric 124056852Seric # define VA_LOCAL_DECL va_list ap; 124156852Seric # define VA_START(f) va_start(ap, f) 124256852Seric # define VA_END va_end(ap) 124356852Seric 124456852Seric # else 124556852Seric 124656852Seric # include <varargs.h> 124756852Seric 124856852Seric # define VA_LOCAL_DECL va_list ap; 124956852Seric # define VA_START(f) va_start(ap) 125056852Seric # define VA_END va_end(ap) 125156852Seric 125256852Seric # endif 125357631Seric 125457943Seric #ifdef HASUNAME 125557631Seric # include <sys/utsname.h> 125657631Seric # ifdef newstr 125757631Seric # undef newstr 125857631Seric # endif 125957943Seric #else /* ! HASUNAME */ 126057631Seric # define NODE_LENGTH 32 126157631Seric struct utsname 126257631Seric { 126357631Seric char nodename[NODE_LENGTH+1]; 126457631Seric }; 126557943Seric #endif /* HASUNAME */ 126657642Seric 126768040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 126863838Seric # define MAXHOSTNAMELEN 256 126957735Seric #endif 127058153Seric 127158153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 127258153Seric # define SIGCHLD SIGCLD 127358153Seric #endif 127458153Seric 127558153Seric #ifndef STDIN_FILENO 127658153Seric #define STDIN_FILENO 0 127758153Seric #endif 127858153Seric 127958153Seric #ifndef STDOUT_FILENO 128058153Seric #define STDOUT_FILENO 1 128158153Seric #endif 128258153Seric 128358153Seric #ifndef STDERR_FILENO 128458153Seric #define STDERR_FILENO 2 128558153Seric #endif 128658689Seric 128764072Seric #ifndef LOCK_SH 128864035Seric # define LOCK_SH 0x01 /* shared lock */ 128964035Seric # define LOCK_EX 0x02 /* exclusive lock */ 129064035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 129164035Seric # define LOCK_UN 0x08 /* unlock */ 129264035Seric #endif 129358692Seric 129464035Seric #ifndef SIG_ERR 129564035Seric # define SIG_ERR ((void (*)()) -1) 129658689Seric #endif 129758702Seric 129864500Seric #ifndef WEXITSTATUS 129964500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 130064500Seric #endif 130164500Seric #ifndef WIFEXITED 130264500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 130364500Seric #endif 130464500Seric 130564561Seric #ifndef SIGFUNC_DEFINED 130664561Seric typedef void (*sigfunc_t) __P((int)); 130764561Seric #endif 130864561Seric 130965053Seric /* size of syslog buffer */ 131065053Seric #ifndef SYSLOG_BUFSIZE 131165053Seric # define SYSLOG_BUFSIZE 1024 131265053Seric #endif 131365053Seric 131458702Seric /* 131558702Seric ** Size of tobuf (deliver.c) 131658702Seric ** Tweak this to match your syslog implementation. It will have to 131758702Seric ** allow for the extra information printed. 131858702Seric */ 131958702Seric 132058702Seric #ifndef TOBUFSIZE 132165053Seric # if (SYSLOG_BUFSIZE) > 512 132265053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 132365053Seric # else 132465053Seric # define TOBUFSIZE 256 132565053Seric # endif 132658702Seric #endif 132760219Seric 132865015Seric /* 132965015Seric ** Size of prescan buffer. 133065015Seric ** Despite comments in the _sendmail_ book, this probably should 133165015Seric ** not be changed; there are some hard-to-define dependencies. 133265015Seric */ 133365015Seric 133465015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 133560219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 133660219Seric # ifndef FORK 133760219Seric # define FORK vfork /* function to call to fork mailer */ 133860219Seric # endif 133965955Seric 134065955Seric /* 134165955Seric ** If we are going to link scanf anyway, use it in readcf 134265955Seric */ 134365955Seric 134465955Seric #if !defined(HASUNAME) && !defined(SCANF) 134565955Seric # define SCANF 1 134665955Seric #endif 1347