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*69679Seric * @(#)conf.h 8.167 (Berkeley) 05/25/95 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1322726Sdist */ 149147Seric 1569562Seric struct rusage; /* forward declaration to get gcc to shut up in wait.h */ 1669562Seric 1757232Seric # include <sys/param.h> 1864705Seric # include <sys/types.h> 1959389Seric # include <sys/stat.h> 2064380Seric # include <sys/file.h> 2164500Seric # include <sys/wait.h> 2258689Seric # include <fcntl.h> 2364035Seric # include <signal.h> 2468693Seric # include <netdb.h> 2568693Seric # include <pwd.h> 2657232Seric 2763902Seric /********************************************************************** 289147Seric ** Table sizes, etc.... 299147Seric ** There shouldn't be much need to change these.... 3063902Seric **********************************************************************/ 319147Seric 3259303Seric # define MAXLINE 2048 /* max line length */ 3324945Seric # define MAXNAME 256 /* max length of a name */ 349147Seric # define MAXPV 40 /* max # of parms to mailers */ 3559303Seric # define MAXATOM 200 /* max atoms per address */ 369147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3768384Seric # define MAXRWSETS 200 /* max # of sets of rewriting rules */ 389147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3957143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 4052106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 4157232Seric # define MAXKEY 128 /* maximum size of a database key */ 4257232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 4359056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4459667Seric # define MAXALIASDB 12 /* max # of alias databases */ 4567729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 4667729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 4768517Seric # define MAXMIMEARGS 20 /* max args in Content-Type: */ 4868517Seric # define MAXMIMENESTING 20 /* max MIME multipart nesting */ 4957143Seric 5057143Seric # ifndef QUEUESIZE 5169638Seric # define QUEUESIZE 3000 /* max # of jobs per queue run */ 5257143Seric # endif 5357143Seric 5463902Seric /********************************************************************** 559147Seric ** Compilation options. 5625673Seric ** 5725673Seric ** #define these if they are available; comment them out otherwise. 5863902Seric **********************************************************************/ 599147Seric 6025673Seric # define LOG 1 /* enable logging */ 6125673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 6264813Seric # define NETUNIX 1 /* include unix domain support */ 6358778Seric # define NETINET 1 /* include internet support */ 6453735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6563753Seric # define XDEBUG 1 /* enable extended debugging */ 6668785Seric # if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB) 6768848Seric # define USERDB 1 /* look in user database */ 6856337Seric # endif 6956337Seric 7066334Seric /********************************************************************** 7166334Seric ** 0/1 Compilation options. 7266334Seric ** #define these to 1 if they are available; 7366334Seric ** #define them to 0 otherwise. 7466334Seric **********************************************************************/ 7566334Seric 7666334Seric # ifndef NAMED_BIND 7766334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7866334Seric # endif 7966334Seric 8068848Seric # ifndef DSN 8168848Seric # define DSN 1 /* include delivery status notification code */ 8268848Seric # endif 8368848Seric 8469480Seric # ifndef MIME8TO7 8569480Seric # define MIME8TO7 1 /* 8->7 bit MIME conversions */ 8669480Seric # endif 8769480Seric 8869480Seric # ifndef MIME7TO8 8969480Seric # define MIME7TO8 1 /* 7->8 bit MIME conversions */ 9069480Seric # endif 9169480Seric 9264032Seric /* 9364944Seric ** Most systems have symbolic links today, so default them on. You 9464944Seric ** can turn them off by #undef'ing this below. 9564944Seric */ 9664944Seric 9764944Seric # define HASLSTAT 1 /* has lstat(2) call */ 9864944Seric 9964962Seric /* 10064962Seric ** General "standard C" defines. 10164962Seric ** 10264962Seric ** These may be undone later, to cope with systems that claim to 10364962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 10464962Seric ** doesn't realize that the library is part of the language. 10564962Seric ** 10664962Seric ** Life would be much easier if we could get rid of this sort 10764962Seric ** of bozo problems. 10864962Seric */ 10964962Seric 11064962Seric #ifdef __STDC__ 11164962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 11264962Seric #endif 11364962Seric 11463902Seric /********************************************************************** 11559023Seric ** Operating system configuration. 11659023Seric ** 11759023Seric ** Unless you are porting to a new OS, you shouldn't have to 11859023Seric ** change these. 11963902Seric **********************************************************************/ 12056823Seric 12163787Seric /* 12263787Seric ** Per-Operating System defines 12363787Seric */ 12463787Seric 12564314Seric 12663902Seric /* 12765565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 12868889Seric ** 12968889Seric ** If V4FS is defined, compile for HP-UX 10.0. 13063902Seric */ 13163902Seric 13267626Seric #ifdef __hpux 13368889Seric /* common definitions for HP-UX 9.x and 10.x */ 13468889Seric # undef m_flags /* conflict between db.h & sys/sysmacros.h on HP 300 */ 13563787Seric # define SYSTEM5 1 /* include all the System V defines */ 13664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 13769638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 13869638Seric # define seteuid(e) setresuid(-1, e, -1) 13969462Seric # define LA_TYPE LA_HPUX 14068873Seric # define SPT_TYPE SPT_PSTAT 14165749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 14265354Seric # define GIDSET_T gid_t 14365581Seric # ifndef HASGETUSERSHELL 14465581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 14565581Seric # endif 14665504Seric # define syslog hard_syslog 14765581Seric # ifdef __STDC__ 14865581Seric extern int syslog(int, char *, ...); 14965167Seric # endif 15068889Seric 15168889Seric # ifdef V4FS 15268889Seric /* HP-UX 10.x */ 15368889Seric # define _PATH_UNIX "/stand/vmunix" 15468889Seric # ifndef _PATH_SENDMAILCF 15568889Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 15668889Seric # endif 15768889Seric # ifndef _PATH_SENDMAILPID 15868889Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 15968889Seric # endif 16068889Seric # ifndef IDENTPROTO 16168889Seric # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ 16268889Seric # endif 16368889Seric 16468889Seric # else 16568889Seric /* HP-UX 9.x */ 16668889Seric # define _PATH_UNIX "/hp-ux" 16768889Seric # ifndef _PATH_SENDMAILCF 16868889Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 16968889Seric # endif 17068889Seric # ifndef IDENTPROTO 17168889Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 17268889Seric # endif 17368889Seric # endif 17468889Seric 17567626Seric #endif 17656823Seric 17764314Seric 17863902Seric /* 17963902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 18063902Seric */ 18163902Seric 18267626Seric #ifdef _AIX3 18364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18464840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 18669601Seric # ifndef IP_SRCROUTE 18769601Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 18869601Seric # endif 18960219Seric # define FORK fork /* no vfork primitive available */ 19069562Seric # define GIDSET_T gid_t 19165749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 19267771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 19368145Seric # define LA_TYPE LA_INT 19467626Seric #endif 19560219Seric 19664314Seric 19763902Seric /* 19863902Seric ** Silicon Graphics IRIX 19963902Seric ** 20063965Seric ** Compiles on 4.0.1. 20167967Seric ** 20268686Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). 20368686Seric ** Use IRIX5 instead of IRIX for IRIX 5.x. 20467967Seric ** 20567967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 20668686Seric ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. 20763902Seric */ 20863902Seric 20968686Seric #if defined(IRIX64) || defined(IRIX5) 21067967Seric # define IRIX 21167967Seric #endif 21267967Seric 21367626Seric #ifdef IRIX 21466763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 21564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 21765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 21863753Seric # define FORK fork /* no vfork primitive available */ 21968686Seric # if !defined(IRIX64) && !defined(IRIX5) 22068225Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 22168225Seric # endif 22264155Seric # define setpgid BSDsetpgrp 22363937Seric # define GIDSET_T gid_t 22468705Seric # define ARGV_T const char ** 22565749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 22668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 22766763Seric # define LA_TYPE LA_INT 22867967Seric # ifdef IRIX64 22967967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 23067967Seric # else 23167967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 23267967Seric # endif 23367626Seric #endif 23463753Seric 23563902Seric 23663902Seric /* 23764813Seric ** SunOS and Solaris 23864813Seric ** 23964813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 24069638Seric ** Solaris 2.4 (a.k.a. SunOS 5.4). 24163902Seric */ 24263902Seric 24363787Seric #if defined(sun) && !defined(BSD) 24459074Seric 24564035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24664813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 24765211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 24865749Seric # define LA_TYPE LA_INT 24960564Seric 25064842Seric # ifdef SOLARIS_2_3 25168813Seric # define SOLARIS 203 /* for back compat only -- use -DSOLARIS=203 */ 25264842Seric # endif 25364842Seric 25460602Seric # ifdef SOLARIS 25563902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 25665222Seric # ifndef __svr4__ 25765222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 25865222Seric # endif 25969658Seric # define BSD_COMP 1 /* get BSD ioctl calls */ 26063787Seric # include <sys/time.h> 26165172Seric # define GIDSET_T gid_t 26265189Seric # ifndef _PATH_UNIX 26367129Seric # define _PATH_UNIX "/dev/ksyms" 26465189Seric # endif 26563962Seric # ifndef _PATH_SENDMAILCF 26663962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 26764072Seric # endif 26864072Seric # ifndef _PATH_SENDMAILPID 26963962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 27063962Seric # endif 27169401Seric # ifndef _PATH_HOSTS 27269401Seric # define _PATH_HOSTS "/etc/inet/hosts" 27369401Seric # endif 27466022Seric # ifndef SYSLOG_BUFSIZE 27566022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 27666022Seric # endif 27763787Seric 27860602Seric # else 27965105Seric /* SunOS 4.0.3 or 4.1.x */ 28065189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 28165830Seric # ifndef HASFLOCK 28265830Seric # define HASFLOCK 1 /* has flock(2) call */ 28365830Seric # endif 28465749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 28560564Seric # include <vfork.h> 28663787Seric 28765105Seric # ifdef SUNOS403 28865105Seric /* special tweaking for SunOS 4.0.3 */ 28965105Seric # include <malloc.h> 29065105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 291*69679Seric # define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */ 29265105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 29365105Seric # undef WIFEXITED 29465105Seric # undef WEXITSTATUS 29565105Seric # undef HASUNAME 29665105Seric # define setpgid setpgrp 29765105Seric typedef int pid_t; 29865105Seric extern char *getenv(); 29965105Seric 30066732Seric # else 30166732Seric /* 4.1.x specifics */ 30266732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 30366732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 30466732Seric 30565105Seric # endif 30660564Seric # endif 30759023Seric #endif 30859023Seric 30964718Seric /* 31064813Seric ** DG/UX 31164813Seric ** 31267427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 31367427Seric ** older support. 31467427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 31564718Seric */ 31664314Seric 31767427Seric #ifdef DGUX_5_4_2 31867427Seric # define DGUX 1 31967427Seric #endif 32067427Seric 32164718Seric #ifdef DGUX 32264718Seric # define SYSTEM5 1 32369462Seric # define LA_TYPE LA_DGUX 32464718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 32564718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 32664718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 32764718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 32866036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 32965167Seric # ifndef IDENTPROTO 33065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 33165167Seric # endif 33267771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 33365749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 33464813Seric 33564813Seric /* these include files must be included early on DG/UX */ 33664813Seric # include <netinet/in.h> 33764813Seric # include <arpa/inet.h> 33864813Seric 33967427Seric # ifdef DGUX_5_4_2 34067427Seric # define inet_addr dgux_inet_addr 34164718Seric extern long dgux_inet_addr(); 34267427Seric # endif 34364718Seric #endif 34464718Seric 34564718Seric 34663902Seric /* 34763902Seric ** Digital Ultrix 4.2A or 4.3 34864264Seric ** 34964264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 35064264Seric ** not dropped when the process exits. This causes major problems, 35164264Seric ** so flock is the only alternative. 35263902Seric */ 35363902Seric 35460564Seric #ifdef ultrix 35564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 35663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 35764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 35866242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 35965830Seric # ifndef HASFLOCK 36065830Seric # define HASFLOCK 1 /* has flock(2) call */ 36165830Seric # endif 36265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 36369279Seric # ifndef BROKEN_RES_SEARCH 36469279Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 36569279Seric # endif 36665135Seric # ifdef vax 36765135Seric # define LA_TYPE LA_FLOAT 36865135Seric # else 36965135Seric # define LA_TYPE LA_INT 37065135Seric # define LA_AVENRUN "avenrun" 37165135Seric # endif 37265749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 37365167Seric # ifndef IDENTPROTO 37469279Seric # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ 37565167Seric # endif 37660564Seric #endif 37760564Seric 37864314Seric 37963902Seric /* 38068072Seric ** OSF/1 for Intel Paragon. 38168072Seric ** 38268082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 38368082Seric ** of Intel Scalable Systems Divison. 38468072Seric */ 38568072Seric 38668072Seric #ifdef __PARAGON__ 38768072Seric # define __osf__ 1 /* get OSF/1 defines below */ 38868072Seric # ifndef _PATH_SENDMAILCF 38968072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 39068072Seric # endif 39168072Seric #endif 39268072Seric 39368072Seric 39468072Seric /* 39563902Seric ** OSF/1 (tested on Alpha) 39663902Seric */ 39763902Seric 39863787Seric #ifdef __osf__ 39963962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 40069638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 40164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 40266226Seric # ifndef HASFLOCK 40365830Seric # define HASFLOCK 1 /* has flock(2) call */ 40465830Seric # endif 40563962Seric # define LA_TYPE LA_INT 40665749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 40764813Seric # ifndef _PATH_SENDMAILPID 40865504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 40964813Seric # endif 41059287Seric #endif 41159287Seric 41264314Seric 41363902Seric /* 41463902Seric ** NeXTstep 41563902Seric */ 41663902Seric 41764076Seric #ifdef NeXT 41864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 41965830Seric # ifndef HASFLOCK 42065830Seric # define HASFLOCK 1 /* has flock(2) call */ 42165830Seric # endif 42264125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 42364563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 42468705Seric # define UID_T int /* compiler gripes on uid_t */ 42563753Seric # define sleep sleepX 42664155Seric # define setpgid setpgrp 42764295Seric # ifndef LA_TYPE 42864295Seric # define LA_TYPE LA_MACH 42964295Seric # endif 43065749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 43164500Seric # ifndef _POSIX_SOURCE 43264035Seric typedef int pid_t; 43364500Seric # undef WEXITSTATUS 43464500Seric # undef WIFEXITED 43564500Seric # endif 43664072Seric # ifndef _PATH_SENDMAILCF 43764072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 43864072Seric # endif 43964072Seric # ifndef _PATH_SENDMAILPID 44064072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 44164072Seric # endif 44259288Seric #endif 44359288Seric 44464314Seric 44563902Seric /* 44663962Seric ** 4.4 BSD 44764831Seric ** 44864831Seric ** See also BSD defines. 44963902Seric */ 45063902Seric 45160568Seric #ifdef BSD4_4 45264072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 45369638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 45460568Seric # include <sys/cdefs.h> 45563838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 45669516Seric # define BSD4_4_SOCKADDR /* has sa_len */ 45769562Seric # define NETLINK /* supports AF_LINK */ 45864072Seric # ifndef LA_TYPE 45964072Seric # define LA_TYPE LA_SUBR 46064072Seric # endif 46165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 46267771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 46360568Seric #endif 46460568Seric 46564314Seric 46663902Seric /* 46765982Seric ** BSD/386 (all versions) 46865982Seric ** From Tony Sanders, BSDI 46965982Seric */ 47065982Seric 47165982Seric #ifdef __bsdi__ 47265982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 47365982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 47469638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 47566843Seric # include <sys/cdefs.h> 47666843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 47769516Seric # define BSD4_4_SOCKADDR /* has sa_len */ 47869562Seric # define NETLINK /* supports AF_LINK */ 47966030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 48066843Seric # ifndef LA_TYPE 48166843Seric # define LA_TYPE LA_SUBR 48266843Seric # endif 48368753Seric # define GIDSET_T gid_t 48465982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 48566843Seric /* version 1.1 or later */ 48667771Seric # undef SPT_TYPE 48767771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 48866843Seric # else 48966843Seric /* version 1.0 or earlier */ 49066843Seric # ifndef OLD_NEWDB 49166843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 49266843Seric # endif 49367771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 49465982Seric # endif 49565982Seric #endif 49665982Seric 49765982Seric 49865982Seric 49965982Seric /* 50065049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 50164733Seric ** 50264733Seric ** 4.3BSD clone, closer to 4.4BSD 50364831Seric ** 50464831Seric ** See also BSD defines. 50564733Seric */ 50664733Seric 50765049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 50864733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 50964733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 51069638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 51166754Seric # ifdef __NetBSD__ 51266754Seric # define HASUNAME 1 /* has uname(2) syscall */ 51366754Seric # endif 51464733Seric # include <sys/cdefs.h> 51564733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 51669516Seric # define BSD4_4_SOCKADDR /* has sa_len */ 51769562Seric # define NETLINK /* supports AF_LINK */ 51864733Seric # ifndef LA_TYPE 51964733Seric # define LA_TYPE LA_SUBR 52064733Seric # endif 52165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 52264733Seric #endif 52364733Seric 52464733Seric 52564733Seric /* 52664813Seric ** Mach386 52764813Seric ** 52864813Seric ** For mt Xinu's Mach386 system. 52964813Seric */ 53064813Seric 53164813Seric #if defined(MACH) && defined(i386) 53264813Seric # define MACH386 1 53364813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 53464813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 53566226Seric # ifndef HASFLOCK 53665830Seric # define HASFLOCK 1 /* has flock(2) call */ 53765830Seric # endif 53864813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 53964813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 54064813Seric # define setpgid setpgrp 54164813Seric # ifndef LA_TYPE 54264813Seric # define LA_TYPE LA_FLOAT 54364813Seric # endif 54465749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 54564962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 54664813Seric # undef WEXITSTATUS 54764813Seric # undef WIFEXITED 54864813Seric # ifndef _PATH_SENDMAILCF 54964813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 55064813Seric # endif 55164813Seric # ifndef _PATH_SENDMAILPID 55264813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 55364813Seric # endif 55464813Seric #endif 55564813Seric 55664813Seric 55764813Seric /* 55863969Seric ** 4.3 BSD -- this is for very old systems 55963969Seric ** 56065949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 56165949Seric ** 56263969Seric ** You'll also have to install a new resolver library. 56363969Seric ** I don't guarantee that support for this environment is complete. 56463969Seric */ 56563969Seric 56665949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 56763969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 56863969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 56963970Seric # define ARBPTR_T char * 57064155Seric # define setpgid setpgrp 57163969Seric # ifndef LA_TYPE 57263969Seric # define LA_TYPE LA_FLOAT 57363969Seric # endif 57463969Seric # ifndef _PATH_SENDMAILCF 57563969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 57663969Seric # endif 57765167Seric # ifndef IDENTPROTO 57865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 57965167Seric # endif 58064834Seric # undef WEXITSTATUS 58164834Seric # undef WIFEXITED 58264834Seric typedef short pid_t; 58364834Seric extern int errno; 58463969Seric #endif 58563969Seric 58664314Seric 58763969Seric /* 58863902Seric ** SCO Unix 58965087Seric ** 59065087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 59165087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 59265087Seric ** The second is, I believe, for an older version. 59363902Seric */ 59463902Seric 59565087Seric #ifdef _SCO_unix_4_2 59665087Seric # define _SCO_unix_ 59765087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 59866757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 59965087Seric # define _PATH_UNIX "/unix" 60065087Seric # ifndef _PATH_SENDMAILCF 60165087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 60265087Seric # endif 60365087Seric # ifndef _PATH_SENDMAILPID 60465087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 60565087Seric # endif 60665087Seric #endif 60765087Seric 60863838Seric #ifdef _SCO_unix_ 60963838Seric # define SYSTEM5 1 /* include all the System V defines */ 61064035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 61165212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 61263838Seric # define FORK fork 61363838Seric # define MAXPATHLEN PATHSIZE 61464718Seric # define LA_TYPE LA_SHORT 61567812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 61668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 61767608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 61864813Seric # undef NETUNIX /* no unix domain socket support */ 61963838Seric #endif 62063838Seric 62164314Seric 62263962Seric /* 62368442Seric ** ISC (SunSoft) Unix. 62468442Seric ** 62568442Seric ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> 62668442Seric */ 62768442Seric 62868442Seric #ifdef ISC_UNIX 62968442Seric # include <net/errno.h> 63068442Seric # define SYSTEM5 1 /* include all the System V defines */ 63168442Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 63268442Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 63368442Seric # define HASSETREUID 1 /* has setreuid(2) call */ 63468442Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 63568442Seric # undef NETUNIX /* no unix domain socket support */ 63668442Seric # define FORK fork 63768442Seric # define MAXPATHLEN 1024 63868442Seric # define LA_TYPE LA_SHORT 63968442Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 64068442Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 64168442Seric # define _PATH_UNIX "/unix" 64268442Seric # ifndef _PATH_SENDMAILCF 64368442Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 64468442Seric # endif 64568442Seric # ifndef _PATH_SENDMAILPID 64668442Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 64768442Seric # endif 64868442Seric 64968442Seric typedef short pid_t; 65068442Seric 65168442Seric #endif 65268442Seric 65368442Seric 65468442Seric /* 65568040Seric ** Altos System V. 65668040Seric ** Contributed by Tim Rice <timr@crl.com>. 65768040Seric */ 65868040Seric 65968040Seric #ifdef ALTOS_SYS_V 66068040Seric # include <limits.h> 66168040Seric # define SYSTEM5 1 /* include all the System V defines */ 66268040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 66368040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 66468040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 66568040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 66668040Seric # define FORK fork 66768040Seric # define MAXPATHLEN PATHSIZE 66868040Seric # define LA_TYPE LA_SHORT 66968040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 67068439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 67168040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 67268040Seric # undef NETUNIX /* no unix domain socket support */ 67368040Seric # undef WIFEXITED 67468040Seric # undef WEXITSTATUS 67568040Seric # define strtoul strtol /* gcc library bogosity */ 67668040Seric 67768040Seric typedef unsigned short uid_t; 67868040Seric typedef unsigned short gid_t; 67968040Seric typedef short pid_t; 68068040Seric #endif 68168040Seric 68268040Seric 68368040Seric /* 68463962Seric ** ConvexOS 11.0 and later 68565949Seric ** 68665949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 68765949Seric ** works on 9.1 as well. 68863962Seric */ 68963962Seric 69063962Seric #ifdef _CONVEX_SOURCE 69163977Seric # define BSD 1 /* include all the BSD defines */ 69263977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 69363962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 69463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 69563962Seric # define LA_TYPE LA_FLOAT 69665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 69765949Seric # ifndef _PATH_SENDMAILCF 69865949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 69965949Seric # endif 70065949Seric # ifndef S_IREAD 70165949Seric # define S_IREAD _S_IREAD 70265949Seric # define S_IWRITE _S_IWRITE 70365949Seric # define S_IEXEC _S_IEXEC 70465949Seric # define S_IFMT _S_IFMT 70565949Seric # define S_IFCHR _S_IFCHR 70665949Seric # define S_IFBLK _S_IFBLK 70765949Seric # endif 70865167Seric # ifndef IDENTPROTO 70965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 71065167Seric # endif 71169601Seric # ifndef IP_SRCROUTE 71269601Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 71369601Seric # endif 71463962Seric #endif 71563962Seric 71664314Seric 71763962Seric /* 71864999Seric ** RISC/os 4.52 71963962Seric ** 72064999Seric ** Gives a ton of warning messages, but otherwise compiles. 72163962Seric */ 72263962Seric 72363965Seric #ifdef RISCOS 72464999Seric 72563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 72666226Seric # ifndef HASFLOCK 72765830Seric # define HASFLOCK 1 /* has flock(2) call */ 72865830Seric # endif 72964999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 73064999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 73163962Seric # define LA_TYPE LA_INT 73263962Seric # define LA_AVENRUN "avenrun" 73363962Seric # define _PATH_UNIX "/unix" 73464999Seric # undef WIFEXITED 73564999Seric 73664999Seric # define setpgid setpgrp 73764999Seric 73864999Seric extern int errno; 73964999Seric typedef int pid_t; 74064999Seric #define SIGFUNC_DEFINED 74164999Seric typedef int (*sigfunc_t)(); 74264999Seric extern char *getenv(); 74364999Seric extern void *malloc(); 74464999Seric 74563962Seric #endif 74663962Seric 74764314Seric 74864155Seric /* 74964155Seric ** Linux 0.99pl10 and above... 75066300Seric ** 75166300Seric ** Thanks to, in reverse order of contact: 75266300Seric ** 75368093Seric ** John Kennedy <warlock@csuchico.edu> 75467885Seric ** Andrew Pam <avatar@aus.xanadu.com> 75566300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 75666300Seric ** Karl London <karl@borg.demon.co.uk> 75766300Seric ** 75868093Seric ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 75968093Seric ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 76068093Seric ** gcc 2.6.2 libc.so.4.6.20 76168093Seric ** slackware 2.1.0 linux 1.1.70 76264155Seric */ 76364155Seric 76464770Seric #ifdef __linux__ 76566298Seric # define BSD 1 /* include BSD defines */ 76664155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 76766298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 76864380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 76966298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 77066300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 77167885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 77268518Seric # ifndef HASFLOCK 77368518Seric # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 77468518Seric # endif 77564155Seric # ifndef LA_TYPE 77666301Seric # define LA_TYPE LA_PROCSTR 77764155Seric # endif 77866300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 77968093Seric # ifndef _PATH_SENDMAILPID 78068093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 78168093Seric # endif 78268093Seric # define TZ_TYPE TZ_TNAME 78364763Seric # include <sys/sysmacros.h> 78466300Seric # undef atol /* wounded in <stdlib.h> */ 78564155Seric #endif 78664155Seric 78764155Seric 78864345Seric /* 78964345Seric ** DELL SVR4 Issue 2.2, and others 79064345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 79164345Seric ** 79264345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 79364345Seric ** defined, and the definitions conflict. 79464924Seric ** 79564924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 79664924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 79764924Seric ** (SVR4.0/386 version 3.0). 79864345Seric */ 79964345Seric 80064345Seric #ifdef DELL_SVR4 80165189Seric /* no changes necessary */ 80265189Seric /* see general __svr4__ defines below */ 80364345Seric #endif 80464345Seric 80564345Seric 80664380Seric /* 80764380Seric ** Apple A/UX 3.0 80864380Seric */ 80964345Seric 81064380Seric #ifdef _AUX_SOURCE 81164729Seric # include <sys/sysmacros.h> 81264380Seric # define BSD /* has BSD routines */ 81368803Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 81464380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 81564380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 81664561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 81765167Seric # ifndef IDENTPROTO 81865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 81965167Seric # endif 82064380Seric # define FORK fork 82164380Seric # ifndef _PATH_SENDMAILCF 82264380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 82364380Seric # endif 82464380Seric # ifndef LA_TYPE 82564380Seric # define LA_TYPE LA_ZERO 82664380Seric # endif 82765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 82864560Seric # undef WIFEXITED 82964560Seric # undef WEXITSTATUS 83064380Seric #endif 83164380Seric 83264380Seric 83364705Seric /* 83464705Seric ** Encore UMAX V 83564705Seric ** 83664705Seric ** Not extensively tested. 83764705Seric */ 83864380Seric 83964705Seric #ifdef UMAXV 84064705Seric # include <limits.h> 84164705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 84264705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 84364705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 84465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 84564705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 84664705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 84764705Seric # define FORK fork /* no vfork(2) primitive available */ 84865749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 84964705Seric # define MAXPATHLEN PATH_MAX 85064705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 85164705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 85264705Seric # undef WIFEXITED 85364705Seric # undef WEXITSTATUS 85464705Seric #endif 85564705Seric 85664705Seric 85764939Seric /* 85864939Seric ** Stardent Titan 3000 running TitanOS 4.2. 85964939Seric ** 86064939Seric ** Must be compiled in "cc -43" mode. 86164939Seric ** 86264944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 86364939Seric ** 86464939Seric ** Note the tweaking below after the BSD defines are set. 86564939Seric */ 86664705Seric 86764939Seric #ifdef titan 86864939Seric # define setpgid setpgrp 86964939Seric typedef int pid_t; 87064939Seric # undef WIFEXITED 87164939Seric # undef WEXITSTATUS 87264939Seric #endif 87364939Seric 87464939Seric 87564962Seric /* 87664962Seric ** Sequent DYNIX 3.2.0 87764962Seric ** 87864962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 87964962Seric */ 88064939Seric 88164962Seric #ifdef sequent 88266038Seric 88364962Seric # define BSD 1 88464962Seric # define HASUNSETENV 1 88564962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 88664962Seric # define WAITUNION 1 88764962Seric # define LA_TYPE LA_FLOAT 88864962Seric # ifdef _POSIX_VERSION 88964962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 89064962Seric # endif 89164962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 89264962Seric # define setpgid setpgrp 89364962Seric 89464962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 89564962Seric # undef WIFEXITED 89664962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 89764962Seric ((union wait*)&(s))->w_termsig == 0) 89864962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 89964962Seric typedef int pid_t; 90064962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 90164962Seric 90266144Seric # ifndef IDENTPROTO 90366144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 90466144Seric # endif 90566144Seric 90664962Seric # ifndef _PATH_UNIX 90764962Seric # define _PATH_UNIX "/dynix" 90864962Seric # endif 90964962Seric # ifndef _PATH_SENDMAILCF 91064962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 91164962Seric # endif 91264962Seric 91364962Seric #endif 91464962Seric 91564962Seric 91665748Seric /* 91766038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 91866038Seric ** 91966038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 92066038Seric ** 92166038Seric ** From Tim Wright <timw@sequent.com>. 92266038Seric */ 92366038Seric 92466038Seric #ifdef _SEQUENT_ 92566038Seric # define SYSTEM5 1 /* include all the System V defines */ 92666038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 92766038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 92866038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 92966038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 93066038Seric # define GIDSET_T gid_t 93166038Seric # define LA_TYPE LA_INT 93266038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 93367771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 93466144Seric # ifndef IDENTPROTO 93566144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 93666144Seric # endif 93766038Seric # ifndef _PATH_SENDMAILCF 93866038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 93966038Seric # endif 94066038Seric # ifndef _PATH_SENDMAILPID 94166038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 94266038Seric # endif 94366038Seric #endif 94466038Seric 94566038Seric 94666038Seric /* 94765748Seric ** Cray Unicos 94865748Seric ** 94965748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 95065748Seric */ 95164962Seric 95265748Seric #ifdef UNICOS 95365748Seric # define SYSTEM5 1 /* include all the System V defines */ 95465748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 95565748Seric # define MAXPATHLEN PATHSIZE 95665748Seric # define LA_TYPE LA_ZERO 95765749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 95868439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 95965748Seric #endif 96064962Seric 96165748Seric 96265820Seric /* 96365820Seric ** Apollo DomainOS 96465820Seric ** 96565820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 96665982Seric ** 96765820Seric ** 15 Jan 1994 96865820Seric ** 96965820Seric */ 97065748Seric 97165820Seric #ifdef apollo 97265820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 97365820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 97467771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 97565820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 97666044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 97768439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 97865820Seric # ifndef _PATH_SENDMAILCF 97965820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 98065820Seric # endif 98165820Seric # ifndef _PATH_SENDMAILPID 98265820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 98365820Seric # endif 98465820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 98565820Seric # undef S_IFIFO 98665820Seric # define S_IFIFO 0010000 98765820Seric # ifndef IDENTPROTO 98865820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 98965820Seric # endif 99065982Seric #endif 99165820Seric 99265820Seric 99366748Seric /* 99467745Seric ** UnixWare 1.1.2. 99566752Seric ** 99666752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 99766752Seric */ 99866752Seric 99966752Seric #ifdef UNIXWARE 100066752Seric # define SYSTEM5 1 100167745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 100267745Seric # define HASGETDTABLESIZE 1 100367745Seric # define HASSETREUID 1 100467745Seric # define HASSETSID 1 100567745Seric # define HASINITGROUPS 1 100667745Seric # define GIDSET_T gid_t 100767745Seric # define SLEEP_T unsigned 100866752Seric # define SFS_TYPE SFS_STATVFS 100966752Seric # define LA_TYPE LA_ZERO 101066752Seric # undef WIFEXITED 101166752Seric # undef WEXITSTATUS 101266752Seric # define _PATH_UNIX "/unix" 101366752Seric # ifndef _PATH_SENDMAILCF 101466752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 101566752Seric # endif 101666752Seric # ifndef _PATH_SENDMAILPID 101766752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 101866752Seric # endif 101966752Seric # define SYSLOG_BUFSIZE 128 102066752Seric #endif 102166752Seric 102266752Seric 102366752Seric /* 102466748Seric ** Intergraph CLIX 3.1 102566748Seric ** 102666748Seric ** From Paul Southworth <pauls@locust.cic.net> 102766748Seric */ 102865820Seric 102966748Seric #ifdef CLIX 103066748Seric # define SYSTEM5 1 /* looks like System V */ 103166752Seric # ifndef HASGETUSERSHELL 103266752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 103366752Seric # endif 103466748Seric # define DEV_BSIZE 512 /* device block size not defined */ 103566748Seric # define GIDSET_T gid_t 103666748Seric # undef LOG /* syslog not available */ 103766748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 103866748Seric # define GETSHORT _getshort 103966748Seric #endif 104065820Seric 104166748Seric 104266776Seric /* 104366776Seric ** NCR 3000 Series (SysVr4) 104466776Seric ** 104567434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 104666776Seric */ 104766748Seric 104866776Seric #ifdef NCR3000 104966776Seric # define __svr4__ 105066776Seric # undef BSD 105166776Seric # define LA_AVENRUN "avenrun" 105266776Seric #endif 105366748Seric 105466776Seric 105567434Seric /* 105667434Seric ** Tandem NonStop-UX SVR4 105767434Seric ** 105867434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 105967434Seric */ 106066776Seric 106167434Seric #ifdef NonStop_UX_BXX 106267434Seric # define __svr4__ 106367434Seric #endif 106466776Seric 106567434Seric 106667488Seric /* 106767488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 106867488Seric ** 106967488Seric ** Tested for 1.04 and 1.03 107067488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 107167488Seric */ 107267434Seric 107367488Seric #ifdef __H3050R 107467488Seric # define SYSTEM5 1 /* include all the System V defines */ 107567488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 107667488Seric # define setreuid(r, e) setresuid(r, e, -1) 107767488Seric # define LA_TYPE LA_FLOAT 107867488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 107967488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 108067488Seric # ifndef GIDSET_T 108167488Seric # define GIDSET_T gid_t 108267488Seric # endif 108367488Seric # ifndef _PATH_UNIX 108467488Seric # define _PATH_UNIX "/HI-UX" 108567488Seric # endif 108667488Seric # ifndef _PATH_SENDMAILCF 108767488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 108867488Seric # endif 108967488Seric # ifndef IDENTPROTO 109067488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 109167488Seric # endif 109267488Seric # ifndef HASGETUSERSHELL 109367488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 109467488Seric # endif 109567488Seric 109667488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 109767488Seric # undef m_flags 109867488Seric 109967488Seric # ifdef __STDC__ 110067488Seric extern int syslog(int, char *, ...); 110167488Seric # endif 110267488Seric 110367488Seric #endif 110467488Seric 110567488Seric 110668099Seric /* 110768099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 110868099Seric ** 110968099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 111068099Seric */ 111167488Seric 111268099Seric #ifdef _UTS 111368099Seric # include <sys/sysmacros.h> 111468099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 111568099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 111668099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 111768099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 111868099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 111968099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 112068099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 112168099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 112268099Seric # ifndef HASGETUSERSHELL 112368099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 112468099Seric # endif 112568099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 112668099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 112768099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 112868439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 112968099Seric # define _PATH_UNIX "/unix" 113068099Seric # ifndef _PATH_SENDMAILCF 113168099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 113268099Seric # endif 113368099Seric #endif 113468099Seric 113568357Seric /* 113668357Seric ** Cray Computer Corporation's CSOS 113768357Seric ** 113869473Seric ** From Scott Bolte <scott@craycos.com>. 113968357Seric */ 114068099Seric 114168357Seric #ifdef _CRAYCOM 114268357Seric # define SYSTEM5 1 /* include all the System V defines */ 114368357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 114468357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 114568357Seric # define MAXPATHLEN PATHSIZE 114668357Seric # define LA_TYPE LA_ZERO 114768357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 114868439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 114968357Seric # define _POSIX_CHOWN_RESTRICTED -1 115068357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 115168357Seric #endif 115268099Seric 115368099Seric 115468742Seric /* 115568742Seric ** Sony NEWS-OS 4.2.1R and 6.0.3 115669473Seric ** 115769473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 115868742Seric */ 115968742Seric 116068742Seric #ifdef sony_news 116168742Seric # ifndef __svr4 116268742Seric /* NEWS-OS 4.2.1R */ 116368742Seric # ifndef BSD 116468742Seric # define BSD /* has BSD routines */ 116568742Seric # endif 116668742Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 116768742Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 116868742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 116968742Seric # define LA_TYPE LA_INT 117068742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 117168742Seric # ifndef HASFLOCK 117268742Seric # define HASFLOCK 1 /* has flock(2) call */ 117368742Seric # endif 117468742Seric # define setpgid setpgrp 117568742Seric # undef WIFEXITED 117668742Seric # undef WEXITSTATUS 117768742Seric typedef int pid_t; 117868742Seric typedef int (*sigfunc_t)(); 117968742Seric # define SIGFUNC_DEFINED 118068742Seric 118168742Seric # else 118268742Seric /* NEWS-OS 6.0.3 with /bin/cc */ 118368742Seric # define SYSTEM5 1 /* include all the System V defines */ 118468742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 118568742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 118669638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 118768742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 118868742Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 118969473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 119068742Seric # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statvfs() impl */ 119169649Seric # ifndef SPT_TYPE 119269649Seric # define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */ 119369649Seric # endif 119468742Seric # define GIDSET_T gid_t 119568742Seric # undef WIFEXITED 119668742Seric # undef WEXITSTATUS 119768742Seric # define _PATH_UNIX "/stand/unix" 119868742Seric # ifndef _PATH_SENDMAILCF 119968742Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 120068742Seric # endif 120168742Seric # ifndef _PATH_SENDMAILPID 120268742Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 120368742Seric # endif 120468742Seric 120568742Seric # endif 120668742Seric #endif 120768742Seric 120868742Seric 120968742Seric /* 121068742Seric ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach 121169473Seric ** 121269473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 121368742Seric */ 121468742Seric 121568742Seric #ifdef luna 121668742Seric # ifndef IDENTPROTO 121768742Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 121868742Seric # endif 121968742Seric # ifdef uniosb 122069454Seric # include <sys/time.h> 122168742Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 122268742Seric # endif 122369649Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 122469649Seric # define NEEDPUTENV 1 /* need putenv(3) call */ 122568742Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 1226*69679Seric # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ 122768742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 122868742Seric # ifdef uniosb 122968742Seric # define LA_TYPE LA_INT 123068742Seric # endif 123168742Seric # ifdef luna2m 123268742Seric # define LA_TYPE LA_SUBR 123368742Seric # endif 123468742Seric # ifdef luna88k 123568742Seric # define LA_TYPE LA_INT 123668742Seric # endif 123768742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 123868742Seric # define setpgid setpgrp 123968742Seric # undef WIFEXITED 124068742Seric # undef WEXITSTATUS 124168742Seric typedef int pid_t; 124268742Seric typedef int (*sigfunc_t)(); 124368742Seric # define SIGFUNC_DEFINED 124468742Seric extern char *getenv(); 124568742Seric extern int errno; 124668742Seric # ifndef _PATH_SENDMAILCF 124768742Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 124868742Seric # endif 124968742Seric #endif 125068742Seric 125168742Seric 125268742Seric /* 125369473Seric ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc) 125468742Seric ** 125569473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 125668742Seric */ 125768742Seric 125868742Seric #ifdef nec_ews_svr4 125969454Seric # ifndef __svr4__ 126069454Seric # define __svr4__ /* use all System V Releae 4 defines below */ 126169454Seric # endif 126268742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 126368742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 126469473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ 126568742Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 126668742Seric # define GIDSET_T gid_t 126768742Seric # undef WIFEXITED 126868742Seric # undef WEXITSTATUS 126969454Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 127068742Seric #endif 127168742Seric 127268742Seric 127368742Seric 127463902Seric /********************************************************************** 127563787Seric ** End of Per-Operating System defines 127663902Seric **********************************************************************/ 127769638Seric /********************************************************************** 127863949Seric ** More general defines 127963949Seric **********************************************************************/ 128063949Seric 128163962Seric /* general BSD defines */ 128263962Seric #ifdef BSD 128364035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 128464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 128567742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 128667430Seric # ifndef HASSETRLIMIT 128767430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 128867430Seric # endif 128965830Seric # ifndef HASFLOCK 129065830Seric # define HASFLOCK 1 /* has flock(2) call */ 129165830Seric # endif 129267602Seric # ifndef TZ_TYPE 129367608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 129467602Seric # endif 129563962Seric #endif 129663962Seric 129765189Seric /* general System V Release 4 defines */ 129865189Seric #ifdef __svr4__ 129965189Seric # define SYSTEM5 1 130069638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 130167742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 130267742Seric # ifndef HASSETRLIMIT 130367742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 130467742Seric # endif 130565211Seric # ifndef HASGETUSERSHELL 130665211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 130765210Seric # endif 130865189Seric 130965189Seric # ifndef _PATH_UNIX 131065189Seric # define _PATH_UNIX "/unix" 131165189Seric # endif 131265189Seric # ifndef _PATH_SENDMAILCF 131365189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 131465189Seric # endif 131565189Seric # ifndef _PATH_SENDMAILPID 131665189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 131765189Seric # endif 131865189Seric # ifndef SYSLOG_BUFSIZE 131965189Seric # define SYSLOG_BUFSIZE 128 132065189Seric # endif 132167159Seric # ifndef SFS_TYPE 132267159Seric # define SFS_TYPE SFS_STATVFS 132367159Seric # endif 132465189Seric #endif 132565189Seric 132663787Seric /* general System V defines */ 132766298Seric #ifdef SYSTEM5 132864813Seric # include <sys/sysmacros.h> 132963949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 133064705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 133164962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 133267430Seric # ifndef HASULIMIT 133367430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 133467430Seric # endif 133563962Seric # ifndef LA_TYPE 133669462Seric # ifdef MIOC_READKSYM 133769462Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 133869462Seric # else 133969462Seric # define LA_TYPE LA_INT /* assume integer load average */ 134069462Seric # endif 134163962Seric # endif 134265749Seric # ifndef SFS_TYPE 134365749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 134465749Seric # endif 134567602Seric # ifndef TZ_TYPE 134667608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 134767602Seric # endif 134868442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 134968442Seric # define bzero(d, l) (memset((d), '\0', (l))) 135068442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 135166298Seric #endif 135263787Seric 135363949Seric /* general POSIX defines */ 135463949Seric #ifdef _POSIX_VERSION 135564718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 135664718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 135769638Seric # if _POSIX_VERSION >= 199500 && !defined(USESETEUID) 135869638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 135969638Seric # endif 136063949Seric #endif 136169638Seric /* 136268357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 136368357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 136464939Seric */ 136564439Seric 136664939Seric #ifdef titan 136764939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 136864939Seric #endif 136964939Seric 137068357Seric #ifdef _CRAYCOM 137168357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 137268357Seric #endif 137365830Seric 137468442Seric #ifdef ISC_UNIX 137568442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 137668442Seric #endif 137768357Seric 137868442Seric #ifdef ALTOS_SYS_V 137968442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 138068442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 138168442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 138268442Seric #endif 138368442Seric 138468442Seric 138565167Seric /* 138665167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 138765167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 138865167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 138965167Seric ** are closed. Some firewalls return this error if you try to connect 139065167Seric ** to the IDENT port (113), so you can't receive email from these hosts 139165167Seric ** on these systems. The firewall really should use a more specific 139265167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 139365167Seric ** not explicitly set to zero above, default it on. 139465167Seric */ 139564939Seric 139665167Seric #ifndef IDENTPROTO 139765167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 139865167Seric #endif 139965167Seric 140069601Seric #ifndef IP_SRCROUTE 140169601Seric # define IP_SRCROUTE 1 /* Detect IP source routing */ 140269601Seric #endif 140369601Seric 140465211Seric #ifndef HASGETUSERSHELL 140565211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 140665210Seric #endif 140765167Seric 140865830Seric #ifndef HASFLOCK 140965830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 141065830Seric #endif 141165210Seric 141269638Seric #ifndef HASSETREUID 141369638Seric # define HASSETREUID 0 /* assume no setreuid(2) call */ 141469638Seric #endif 141569638Seric 141669638Seric #ifndef USESETEUID 141769638Seric # define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */ 141869638Seric #endif 141969638Seric 142067430Seric #ifndef HASSETRLIMIT 142167430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 142267430Seric #endif 142367430Seric 142467430Seric #ifndef HASULIMIT 142567430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 142667430Seric #endif 142767430Seric 142866843Seric #ifndef OLD_NEWDB 142966843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 143066843Seric #endif 143165830Seric 143268099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 143368099Seric #ifndef HASSIGSETMASK 143468099Seric # ifdef SIGVTALRM 143568099Seric # define HASSETSIGMASK 1 143668099Seric # else 143768099Seric # define HASSETSIGMASK 0 143868099Seric # endif 143968099Seric #endif 144066843Seric 144169638Seric /* 144269638Seric ** If no type for argument two of getgroups call is defined, assume 144369638Seric ** it's an integer -- unfortunately, there seem to be several choices 144469638Seric ** here. 144569638Seric */ 144669638Seric 144769638Seric #ifndef GIDSET_T 144869638Seric # define GIDSET_T int 144969638Seric #endif 145069638Seric 145168705Seric #ifndef UID_T 145268705Seric # define UID_T uid_t 145368705Seric #endif 145468099Seric 145568706Seric #ifndef SIZE_T 145668706Seric # define SIZE_T size_t 145768706Seric #endif 145868706Seric 145968705Seric #ifndef ARGV_T 146068705Seric # define ARGV_T char ** 146168705Seric #endif 146268705Seric 146368705Seric 146464439Seric /********************************************************************** 146559023Seric ** Remaining definitions should never have to be changed. They are 146659023Seric ** primarily to provide back compatibility for older systems -- for 146759287Seric ** example, it includes some POSIX compatibility definitions 146864439Seric **********************************************************************/ 146959023Seric 147059388Seric /* System 5 compatibility */ 147159388Seric #ifndef S_ISREG 147264944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 147359388Seric #endif 147464944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 147564944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 147664944Seric #endif 147768494Seric #ifndef S_IWUSR 147868494Seric # define S_IWUSR 0200 147968494Seric #endif 148059388Seric #ifndef S_IWGRP 148168494Seric # define S_IWGRP 0020 148259388Seric #endif 148359388Seric #ifndef S_IWOTH 148468494Seric # define S_IWOTH 0002 148559388Seric #endif 148659388Seric 148759023Seric /* 148850537Seric ** Older systems don't have this error code -- it should be in 148950537Seric ** /usr/include/sysexits.h. 149050537Seric */ 149150537Seric 149250537Seric # ifndef EX_CONFIG 149350537Seric # define EX_CONFIG 78 /* configuration error */ 149450537Seric # endif 149556852Seric 149664718Seric /* pseudo-code used in server SMTP */ 149764718Seric # define EX_QUIT 22 /* drop out of server immediately */ 149864718Seric 149964718Seric 150063993Seric /* 150163993Seric ** These are used in a few cases where we need some special 150263993Seric ** error codes, but where the system doesn't provide something 150363993Seric ** reasonable. They are printed in errstring. 150463993Seric */ 150563993Seric 150663993Seric #ifndef E_PSEUDOBASE 150763993Seric # define E_PSEUDOBASE 256 150863993Seric #endif 150963993Seric 151063993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 151163993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 151263993Seric 151363970Seric /* type of arbitrary pointer */ 151463970Seric #ifndef ARBPTR_T 151563970Seric # define ARBPTR_T void * 151663970Seric #endif 151763970Seric 151860568Seric #ifndef __P 151960568Seric # include "cdefs.h" 152060568Seric #endif 152160568Seric 152267421Seric #if NAMED_BIND 152367421Seric # include <arpa/nameser.h> 152467434Seric # ifdef __svr4__ 152567434Seric # ifdef NOERROR 152667434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 152767434Seric # endif 152867434Seric # endif 152967421Seric #endif 153067421Seric 153156852Seric /* 153267419Seric ** The size of an IP address -- can't use sizeof because of problems 153367419Seric ** on Crays, where everything is 64 bits. This will break if/when 153467419Seric ** IP addresses are expanded to eight bytes. 153567419Seric */ 153667419Seric 153767421Seric #ifndef INADDRSZ 153867421Seric # define INADDRSZ 4 153967421Seric #endif 154067419Seric 154167419Seric /* 154267421Seric ** The size of various known types -- for reading network protocols. 154367421Seric ** Again, we can't use sizeof because of compiler randomness. 154467421Seric */ 154567421Seric 154667421Seric #ifndef INT16SZ 154767421Seric # define INT16SZ 2 154867421Seric #endif 154967421Seric #ifndef INT32SZ 155067421Seric # define INT32SZ 4 155167421Seric #endif 155267421Seric 155367421Seric /* 155458778Seric ** Do some required dependencies 155558778Seric */ 155658778Seric 155758778Seric #if defined(NETINET) || defined(NETISO) 155859107Seric # define SMTP 1 /* enable user and server SMTP */ 155959107Seric # define QUEUE 1 /* enable queueing */ 156059107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 156158778Seric #endif 156258778Seric 156358778Seric 156458778Seric /* 156556852Seric ** Arrange to use either varargs or stdargs 156656852Seric */ 156756852Seric 156856852Seric # ifdef __STDC__ 156956852Seric 157056852Seric # include <stdarg.h> 157156852Seric 157256852Seric # define VA_LOCAL_DECL va_list ap; 157356852Seric # define VA_START(f) va_start(ap, f) 157456852Seric # define VA_END va_end(ap) 157556852Seric 157656852Seric # else 157756852Seric 157856852Seric # include <varargs.h> 157956852Seric 158056852Seric # define VA_LOCAL_DECL va_list ap; 158156852Seric # define VA_START(f) va_start(ap) 158256852Seric # define VA_END va_end(ap) 158356852Seric 158456852Seric # endif 158557631Seric 158657943Seric #ifdef HASUNAME 158757631Seric # include <sys/utsname.h> 158857631Seric # ifdef newstr 158957631Seric # undef newstr 159057631Seric # endif 159157943Seric #else /* ! HASUNAME */ 159257631Seric # define NODE_LENGTH 32 159357631Seric struct utsname 159457631Seric { 159557631Seric char nodename[NODE_LENGTH+1]; 159657631Seric }; 159757943Seric #endif /* HASUNAME */ 159857642Seric 159968040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 160063838Seric # define MAXHOSTNAMELEN 256 160157735Seric #endif 160258153Seric 160358153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 160458153Seric # define SIGCHLD SIGCLD 160558153Seric #endif 160658153Seric 160758153Seric #ifndef STDIN_FILENO 160868742Seric # define STDIN_FILENO 0 160958153Seric #endif 161058153Seric 161158153Seric #ifndef STDOUT_FILENO 161268742Seric # define STDOUT_FILENO 1 161358153Seric #endif 161458153Seric 161558153Seric #ifndef STDERR_FILENO 161668742Seric # define STDERR_FILENO 2 161758153Seric #endif 161858689Seric 161964072Seric #ifndef LOCK_SH 162064035Seric # define LOCK_SH 0x01 /* shared lock */ 162164035Seric # define LOCK_EX 0x02 /* exclusive lock */ 162264035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 162364035Seric # define LOCK_UN 0x08 /* unlock */ 162464035Seric #endif 162558692Seric 162668742Seric #ifndef SEEK_SET 162768742Seric # define SEEK_SET 0 162868742Seric # define SEEK_CUR 1 162968742Seric # define SEEK_END 2 163068742Seric #endif 163168742Seric 163264035Seric #ifndef SIG_ERR 163364035Seric # define SIG_ERR ((void (*)()) -1) 163458689Seric #endif 163558702Seric 163664500Seric #ifndef WEXITSTATUS 163764500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 163864500Seric #endif 163964500Seric #ifndef WIFEXITED 164064500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 164164500Seric #endif 164264500Seric 164364561Seric #ifndef SIGFUNC_DEFINED 164464561Seric typedef void (*sigfunc_t) __P((int)); 164564561Seric #endif 164664561Seric 164765053Seric /* size of syslog buffer */ 164865053Seric #ifndef SYSLOG_BUFSIZE 164965053Seric # define SYSLOG_BUFSIZE 1024 165065053Seric #endif 165165053Seric 165258702Seric /* 165358702Seric ** Size of tobuf (deliver.c) 165458702Seric ** Tweak this to match your syslog implementation. It will have to 165558702Seric ** allow for the extra information printed. 165658702Seric */ 165758702Seric 165858702Seric #ifndef TOBUFSIZE 165965053Seric # if (SYSLOG_BUFSIZE) > 512 166065053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 166165053Seric # else 166265053Seric # define TOBUFSIZE 256 166365053Seric # endif 166458702Seric #endif 166560219Seric 166665015Seric /* 166765015Seric ** Size of prescan buffer. 166865015Seric ** Despite comments in the _sendmail_ book, this probably should 166965015Seric ** not be changed; there are some hard-to-define dependencies. 167065015Seric */ 167165015Seric 167265015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 167360219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 167460219Seric # ifndef FORK 167560219Seric # define FORK vfork /* function to call to fork mailer */ 167660219Seric # endif 167765955Seric 167865955Seric /* 167965955Seric ** If we are going to link scanf anyway, use it in readcf 168065955Seric */ 168165955Seric 168265955Seric #if !defined(HASUNAME) && !defined(SCANF) 168365955Seric # define SCANF 1 168465955Seric #endif 1685