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*69681Seric * @(#)conf.h 8.168 (Berkeley) 05/25/95 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 13*69681Seric ** 14*69681Seric ** Send updates to sendmail@CS.Berkeley.EDU so they will be 15*69681Seric ** included in the next release. 1622726Sdist */ 179147Seric 1869562Seric struct rusage; /* forward declaration to get gcc to shut up in wait.h */ 1969562Seric 2057232Seric # include <sys/param.h> 2164705Seric # include <sys/types.h> 2259389Seric # include <sys/stat.h> 2364380Seric # include <sys/file.h> 2464500Seric # include <sys/wait.h> 2558689Seric # include <fcntl.h> 2664035Seric # include <signal.h> 2768693Seric # include <netdb.h> 2868693Seric # include <pwd.h> 2957232Seric 3063902Seric /********************************************************************** 319147Seric ** Table sizes, etc.... 329147Seric ** There shouldn't be much need to change these.... 3363902Seric **********************************************************************/ 349147Seric 3559303Seric # define MAXLINE 2048 /* max line length */ 3624945Seric # define MAXNAME 256 /* max length of a name */ 379147Seric # define MAXPV 40 /* max # of parms to mailers */ 3859303Seric # define MAXATOM 200 /* max atoms per address */ 399147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 4068384Seric # define MAXRWSETS 200 /* max # of sets of rewriting rules */ 419147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 4257143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 4352106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 4457232Seric # define MAXKEY 128 /* maximum size of a database key */ 4557232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 4659056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4759667Seric # define MAXALIASDB 12 /* max # of alias databases */ 4867729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 4967729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 5068517Seric # define MAXMIMEARGS 20 /* max args in Content-Type: */ 5168517Seric # define MAXMIMENESTING 20 /* max MIME multipart nesting */ 5257143Seric 5357143Seric # ifndef QUEUESIZE 5469638Seric # define QUEUESIZE 3000 /* max # of jobs per queue run */ 5557143Seric # endif 5657143Seric 5763902Seric /********************************************************************** 589147Seric ** Compilation options. 5925673Seric ** 6025673Seric ** #define these if they are available; comment them out otherwise. 6163902Seric **********************************************************************/ 629147Seric 6325673Seric # define LOG 1 /* enable logging */ 6425673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 6564813Seric # define NETUNIX 1 /* include unix domain support */ 6658778Seric # define NETINET 1 /* include internet support */ 6753735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6863753Seric # define XDEBUG 1 /* enable extended debugging */ 6968785Seric # if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB) 7068848Seric # define USERDB 1 /* look in user database */ 7156337Seric # endif 7256337Seric 7366334Seric /********************************************************************** 7466334Seric ** 0/1 Compilation options. 7566334Seric ** #define these to 1 if they are available; 7666334Seric ** #define them to 0 otherwise. 7766334Seric **********************************************************************/ 7866334Seric 7966334Seric # ifndef NAMED_BIND 8066334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 8166334Seric # endif 8266334Seric 8368848Seric # ifndef DSN 8468848Seric # define DSN 1 /* include delivery status notification code */ 8568848Seric # endif 8668848Seric 8769480Seric # ifndef MIME8TO7 8869480Seric # define MIME8TO7 1 /* 8->7 bit MIME conversions */ 8969480Seric # endif 9069480Seric 9169480Seric # ifndef MIME7TO8 9269480Seric # define MIME7TO8 1 /* 7->8 bit MIME conversions */ 9369480Seric # endif 9469480Seric 9564032Seric /* 9664944Seric ** Most systems have symbolic links today, so default them on. You 9764944Seric ** can turn them off by #undef'ing this below. 9864944Seric */ 9964944Seric 10064944Seric # define HASLSTAT 1 /* has lstat(2) call */ 10164944Seric 10264962Seric /* 10364962Seric ** General "standard C" defines. 10464962Seric ** 10564962Seric ** These may be undone later, to cope with systems that claim to 10664962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 10764962Seric ** doesn't realize that the library is part of the language. 10864962Seric ** 10964962Seric ** Life would be much easier if we could get rid of this sort 11064962Seric ** of bozo problems. 11164962Seric */ 11264962Seric 11364962Seric #ifdef __STDC__ 11464962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 11564962Seric #endif 116*69681Seric /********************************************************************** 11759023Seric ** Operating system configuration. 11859023Seric ** 11959023Seric ** Unless you are porting to a new OS, you shouldn't have to 12059023Seric ** change these. 12163902Seric **********************************************************************/ 12256823Seric 12363787Seric 12463902Seric /* 12565565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 12668889Seric ** 12768889Seric ** If V4FS is defined, compile for HP-UX 10.0. 12863902Seric */ 12963902Seric 13067626Seric #ifdef __hpux 13168889Seric /* common definitions for HP-UX 9.x and 10.x */ 13268889Seric # undef m_flags /* conflict between db.h & sys/sysmacros.h on HP 300 */ 13363787Seric # define SYSTEM5 1 /* include all the System V defines */ 13464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 13569638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 13669638Seric # define seteuid(e) setresuid(-1, e, -1) 137*69681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 13869462Seric # define LA_TYPE LA_HPUX 13968873Seric # define SPT_TYPE SPT_PSTAT 14065749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 14165354Seric # define GIDSET_T gid_t 14265581Seric # ifndef HASGETUSERSHELL 14365581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 14465581Seric # endif 14565504Seric # define syslog hard_syslog 14665581Seric # ifdef __STDC__ 14765581Seric extern int syslog(int, char *, ...); 14865167Seric # endif 14968889Seric 15068889Seric # ifdef V4FS 15168889Seric /* HP-UX 10.x */ 15268889Seric # define _PATH_UNIX "/stand/vmunix" 15368889Seric # ifndef _PATH_SENDMAILCF 15468889Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 15568889Seric # endif 15668889Seric # ifndef _PATH_SENDMAILPID 15768889Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 15868889Seric # endif 15968889Seric # ifndef IDENTPROTO 16068889Seric # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ 16168889Seric # endif 16268889Seric 16368889Seric # else 16468889Seric /* HP-UX 9.x */ 16568889Seric # define _PATH_UNIX "/hp-ux" 16668889Seric # ifndef _PATH_SENDMAILCF 16768889Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 16868889Seric # endif 16968889Seric # ifndef IDENTPROTO 17068889Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 17168889Seric # endif 17268889Seric # endif 17368889Seric 17467626Seric #endif 17556823Seric 17664314Seric 17763902Seric /* 17863902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 17963902Seric */ 18063902Seric 18167626Seric #ifdef _AIX3 18264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18364840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 185*69681Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 18660219Seric # define FORK fork /* no vfork primitive available */ 18769562Seric # define GIDSET_T gid_t 18865749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 18967771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 19068145Seric # define LA_TYPE LA_INT 19167626Seric #endif 19260219Seric 19364314Seric 19463902Seric /* 19563902Seric ** Silicon Graphics IRIX 19663902Seric ** 19763965Seric ** Compiles on 4.0.1. 19867967Seric ** 19968686Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). 20068686Seric ** Use IRIX5 instead of IRIX for IRIX 5.x. 20167967Seric ** 20267967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 20368686Seric ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. 20463902Seric */ 20563902Seric 20668686Seric #if defined(IRIX64) || defined(IRIX5) 20767967Seric # define IRIX 20867967Seric #endif 20967967Seric 21067626Seric #ifdef IRIX 21166763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 21264035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 21465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 215*69681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 21663753Seric # define FORK fork /* no vfork primitive available */ 21768686Seric # if !defined(IRIX64) && !defined(IRIX5) 21868225Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 21968225Seric # endif 22064155Seric # define setpgid BSDsetpgrp 22163937Seric # define GIDSET_T gid_t 22268705Seric # define ARGV_T const char ** 22365749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 22468439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 22566763Seric # define LA_TYPE LA_INT 22667967Seric # ifdef IRIX64 22767967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 22867967Seric # else 22967967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 23067967Seric # endif 23167626Seric #endif 23263753Seric 23363902Seric 23463902Seric /* 23564813Seric ** SunOS and Solaris 23664813Seric ** 23764813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 23869638Seric ** Solaris 2.4 (a.k.a. SunOS 5.4). 23963902Seric */ 24063902Seric 24163787Seric #if defined(sun) && !defined(BSD) 24259074Seric 24364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 24464813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 24565211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 246*69681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 24765749Seric # define LA_TYPE LA_INT 24860564Seric 24964842Seric # ifdef SOLARIS_2_3 25068813Seric # define SOLARIS 203 /* for back compat only -- use -DSOLARIS=203 */ 25164842Seric # endif 25264842Seric 25360602Seric # ifdef SOLARIS 25463902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 25565222Seric # ifndef __svr4__ 25665222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 25765222Seric # endif 25869658Seric # define BSD_COMP 1 /* get BSD ioctl calls */ 25963787Seric # include <sys/time.h> 26065172Seric # define GIDSET_T gid_t 26165189Seric # ifndef _PATH_UNIX 26267129Seric # define _PATH_UNIX "/dev/ksyms" 26365189Seric # endif 26463962Seric # ifndef _PATH_SENDMAILCF 26563962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 26664072Seric # endif 26764072Seric # ifndef _PATH_SENDMAILPID 26863962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 26963962Seric # endif 27069401Seric # ifndef _PATH_HOSTS 27169401Seric # define _PATH_HOSTS "/etc/inet/hosts" 27269401Seric # endif 27366022Seric # ifndef SYSLOG_BUFSIZE 27466022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 27566022Seric # endif 27663787Seric 27760602Seric # else 27865105Seric /* SunOS 4.0.3 or 4.1.x */ 27965189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 28065830Seric # ifndef HASFLOCK 28165830Seric # define HASFLOCK 1 /* has flock(2) call */ 28265830Seric # endif 28365749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 28460564Seric # include <vfork.h> 28563787Seric 28665105Seric # ifdef SUNOS403 28765105Seric /* special tweaking for SunOS 4.0.3 */ 28865105Seric # include <malloc.h> 28965105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 29069679Seric # define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */ 29165105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 29265105Seric # undef WIFEXITED 29365105Seric # undef WEXITSTATUS 29465105Seric # undef HASUNAME 29565105Seric # define setpgid setpgrp 29665105Seric typedef int pid_t; 29765105Seric extern char *getenv(); 29865105Seric 29966732Seric # else 30066732Seric /* 4.1.x specifics */ 30166732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 30266732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 30366732Seric 30465105Seric # endif 30560564Seric # endif 30659023Seric #endif 30759023Seric 30864718Seric /* 30964813Seric ** DG/UX 31064813Seric ** 31167427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 31267427Seric ** older support. 31367427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 31464718Seric */ 31564314Seric 31667427Seric #ifdef DGUX_5_4_2 31767427Seric # define DGUX 1 31867427Seric #endif 31967427Seric 32064718Seric #ifdef DGUX 32164718Seric # define SYSTEM5 1 32269462Seric # define LA_TYPE LA_DGUX 32364718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 32464718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 32564718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 32664718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 32766036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 32865167Seric # ifndef IDENTPROTO 32965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 33065167Seric # endif 33167771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 33265749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 33364813Seric 33464813Seric /* these include files must be included early on DG/UX */ 33564813Seric # include <netinet/in.h> 33664813Seric # include <arpa/inet.h> 33764813Seric 33867427Seric # ifdef DGUX_5_4_2 33967427Seric # define inet_addr dgux_inet_addr 34064718Seric extern long dgux_inet_addr(); 34167427Seric # endif 34264718Seric #endif 34364718Seric 34464718Seric 34563902Seric /* 34663902Seric ** Digital Ultrix 4.2A or 4.3 34764264Seric ** 34864264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 34964264Seric ** not dropped when the process exits. This causes major problems, 35064264Seric ** so flock is the only alternative. 35163902Seric */ 35263902Seric 35360564Seric #ifdef ultrix 35464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 35563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 35664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 35766242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 35865830Seric # ifndef HASFLOCK 35965830Seric # define HASFLOCK 1 /* has flock(2) call */ 36065830Seric # endif 36165211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 36269279Seric # ifndef BROKEN_RES_SEARCH 36369279Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 36469279Seric # endif 36565135Seric # ifdef vax 36665135Seric # define LA_TYPE LA_FLOAT 36765135Seric # else 36865135Seric # define LA_TYPE LA_INT 36965135Seric # define LA_AVENRUN "avenrun" 37065135Seric # endif 37165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 37265167Seric # ifndef IDENTPROTO 37369279Seric # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ 37465167Seric # endif 37560564Seric #endif 37660564Seric 37764314Seric 37863902Seric /* 37968072Seric ** OSF/1 for Intel Paragon. 38068072Seric ** 38168082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 38268082Seric ** of Intel Scalable Systems Divison. 38368072Seric */ 38468072Seric 38568072Seric #ifdef __PARAGON__ 38668072Seric # define __osf__ 1 /* get OSF/1 defines below */ 38768072Seric # ifndef _PATH_SENDMAILCF 38868072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 38968072Seric # endif 39068072Seric #endif 39168072Seric 39268072Seric 39368072Seric /* 39463902Seric ** OSF/1 (tested on Alpha) 39563902Seric */ 39663902Seric 39763787Seric #ifdef __osf__ 39863962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 39969638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 40064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 401*69681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 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) */ 695*69681Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 69663962Seric # define LA_TYPE LA_FLOAT 69765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 69865949Seric # ifndef _PATH_SENDMAILCF 69965949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 70065949Seric # endif 70165949Seric # ifndef S_IREAD 70265949Seric # define S_IREAD _S_IREAD 70365949Seric # define S_IWRITE _S_IWRITE 70465949Seric # define S_IEXEC _S_IEXEC 70565949Seric # define S_IFMT _S_IFMT 70665949Seric # define S_IFCHR _S_IFCHR 70765949Seric # define S_IFBLK _S_IFBLK 70865949Seric # endif 70965167Seric # ifndef IDENTPROTO 71065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 71165167Seric # endif 71263962Seric #endif 71363962Seric 71464314Seric 71563962Seric /* 71664999Seric ** RISC/os 4.52 71763962Seric ** 71864999Seric ** Gives a ton of warning messages, but otherwise compiles. 71963962Seric */ 72063962Seric 72163965Seric #ifdef RISCOS 72264999Seric 72363962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 72466226Seric # ifndef HASFLOCK 72565830Seric # define HASFLOCK 1 /* has flock(2) call */ 72665830Seric # endif 72764999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 72864999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 72963962Seric # define LA_TYPE LA_INT 73063962Seric # define LA_AVENRUN "avenrun" 73163962Seric # define _PATH_UNIX "/unix" 73264999Seric # undef WIFEXITED 73364999Seric 73464999Seric # define setpgid setpgrp 73564999Seric 73664999Seric extern int errno; 73764999Seric typedef int pid_t; 73864999Seric #define SIGFUNC_DEFINED 73964999Seric typedef int (*sigfunc_t)(); 74064999Seric extern char *getenv(); 74164999Seric extern void *malloc(); 74264999Seric 74363962Seric #endif 74463962Seric 74564314Seric 74664155Seric /* 74764155Seric ** Linux 0.99pl10 and above... 74866300Seric ** 74966300Seric ** Thanks to, in reverse order of contact: 75066300Seric ** 75168093Seric ** John Kennedy <warlock@csuchico.edu> 75267885Seric ** Andrew Pam <avatar@aus.xanadu.com> 75366300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 75466300Seric ** Karl London <karl@borg.demon.co.uk> 75566300Seric ** 75668093Seric ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 75768093Seric ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 75868093Seric ** gcc 2.6.2 libc.so.4.6.20 75968093Seric ** slackware 2.1.0 linux 1.1.70 76064155Seric */ 76164155Seric 76264770Seric #ifdef __linux__ 76366298Seric # define BSD 1 /* include BSD defines */ 76464155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 76566298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 76664380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 76766298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 76866300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 76967885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 77068518Seric # ifndef HASFLOCK 77168518Seric # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 77268518Seric # endif 77364155Seric # ifndef LA_TYPE 77466301Seric # define LA_TYPE LA_PROCSTR 77564155Seric # endif 77666300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 77768093Seric # ifndef _PATH_SENDMAILPID 77868093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 77968093Seric # endif 78068093Seric # define TZ_TYPE TZ_TNAME 78164763Seric # include <sys/sysmacros.h> 78266300Seric # undef atol /* wounded in <stdlib.h> */ 78364155Seric #endif 78464155Seric 78564155Seric 78664345Seric /* 78764345Seric ** DELL SVR4 Issue 2.2, and others 78864345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 78964345Seric ** 79064345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 79164345Seric ** defined, and the definitions conflict. 79264924Seric ** 79364924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 79464924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 79564924Seric ** (SVR4.0/386 version 3.0). 79664345Seric */ 79764345Seric 79864345Seric #ifdef DELL_SVR4 79965189Seric /* no changes necessary */ 80065189Seric /* see general __svr4__ defines below */ 80164345Seric #endif 80264345Seric 80364345Seric 80464380Seric /* 80564380Seric ** Apple A/UX 3.0 80664380Seric */ 80764345Seric 80864380Seric #ifdef _AUX_SOURCE 80964729Seric # include <sys/sysmacros.h> 81064380Seric # define BSD /* has BSD routines */ 81168803Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 81264380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 81364380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 81464561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 81565167Seric # ifndef IDENTPROTO 81665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 81765167Seric # endif 81864380Seric # define FORK fork 81964380Seric # ifndef _PATH_SENDMAILCF 82064380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 82164380Seric # endif 82264380Seric # ifndef LA_TYPE 82364380Seric # define LA_TYPE LA_ZERO 82464380Seric # endif 82565749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 82664560Seric # undef WIFEXITED 82764560Seric # undef WEXITSTATUS 82864380Seric #endif 82964380Seric 83064380Seric 83164705Seric /* 83264705Seric ** Encore UMAX V 83364705Seric ** 83464705Seric ** Not extensively tested. 83564705Seric */ 83664380Seric 83764705Seric #ifdef UMAXV 83864705Seric # include <limits.h> 83964705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 84064705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 84164705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 84265211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 84364705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 84464705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 84564705Seric # define FORK fork /* no vfork(2) primitive available */ 84665749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 84764705Seric # define MAXPATHLEN PATH_MAX 84864705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 84964705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 85064705Seric # undef WIFEXITED 85164705Seric # undef WEXITSTATUS 85264705Seric #endif 85364705Seric 85464705Seric 85564939Seric /* 85664939Seric ** Stardent Titan 3000 running TitanOS 4.2. 85764939Seric ** 85864939Seric ** Must be compiled in "cc -43" mode. 85964939Seric ** 86064944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 86164939Seric ** 86264939Seric ** Note the tweaking below after the BSD defines are set. 86364939Seric */ 86464705Seric 86564939Seric #ifdef titan 86664939Seric # define setpgid setpgrp 86764939Seric typedef int pid_t; 86864939Seric # undef WIFEXITED 86964939Seric # undef WEXITSTATUS 87064939Seric #endif 87164939Seric 87264939Seric 87364962Seric /* 87464962Seric ** Sequent DYNIX 3.2.0 87564962Seric ** 87664962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 87764962Seric */ 87864939Seric 87964962Seric #ifdef sequent 88066038Seric 88164962Seric # define BSD 1 88264962Seric # define HASUNSETENV 1 88364962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 88464962Seric # define WAITUNION 1 88564962Seric # define LA_TYPE LA_FLOAT 88664962Seric # ifdef _POSIX_VERSION 88764962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 88864962Seric # endif 88964962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 89064962Seric # define setpgid setpgrp 89164962Seric 89264962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 89364962Seric # undef WIFEXITED 89464962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 89564962Seric ((union wait*)&(s))->w_termsig == 0) 89664962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 89764962Seric typedef int pid_t; 89864962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 89964962Seric 90066144Seric # ifndef IDENTPROTO 90166144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 90266144Seric # endif 90366144Seric 90464962Seric # ifndef _PATH_UNIX 90564962Seric # define _PATH_UNIX "/dynix" 90664962Seric # endif 90764962Seric # ifndef _PATH_SENDMAILCF 90864962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 90964962Seric # endif 91064962Seric 91164962Seric #endif 91264962Seric 91364962Seric 91465748Seric /* 91566038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 91666038Seric ** 91766038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 91866038Seric ** 91966038Seric ** From Tim Wright <timw@sequent.com>. 92066038Seric */ 92166038Seric 92266038Seric #ifdef _SEQUENT_ 92366038Seric # define SYSTEM5 1 /* include all the System V defines */ 92466038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 92566038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 92666038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 92766038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 92866038Seric # define GIDSET_T gid_t 92966038Seric # define LA_TYPE LA_INT 93066038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 93167771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 93266144Seric # ifndef IDENTPROTO 93366144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 93466144Seric # endif 93566038Seric # ifndef _PATH_SENDMAILCF 93666038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 93766038Seric # endif 93866038Seric # ifndef _PATH_SENDMAILPID 93966038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 94066038Seric # endif 94166038Seric #endif 94266038Seric 94366038Seric 94466038Seric /* 94565748Seric ** Cray Unicos 94665748Seric ** 94765748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 94865748Seric */ 94964962Seric 95065748Seric #ifdef UNICOS 95165748Seric # define SYSTEM5 1 /* include all the System V defines */ 95265748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 95365748Seric # define MAXPATHLEN PATHSIZE 95465748Seric # define LA_TYPE LA_ZERO 95565749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 95668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 95765748Seric #endif 95864962Seric 95965748Seric 96065820Seric /* 96165820Seric ** Apollo DomainOS 96265820Seric ** 96365820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 96465982Seric ** 96565820Seric ** 15 Jan 1994 96665820Seric ** 96765820Seric */ 96865748Seric 96965820Seric #ifdef apollo 97065820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 97165820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 97267771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 97365820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 97466044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 97568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 97665820Seric # ifndef _PATH_SENDMAILCF 97765820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 97865820Seric # endif 97965820Seric # ifndef _PATH_SENDMAILPID 98065820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 98165820Seric # endif 98265820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 98365820Seric # undef S_IFIFO 98465820Seric # define S_IFIFO 0010000 98565820Seric # ifndef IDENTPROTO 98665820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 98765820Seric # endif 98865982Seric #endif 98965820Seric 99065820Seric 99166748Seric /* 99267745Seric ** UnixWare 1.1.2. 99366752Seric ** 99466752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 99566752Seric */ 99666752Seric 99766752Seric #ifdef UNIXWARE 99866752Seric # define SYSTEM5 1 99967745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 100067745Seric # define HASGETDTABLESIZE 1 100167745Seric # define HASSETREUID 1 100267745Seric # define HASSETSID 1 100367745Seric # define HASINITGROUPS 1 100467745Seric # define GIDSET_T gid_t 100567745Seric # define SLEEP_T unsigned 100666752Seric # define SFS_TYPE SFS_STATVFS 100766752Seric # define LA_TYPE LA_ZERO 100866752Seric # undef WIFEXITED 100966752Seric # undef WEXITSTATUS 101066752Seric # define _PATH_UNIX "/unix" 101166752Seric # ifndef _PATH_SENDMAILCF 101266752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 101366752Seric # endif 101466752Seric # ifndef _PATH_SENDMAILPID 101566752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 101666752Seric # endif 101766752Seric # define SYSLOG_BUFSIZE 128 101866752Seric #endif 101966752Seric 102066752Seric 102166752Seric /* 102266748Seric ** Intergraph CLIX 3.1 102366748Seric ** 102466748Seric ** From Paul Southworth <pauls@locust.cic.net> 102566748Seric */ 102665820Seric 102766748Seric #ifdef CLIX 102866748Seric # define SYSTEM5 1 /* looks like System V */ 102966752Seric # ifndef HASGETUSERSHELL 103066752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 103166752Seric # endif 103266748Seric # define DEV_BSIZE 512 /* device block size not defined */ 103366748Seric # define GIDSET_T gid_t 103466748Seric # undef LOG /* syslog not available */ 103566748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 103666748Seric # define GETSHORT _getshort 103766748Seric #endif 103865820Seric 103966748Seric 104066776Seric /* 104166776Seric ** NCR 3000 Series (SysVr4) 104266776Seric ** 104367434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 104466776Seric */ 104566748Seric 104666776Seric #ifdef NCR3000 104766776Seric # define __svr4__ 1048*69681Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 104966776Seric # undef BSD 105066776Seric # define LA_AVENRUN "avenrun" 105166776Seric #endif 105266748Seric 105366776Seric 105467434Seric /* 105567434Seric ** Tandem NonStop-UX SVR4 105667434Seric ** 105767434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 105867434Seric */ 105966776Seric 106067434Seric #ifdef NonStop_UX_BXX 106167434Seric # define __svr4__ 106267434Seric #endif 106366776Seric 106467434Seric 106567488Seric /* 106667488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 106767488Seric ** 106867488Seric ** Tested for 1.04 and 1.03 106967488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 107067488Seric */ 107167434Seric 107267488Seric #ifdef __H3050R 107367488Seric # define SYSTEM5 1 /* include all the System V defines */ 107467488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 107567488Seric # define setreuid(r, e) setresuid(r, e, -1) 107667488Seric # define LA_TYPE LA_FLOAT 107767488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 107867488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 107967488Seric # ifndef GIDSET_T 108067488Seric # define GIDSET_T gid_t 108167488Seric # endif 108267488Seric # ifndef _PATH_UNIX 108367488Seric # define _PATH_UNIX "/HI-UX" 108467488Seric # endif 108567488Seric # ifndef _PATH_SENDMAILCF 108667488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 108767488Seric # endif 108867488Seric # ifndef IDENTPROTO 108967488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 109067488Seric # endif 109167488Seric # ifndef HASGETUSERSHELL 109267488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 109367488Seric # endif 109467488Seric 109567488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 109667488Seric # undef m_flags 109767488Seric 109867488Seric # ifdef __STDC__ 109967488Seric extern int syslog(int, char *, ...); 110067488Seric # endif 110167488Seric 110267488Seric #endif 110367488Seric 110467488Seric 110568099Seric /* 110668099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 110768099Seric ** 110868099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 110968099Seric */ 111067488Seric 111168099Seric #ifdef _UTS 111268099Seric # include <sys/sysmacros.h> 111368099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 111468099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 111568099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 111668099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 111768099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 111868099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 111968099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 112068099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 112168099Seric # ifndef HASGETUSERSHELL 112268099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 112368099Seric # endif 112468099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 112568099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 112668099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 112768439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 112868099Seric # define _PATH_UNIX "/unix" 112968099Seric # ifndef _PATH_SENDMAILCF 113068099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 113168099Seric # endif 113268099Seric #endif 113368099Seric 113468357Seric /* 113568357Seric ** Cray Computer Corporation's CSOS 113668357Seric ** 113769473Seric ** From Scott Bolte <scott@craycos.com>. 113868357Seric */ 113968099Seric 114068357Seric #ifdef _CRAYCOM 114168357Seric # define SYSTEM5 1 /* include all the System V defines */ 114268357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 114368357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 114468357Seric # define MAXPATHLEN PATHSIZE 114568357Seric # define LA_TYPE LA_ZERO 114668357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 114768439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 114868357Seric # define _POSIX_CHOWN_RESTRICTED -1 114968357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 115068357Seric #endif 115168099Seric 115268099Seric 115368742Seric /* 115468742Seric ** Sony NEWS-OS 4.2.1R and 6.0.3 115569473Seric ** 115669473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 115768742Seric */ 115868742Seric 115968742Seric #ifdef sony_news 116068742Seric # ifndef __svr4 116168742Seric /* NEWS-OS 4.2.1R */ 116268742Seric # ifndef BSD 116368742Seric # define BSD /* has BSD routines */ 116468742Seric # endif 116568742Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 116668742Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 116768742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 116868742Seric # define LA_TYPE LA_INT 116968742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 117068742Seric # ifndef HASFLOCK 117168742Seric # define HASFLOCK 1 /* has flock(2) call */ 117268742Seric # endif 117368742Seric # define setpgid setpgrp 117468742Seric # undef WIFEXITED 117568742Seric # undef WEXITSTATUS 117668742Seric typedef int pid_t; 117768742Seric typedef int (*sigfunc_t)(); 117868742Seric # define SIGFUNC_DEFINED 117968742Seric 118068742Seric # else 118168742Seric /* NEWS-OS 6.0.3 with /bin/cc */ 118268742Seric # define SYSTEM5 1 /* include all the System V defines */ 118368742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 118468742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 118569638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 118668742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 118768742Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 118869473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 118968742Seric # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statvfs() impl */ 119069649Seric # ifndef SPT_TYPE 119169649Seric # define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */ 119269649Seric # endif 119368742Seric # define GIDSET_T gid_t 119468742Seric # undef WIFEXITED 119568742Seric # undef WEXITSTATUS 119668742Seric # define _PATH_UNIX "/stand/unix" 119768742Seric # ifndef _PATH_SENDMAILCF 119868742Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 119968742Seric # endif 120068742Seric # ifndef _PATH_SENDMAILPID 120168742Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 120268742Seric # endif 120368742Seric 120468742Seric # endif 120568742Seric #endif 120668742Seric 120768742Seric 120868742Seric /* 120968742Seric ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach 121069473Seric ** 121169473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 121268742Seric */ 121368742Seric 121468742Seric #ifdef luna 121568742Seric # ifndef IDENTPROTO 121668742Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 121768742Seric # endif 121868742Seric # ifdef uniosb 121969454Seric # include <sys/time.h> 122068742Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 122168742Seric # endif 122269649Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 122369649Seric # define NEEDPUTENV 1 /* need putenv(3) call */ 122468742Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 122569679Seric # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ 122668742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 122768742Seric # ifdef uniosb 122868742Seric # define LA_TYPE LA_INT 122968742Seric # endif 123068742Seric # ifdef luna2m 123168742Seric # define LA_TYPE LA_SUBR 123268742Seric # endif 123368742Seric # ifdef luna88k 123468742Seric # define LA_TYPE LA_INT 123568742Seric # endif 123668742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 123768742Seric # define setpgid setpgrp 123868742Seric # undef WIFEXITED 123968742Seric # undef WEXITSTATUS 124068742Seric typedef int pid_t; 124168742Seric typedef int (*sigfunc_t)(); 124268742Seric # define SIGFUNC_DEFINED 124368742Seric extern char *getenv(); 124468742Seric extern int errno; 124568742Seric # ifndef _PATH_SENDMAILCF 124668742Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 124768742Seric # endif 124868742Seric #endif 124968742Seric 125068742Seric 125168742Seric /* 125269473Seric ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc) 125368742Seric ** 125469473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 125568742Seric */ 125668742Seric 125768742Seric #ifdef nec_ews_svr4 125869454Seric # ifndef __svr4__ 125969454Seric # define __svr4__ /* use all System V Releae 4 defines below */ 126069454Seric # endif 126168742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 126268742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 126369473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ 126468742Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 126568742Seric # define GIDSET_T gid_t 126668742Seric # undef WIFEXITED 126768742Seric # undef WEXITSTATUS 126869454Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 126968742Seric #endif 127068742Seric 127168742Seric 127268742Seric 127363902Seric /********************************************************************** 127463787Seric ** End of Per-Operating System defines 127563902Seric **********************************************************************/ 127669638Seric /********************************************************************** 127763949Seric ** More general defines 127863949Seric **********************************************************************/ 127963949Seric 128063962Seric /* general BSD defines */ 128163962Seric #ifdef BSD 128264035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 128364035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 128467742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 1285*69681Seric # ifndef IP_SRCROUTE 1286*69681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 1287*69681Seric # endif 128867430Seric # ifndef HASSETRLIMIT 128967430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 129067430Seric # endif 129165830Seric # ifndef HASFLOCK 129265830Seric # define HASFLOCK 1 /* has flock(2) call */ 129365830Seric # endif 129467602Seric # ifndef TZ_TYPE 129567608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 129667602Seric # endif 129763962Seric #endif 129863962Seric 129965189Seric /* general System V Release 4 defines */ 130065189Seric #ifdef __svr4__ 130165189Seric # define SYSTEM5 1 130269638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 130367742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 130467742Seric # ifndef HASSETRLIMIT 130567742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 130667742Seric # endif 130765211Seric # ifndef HASGETUSERSHELL 130865211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 130965210Seric # endif 131065189Seric 131165189Seric # ifndef _PATH_UNIX 131265189Seric # define _PATH_UNIX "/unix" 131365189Seric # endif 131465189Seric # ifndef _PATH_SENDMAILCF 131565189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 131665189Seric # endif 131765189Seric # ifndef _PATH_SENDMAILPID 131865189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 131965189Seric # endif 132065189Seric # ifndef SYSLOG_BUFSIZE 132165189Seric # define SYSLOG_BUFSIZE 128 132265189Seric # endif 132367159Seric # ifndef SFS_TYPE 132467159Seric # define SFS_TYPE SFS_STATVFS 132567159Seric # endif 132665189Seric #endif 132765189Seric 132863787Seric /* general System V defines */ 132966298Seric #ifdef SYSTEM5 133064813Seric # include <sys/sysmacros.h> 133163949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 133264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 133364962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 133467430Seric # ifndef HASULIMIT 133567430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 133667430Seric # endif 133763962Seric # ifndef LA_TYPE 133869462Seric # ifdef MIOC_READKSYM 133969462Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 134069462Seric # else 134169462Seric # define LA_TYPE LA_INT /* assume integer load average */ 134269462Seric # endif 134363962Seric # endif 134465749Seric # ifndef SFS_TYPE 134565749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 134665749Seric # endif 134767602Seric # ifndef TZ_TYPE 134867608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 134967602Seric # endif 135068442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 135168442Seric # define bzero(d, l) (memset((d), '\0', (l))) 135268442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 135366298Seric #endif 135463787Seric 135563949Seric /* general POSIX defines */ 135663949Seric #ifdef _POSIX_VERSION 135764718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 135864718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 135969638Seric # if _POSIX_VERSION >= 199500 && !defined(USESETEUID) 136069638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 136169638Seric # endif 136263949Seric #endif 136369638Seric /* 136468357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 136568357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 136664939Seric */ 136764439Seric 136864939Seric #ifdef titan 136964939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 137064939Seric #endif 137164939Seric 137268357Seric #ifdef _CRAYCOM 137368357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 137468357Seric #endif 137565830Seric 137668442Seric #ifdef ISC_UNIX 137768442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 137868442Seric #endif 137968357Seric 138068442Seric #ifdef ALTOS_SYS_V 138168442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 138268442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 138368442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 138468442Seric #endif 138568442Seric 138668442Seric 138765167Seric /* 138865167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 138965167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 139065167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 139165167Seric ** are closed. Some firewalls return this error if you try to connect 139265167Seric ** to the IDENT port (113), so you can't receive email from these hosts 139365167Seric ** on these systems. The firewall really should use a more specific 139465167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 139565167Seric ** not explicitly set to zero above, default it on. 139665167Seric */ 139764939Seric 139865167Seric #ifndef IDENTPROTO 139965167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 140065167Seric #endif 140165167Seric 140269601Seric #ifndef IP_SRCROUTE 140369601Seric # define IP_SRCROUTE 1 /* Detect IP source routing */ 140469601Seric #endif 140569601Seric 140665211Seric #ifndef HASGETUSERSHELL 140765211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 140865210Seric #endif 140965167Seric 141065830Seric #ifndef HASFLOCK 141165830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 141265830Seric #endif 141365210Seric 141469638Seric #ifndef HASSETREUID 141569638Seric # define HASSETREUID 0 /* assume no setreuid(2) call */ 141669638Seric #endif 141769638Seric 141869638Seric #ifndef USESETEUID 141969638Seric # define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */ 142069638Seric #endif 142169638Seric 142267430Seric #ifndef HASSETRLIMIT 142367430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 142467430Seric #endif 142567430Seric 142667430Seric #ifndef HASULIMIT 142767430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 142867430Seric #endif 142967430Seric 143066843Seric #ifndef OLD_NEWDB 143166843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 143266843Seric #endif 143365830Seric 143468099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 143568099Seric #ifndef HASSIGSETMASK 143668099Seric # ifdef SIGVTALRM 143768099Seric # define HASSETSIGMASK 1 143868099Seric # else 143968099Seric # define HASSETSIGMASK 0 144068099Seric # endif 144168099Seric #endif 144266843Seric 144369638Seric /* 144469638Seric ** If no type for argument two of getgroups call is defined, assume 144569638Seric ** it's an integer -- unfortunately, there seem to be several choices 144669638Seric ** here. 144769638Seric */ 144869638Seric 144969638Seric #ifndef GIDSET_T 145069638Seric # define GIDSET_T int 145169638Seric #endif 145269638Seric 145368705Seric #ifndef UID_T 145468705Seric # define UID_T uid_t 145568705Seric #endif 145668099Seric 145768706Seric #ifndef SIZE_T 145868706Seric # define SIZE_T size_t 145968706Seric #endif 146068706Seric 146168705Seric #ifndef ARGV_T 146268705Seric # define ARGV_T char ** 146368705Seric #endif 1464*69681Seric /********************************************************************** 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