19147Seric /* 268839Seric * Copyright (c) 1983, 1995 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*69473Seric * @(#)conf.h 8.159 (Berkeley) 05/15/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> 2268693Seric # include <netdb.h> 2368693Seric # include <pwd.h> 2457232Seric 2563902Seric /********************************************************************** 269147Seric ** Table sizes, etc.... 279147Seric ** There shouldn't be much need to change these.... 2863902Seric **********************************************************************/ 299147Seric 3059303Seric # define MAXLINE 2048 /* max line length */ 3124945Seric # define MAXNAME 256 /* max length of a name */ 329147Seric # define MAXPV 40 /* max # of parms to mailers */ 3359303Seric # define MAXATOM 200 /* max atoms per address */ 349147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3568384Seric # define MAXRWSETS 200 /* max # of sets of rewriting rules */ 369147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3757143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 3852106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 3957232Seric # define MAXKEY 128 /* maximum size of a database key */ 4057232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 4159056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4259667Seric # define MAXALIASDB 12 /* max # of alias databases */ 4367729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 4467729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 4568517Seric # define MAXMIMEARGS 20 /* max args in Content-Type: */ 4668517Seric # define MAXMIMENESTING 20 /* max MIME multipart nesting */ 4757143Seric 4857143Seric # ifndef QUEUESIZE 4957143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 5057143Seric # endif 5157143Seric 5263902Seric /********************************************************************** 539147Seric ** Compilation options. 5425673Seric ** 5525673Seric ** #define these if they are available; comment them out otherwise. 5663902Seric **********************************************************************/ 579147Seric 5825673Seric # define LOG 1 /* enable logging */ 5925673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 6064813Seric # define NETUNIX 1 /* include unix domain support */ 6158778Seric # define NETINET 1 /* include internet support */ 6253735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6363753Seric # define XDEBUG 1 /* enable extended debugging */ 6468785Seric # if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB) 6568848Seric # define USERDB 1 /* look in user database */ 6656337Seric # endif 6756337Seric 6866334Seric /********************************************************************** 6966334Seric ** 0/1 Compilation options. 7066334Seric ** #define these to 1 if they are available; 7166334Seric ** #define them to 0 otherwise. 7266334Seric **********************************************************************/ 7366334Seric 7466334Seric # ifndef NAMED_BIND 7566334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7666334Seric # endif 7766334Seric 7868848Seric # ifndef DSN 7968848Seric # define DSN 1 /* include delivery status notification code */ 8068848Seric # endif 8168848Seric 8264032Seric /* 8364944Seric ** Most systems have symbolic links today, so default them on. You 8464944Seric ** can turn them off by #undef'ing this below. 8564944Seric */ 8664944Seric 8764944Seric # define HASLSTAT 1 /* has lstat(2) call */ 8864944Seric 8964962Seric /* 9064962Seric ** General "standard C" defines. 9164962Seric ** 9264962Seric ** These may be undone later, to cope with systems that claim to 9364962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 9464962Seric ** doesn't realize that the library is part of the language. 9564962Seric ** 9664962Seric ** Life would be much easier if we could get rid of this sort 9764962Seric ** of bozo problems. 9864962Seric */ 9964962Seric 10064962Seric #ifdef __STDC__ 10164962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 10264962Seric #endif 10364962Seric 10463902Seric /********************************************************************** 10559023Seric ** Operating system configuration. 10659023Seric ** 10759023Seric ** Unless you are porting to a new OS, you shouldn't have to 10859023Seric ** change these. 10963902Seric **********************************************************************/ 11056823Seric 11163787Seric /* 11263787Seric ** Per-Operating System defines 11363787Seric */ 11463787Seric 11564314Seric 11663902Seric /* 11765565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 11868889Seric ** 11968889Seric ** If V4FS is defined, compile for HP-UX 10.0. 12063902Seric */ 12163902Seric 12267626Seric #ifdef __hpux 12368889Seric /* common definitions for HP-UX 9.x and 10.x */ 12468889Seric # undef m_flags /* conflict between db.h & sys/sysmacros.h on HP 300 */ 12563787Seric # define SYSTEM5 1 /* include all the System V defines */ 12664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 12764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 12865982Seric # define setreuid(r, e) setresuid(r, e, -1) 12969462Seric # define LA_TYPE LA_HPUX 13068873Seric # define SPT_TYPE SPT_PSTAT 13165749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 13265354Seric # define GIDSET_T gid_t 13365581Seric # ifndef HASGETUSERSHELL 13465581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13565581Seric # endif 13665504Seric # define syslog hard_syslog 13765581Seric # ifdef __STDC__ 13865581Seric extern int syslog(int, char *, ...); 13965167Seric # endif 14068889Seric 14168889Seric # ifdef V4FS 14268889Seric /* HP-UX 10.x */ 14368889Seric # define _PATH_UNIX "/stand/vmunix" 14468889Seric # ifndef _PATH_SENDMAILCF 14568889Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 14668889Seric # endif 14768889Seric # ifndef _PATH_SENDMAILPID 14868889Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 14968889Seric # endif 15068889Seric # ifndef IDENTPROTO 15168889Seric # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ 15268889Seric # endif 15368889Seric 15468889Seric # else 15568889Seric /* HP-UX 9.x */ 15668889Seric # define _PATH_UNIX "/hp-ux" 15768889Seric # ifndef _PATH_SENDMAILCF 15868889Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 15968889Seric # endif 16068889Seric # ifndef IDENTPROTO 16168889Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 16268889Seric # endif 16368889Seric # endif 16468889Seric 16567626Seric #endif 16656823Seric 16764314Seric 16863902Seric /* 16963902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 17063902Seric */ 17163902Seric 17267626Seric #ifdef _AIX3 17364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 17464840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 17565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 17660219Seric # define FORK fork /* no vfork primitive available */ 17765749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 17867771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 17968145Seric # define LA_TYPE LA_INT 18067626Seric #endif 18160219Seric 18264314Seric 18363902Seric /* 18463902Seric ** Silicon Graphics IRIX 18563902Seric ** 18663965Seric ** Compiles on 4.0.1. 18767967Seric ** 18868686Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). 18968686Seric ** Use IRIX5 instead of IRIX for IRIX 5.x. 19067967Seric ** 19167967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 19268686Seric ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. 19363902Seric */ 19463902Seric 19568686Seric #if defined(IRIX64) || defined(IRIX5) 19667967Seric # define IRIX 19767967Seric #endif 19867967Seric 19967626Seric #ifdef IRIX 20066763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 20164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 20264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 20365211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 20463753Seric # define FORK fork /* no vfork primitive available */ 20568686Seric # if !defined(IRIX64) && !defined(IRIX5) 20668225Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 20768225Seric # endif 20864155Seric # define setpgid BSDsetpgrp 20963937Seric # define GIDSET_T gid_t 21068705Seric # define ARGV_T const char ** 21165749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 21268439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 21366763Seric # define LA_TYPE LA_INT 21467967Seric # ifdef IRIX64 21567967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 21667967Seric # else 21767967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 21867967Seric # endif 21967626Seric #endif 22063753Seric 22163902Seric 22263902Seric /* 22364813Seric ** SunOS and Solaris 22464813Seric ** 22564813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 22664813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 22763902Seric */ 22863902Seric 22963787Seric #if defined(sun) && !defined(BSD) 23059074Seric 23164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 23264813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 23365211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 23465749Seric # define LA_TYPE LA_INT 23560564Seric 23664842Seric # ifdef SOLARIS_2_3 23768813Seric # define SOLARIS 203 /* for back compat only -- use -DSOLARIS=203 */ 23864842Seric # endif 23964842Seric 24060602Seric # ifdef SOLARIS 24163902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 24265222Seric # ifndef __svr4__ 24365222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 24465222Seric # endif 24563787Seric # include <sys/time.h> 24665172Seric # define GIDSET_T gid_t 24765189Seric # ifndef _PATH_UNIX 24867129Seric # define _PATH_UNIX "/dev/ksyms" 24965189Seric # endif 25063962Seric # ifndef _PATH_SENDMAILCF 25163962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 25264072Seric # endif 25364072Seric # ifndef _PATH_SENDMAILPID 25463962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 25563962Seric # endif 25669401Seric # ifndef _PATH_HOSTS 25769401Seric # define _PATH_HOSTS "/etc/inet/hosts" 25869401Seric # endif 25966022Seric # ifndef SYSLOG_BUFSIZE 26066022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 26166022Seric # endif 26263787Seric 26360602Seric # else 26465105Seric /* SunOS 4.0.3 or 4.1.x */ 26565189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 26665830Seric # ifndef HASFLOCK 26765830Seric # define HASFLOCK 1 /* has flock(2) call */ 26865830Seric # endif 26965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 27060564Seric # include <vfork.h> 27163787Seric 27265105Seric # ifdef SUNOS403 27365105Seric /* special tweaking for SunOS 4.0.3 */ 27465105Seric # include <malloc.h> 27565105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 27665105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 27765105Seric # undef WIFEXITED 27865105Seric # undef WEXITSTATUS 27965105Seric # undef HASUNAME 28065105Seric # define setpgid setpgrp 28165105Seric typedef int pid_t; 28265105Seric extern char *getenv(); 28365105Seric 28466732Seric # else 28566732Seric /* 4.1.x specifics */ 28666732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 28766732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 28866732Seric 28965105Seric # endif 29060564Seric # endif 29159023Seric #endif 29259023Seric 29364718Seric /* 29464813Seric ** DG/UX 29564813Seric ** 29667427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 29767427Seric ** older support. 29867427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 29964718Seric */ 30064314Seric 30167427Seric #ifdef DGUX_5_4_2 30267427Seric # define DGUX 1 30367427Seric #endif 30467427Seric 30564718Seric #ifdef DGUX 30664718Seric # define SYSTEM5 1 30769462Seric # define LA_TYPE LA_DGUX 30864718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 30964718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 31064718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 31164718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 31266036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 31365167Seric # ifndef IDENTPROTO 31465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 31565167Seric # endif 31667771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 31765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 31864813Seric 31964813Seric /* these include files must be included early on DG/UX */ 32064813Seric # include <netinet/in.h> 32164813Seric # include <arpa/inet.h> 32264813Seric 32367427Seric # ifdef DGUX_5_4_2 32467427Seric # define inet_addr dgux_inet_addr 32564718Seric extern long dgux_inet_addr(); 32667427Seric # endif 32764718Seric #endif 32864718Seric 32964718Seric 33063902Seric /* 33163902Seric ** Digital Ultrix 4.2A or 4.3 33264264Seric ** 33364264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 33464264Seric ** not dropped when the process exits. This causes major problems, 33564264Seric ** so flock is the only alternative. 33663902Seric */ 33763902Seric 33860564Seric #ifdef ultrix 33964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 34063962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 34164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 34266242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 34365830Seric # ifndef HASFLOCK 34465830Seric # define HASFLOCK 1 /* has flock(2) call */ 34565830Seric # endif 34665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 34769279Seric # ifndef BROKEN_RES_SEARCH 34869279Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 34969279Seric # endif 35065135Seric # ifdef vax 35165135Seric # define LA_TYPE LA_FLOAT 35265135Seric # else 35365135Seric # define LA_TYPE LA_INT 35465135Seric # define LA_AVENRUN "avenrun" 35565135Seric # endif 35665749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 35765167Seric # ifndef IDENTPROTO 35869279Seric # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ 35965167Seric # endif 36060564Seric #endif 36160564Seric 36264314Seric 36363902Seric /* 36468072Seric ** OSF/1 for Intel Paragon. 36568072Seric ** 36668082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 36768082Seric ** of Intel Scalable Systems Divison. 36868072Seric */ 36968072Seric 37068072Seric #ifdef __PARAGON__ 37168072Seric # define __osf__ 1 /* get OSF/1 defines below */ 37268072Seric # ifndef _PATH_SENDMAILCF 37368072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 37468072Seric # endif 37568072Seric #endif 37668072Seric 37768072Seric 37868072Seric /* 37963902Seric ** OSF/1 (tested on Alpha) 38063902Seric */ 38163902Seric 38263787Seric #ifdef __osf__ 38363962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 38464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 38564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 38666226Seric # ifndef HASFLOCK 38765830Seric # define HASFLOCK 1 /* has flock(2) call */ 38865830Seric # endif 38963962Seric # define LA_TYPE LA_INT 39065749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 39164813Seric # ifndef _PATH_SENDMAILPID 39265504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 39364813Seric # endif 39459287Seric #endif 39559287Seric 39664314Seric 39763902Seric /* 39863902Seric ** NeXTstep 39963902Seric */ 40063902Seric 40164076Seric #ifdef NeXT 40264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 40365830Seric # ifndef HASFLOCK 40465830Seric # define HASFLOCK 1 /* has flock(2) call */ 40565830Seric # endif 40664125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 40764563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 40868705Seric # define UID_T int /* compiler gripes on uid_t */ 40963753Seric # define sleep sleepX 41064155Seric # define setpgid setpgrp 41164295Seric # ifndef LA_TYPE 41264295Seric # define LA_TYPE LA_MACH 41364295Seric # endif 41465749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 41564500Seric # ifndef _POSIX_SOURCE 41664035Seric typedef int pid_t; 41764500Seric # undef WEXITSTATUS 41864500Seric # undef WIFEXITED 41964500Seric # endif 42064072Seric # ifndef _PATH_SENDMAILCF 42164072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 42264072Seric # endif 42364072Seric # ifndef _PATH_SENDMAILPID 42464072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 42564072Seric # endif 42659288Seric #endif 42759288Seric 42864314Seric 42963902Seric /* 43063962Seric ** 4.4 BSD 43164831Seric ** 43264831Seric ** See also BSD defines. 43363902Seric */ 43463902Seric 43560568Seric #ifdef BSD4_4 43664072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 43760568Seric # include <sys/cdefs.h> 43863838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 43964072Seric # ifndef LA_TYPE 44064072Seric # define LA_TYPE LA_SUBR 44164072Seric # endif 44265749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 44367771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 44460568Seric #endif 44560568Seric 44664314Seric 44763902Seric /* 44865982Seric ** BSD/386 (all versions) 44965982Seric ** From Tony Sanders, BSDI 45065982Seric */ 45165982Seric 45265982Seric #ifdef __bsdi__ 45365982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 45465982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 45566843Seric # include <sys/cdefs.h> 45666843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 45766030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 45866843Seric # ifndef LA_TYPE 45966843Seric # define LA_TYPE LA_SUBR 46066843Seric # endif 46168753Seric # define GIDSET_T gid_t 46265982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 46366843Seric /* version 1.1 or later */ 46467771Seric # undef SPT_TYPE 46567771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 46666843Seric # else 46766843Seric /* version 1.0 or earlier */ 46866843Seric # ifndef OLD_NEWDB 46966843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 47066843Seric # endif 47167771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 47265982Seric # endif 47365982Seric #endif 47465982Seric 47565982Seric 47665982Seric 47765982Seric /* 47865049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 47964733Seric ** 48064733Seric ** 4.3BSD clone, closer to 4.4BSD 48164831Seric ** 48264831Seric ** See also BSD defines. 48364733Seric */ 48464733Seric 48565049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 48664733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 48764733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 48866754Seric # ifdef __NetBSD__ 48966754Seric # define HASUNAME 1 /* has uname(2) syscall */ 49066754Seric # endif 49164733Seric # include <sys/cdefs.h> 49264733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 49364733Seric # ifndef LA_TYPE 49464733Seric # define LA_TYPE LA_SUBR 49564733Seric # endif 49665749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 49764733Seric #endif 49864733Seric 49964733Seric 50064733Seric /* 50164813Seric ** Mach386 50264813Seric ** 50364813Seric ** For mt Xinu's Mach386 system. 50464813Seric */ 50564813Seric 50664813Seric #if defined(MACH) && defined(i386) 50764813Seric # define MACH386 1 50864813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 50964813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 51066226Seric # ifndef HASFLOCK 51165830Seric # define HASFLOCK 1 /* has flock(2) call */ 51265830Seric # endif 51364813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 51464813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 51564813Seric # define setpgid setpgrp 51664813Seric # ifndef LA_TYPE 51764813Seric # define LA_TYPE LA_FLOAT 51864813Seric # endif 51965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 52064962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 52164813Seric # undef WEXITSTATUS 52264813Seric # undef WIFEXITED 52364813Seric # ifndef _PATH_SENDMAILCF 52464813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 52564813Seric # endif 52664813Seric # ifndef _PATH_SENDMAILPID 52764813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 52864813Seric # endif 52964813Seric #endif 53064813Seric 53164813Seric 53264813Seric /* 53363969Seric ** 4.3 BSD -- this is for very old systems 53463969Seric ** 53565949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 53665949Seric ** 53763969Seric ** You'll also have to install a new resolver library. 53863969Seric ** I don't guarantee that support for this environment is complete. 53963969Seric */ 54063969Seric 54165949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 54263969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 54363969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 54463970Seric # define ARBPTR_T char * 54564155Seric # define setpgid setpgrp 54663969Seric # ifndef LA_TYPE 54763969Seric # define LA_TYPE LA_FLOAT 54863969Seric # endif 54963969Seric # ifndef _PATH_SENDMAILCF 55063969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 55163969Seric # endif 55265167Seric # ifndef IDENTPROTO 55365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 55465167Seric # endif 55564834Seric # undef WEXITSTATUS 55664834Seric # undef WIFEXITED 55764834Seric typedef short pid_t; 55864834Seric extern int errno; 55963969Seric #endif 56063969Seric 56164314Seric 56263969Seric /* 56363902Seric ** SCO Unix 56465087Seric ** 56565087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 56665087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 56765087Seric ** The second is, I believe, for an older version. 56863902Seric */ 56963902Seric 57065087Seric #ifdef _SCO_unix_4_2 57165087Seric # define _SCO_unix_ 57265087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 57366757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 57465087Seric # define _PATH_UNIX "/unix" 57565087Seric # ifndef _PATH_SENDMAILCF 57665087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 57765087Seric # endif 57865087Seric # ifndef _PATH_SENDMAILPID 57965087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 58065087Seric # endif 58165087Seric #endif 58265087Seric 58363838Seric #ifdef _SCO_unix_ 58463838Seric # define SYSTEM5 1 /* include all the System V defines */ 58564035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 58665212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 58763838Seric # define FORK fork 58863838Seric # define MAXPATHLEN PATHSIZE 58964718Seric # define LA_TYPE LA_SHORT 59067812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 59168439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 59267608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 59364813Seric # undef NETUNIX /* no unix domain socket support */ 59463838Seric #endif 59563838Seric 59664314Seric 59763962Seric /* 59868442Seric ** ISC (SunSoft) Unix. 59968442Seric ** 60068442Seric ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> 60168442Seric */ 60268442Seric 60368442Seric #ifdef ISC_UNIX 60468442Seric # include <net/errno.h> 60568442Seric # define SYSTEM5 1 /* include all the System V defines */ 60668442Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 60768442Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 60868442Seric # define HASSETREUID 1 /* has setreuid(2) call */ 60968442Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 61068442Seric # undef NETUNIX /* no unix domain socket support */ 61168442Seric # define FORK fork 61268442Seric # define MAXPATHLEN 1024 61368442Seric # define LA_TYPE LA_SHORT 61468442Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 61568442Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 61668442Seric # define _PATH_UNIX "/unix" 61768442Seric # ifndef _PATH_SENDMAILCF 61868442Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 61968442Seric # endif 62068442Seric # ifndef _PATH_SENDMAILPID 62168442Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 62268442Seric # endif 62368442Seric 62468442Seric typedef short pid_t; 62568442Seric 62668442Seric #endif 62768442Seric 62868442Seric 62968442Seric /* 63068040Seric ** Altos System V. 63168040Seric ** Contributed by Tim Rice <timr@crl.com>. 63268040Seric */ 63368040Seric 63468040Seric #ifdef ALTOS_SYS_V 63568040Seric # include <limits.h> 63668040Seric # define SYSTEM5 1 /* include all the System V defines */ 63768040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 63868040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 63968040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 64068040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 64168040Seric # define FORK fork 64268040Seric # define MAXPATHLEN PATHSIZE 64368040Seric # define LA_TYPE LA_SHORT 64468040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 64568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 64668040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 64768040Seric # undef NETUNIX /* no unix domain socket support */ 64868040Seric # undef WIFEXITED 64968040Seric # undef WEXITSTATUS 65068040Seric # define strtoul strtol /* gcc library bogosity */ 65168040Seric 65268040Seric typedef unsigned short uid_t; 65368040Seric typedef unsigned short gid_t; 65468040Seric typedef short pid_t; 65568040Seric #endif 65668040Seric 65768040Seric 65868040Seric /* 65963962Seric ** ConvexOS 11.0 and later 66065949Seric ** 66165949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 66265949Seric ** works on 9.1 as well. 66363962Seric */ 66463962Seric 66563962Seric #ifdef _CONVEX_SOURCE 66663977Seric # define BSD 1 /* include all the BSD defines */ 66763977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 66863962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 66963977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 67063962Seric # define LA_TYPE LA_FLOAT 67165749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 67265949Seric # ifndef _PATH_SENDMAILCF 67365949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 67465949Seric # endif 67565949Seric # ifndef S_IREAD 67665949Seric # define S_IREAD _S_IREAD 67765949Seric # define S_IWRITE _S_IWRITE 67865949Seric # define S_IEXEC _S_IEXEC 67965949Seric # define S_IFMT _S_IFMT 68065949Seric # define S_IFCHR _S_IFCHR 68165949Seric # define S_IFBLK _S_IFBLK 68265949Seric # endif 68365167Seric # ifndef IDENTPROTO 68465167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 68565167Seric # endif 68663962Seric #endif 68763962Seric 68864314Seric 68963962Seric /* 69064999Seric ** RISC/os 4.52 69163962Seric ** 69264999Seric ** Gives a ton of warning messages, but otherwise compiles. 69363962Seric */ 69463962Seric 69563965Seric #ifdef RISCOS 69664999Seric 69763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 69866226Seric # ifndef HASFLOCK 69965830Seric # define HASFLOCK 1 /* has flock(2) call */ 70065830Seric # endif 70164999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 70264999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 70363962Seric # define LA_TYPE LA_INT 70463962Seric # define LA_AVENRUN "avenrun" 70563962Seric # define _PATH_UNIX "/unix" 70664999Seric # undef WIFEXITED 70764999Seric 70864999Seric # define setpgid setpgrp 70964999Seric 71064999Seric extern int errno; 71164999Seric typedef int pid_t; 71264999Seric #define SIGFUNC_DEFINED 71364999Seric typedef int (*sigfunc_t)(); 71464999Seric extern char *getenv(); 71564999Seric extern void *malloc(); 71664999Seric 71763962Seric #endif 71863962Seric 71964314Seric 72064155Seric /* 72164155Seric ** Linux 0.99pl10 and above... 72266300Seric ** 72366300Seric ** Thanks to, in reverse order of contact: 72466300Seric ** 72568093Seric ** John Kennedy <warlock@csuchico.edu> 72667885Seric ** Andrew Pam <avatar@aus.xanadu.com> 72766300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 72866300Seric ** Karl London <karl@borg.demon.co.uk> 72966300Seric ** 73068093Seric ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 73168093Seric ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 73268093Seric ** gcc 2.6.2 libc.so.4.6.20 73368093Seric ** slackware 2.1.0 linux 1.1.70 73464155Seric */ 73564155Seric 73664770Seric #ifdef __linux__ 73766298Seric # define BSD 1 /* include BSD defines */ 73864155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 73966298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 74064380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 74166298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 74266300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 74367885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 74468518Seric # ifndef HASFLOCK 74568518Seric # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 74668518Seric # endif 74764155Seric # ifndef LA_TYPE 74866301Seric # define LA_TYPE LA_PROCSTR 74964155Seric # endif 75066300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 75168093Seric # ifndef _PATH_SENDMAILPID 75268093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 75368093Seric # endif 75468093Seric # define TZ_TYPE TZ_TNAME 75564763Seric # include <sys/sysmacros.h> 75666300Seric # undef atol /* wounded in <stdlib.h> */ 75764155Seric #endif 75864155Seric 75964155Seric 76064345Seric /* 76164345Seric ** DELL SVR4 Issue 2.2, and others 76264345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 76364345Seric ** 76464345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 76564345Seric ** defined, and the definitions conflict. 76664924Seric ** 76764924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 76864924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 76964924Seric ** (SVR4.0/386 version 3.0). 77064345Seric */ 77164345Seric 77264345Seric #ifdef DELL_SVR4 77365189Seric /* no changes necessary */ 77465189Seric /* see general __svr4__ defines below */ 77564345Seric #endif 77664345Seric 77764345Seric 77864380Seric /* 77964380Seric ** Apple A/UX 3.0 78064380Seric */ 78164345Seric 78264380Seric #ifdef _AUX_SOURCE 78364729Seric # include <sys/sysmacros.h> 78464380Seric # define BSD /* has BSD routines */ 78568803Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 78664380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 78764380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 78864561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 78965167Seric # ifndef IDENTPROTO 79065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 79165167Seric # endif 79264380Seric # define FORK fork 79364380Seric # ifndef _PATH_SENDMAILCF 79464380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 79564380Seric # endif 79664380Seric # ifndef LA_TYPE 79764380Seric # define LA_TYPE LA_ZERO 79864380Seric # endif 79965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 80064560Seric # undef WIFEXITED 80164560Seric # undef WEXITSTATUS 80264380Seric #endif 80364380Seric 80464380Seric 80564705Seric /* 80664705Seric ** Encore UMAX V 80764705Seric ** 80864705Seric ** Not extensively tested. 80964705Seric */ 81064380Seric 81164705Seric #ifdef UMAXV 81264705Seric # include <limits.h> 81364705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 81464705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 81564705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 81665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 81764705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 81864705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 81964705Seric # define FORK fork /* no vfork(2) primitive available */ 82065749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 82164705Seric # define MAXPATHLEN PATH_MAX 82264705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 82364705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 82464705Seric # undef WIFEXITED 82564705Seric # undef WEXITSTATUS 82664705Seric #endif 82764705Seric 82864705Seric 82964939Seric /* 83064939Seric ** Stardent Titan 3000 running TitanOS 4.2. 83164939Seric ** 83264939Seric ** Must be compiled in "cc -43" mode. 83364939Seric ** 83464944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 83564939Seric ** 83664939Seric ** Note the tweaking below after the BSD defines are set. 83764939Seric */ 83864705Seric 83964939Seric #ifdef titan 84064939Seric # define setpgid setpgrp 84164939Seric typedef int pid_t; 84264939Seric # undef WIFEXITED 84364939Seric # undef WEXITSTATUS 84464939Seric #endif 84564939Seric 84664939Seric 84764962Seric /* 84864962Seric ** Sequent DYNIX 3.2.0 84964962Seric ** 85064962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 85164962Seric */ 85264939Seric 85364962Seric #ifdef sequent 85466038Seric 85564962Seric # define BSD 1 85664962Seric # define HASUNSETENV 1 85764962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 85864962Seric # define WAITUNION 1 85964962Seric # define LA_TYPE LA_FLOAT 86064962Seric # ifdef _POSIX_VERSION 86164962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 86264962Seric # endif 86364962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 86464962Seric # define setpgid setpgrp 86564962Seric 86664962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 86764962Seric # undef WIFEXITED 86864962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 86964962Seric ((union wait*)&(s))->w_termsig == 0) 87064962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 87164962Seric typedef int pid_t; 87264962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 87364962Seric 87466144Seric # ifndef IDENTPROTO 87566144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 87666144Seric # endif 87766144Seric 87864962Seric # ifndef _PATH_UNIX 87964962Seric # define _PATH_UNIX "/dynix" 88064962Seric # endif 88164962Seric # ifndef _PATH_SENDMAILCF 88264962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 88364962Seric # endif 88464962Seric 88564962Seric #endif 88664962Seric 88764962Seric 88865748Seric /* 88966038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 89066038Seric ** 89166038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 89266038Seric ** 89366038Seric ** From Tim Wright <timw@sequent.com>. 89466038Seric */ 89566038Seric 89666038Seric #ifdef _SEQUENT_ 89766038Seric # define SYSTEM5 1 /* include all the System V defines */ 89866038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 89966038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 90066038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 90166038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 90266038Seric # define GIDSET_T gid_t 90366038Seric # define LA_TYPE LA_INT 90466038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 90567771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 90666144Seric # ifndef IDENTPROTO 90766144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 90866144Seric # endif 90966038Seric # ifndef _PATH_SENDMAILCF 91066038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 91166038Seric # endif 91266038Seric # ifndef _PATH_SENDMAILPID 91366038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 91466038Seric # endif 91566038Seric #endif 91666038Seric 91766038Seric 91866038Seric /* 91965748Seric ** Cray Unicos 92065748Seric ** 92165748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 92265748Seric */ 92364962Seric 92465748Seric #ifdef UNICOS 92565748Seric # define SYSTEM5 1 /* include all the System V defines */ 92665748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 92765748Seric # define MAXPATHLEN PATHSIZE 92865748Seric # define LA_TYPE LA_ZERO 92965749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 93068439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 93165748Seric #endif 93264962Seric 93365748Seric 93465820Seric /* 93565820Seric ** Apollo DomainOS 93665820Seric ** 93765820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 93865982Seric ** 93965820Seric ** 15 Jan 1994 94065820Seric ** 94165820Seric */ 94265748Seric 94365820Seric #ifdef apollo 94465820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 94565820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 94667771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 94765820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 94866044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 94968439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 95065820Seric # ifndef _PATH_SENDMAILCF 95165820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 95265820Seric # endif 95365820Seric # ifndef _PATH_SENDMAILPID 95465820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 95565820Seric # endif 95665820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 95765820Seric # undef S_IFIFO 95865820Seric # define S_IFIFO 0010000 95965820Seric # ifndef IDENTPROTO 96065820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 96165820Seric # endif 96265982Seric #endif 96365820Seric 96465820Seric 96566748Seric /* 96667745Seric ** UnixWare 1.1.2. 96766752Seric ** 96866752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 96966752Seric */ 97066752Seric 97166752Seric #ifdef UNIXWARE 97266752Seric # define SYSTEM5 1 97367745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 97467745Seric # define HASGETDTABLESIZE 1 97567745Seric # define HASSETREUID 1 97667745Seric # define HASSETSID 1 97767745Seric # define HASINITGROUPS 1 97867745Seric # define GIDSET_T gid_t 97967745Seric # define SLEEP_T unsigned 98066752Seric # define SFS_TYPE SFS_STATVFS 98166752Seric # define LA_TYPE LA_ZERO 98266752Seric # undef WIFEXITED 98366752Seric # undef WEXITSTATUS 98466752Seric # define _PATH_UNIX "/unix" 98566752Seric # ifndef _PATH_SENDMAILCF 98666752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 98766752Seric # endif 98866752Seric # ifndef _PATH_SENDMAILPID 98966752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 99066752Seric # endif 99166752Seric # define SYSLOG_BUFSIZE 128 99266752Seric #endif 99366752Seric 99466752Seric 99566752Seric /* 99666748Seric ** Intergraph CLIX 3.1 99766748Seric ** 99866748Seric ** From Paul Southworth <pauls@locust.cic.net> 99966748Seric */ 100065820Seric 100166748Seric #ifdef CLIX 100266748Seric # define SYSTEM5 1 /* looks like System V */ 100366752Seric # ifndef HASGETUSERSHELL 100466752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 100566752Seric # endif 100666748Seric # define DEV_BSIZE 512 /* device block size not defined */ 100766748Seric # define GIDSET_T gid_t 100866748Seric # undef LOG /* syslog not available */ 100966748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 101066748Seric # define GETSHORT _getshort 101166748Seric #endif 101265820Seric 101366748Seric 101466776Seric /* 101566776Seric ** NCR 3000 Series (SysVr4) 101666776Seric ** 101767434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 101866776Seric */ 101966748Seric 102066776Seric #ifdef NCR3000 102166776Seric # define __svr4__ 102266776Seric # undef BSD 102366776Seric # define LA_AVENRUN "avenrun" 102466776Seric #endif 102566748Seric 102666776Seric 102767434Seric /* 102867434Seric ** Tandem NonStop-UX SVR4 102967434Seric ** 103067434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 103167434Seric */ 103266776Seric 103367434Seric #ifdef NonStop_UX_BXX 103467434Seric # define __svr4__ 103567434Seric #endif 103666776Seric 103767434Seric 103867488Seric /* 103967488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 104067488Seric ** 104167488Seric ** Tested for 1.04 and 1.03 104267488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 104367488Seric */ 104467434Seric 104567488Seric #ifdef __H3050R 104667488Seric # define SYSTEM5 1 /* include all the System V defines */ 104767488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 104867488Seric # define setreuid(r, e) setresuid(r, e, -1) 104967488Seric # define LA_TYPE LA_FLOAT 105067488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 105167488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 105267488Seric # ifndef GIDSET_T 105367488Seric # define GIDSET_T gid_t 105467488Seric # endif 105567488Seric # ifndef _PATH_UNIX 105667488Seric # define _PATH_UNIX "/HI-UX" 105767488Seric # endif 105867488Seric # ifndef _PATH_SENDMAILCF 105967488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 106067488Seric # endif 106167488Seric # ifndef IDENTPROTO 106267488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 106367488Seric # endif 106467488Seric # ifndef HASGETUSERSHELL 106567488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 106667488Seric # endif 106767488Seric 106867488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 106967488Seric # undef m_flags 107067488Seric 107167488Seric # ifdef __STDC__ 107267488Seric extern int syslog(int, char *, ...); 107367488Seric # endif 107467488Seric 107567488Seric #endif 107667488Seric 107767488Seric 107868099Seric /* 107968099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 108068099Seric ** 108168099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 108268099Seric */ 108367488Seric 108468099Seric #ifdef _UTS 108568099Seric # include <sys/sysmacros.h> 108668099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 108768099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 108868099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 108968099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 109068099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 109168099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 109268099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 109368099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 109468099Seric # ifndef HASGETUSERSHELL 109568099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 109668099Seric # endif 109768099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 109868099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 109968099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 110068439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 110168099Seric # define _PATH_UNIX "/unix" 110268099Seric # ifndef _PATH_SENDMAILCF 110368099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 110468099Seric # endif 110568099Seric #endif 110668099Seric 110768357Seric /* 110868357Seric ** Cray Computer Corporation's CSOS 110968357Seric ** 1110*69473Seric ** From Scott Bolte <scott@craycos.com>. 111168357Seric */ 111268099Seric 111368357Seric #ifdef _CRAYCOM 111468357Seric # define SYSTEM5 1 /* include all the System V defines */ 111568357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 111668357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 111768357Seric # define MAXPATHLEN PATHSIZE 111868357Seric # define LA_TYPE LA_ZERO 111968357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 112068439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 112168357Seric # define _POSIX_CHOWN_RESTRICTED -1 112268357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 112368357Seric #endif 112468099Seric 112568099Seric 112668742Seric /* 112768742Seric ** Sony NEWS-OS 4.2.1R and 6.0.3 1128*69473Seric ** 1129*69473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 113068742Seric */ 113168742Seric 113268742Seric #ifdef sony_news 113368742Seric # ifndef __svr4 113468742Seric /* NEWS-OS 4.2.1R */ 113568742Seric # ifndef BSD 113668742Seric # define BSD /* has BSD routines */ 113768742Seric # endif 113868742Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 113968742Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 114068742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 114168742Seric # define LA_TYPE LA_INT 114268742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 114368742Seric # ifndef HASFLOCK 114468742Seric # define HASFLOCK 1 /* has flock(2) call */ 114568742Seric # endif 114668742Seric # define setpgid setpgrp 114768742Seric # undef WIFEXITED 114868742Seric # undef WEXITSTATUS 114968742Seric typedef int pid_t; 115068742Seric typedef int (*sigfunc_t)(); 115168742Seric # define SIGFUNC_DEFINED 115268742Seric 115368742Seric # else 115468742Seric /* NEWS-OS 6.0.3 with /bin/cc */ 115568742Seric # define SYSTEM5 1 /* include all the System V defines */ 115668742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 115768742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 115868742Seric # define HASSETREUID 1 /* has setreuid(2) call */ 115968742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 116068742Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 1161*69473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 116268742Seric # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statvfs() impl */ 116368742Seric # define GIDSET_T gid_t 116468742Seric # define setreuid(r, e) seteuid(e) 116568742Seric # undef WIFEXITED 116668742Seric # undef WEXITSTATUS 116768742Seric # define _PATH_UNIX "/stand/unix" 116868742Seric # ifndef _PATH_SENDMAILCF 116968742Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 117068742Seric # endif 117168742Seric # ifndef _PATH_SENDMAILPID 117268742Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 117368742Seric # endif 117468742Seric 117568742Seric # endif 117668742Seric #endif 117768742Seric 117868742Seric 117968742Seric /* 118068742Seric ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach 1181*69473Seric ** 1182*69473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 118368742Seric */ 118468742Seric 118568742Seric #ifdef luna 118668742Seric # ifndef IDENTPROTO 118768742Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 118868742Seric # endif 118968742Seric # ifdef uniosb 119069454Seric # include <sys/time.h> 119168742Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 119268742Seric # endif 119368742Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 119468742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 119568742Seric # ifdef uniosb 119668742Seric # define LA_TYPE LA_INT 119768742Seric # endif 119868742Seric # ifdef luna2m 119968742Seric # define LA_TYPE LA_SUBR 120068742Seric # endif 120168742Seric # ifdef luna88k 120268742Seric # define LA_TYPE LA_INT 120368742Seric # endif 120468742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 120568742Seric # define setpgid setpgrp 120668742Seric # undef WIFEXITED 120768742Seric # undef WEXITSTATUS 120868742Seric typedef int pid_t; 120968742Seric typedef int (*sigfunc_t)(); 121068742Seric # define SIGFUNC_DEFINED 121168742Seric extern char *getenv(); 121268742Seric extern int errno; 121368742Seric # ifndef _PATH_SENDMAILCF 121468742Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 121568742Seric # endif 121668742Seric #endif 121768742Seric 121868742Seric 121968742Seric /* 1220*69473Seric ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc) 122168742Seric ** 1222*69473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 122368742Seric */ 122468742Seric 122568742Seric #ifdef nec_ews_svr4 122669454Seric # ifndef __svr4__ 122769454Seric # define __svr4__ /* use all System V Releae 4 defines below */ 122869454Seric # endif 122968742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 123068742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 1231*69473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ 123268742Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 123368742Seric # define GIDSET_T gid_t 123468742Seric # undef WIFEXITED 123568742Seric # undef WEXITSTATUS 123669454Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 123768742Seric #endif 123868742Seric 123968742Seric 124068742Seric 124163902Seric /********************************************************************** 124263787Seric ** End of Per-Operating System defines 124363902Seric **********************************************************************/ 124463787Seric 124563949Seric /********************************************************************** 124663949Seric ** More general defines 124763949Seric **********************************************************************/ 124863949Seric 124963962Seric /* general BSD defines */ 125063962Seric #ifdef BSD 125164035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 125264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 125367742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 125467430Seric # ifndef HASSETRLIMIT 125567430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 125667430Seric # endif 125765830Seric # ifndef HASFLOCK 125865830Seric # define HASFLOCK 1 /* has flock(2) call */ 125965830Seric # endif 126067602Seric # ifndef TZ_TYPE 126167608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 126267602Seric # endif 126363962Seric #endif 126463962Seric 126565189Seric /* general System V Release 4 defines */ 126665189Seric #ifdef __svr4__ 126765189Seric # define SYSTEM5 1 126865189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 126967742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 127067742Seric # ifndef HASSETRLIMIT 127167742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 127267742Seric # endif 127365211Seric # ifndef HASGETUSERSHELL 127465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 127565210Seric # endif 127665189Seric # define setreuid(r, e) seteuid(e) 127765189Seric 127865189Seric # ifndef _PATH_UNIX 127965189Seric # define _PATH_UNIX "/unix" 128065189Seric # endif 128165189Seric # ifndef _PATH_SENDMAILCF 128265189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 128365189Seric # endif 128465189Seric # ifndef _PATH_SENDMAILPID 128565189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 128665189Seric # endif 128765189Seric # ifndef SYSLOG_BUFSIZE 128865189Seric # define SYSLOG_BUFSIZE 128 128965189Seric # endif 129067159Seric # ifndef SFS_TYPE 129167159Seric # define SFS_TYPE SFS_STATVFS 129267159Seric # endif 129365189Seric #endif 129465189Seric 129563787Seric /* general System V defines */ 129666298Seric #ifdef SYSTEM5 129764813Seric # include <sys/sysmacros.h> 129863949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 129964705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 130064962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 130167430Seric # ifndef HASULIMIT 130267430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 130367430Seric # endif 130463962Seric # ifndef LA_TYPE 130569462Seric # ifdef MIOC_READKSYM 130669462Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 130769462Seric # else 130869462Seric # define LA_TYPE LA_INT /* assume integer load average */ 130969462Seric # endif 131063962Seric # endif 131165749Seric # ifndef SFS_TYPE 131265749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 131365749Seric # endif 131467602Seric # ifndef TZ_TYPE 131567608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 131667602Seric # endif 131768442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 131868442Seric # define bzero(d, l) (memset((d), '\0', (l))) 131968442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 132066298Seric #endif 132163787Seric 132263949Seric /* general POSIX defines */ 132363949Seric #ifdef _POSIX_VERSION 132464718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 132564718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 132663949Seric #endif 132763949Seric 132863787Seric /* 132963937Seric ** If no type for argument two of getgroups call is defined, assume 133063937Seric ** it's an integer -- unfortunately, there seem to be several choices 133163937Seric ** here. 133263937Seric */ 133363937Seric 133463937Seric #ifndef GIDSET_T 133563937Seric # define GIDSET_T int 133663937Seric #endif 133763937Seric 133864939Seric /* 133968357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 134068357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 134164939Seric */ 134264439Seric 134364939Seric #ifdef titan 134464939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 134564939Seric #endif 134664939Seric 134768357Seric #ifdef _CRAYCOM 134868357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 134968357Seric #endif 135065830Seric 135168442Seric #ifdef ISC_UNIX 135268442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 135368442Seric #endif 135468357Seric 135568442Seric #ifdef ALTOS_SYS_V 135668442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 135768442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 135868442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 135968442Seric #endif 136068442Seric 136168442Seric 136265167Seric /* 136365167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 136465167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 136565167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 136665167Seric ** are closed. Some firewalls return this error if you try to connect 136765167Seric ** to the IDENT port (113), so you can't receive email from these hosts 136865167Seric ** on these systems. The firewall really should use a more specific 136965167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 137065167Seric ** not explicitly set to zero above, default it on. 137165167Seric */ 137264939Seric 137365167Seric #ifndef IDENTPROTO 137465167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 137565167Seric #endif 137665167Seric 137765211Seric #ifndef HASGETUSERSHELL 137865211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 137965210Seric #endif 138065167Seric 138165830Seric #ifndef HASFLOCK 138265830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 138365830Seric #endif 138465210Seric 138567430Seric #ifndef HASSETRLIMIT 138667430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 138767430Seric #endif 138867430Seric 138967430Seric #ifndef HASULIMIT 139067430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 139167430Seric #endif 139267430Seric 139366843Seric #ifndef OLD_NEWDB 139466843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 139566843Seric #endif 139665830Seric 139768099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 139868099Seric #ifndef HASSIGSETMASK 139968099Seric # ifdef SIGVTALRM 140068099Seric # define HASSETSIGMASK 1 140168099Seric # else 140268099Seric # define HASSETSIGMASK 0 140368099Seric # endif 140468099Seric #endif 140566843Seric 140668705Seric #ifndef UID_T 140768705Seric # define UID_T uid_t 140868705Seric #endif 140968099Seric 141068706Seric #ifndef SIZE_T 141168706Seric # define SIZE_T size_t 141268706Seric #endif 141368706Seric 141468705Seric #ifndef ARGV_T 141568705Seric # define ARGV_T char ** 141668705Seric #endif 141768705Seric 141868705Seric 141964439Seric /********************************************************************** 142059023Seric ** Remaining definitions should never have to be changed. They are 142159023Seric ** primarily to provide back compatibility for older systems -- for 142259287Seric ** example, it includes some POSIX compatibility definitions 142364439Seric **********************************************************************/ 142459023Seric 142559388Seric /* System 5 compatibility */ 142659388Seric #ifndef S_ISREG 142764944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 142859388Seric #endif 142964944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 143064944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 143164944Seric #endif 143268494Seric #ifndef S_IWUSR 143368494Seric # define S_IWUSR 0200 143468494Seric #endif 143559388Seric #ifndef S_IWGRP 143668494Seric # define S_IWGRP 0020 143759388Seric #endif 143859388Seric #ifndef S_IWOTH 143968494Seric # define S_IWOTH 0002 144059388Seric #endif 144159388Seric 144259023Seric /* 144350537Seric ** Older systems don't have this error code -- it should be in 144450537Seric ** /usr/include/sysexits.h. 144550537Seric */ 144650537Seric 144750537Seric # ifndef EX_CONFIG 144850537Seric # define EX_CONFIG 78 /* configuration error */ 144950537Seric # endif 145056852Seric 145164718Seric /* pseudo-code used in server SMTP */ 145264718Seric # define EX_QUIT 22 /* drop out of server immediately */ 145364718Seric 145464718Seric 145563993Seric /* 145663993Seric ** These are used in a few cases where we need some special 145763993Seric ** error codes, but where the system doesn't provide something 145863993Seric ** reasonable. They are printed in errstring. 145963993Seric */ 146063993Seric 146163993Seric #ifndef E_PSEUDOBASE 146263993Seric # define E_PSEUDOBASE 256 146363993Seric #endif 146463993Seric 146563993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 146663993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 146763993Seric 146863970Seric /* type of arbitrary pointer */ 146963970Seric #ifndef ARBPTR_T 147063970Seric # define ARBPTR_T void * 147163970Seric #endif 147263970Seric 147360568Seric #ifndef __P 147460568Seric # include "cdefs.h" 147560568Seric #endif 147660568Seric 147767421Seric #if NAMED_BIND 147867421Seric # include <arpa/nameser.h> 147967434Seric # ifdef __svr4__ 148067434Seric # ifdef NOERROR 148167434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 148267434Seric # endif 148367434Seric # endif 148467421Seric #endif 148567421Seric 148656852Seric /* 148767419Seric ** The size of an IP address -- can't use sizeof because of problems 148867419Seric ** on Crays, where everything is 64 bits. This will break if/when 148967419Seric ** IP addresses are expanded to eight bytes. 149067419Seric */ 149167419Seric 149267421Seric #ifndef INADDRSZ 149367421Seric # define INADDRSZ 4 149467421Seric #endif 149567419Seric 149667419Seric /* 149767421Seric ** The size of various known types -- for reading network protocols. 149867421Seric ** Again, we can't use sizeof because of compiler randomness. 149967421Seric */ 150067421Seric 150167421Seric #ifndef INT16SZ 150267421Seric # define INT16SZ 2 150367421Seric #endif 150467421Seric #ifndef INT32SZ 150567421Seric # define INT32SZ 4 150667421Seric #endif 150767421Seric 150867421Seric /* 150958778Seric ** Do some required dependencies 151058778Seric */ 151158778Seric 151258778Seric #if defined(NETINET) || defined(NETISO) 151359107Seric # define SMTP 1 /* enable user and server SMTP */ 151459107Seric # define QUEUE 1 /* enable queueing */ 151559107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 151658778Seric #endif 151758778Seric 151858778Seric 151958778Seric /* 152056852Seric ** Arrange to use either varargs or stdargs 152156852Seric */ 152256852Seric 152356852Seric # ifdef __STDC__ 152456852Seric 152556852Seric # include <stdarg.h> 152656852Seric 152756852Seric # define VA_LOCAL_DECL va_list ap; 152856852Seric # define VA_START(f) va_start(ap, f) 152956852Seric # define VA_END va_end(ap) 153056852Seric 153156852Seric # else 153256852Seric 153356852Seric # include <varargs.h> 153456852Seric 153556852Seric # define VA_LOCAL_DECL va_list ap; 153656852Seric # define VA_START(f) va_start(ap) 153756852Seric # define VA_END va_end(ap) 153856852Seric 153956852Seric # endif 154057631Seric 154157943Seric #ifdef HASUNAME 154257631Seric # include <sys/utsname.h> 154357631Seric # ifdef newstr 154457631Seric # undef newstr 154557631Seric # endif 154657943Seric #else /* ! HASUNAME */ 154757631Seric # define NODE_LENGTH 32 154857631Seric struct utsname 154957631Seric { 155057631Seric char nodename[NODE_LENGTH+1]; 155157631Seric }; 155257943Seric #endif /* HASUNAME */ 155357642Seric 155468040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 155563838Seric # define MAXHOSTNAMELEN 256 155657735Seric #endif 155758153Seric 155858153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 155958153Seric # define SIGCHLD SIGCLD 156058153Seric #endif 156158153Seric 156258153Seric #ifndef STDIN_FILENO 156368742Seric # define STDIN_FILENO 0 156458153Seric #endif 156558153Seric 156658153Seric #ifndef STDOUT_FILENO 156768742Seric # define STDOUT_FILENO 1 156858153Seric #endif 156958153Seric 157058153Seric #ifndef STDERR_FILENO 157168742Seric # define STDERR_FILENO 2 157258153Seric #endif 157358689Seric 157464072Seric #ifndef LOCK_SH 157564035Seric # define LOCK_SH 0x01 /* shared lock */ 157664035Seric # define LOCK_EX 0x02 /* exclusive lock */ 157764035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 157864035Seric # define LOCK_UN 0x08 /* unlock */ 157964035Seric #endif 158058692Seric 158168742Seric #ifndef SEEK_SET 158268742Seric # define SEEK_SET 0 158368742Seric # define SEEK_CUR 1 158468742Seric # define SEEK_END 2 158568742Seric #endif 158668742Seric 158764035Seric #ifndef SIG_ERR 158864035Seric # define SIG_ERR ((void (*)()) -1) 158958689Seric #endif 159058702Seric 159164500Seric #ifndef WEXITSTATUS 159264500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 159364500Seric #endif 159464500Seric #ifndef WIFEXITED 159564500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 159664500Seric #endif 159764500Seric 159864561Seric #ifndef SIGFUNC_DEFINED 159964561Seric typedef void (*sigfunc_t) __P((int)); 160064561Seric #endif 160164561Seric 160265053Seric /* size of syslog buffer */ 160365053Seric #ifndef SYSLOG_BUFSIZE 160465053Seric # define SYSLOG_BUFSIZE 1024 160565053Seric #endif 160665053Seric 160758702Seric /* 160858702Seric ** Size of tobuf (deliver.c) 160958702Seric ** Tweak this to match your syslog implementation. It will have to 161058702Seric ** allow for the extra information printed. 161158702Seric */ 161258702Seric 161358702Seric #ifndef TOBUFSIZE 161465053Seric # if (SYSLOG_BUFSIZE) > 512 161565053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 161665053Seric # else 161765053Seric # define TOBUFSIZE 256 161865053Seric # endif 161958702Seric #endif 162060219Seric 162165015Seric /* 162265015Seric ** Size of prescan buffer. 162365015Seric ** Despite comments in the _sendmail_ book, this probably should 162465015Seric ** not be changed; there are some hard-to-define dependencies. 162565015Seric */ 162665015Seric 162765015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 162860219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 162960219Seric # ifndef FORK 163060219Seric # define FORK vfork /* function to call to fork mailer */ 163160219Seric # endif 163265955Seric 163365955Seric /* 163465955Seric ** If we are going to link scanf anyway, use it in readcf 163565955Seric */ 163665955Seric 163765955Seric #if !defined(HASUNAME) && !defined(SCANF) 163865955Seric # define SCANF 1 163965955Seric #endif 1640