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*69959Seric * @(#)conf.h 8.196 (Berkeley) 06/21/95 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1369681Seric ** 1469681Seric ** Send updates to sendmail@CS.Berkeley.EDU so they will be 1569681Seric ** 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 */ 5269722Seric # define QUEUESEGSIZE 1000 /* increment for queue size */ 5357143Seric 5463902Seric /********************************************************************** 559147Seric ** Compilation options. 5669881Seric ** #define these to 1 if they are available; 5769881Seric ** #define them to 0 otherwise. 5869881Seric ** All can be overridden from Makefile. 5963902Seric **********************************************************************/ 609147Seric 6169881Seric # ifndef NETINET 6269881Seric # define NETINET 1 /* include internet support */ 6356337Seric # endif 6456337Seric 6566334Seric # ifndef NAMED_BIND 6666334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 6766334Seric # endif 6866334Seric 6969881Seric # ifndef XDEBUG 7069881Seric # define XDEBUG 1 /* enable extended debugging */ 7169881Seric # endif 7269881Seric 7369881Seric # ifndef MATCHGECOS 7469881Seric # define MATCHGECOS 1 /* match user names from gecos field */ 7569881Seric # endif 7669881Seric 7768848Seric # ifndef DSN 7868848Seric # define DSN 1 /* include delivery status notification code */ 7968848Seric # endif 8068848Seric 8169881Seric # if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) 8269881Seric # define USERDB 1 /* look in user database */ 8369881Seric # endif 8469881Seric 8569480Seric # ifndef MIME8TO7 8669480Seric # define MIME8TO7 1 /* 8->7 bit MIME conversions */ 8769480Seric # endif 8869480Seric 8969480Seric # ifndef MIME7TO8 9069480Seric # define MIME7TO8 1 /* 7->8 bit MIME conversions */ 9169480Seric # endif 9269480Seric 9369881Seric /********************************************************************** 9469881Seric ** "Hard" compilation options. 9569881Seric ** #define these if they are available; comment them out otherwise. 9669881Seric ** These cannot be overridden from the Makefile, and should really not 9769881Seric ** be turned off unless absolutely necessary. 9869881Seric **********************************************************************/ 9964944Seric 10069881Seric # define LOG /* enable logging -- don't turn off */ 10164944Seric 10269881Seric /********************************************************************** 10369881Seric ** End of site-specific configuration. 10469881Seric **********************************************************************/ 10569881Seric /* 10664962Seric ** General "standard C" defines. 10764962Seric ** 10864962Seric ** These may be undone later, to cope with systems that claim to 10964962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 11064962Seric ** doesn't realize that the library is part of the language. 11164962Seric ** 11264962Seric ** Life would be much easier if we could get rid of this sort 11364962Seric ** of bozo problems. 11464962Seric */ 11564962Seric 11664962Seric #ifdef __STDC__ 11764962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 11864962Seric #endif 11969881Seric 12069881Seric /* 12169881Seric ** Assume you have standard calls; can be #undefed below if necessary. 12269881Seric */ 12369881Seric 12469881Seric # define HASLSTAT 1 /* has lstat(2) call */ 12569681Seric /********************************************************************** 12659023Seric ** Operating system configuration. 12759023Seric ** 12859023Seric ** Unless you are porting to a new OS, you shouldn't have to 12959023Seric ** change these. 13063902Seric **********************************************************************/ 13156823Seric 13263902Seric /* 13365565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 13468889Seric ** 13568889Seric ** If V4FS is defined, compile for HP-UX 10.0. 13663902Seric */ 13763902Seric 13867626Seric #ifdef __hpux 13968889Seric /* common definitions for HP-UX 9.x and 10.x */ 14068889Seric # undef m_flags /* conflict between db.h & sys/sysmacros.h on HP 300 */ 14163787Seric # define SYSTEM5 1 /* include all the System V defines */ 14264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 14369638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 14469638Seric # define seteuid(e) setresuid(-1, e, -1) 14569681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 14669462Seric # define LA_TYPE LA_HPUX 14768873Seric # define SPT_TYPE SPT_PSTAT 14865749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 14965354Seric # define GIDSET_T gid_t 15065581Seric # ifndef HASGETUSERSHELL 15165581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 15265581Seric # endif 15365504Seric # define syslog hard_syslog 15469750Seric # ifdef __STDC__ 15569750Seric extern void hard_syslog(int, char *, ...); 15669750Seric # endif 15768889Seric 15868889Seric # ifdef V4FS 15968889Seric /* HP-UX 10.x */ 16069935Seric # define _PATH_UNIX "/stand/vmunix" 16169935Seric # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 16268889Seric # ifndef _PATH_SENDMAILPID 16368889Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 16468889Seric # endif 16568889Seric # ifndef IDENTPROTO 16668889Seric # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ 16768889Seric # endif 16868889Seric 16968889Seric # else 17068889Seric /* HP-UX 9.x */ 17169935Seric # define _PATH_UNIX "/hp-ux" 17269935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 17368889Seric # ifndef IDENTPROTO 17468889Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 17568889Seric # endif 17668889Seric # endif 17768889Seric 17867626Seric #endif 17956823Seric 18064314Seric 18163902Seric /* 18263902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 18363902Seric */ 18463902Seric 18567626Seric #ifdef _AIX3 18669805Seric # include <paths.h> 18764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 18864840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 18965211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 19069681Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 19160219Seric # define FORK fork /* no vfork primitive available */ 19269562Seric # define GIDSET_T gid_t 19365749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 19467771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 19568145Seric # define LA_TYPE LA_INT 19669805Seric # define LA_AVENRUN "avenrun" 19767626Seric #endif 19860219Seric 19964314Seric 20063902Seric /* 20163902Seric ** Silicon Graphics IRIX 20263902Seric ** 20363965Seric ** Compiles on 4.0.1. 20467967Seric ** 20568686Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). 20668686Seric ** Use IRIX5 instead of IRIX for IRIX 5.x. 20767967Seric ** 20867967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 20968686Seric ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. 21063902Seric */ 21163902Seric 21268686Seric #if defined(IRIX64) || defined(IRIX5) 21367967Seric # define IRIX 21467967Seric #endif 21567967Seric 21667626Seric #ifdef IRIX 21766763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 21864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 21964035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 22065211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 22169681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 22263753Seric # define FORK fork /* no vfork primitive available */ 22364155Seric # define setpgid BSDsetpgrp 22463937Seric # define GIDSET_T gid_t 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 23369685Seric # if defined(IRIX64) || defined(IRIX5) 23469685Seric # define ARGV_T char *const * 23569828Seric # define HASSETRLIMIT 1 /* has setrlimit(2) syscall */ 23669685Seric # else 23769685Seric # define ARGV_T const char ** 23869685Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 23969685Seric # endif 24067626Seric #endif 24163753Seric 24263902Seric 24363902Seric /* 24464813Seric ** SunOS and Solaris 24564813Seric ** 24664813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 24769638Seric ** Solaris 2.4 (a.k.a. SunOS 5.4). 24863902Seric */ 24963902Seric 25063787Seric #if defined(sun) && !defined(BSD) 25159074Seric 25264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 25364813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 25465211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 25569681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 25665749Seric # define LA_TYPE LA_INT 25760564Seric 25864842Seric # ifdef SOLARIS_2_3 25968813Seric # define SOLARIS 203 /* for back compat only -- use -DSOLARIS=203 */ 26064842Seric # endif 26164842Seric 26260602Seric # ifdef SOLARIS 26363902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 26465222Seric # ifndef __svr4__ 26565222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 26665222Seric # endif 26763787Seric # include <sys/time.h> 26865172Seric # define GIDSET_T gid_t 26965189Seric # ifndef _PATH_UNIX 27069935Seric # define _PATH_UNIX "/dev/ksyms" 27165189Seric # endif 27269935Seric # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 27364072Seric # ifndef _PATH_SENDMAILPID 27463962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 27563962Seric # endif 27669401Seric # ifndef _PATH_HOSTS 27769401Seric # define _PATH_HOSTS "/etc/inet/hosts" 27869401Seric # endif 27966022Seric # ifndef SYSLOG_BUFSIZE 28066022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 28166022Seric # endif 28263787Seric 28360602Seric # else 28465105Seric /* SunOS 4.0.3 or 4.1.x */ 28565189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 28665830Seric # ifndef HASFLOCK 28765830Seric # define HASFLOCK 1 /* has flock(2) call */ 28865830Seric # endif 28965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 29060564Seric # include <vfork.h> 29163787Seric 29265105Seric # ifdef SUNOS403 29365105Seric /* special tweaking for SunOS 4.0.3 */ 29465105Seric # include <malloc.h> 29565105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 29669679Seric # define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */ 29765105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 29865105Seric # undef WIFEXITED 29965105Seric # undef WEXITSTATUS 30065105Seric # undef HASUNAME 30165105Seric # define setpgid setpgrp 30265105Seric typedef int pid_t; 30365105Seric extern char *getenv(); 30465105Seric 30566732Seric # else 30666732Seric /* 4.1.x specifics */ 30766732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 30866732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 30966732Seric 31065105Seric # endif 31160564Seric # endif 31259023Seric #endif 31359023Seric 31464718Seric /* 31564813Seric ** DG/UX 31664813Seric ** 31767427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 31867427Seric ** older support. 31967427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 32064718Seric */ 32164314Seric 32267427Seric #ifdef DGUX_5_4_2 32367427Seric # define DGUX 1 32467427Seric #endif 32567427Seric 32664718Seric #ifdef DGUX 32764718Seric # define SYSTEM5 1 32869462Seric # define LA_TYPE LA_DGUX 32964718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 33064718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 33164718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 33264718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 33369941Seric # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */ 33466036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 33565167Seric # ifndef IDENTPROTO 33665167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 33765167Seric # endif 33867771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 33965749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 34064813Seric 34164813Seric /* these include files must be included early on DG/UX */ 34264813Seric # include <netinet/in.h> 34364813Seric # include <arpa/inet.h> 34464813Seric 34569941Seric /* compiler doesn't understand const? */ 34669941Seric # define const 34769941Seric 34867427Seric # ifdef DGUX_5_4_2 34967427Seric # define inet_addr dgux_inet_addr 35064718Seric extern long dgux_inet_addr(); 35167427Seric # endif 35264718Seric #endif 35364718Seric 35464718Seric 35563902Seric /* 35663902Seric ** Digital Ultrix 4.2A or 4.3 35764264Seric ** 35864264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 35964264Seric ** not dropped when the process exits. This causes major problems, 36064264Seric ** so flock is the only alternative. 36163902Seric */ 36263902Seric 36360564Seric #ifdef ultrix 36464035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 36563962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 36664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 36766242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 36865830Seric # ifndef HASFLOCK 36965830Seric # define HASFLOCK 1 /* has flock(2) call */ 37065830Seric # endif 37165211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 37269279Seric # ifndef BROKEN_RES_SEARCH 37369279Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 37469279Seric # endif 37565135Seric # ifdef vax 37665135Seric # define LA_TYPE LA_FLOAT 37765135Seric # else 37865135Seric # define LA_TYPE LA_INT 37965135Seric # define LA_AVENRUN "avenrun" 38065135Seric # endif 38165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 38265167Seric # ifndef IDENTPROTO 38369279Seric # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ 38465167Seric # endif 38560564Seric #endif 38660564Seric 38764314Seric 38863902Seric /* 38969958Seric ** OSF/1 for KSR. 39069958Seric ** 39169958Seric ** Contributed by Todd C. Miller <Todd.Miller@cs.colorado.edu> 39269958Seric */ 39369958Seric 39469958Seric #ifdef __ksr__ 39569958Seric # define __osf__ 1 /* get OSF/1 defines below */ 39669958Seric # define FORK fork /* no vfork primitive available */ 39769958Seric # define _PATH_VENDOR_CF "/var/adm/sendmail/sendmail.cf" 39869958Seric # ifndef TZ_TYPE 39969958Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 40069958Seric # endif 40169958Seric #endif 40269958Seric 40369958Seric 40469958Seric /* 40568072Seric ** OSF/1 for Intel Paragon. 40668072Seric ** 40768082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 40868082Seric ** of Intel Scalable Systems Divison. 40968072Seric */ 41068072Seric 41168072Seric #ifdef __PARAGON__ 41268072Seric # define __osf__ 1 /* get OSF/1 defines below */ 41369935Seric # define _PATH_VENDOR_CF "/var/adm/sendmail/sendmail.cf" 41468072Seric #endif 41568072Seric 41668072Seric 41768072Seric /* 41863902Seric ** OSF/1 (tested on Alpha) 41963902Seric */ 42063902Seric 42163787Seric #ifdef __osf__ 42263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 42369638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 42464035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 42569681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 42666226Seric # ifndef HASFLOCK 42765830Seric # define HASFLOCK 1 /* has flock(2) call */ 42865830Seric # endif 42963962Seric # define LA_TYPE LA_INT 43065749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 43164813Seric # ifndef _PATH_SENDMAILPID 43265504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 43364813Seric # endif 43459287Seric #endif 43559287Seric 43664314Seric 43763902Seric /* 43863902Seric ** NeXTstep 43963902Seric */ 44063902Seric 44164076Seric #ifdef NeXT 44264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 44369717Seric # define NEEDPUTENV 2 /* need putenv(3) call; no setenv(3) call */ 44465830Seric # ifndef HASFLOCK 44565830Seric # define HASFLOCK 1 /* has flock(2) call */ 44665830Seric # endif 44764125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 44864563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 44968705Seric # define UID_T int /* compiler gripes on uid_t */ 45063753Seric # define sleep sleepX 45164155Seric # define setpgid setpgrp 45264295Seric # ifndef LA_TYPE 45364295Seric # define LA_TYPE LA_MACH 45464295Seric # endif 45565749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 45664500Seric # ifndef _POSIX_SOURCE 45764035Seric typedef int pid_t; 45864500Seric # undef WEXITSTATUS 45964500Seric # undef WIFEXITED 46064500Seric # endif 46169935Seric # define _PATH_VENDOR_CF "/etc/sendmail/sendmail.cf" 46264072Seric # ifndef _PATH_SENDMAILPID 46364072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 46464072Seric # endif 46559288Seric #endif 46659288Seric 46764314Seric 46863902Seric /* 46963962Seric ** 4.4 BSD 47064831Seric ** 47164831Seric ** See also BSD defines. 47263902Seric */ 47363902Seric 47469860Seric #if defined(BSD4_4) && !defined(__bsdi__) 47564072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 47669638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 47760568Seric # include <sys/cdefs.h> 47863838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 47969516Seric # define BSD4_4_SOCKADDR /* has sa_len */ 48069882Seric # define NETLINK 1 /* supports AF_LINK */ 48164072Seric # ifndef LA_TYPE 48264072Seric # define LA_TYPE LA_SUBR 48364072Seric # endif 48465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 48567771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 48660568Seric #endif 48760568Seric 48864314Seric 48963902Seric /* 49065982Seric ** BSD/386 (all versions) 49165982Seric ** From Tony Sanders, BSDI 49265982Seric */ 49365982Seric 49465982Seric #ifdef __bsdi__ 49565982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 49665982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 49769638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 49866843Seric # include <sys/cdefs.h> 49966843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 50069516Seric # define BSD4_4_SOCKADDR /* has sa_len */ 50169882Seric # define NETLINK 1 /* supports AF_LINK */ 50266030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 50366843Seric # ifndef LA_TYPE 50466843Seric # define LA_TYPE LA_SUBR 50566843Seric # endif 50668753Seric # define GIDSET_T gid_t 50765982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 50866843Seric /* version 1.1 or later */ 50967771Seric # undef SPT_TYPE 51067771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 51166843Seric # else 51266843Seric /* version 1.0 or earlier */ 51366843Seric # ifndef OLD_NEWDB 51466843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 51566843Seric # endif 51667771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 51765982Seric # endif 51865982Seric #endif 51965982Seric 52065982Seric 52165982Seric 52265982Seric /* 52369826Seric ** FreeBSD / NetBSD (all architectures, all versions) 52464733Seric ** 52569826Seric ** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x 52669826Seric ** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x 52764831Seric ** 52864831Seric ** See also BSD defines. 52964733Seric */ 53064733Seric 53169826Seric #if defined(__FreeBSD__) || defined(__NetBSD__) 53264733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 53364733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 53469638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 53569826Seric # define HASUNAME 1 /* has uname(2) syscall */ 53664733Seric # include <sys/cdefs.h> 53764733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 53869516Seric # define BSD4_4_SOCKADDR /* has sa_len */ 53969882Seric # define NETLINK 1 /* supports AF_LINK */ 54069826Seric # define GIDSET_T gid_t 54164733Seric # ifndef LA_TYPE 54264733Seric # define LA_TYPE LA_SUBR 54364733Seric # endif 54465749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 54564733Seric #endif 54664733Seric 54764733Seric 54864733Seric /* 54964813Seric ** Mach386 55064813Seric ** 55164813Seric ** For mt Xinu's Mach386 system. 55264813Seric */ 55364813Seric 55464813Seric #if defined(MACH) && defined(i386) 55564813Seric # define MACH386 1 55664813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 55764813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 55866226Seric # ifndef HASFLOCK 55965830Seric # define HASFLOCK 1 /* has flock(2) call */ 56065830Seric # endif 56164813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 56264813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 56364813Seric # define setpgid setpgrp 56464813Seric # ifndef LA_TYPE 56564813Seric # define LA_TYPE LA_FLOAT 56664813Seric # endif 56765749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 56864962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 56964813Seric # undef WEXITSTATUS 57064813Seric # undef WIFEXITED 57169935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 57264813Seric # ifndef _PATH_SENDMAILPID 57364813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 57464813Seric # endif 57564813Seric #endif 57664813Seric 57764813Seric 57864813Seric /* 57963969Seric ** 4.3 BSD -- this is for very old systems 58063969Seric ** 58165949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 58265949Seric ** 58363969Seric ** You'll also have to install a new resolver library. 58463969Seric ** I don't guarantee that support for this environment is complete. 58563969Seric */ 58663969Seric 58765949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 58863969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 58963969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 59063970Seric # define ARBPTR_T char * 59164155Seric # define setpgid setpgrp 59263969Seric # ifndef LA_TYPE 59363969Seric # define LA_TYPE LA_FLOAT 59463969Seric # endif 59569935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 59665167Seric # ifndef IDENTPROTO 59765167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 59865167Seric # endif 59964834Seric # undef WEXITSTATUS 60064834Seric # undef WIFEXITED 60164834Seric typedef short pid_t; 60264834Seric extern int errno; 60363969Seric #endif 60463969Seric 60564314Seric 60663969Seric /* 60763902Seric ** SCO Unix 60865087Seric ** 60965087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 61065087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 61165087Seric ** The second is, I believe, for an older version. 61263902Seric */ 61363902Seric 61465087Seric #ifdef _SCO_unix_4_2 61565087Seric # define _SCO_unix_ 61665087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 61766757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 61869935Seric # define _PATH_UNIX "/unix" 61969935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 62065087Seric # ifndef _PATH_SENDMAILPID 62165087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 62265087Seric # endif 62365087Seric #endif 62465087Seric 62563838Seric #ifdef _SCO_unix_ 62663838Seric # define SYSTEM5 1 /* include all the System V defines */ 62764035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 62865212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 62963838Seric # define FORK fork 63063838Seric # define MAXPATHLEN PATHSIZE 63164718Seric # define LA_TYPE LA_SHORT 63267812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 63368439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 63467608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 63569881Seric # define NETUNIX 0 /* no unix domain socket support */ 63663838Seric #endif 63763838Seric 63864314Seric 63963962Seric /* 64068442Seric ** ISC (SunSoft) Unix. 64168442Seric ** 64268442Seric ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> 64368442Seric */ 64468442Seric 64568442Seric #ifdef ISC_UNIX 64668442Seric # include <net/errno.h> 64769849Seric # include <sys/stream.h> /* needed for IP_SRCROUTE */ 64869849Seric # include <sys/bsdtypes.h> 64968442Seric # define SYSTEM5 1 /* include all the System V defines */ 65068442Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 65168442Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 65268442Seric # define HASSETREUID 1 /* has setreuid(2) call */ 65368442Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 65469881Seric # define NETUNIX 0 /* no unix domain socket support */ 65568442Seric # define FORK fork 65668442Seric # define MAXPATHLEN 1024 65768442Seric # define LA_TYPE LA_SHORT 65868442Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 65968442Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 66069935Seric # define _PATH_UNIX "/unix" 66169935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 66268442Seric # ifndef _PATH_SENDMAILPID 66368442Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 66468442Seric # endif 66568442Seric 66668442Seric #endif 66768442Seric 66868442Seric 66968442Seric /* 67068040Seric ** Altos System V. 67168040Seric ** Contributed by Tim Rice <timr@crl.com>. 67268040Seric */ 67368040Seric 67468040Seric #ifdef ALTOS_SYS_V 67568040Seric # include <limits.h> 67668040Seric # define SYSTEM5 1 /* include all the System V defines */ 67768040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 67868040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 67968040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 68068040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 68168040Seric # define FORK fork 68268040Seric # define MAXPATHLEN PATHSIZE 68368040Seric # define LA_TYPE LA_SHORT 68468040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 68568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 68668040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 68769881Seric # define NETUNIX 0 /* no unix domain socket support */ 68868040Seric # undef WIFEXITED 68968040Seric # undef WEXITSTATUS 69068040Seric # define strtoul strtol /* gcc library bogosity */ 69168040Seric 69268040Seric typedef unsigned short uid_t; 69368040Seric typedef unsigned short gid_t; 69468040Seric typedef short pid_t; 69568040Seric #endif 69668040Seric 69768040Seric 69868040Seric /* 69963962Seric ** ConvexOS 11.0 and later 70065949Seric ** 70165949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 70265949Seric ** works on 9.1 as well. 70363962Seric */ 70463962Seric 70563962Seric #ifdef _CONVEX_SOURCE 70663977Seric # define BSD 1 /* include all the BSD defines */ 70763977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 70863962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 70963977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 71069681Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 71163962Seric # define LA_TYPE LA_FLOAT 71265749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 71369935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 71465949Seric # ifndef S_IREAD 71565949Seric # define S_IREAD _S_IREAD 71665949Seric # define S_IWRITE _S_IWRITE 71765949Seric # define S_IEXEC _S_IEXEC 71865949Seric # define S_IFMT _S_IFMT 71965949Seric # define S_IFCHR _S_IFCHR 72065949Seric # define S_IFBLK _S_IFBLK 72165949Seric # endif 72265167Seric # ifndef IDENTPROTO 72365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 72465167Seric # endif 72563962Seric #endif 72663962Seric 72764314Seric 72863962Seric /* 72964999Seric ** RISC/os 4.52 73063962Seric ** 73164999Seric ** Gives a ton of warning messages, but otherwise compiles. 73263962Seric */ 73363962Seric 73463965Seric #ifdef RISCOS 73564999Seric 73663962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 73766226Seric # ifndef HASFLOCK 73865830Seric # define HASFLOCK 1 /* has flock(2) call */ 73965830Seric # endif 74064999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 74164999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 74263962Seric # define LA_TYPE LA_INT 74363962Seric # define LA_AVENRUN "avenrun" 74463962Seric # define _PATH_UNIX "/unix" 74564999Seric # undef WIFEXITED 74664999Seric 74764999Seric # define setpgid setpgrp 74864999Seric 74964999Seric extern int errno; 75064999Seric typedef int pid_t; 75164999Seric #define SIGFUNC_DEFINED 75264999Seric typedef int (*sigfunc_t)(); 75364999Seric extern char *getenv(); 75464999Seric extern void *malloc(); 75564999Seric 75663962Seric #endif 75763962Seric 75864314Seric 75964155Seric /* 76064155Seric ** Linux 0.99pl10 and above... 76166300Seric ** 76266300Seric ** Thanks to, in reverse order of contact: 76366300Seric ** 76468093Seric ** John Kennedy <warlock@csuchico.edu> 76567885Seric ** Andrew Pam <avatar@aus.xanadu.com> 76666300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 76766300Seric ** Karl London <karl@borg.demon.co.uk> 76866300Seric ** 76969690Seric ** Last compiled against: [05/25/95 @ 11:39:31 AM (Thursday)] 77069690Seric ** sendmail 8.7.b.0 named 4.9.3-beta17 db-1.85 77169690Seric ** gcc 2.6.4-950518 libc-5.0.9 linux 1.2.8 77264155Seric */ 77364155Seric 77464770Seric #ifdef __linux__ 77566298Seric # define BSD 1 /* include BSD defines */ 77664155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 77766298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 77864380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 77966298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 78066300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 78167885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 78269690Seric # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ 78368518Seric # ifndef HASFLOCK 78468518Seric # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 78568518Seric # endif 78664155Seric # ifndef LA_TYPE 78766301Seric # define LA_TYPE LA_PROCSTR 78864155Seric # endif 78966300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 79068093Seric # ifndef _PATH_SENDMAILPID 79168093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 79268093Seric # endif 79368093Seric # define TZ_TYPE TZ_TNAME 79464763Seric # include <sys/sysmacros.h> 79566300Seric # undef atol /* wounded in <stdlib.h> */ 79664155Seric #endif 79764155Seric 79864155Seric 79964345Seric /* 80064345Seric ** DELL SVR4 Issue 2.2, and others 80164345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 80264345Seric ** 80364345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 80464345Seric ** defined, and the definitions conflict. 80564924Seric ** 80664924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 80764924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 80864924Seric ** (SVR4.0/386 version 3.0). 80964345Seric */ 81064345Seric 81164345Seric #ifdef DELL_SVR4 81265189Seric /* no changes necessary */ 81365189Seric /* see general __svr4__ defines below */ 81464345Seric #endif 81564345Seric 81664345Seric 81764380Seric /* 81864380Seric ** Apple A/UX 3.0 81964380Seric */ 82064345Seric 82164380Seric #ifdef _AUX_SOURCE 82264729Seric # include <sys/sysmacros.h> 82364380Seric # define BSD /* has BSD routines */ 82469892Seric # define HASSETRLIMIT 0 /* ... but not setrlimit(2) */ 82568803Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 82664380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 82764380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 82864561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 82965167Seric # ifndef IDENTPROTO 83065167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 83165167Seric # endif 83264380Seric # define FORK fork 83364380Seric # ifndef LA_TYPE 83469892Seric # define LA_TYPE LA_INT 83569892Seric # define FSHIFT 16 83664380Seric # endif 83769892Seric # define LA_AVENRUN "avenrun" 83865749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 83969892Seric # define TZ_TYPE TZ_TZNAME 84069892Seric # ifndef _PATH_UNIX 84169935Seric # define _PATH_UNIX "/unix" /* should be in <paths.h> */ 84269892Seric # endif 84369935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 84464560Seric # undef WIFEXITED 84564560Seric # undef WEXITSTATUS 84664380Seric #endif 84764380Seric 84864380Seric 84964705Seric /* 85064705Seric ** Encore UMAX V 85164705Seric ** 85264705Seric ** Not extensively tested. 85364705Seric */ 85464380Seric 85564705Seric #ifdef UMAXV 85664705Seric # include <limits.h> 85764705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 85864705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 85964705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 86065211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 86164705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 86264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 86364705Seric # define FORK fork /* no vfork(2) primitive available */ 86465749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 86564705Seric # define MAXPATHLEN PATH_MAX 86664705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 86764705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 86864705Seric # undef WIFEXITED 86964705Seric # undef WEXITSTATUS 87064705Seric #endif 87164705Seric 87264705Seric 87364939Seric /* 87464939Seric ** Stardent Titan 3000 running TitanOS 4.2. 87564939Seric ** 87664939Seric ** Must be compiled in "cc -43" mode. 87764939Seric ** 87864944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 87964939Seric ** 88064939Seric ** Note the tweaking below after the BSD defines are set. 88164939Seric */ 88264705Seric 88364939Seric #ifdef titan 88464939Seric # define setpgid setpgrp 88564939Seric typedef int pid_t; 88664939Seric # undef WIFEXITED 88764939Seric # undef WEXITSTATUS 88864939Seric #endif 88964939Seric 89064939Seric 89164962Seric /* 89264962Seric ** Sequent DYNIX 3.2.0 89364962Seric ** 89464962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 89564962Seric */ 89664939Seric 89764962Seric #ifdef sequent 89866038Seric 89964962Seric # define BSD 1 90064962Seric # define HASUNSETENV 1 90164962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 90264962Seric # define WAITUNION 1 90364962Seric # define LA_TYPE LA_FLOAT 90464962Seric # ifdef _POSIX_VERSION 90564962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 90664962Seric # endif 90764962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 90864962Seric # define setpgid setpgrp 90964962Seric 91064962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 91164962Seric # undef WIFEXITED 91264962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 91364962Seric ((union wait*)&(s))->w_termsig == 0) 91464962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 91564962Seric typedef int pid_t; 91664962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 91764962Seric 91866144Seric # ifndef IDENTPROTO 91966144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 92066144Seric # endif 92166144Seric 92264962Seric # ifndef _PATH_UNIX 92369935Seric # define _PATH_UNIX "/dynix" 92464962Seric # endif 92569935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 92664962Seric 92764962Seric #endif 92864962Seric 92964962Seric 93065748Seric /* 93166038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 93266038Seric ** 93366038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 93466038Seric ** 93566038Seric ** From Tim Wright <timw@sequent.com>. 93666038Seric */ 93766038Seric 93866038Seric #ifdef _SEQUENT_ 93966038Seric # define SYSTEM5 1 /* include all the System V defines */ 94066038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 94166038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 94266038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 94366038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 94466038Seric # define GIDSET_T gid_t 94566038Seric # define LA_TYPE LA_INT 94666038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 94767771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 94866144Seric # ifndef IDENTPROTO 94966144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 95066144Seric # endif 95169935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 95266038Seric # ifndef _PATH_SENDMAILPID 95366038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 95466038Seric # endif 95566038Seric #endif 95666038Seric 95766038Seric 95866038Seric /* 95965748Seric ** Cray Unicos 96065748Seric ** 96165748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 96265748Seric */ 96364962Seric 96465748Seric #ifdef UNICOS 96565748Seric # define SYSTEM5 1 /* include all the System V defines */ 96665748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 96765748Seric # define MAXPATHLEN PATHSIZE 96865748Seric # define LA_TYPE LA_ZERO 96965749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 97068439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 97165748Seric #endif 97264962Seric 97365748Seric 97465820Seric /* 97565820Seric ** Apollo DomainOS 97665820Seric ** 97765820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 97865982Seric ** 97965820Seric ** 15 Jan 1994 98065820Seric ** 98165820Seric */ 98265748Seric 98365820Seric #ifdef apollo 98465820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 98565820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 98667771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 98765820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 98866044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 98968439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 99069935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 99165820Seric # ifndef _PATH_SENDMAILPID 99265820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 99365820Seric # endif 99465820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 99565820Seric # undef S_IFIFO 99665820Seric # define S_IFIFO 0010000 99765820Seric # ifndef IDENTPROTO 99865820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 99965820Seric # endif 100065982Seric #endif 100165820Seric 100265820Seric 100366748Seric /* 100467745Seric ** UnixWare 1.1.2. 100566752Seric ** 100669803Seric ** Updated by Petr Lampa <lampa@fee.vutbr.cz>. 100766752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 100866752Seric */ 100966752Seric 101066752Seric #ifdef UNIXWARE 101169841Seric # include <sys/mkdev.h> 101266752Seric # define SYSTEM5 1 101367745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 101467745Seric # define HASSETREUID 1 101567745Seric # define HASSETSID 1 101667745Seric # define HASINITGROUPS 1 101767745Seric # define GIDSET_T gid_t 101867745Seric # define SLEEP_T unsigned 101966752Seric # define SFS_TYPE SFS_STATVFS 102066752Seric # define LA_TYPE LA_ZERO 102166752Seric # undef WIFEXITED 102266752Seric # undef WEXITSTATUS 102366752Seric # define _PATH_UNIX "/unix" 102469935Seric # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" 102566752Seric # ifndef _PATH_SENDMAILPID 102666752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 102766752Seric # endif 102866752Seric # define SYSLOG_BUFSIZE 128 102966752Seric #endif 103066752Seric 103166752Seric 103266752Seric /* 103366748Seric ** Intergraph CLIX 3.1 103466748Seric ** 103566748Seric ** From Paul Southworth <pauls@locust.cic.net> 103666748Seric */ 103765820Seric 103866748Seric #ifdef CLIX 103966748Seric # define SYSTEM5 1 /* looks like System V */ 104066752Seric # ifndef HASGETUSERSHELL 104166752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 104266752Seric # endif 104366748Seric # define DEV_BSIZE 512 /* device block size not defined */ 104466748Seric # define GIDSET_T gid_t 104566748Seric # undef LOG /* syslog not available */ 104666748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 104766748Seric # define GETSHORT _getshort 104866748Seric #endif 104965820Seric 105066748Seric 105166776Seric /* 105266776Seric ** NCR 3000 Series (SysVr4) 105366776Seric ** 105467434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 105566776Seric */ 105666748Seric 105766776Seric #ifdef NCR3000 105869775Seric # include <sys/sockio.h> 105966776Seric # define __svr4__ 106069681Seric # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 106166776Seric # undef BSD 106266776Seric # define LA_AVENRUN "avenrun" 106366776Seric #endif 106466748Seric 106566776Seric 106667434Seric /* 106767434Seric ** Tandem NonStop-UX SVR4 106867434Seric ** 106967434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 107067434Seric */ 107166776Seric 107267434Seric #ifdef NonStop_UX_BXX 107367434Seric # define __svr4__ 107467434Seric #endif 107566776Seric 107667434Seric 107767488Seric /* 107867488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 107967488Seric ** 108067488Seric ** Tested for 1.04 and 1.03 108167488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 108267488Seric */ 108367434Seric 108467488Seric #ifdef __H3050R 108567488Seric # define SYSTEM5 1 /* include all the System V defines */ 108667488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 108767488Seric # define setreuid(r, e) setresuid(r, e, -1) 108867488Seric # define LA_TYPE LA_FLOAT 108967488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 109067488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 109167488Seric # ifndef GIDSET_T 109267488Seric # define GIDSET_T gid_t 109367488Seric # endif 109467488Seric # ifndef _PATH_UNIX 109569935Seric # define _PATH_UNIX "/HI-UX" 109667488Seric # endif 109769935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 109867488Seric # ifndef IDENTPROTO 109967488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 110067488Seric # endif 110167488Seric # ifndef HASGETUSERSHELL 110267488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 110367488Seric # endif 110467488Seric 110567488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 110667488Seric # undef m_flags 110767488Seric 110867488Seric # ifdef __STDC__ 110967488Seric extern int syslog(int, char *, ...); 111067488Seric # endif 111167488Seric 111267488Seric #endif 111367488Seric 111467488Seric 111568099Seric /* 111668099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 111768099Seric ** 111868099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 111968099Seric */ 112067488Seric 112168099Seric #ifdef _UTS 112268099Seric # include <sys/sysmacros.h> 112369881Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 112468099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 112568099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 112668099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 112768099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 112868099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 112968099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 113068099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 113168099Seric # ifndef HASGETUSERSHELL 113268099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 113368099Seric # endif 113468099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 113568099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 113668099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 113768439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 113869935Seric # define _PATH_UNIX "/unix" 113969935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 114068099Seric #endif 114168099Seric 114268357Seric /* 114368357Seric ** Cray Computer Corporation's CSOS 114468357Seric ** 114569473Seric ** From Scott Bolte <scott@craycos.com>. 114668357Seric */ 114768099Seric 114868357Seric #ifdef _CRAYCOM 114968357Seric # define SYSTEM5 1 /* include all the System V defines */ 115068357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 115168357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 115268357Seric # define MAXPATHLEN PATHSIZE 115368357Seric # define LA_TYPE LA_ZERO 115468357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 115568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 115668357Seric # define _POSIX_CHOWN_RESTRICTED -1 115768357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 115868357Seric #endif 115968099Seric 116068099Seric 116168742Seric /* 116268742Seric ** Sony NEWS-OS 4.2.1R and 6.0.3 116369473Seric ** 116469473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 116568742Seric */ 116668742Seric 116768742Seric #ifdef sony_news 116868742Seric # ifndef __svr4 116968742Seric /* NEWS-OS 4.2.1R */ 117068742Seric # ifndef BSD 117168742Seric # define BSD /* has BSD routines */ 117268742Seric # endif 117368742Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 117468742Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 117568742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 117668742Seric # define LA_TYPE LA_INT 117768742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 117868742Seric # ifndef HASFLOCK 117968742Seric # define HASFLOCK 1 /* has flock(2) call */ 118068742Seric # endif 118168742Seric # define setpgid setpgrp 118268742Seric # undef WIFEXITED 118368742Seric # undef WEXITSTATUS 118468742Seric typedef int pid_t; 118568742Seric typedef int (*sigfunc_t)(); 118668742Seric # define SIGFUNC_DEFINED 118768742Seric 118868742Seric # else 118968742Seric /* NEWS-OS 6.0.3 with /bin/cc */ 119069879Seric # ifndef __svr4__ 119169879Seric # define __svr4__ /* use all System V Releae 4 defines below */ 119269879Seric # endif 119368742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 119468742Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 119569473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 119669649Seric # ifndef SPT_TYPE 119769649Seric # define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */ 119869649Seric # endif 119968742Seric # define GIDSET_T gid_t 120068742Seric # undef WIFEXITED 120168742Seric # undef WEXITSTATUS 120269879Seric # ifndef SYSLOG_BUFSIZE 120369879Seric # define SYSLOG_BUFSIZE 1024 120469879Seric # endif 120569935Seric # define _PATH_UNIX "/stand/unix" 120669935Seric # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 120768742Seric # ifndef _PATH_SENDMAILPID 120868742Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 120968742Seric # endif 121068742Seric 121168742Seric # endif 121268742Seric #endif 121368742Seric 121468742Seric 121568742Seric /* 121668742Seric ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach 121769473Seric ** 121869473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 121968742Seric */ 122068742Seric 122168742Seric #ifdef luna 122268742Seric # ifndef IDENTPROTO 122368742Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 122468742Seric # endif 122568742Seric # ifdef uniosb 122669454Seric # include <sys/time.h> 122768742Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 122868742Seric # endif 122969649Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 123069649Seric # define NEEDPUTENV 1 /* need putenv(3) call */ 123168742Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 123269679Seric # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ 123368742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 123468742Seric # ifdef uniosb 123568742Seric # define LA_TYPE LA_INT 123668742Seric # endif 123768742Seric # ifdef luna2m 123868742Seric # define LA_TYPE LA_SUBR 123968742Seric # endif 124068742Seric # ifdef luna88k 124168742Seric # define LA_TYPE LA_INT 124268742Seric # endif 124368742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 124468742Seric # define setpgid setpgrp 124568742Seric # undef WIFEXITED 124668742Seric # undef WEXITSTATUS 124768742Seric typedef int pid_t; 124868742Seric typedef int (*sigfunc_t)(); 124968742Seric # define SIGFUNC_DEFINED 125068742Seric extern char *getenv(); 125168742Seric extern int errno; 125269935Seric # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 125368742Seric #endif 125468742Seric 125568742Seric 125668742Seric /* 125769473Seric ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc) 125868742Seric ** 125969473Seric ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 126068742Seric */ 126168742Seric 126268742Seric #ifdef nec_ews_svr4 126369454Seric # ifndef __svr4__ 126469454Seric # define __svr4__ /* use all System V Releae 4 defines below */ 126569454Seric # endif 126668742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 126768742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 126869473Seric # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ 126968742Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 127068742Seric # define GIDSET_T gid_t 127168742Seric # undef WIFEXITED 127268742Seric # undef WEXITSTATUS 127369454Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 127468742Seric #endif 127568742Seric 127668742Seric 127768742Seric 127863902Seric /********************************************************************** 127963787Seric ** End of Per-Operating System defines 128063902Seric **********************************************************************/ 128169638Seric /********************************************************************** 128263949Seric ** More general defines 128363949Seric **********************************************************************/ 128463949Seric 128563962Seric /* general BSD defines */ 128663962Seric #ifdef BSD 128764035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 128864035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 128967742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 129069681Seric # ifndef IP_SRCROUTE 129169681Seric # define IP_SRCROUTE 1 /* can check IP source routing */ 129269681Seric # endif 129367430Seric # ifndef HASSETRLIMIT 129467430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 129567430Seric # endif 129665830Seric # ifndef HASFLOCK 129765830Seric # define HASFLOCK 1 /* has flock(2) call */ 129865830Seric # endif 129967602Seric # ifndef TZ_TYPE 130067608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 130167602Seric # endif 130263962Seric #endif 130363962Seric 130465189Seric /* general System V Release 4 defines */ 130565189Seric #ifdef __svr4__ 130665189Seric # define SYSTEM5 1 130769638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 130867742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 130969778Seric # define BSD_COMP 1 /* get BSD ioctl calls */ 131067742Seric # ifndef HASSETRLIMIT 131167742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 131267742Seric # endif 131365211Seric # ifndef HASGETUSERSHELL 131465211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 131565210Seric # endif 131665189Seric 131765189Seric # ifndef _PATH_UNIX 131865189Seric # define _PATH_UNIX "/unix" 131965189Seric # endif 132069942Seric # ifndef _PATH_VENDOR_CF 132169942Seric # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" 132269942Seric # endif 132365189Seric # ifndef _PATH_SENDMAILPID 132465189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 132565189Seric # endif 132665189Seric # ifndef SYSLOG_BUFSIZE 132765189Seric # define SYSLOG_BUFSIZE 128 132865189Seric # endif 132967159Seric # ifndef SFS_TYPE 133067159Seric # define SFS_TYPE SFS_STATVFS 133167159Seric # endif 133265189Seric #endif 133365189Seric 133463787Seric /* general System V defines */ 133566298Seric #ifdef SYSTEM5 133664813Seric # include <sys/sysmacros.h> 133763949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 133864705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 133964962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 134067430Seric # ifndef HASULIMIT 134167430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 134267430Seric # endif 134363962Seric # ifndef LA_TYPE 134469462Seric # ifdef MIOC_READKSYM 134569462Seric # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 134669462Seric # else 134769462Seric # define LA_TYPE LA_INT /* assume integer load average */ 134869462Seric # endif 134963962Seric # endif 135065749Seric # ifndef SFS_TYPE 135165749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 135265749Seric # endif 135367602Seric # ifndef TZ_TYPE 135467608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 135567602Seric # endif 135668442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 135768442Seric # define bzero(d, l) (memset((d), '\0', (l))) 135868442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 135966298Seric #endif 136063787Seric 136163949Seric /* general POSIX defines */ 136263949Seric #ifdef _POSIX_VERSION 136364718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 136464718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 136569638Seric # if _POSIX_VERSION >= 199500 && !defined(USESETEUID) 136669638Seric # define USESETEUID 1 /* has useable seteuid(2) call */ 136769638Seric # endif 136863949Seric #endif 136969638Seric /* 137068357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 137168357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 137264939Seric */ 137364439Seric 137464939Seric #ifdef titan 137564939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 137664939Seric #endif 137764939Seric 137868357Seric #ifdef _CRAYCOM 137968357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 138068357Seric #endif 138165830Seric 138268442Seric #ifdef ISC_UNIX 138368442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 138468442Seric #endif 138568357Seric 138668442Seric #ifdef ALTOS_SYS_V 138768442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 138868442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 138968442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 139068442Seric #endif 139168442Seric 139268442Seric 139365167Seric /* 139465167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 139565167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 139665167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 139765167Seric ** are closed. Some firewalls return this error if you try to connect 139865167Seric ** to the IDENT port (113), so you can't receive email from these hosts 139965167Seric ** on these systems. The firewall really should use a more specific 140065167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 140165167Seric ** not explicitly set to zero above, default it on. 140265167Seric */ 140364939Seric 140465167Seric #ifndef IDENTPROTO 140565167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 140665167Seric #endif 140765167Seric 140869601Seric #ifndef IP_SRCROUTE 140969601Seric # define IP_SRCROUTE 1 /* Detect IP source routing */ 141069601Seric #endif 141169601Seric 141265211Seric #ifndef HASGETUSERSHELL 141365211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 141465210Seric #endif 141565167Seric 141669881Seric #ifndef NETUNIX 141769881Seric # define NETUNIX 1 /* include unix domain support */ 141869881Seric #endif 141969881Seric 142065830Seric #ifndef HASFLOCK 142165830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 142265830Seric #endif 142365210Seric 142469638Seric #ifndef HASSETREUID 142569638Seric # define HASSETREUID 0 /* assume no setreuid(2) call */ 142669638Seric #endif 142769638Seric 142869638Seric #ifndef USESETEUID 142969638Seric # define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */ 143069638Seric #endif 143169638Seric 143267430Seric #ifndef HASSETRLIMIT 143367430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 143467430Seric #endif 143567430Seric 143667430Seric #ifndef HASULIMIT 143767430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 143867430Seric #endif 143967430Seric 144066843Seric #ifndef OLD_NEWDB 144166843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 144266843Seric #endif 144365830Seric 144468099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 144568099Seric #ifndef HASSIGSETMASK 144668099Seric # ifdef SIGVTALRM 144768099Seric # define HASSETSIGMASK 1 144868099Seric # else 144968099Seric # define HASSETSIGMASK 0 145068099Seric # endif 145168099Seric #endif 145266843Seric 145369638Seric /* 145469638Seric ** If no type for argument two of getgroups call is defined, assume 145569638Seric ** it's an integer -- unfortunately, there seem to be several choices 145669638Seric ** here. 145769638Seric */ 145869638Seric 145969638Seric #ifndef GIDSET_T 146069638Seric # define GIDSET_T int 146169638Seric #endif 146269638Seric 146368705Seric #ifndef UID_T 146468705Seric # define UID_T uid_t 146568705Seric #endif 146668099Seric 146768706Seric #ifndef SIZE_T 146868706Seric # define SIZE_T size_t 146968706Seric #endif 147068706Seric 147168705Seric #ifndef ARGV_T 147268705Seric # define ARGV_T char ** 147368705Seric #endif 147469681Seric /********************************************************************** 147559023Seric ** Remaining definitions should never have to be changed. They are 147659023Seric ** primarily to provide back compatibility for older systems -- for 147759287Seric ** example, it includes some POSIX compatibility definitions 147864439Seric **********************************************************************/ 147959023Seric 148059388Seric /* System 5 compatibility */ 148159388Seric #ifndef S_ISREG 148264944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 148359388Seric #endif 148464944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 148564944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 148664944Seric #endif 148768494Seric #ifndef S_IWUSR 148868494Seric # define S_IWUSR 0200 148968494Seric #endif 149059388Seric #ifndef S_IWGRP 149168494Seric # define S_IWGRP 0020 149259388Seric #endif 149359388Seric #ifndef S_IWOTH 149468494Seric # define S_IWOTH 0002 149559388Seric #endif 149659388Seric 149759023Seric /* 149850537Seric ** Older systems don't have this error code -- it should be in 149950537Seric ** /usr/include/sysexits.h. 150050537Seric */ 150150537Seric 150250537Seric # ifndef EX_CONFIG 150350537Seric # define EX_CONFIG 78 /* configuration error */ 150450537Seric # endif 150556852Seric 150664718Seric /* pseudo-code used in server SMTP */ 150764718Seric # define EX_QUIT 22 /* drop out of server immediately */ 150864718Seric 150964718Seric 151063993Seric /* 151163993Seric ** These are used in a few cases where we need some special 151263993Seric ** error codes, but where the system doesn't provide something 151363993Seric ** reasonable. They are printed in errstring. 151463993Seric */ 151563993Seric 151663993Seric #ifndef E_PSEUDOBASE 151763993Seric # define E_PSEUDOBASE 256 151863993Seric #endif 151963993Seric 152063993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 152163993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 152263993Seric 152363970Seric /* type of arbitrary pointer */ 152463970Seric #ifndef ARBPTR_T 152563970Seric # define ARBPTR_T void * 152663970Seric #endif 152763970Seric 152860568Seric #ifndef __P 152960568Seric # include "cdefs.h" 153060568Seric #endif 153160568Seric 153267421Seric #if NAMED_BIND 153367421Seric # include <arpa/nameser.h> 153467434Seric # ifdef __svr4__ 153567434Seric # ifdef NOERROR 153667434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 153767434Seric # endif 153867434Seric # endif 153969953Seric # ifndef __ksr__ 154069953Seric extern int h_errno; 154169953Seric # endif 154267421Seric #endif 154367421Seric 154456852Seric /* 154567419Seric ** The size of an IP address -- can't use sizeof because of problems 154667419Seric ** on Crays, where everything is 64 bits. This will break if/when 154767419Seric ** IP addresses are expanded to eight bytes. 154867419Seric */ 154967419Seric 155067421Seric #ifndef INADDRSZ 155167421Seric # define INADDRSZ 4 155267421Seric #endif 155367419Seric 155467419Seric /* 155567421Seric ** The size of various known types -- for reading network protocols. 155667421Seric ** Again, we can't use sizeof because of compiler randomness. 155767421Seric */ 155867421Seric 155967421Seric #ifndef INT16SZ 156067421Seric # define INT16SZ 2 156167421Seric #endif 156267421Seric #ifndef INT32SZ 156367421Seric # define INT32SZ 4 156467421Seric #endif 156567421Seric 156667421Seric /* 156758778Seric ** Do some required dependencies 156858778Seric */ 156958778Seric 157058778Seric #if defined(NETINET) || defined(NETISO) 157159107Seric # define SMTP 1 /* enable user and server SMTP */ 157259107Seric # define QUEUE 1 /* enable queueing */ 157359107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 157458778Seric #endif 157558778Seric 157658778Seric 157758778Seric /* 157856852Seric ** Arrange to use either varargs or stdargs 157956852Seric */ 158056852Seric 158156852Seric # ifdef __STDC__ 158256852Seric 158356852Seric # include <stdarg.h> 158456852Seric 158556852Seric # define VA_LOCAL_DECL va_list ap; 158656852Seric # define VA_START(f) va_start(ap, f) 158756852Seric # define VA_END va_end(ap) 158856852Seric 158956852Seric # else 159056852Seric 159156852Seric # include <varargs.h> 159256852Seric 159356852Seric # define VA_LOCAL_DECL va_list ap; 159456852Seric # define VA_START(f) va_start(ap) 159556852Seric # define VA_END va_end(ap) 159656852Seric 159756852Seric # endif 159857631Seric 159957943Seric #ifdef HASUNAME 160057631Seric # include <sys/utsname.h> 160157631Seric # ifdef newstr 160257631Seric # undef newstr 160357631Seric # endif 160457943Seric #else /* ! HASUNAME */ 160557631Seric # define NODE_LENGTH 32 160657631Seric struct utsname 160757631Seric { 160857631Seric char nodename[NODE_LENGTH+1]; 160957631Seric }; 161057943Seric #endif /* HASUNAME */ 161157642Seric 161268040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 161363838Seric # define MAXHOSTNAMELEN 256 161457735Seric #endif 161558153Seric 161658153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 161758153Seric # define SIGCHLD SIGCLD 161858153Seric #endif 161958153Seric 162058153Seric #ifndef STDIN_FILENO 162168742Seric # define STDIN_FILENO 0 162258153Seric #endif 162358153Seric 162458153Seric #ifndef STDOUT_FILENO 162568742Seric # define STDOUT_FILENO 1 162658153Seric #endif 162758153Seric 162858153Seric #ifndef STDERR_FILENO 162968742Seric # define STDERR_FILENO 2 163058153Seric #endif 163158689Seric 163264072Seric #ifndef LOCK_SH 163364035Seric # define LOCK_SH 0x01 /* shared lock */ 163464035Seric # define LOCK_EX 0x02 /* exclusive lock */ 163564035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 163664035Seric # define LOCK_UN 0x08 /* unlock */ 163764035Seric #endif 163858692Seric 163968742Seric #ifndef SEEK_SET 164068742Seric # define SEEK_SET 0 164168742Seric # define SEEK_CUR 1 164268742Seric # define SEEK_END 2 164368742Seric #endif 164468742Seric 164564035Seric #ifndef SIG_ERR 164664035Seric # define SIG_ERR ((void (*)()) -1) 164758689Seric #endif 164858702Seric 164964500Seric #ifndef WEXITSTATUS 165064500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 165164500Seric #endif 165264500Seric #ifndef WIFEXITED 165364500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 165464500Seric #endif 165564500Seric 165664561Seric #ifndef SIGFUNC_DEFINED 165764561Seric typedef void (*sigfunc_t) __P((int)); 165864561Seric #endif 165964561Seric 166065053Seric /* size of syslog buffer */ 166165053Seric #ifndef SYSLOG_BUFSIZE 166265053Seric # define SYSLOG_BUFSIZE 1024 166365053Seric #endif 166465053Seric 166558702Seric /* 166658702Seric ** Size of tobuf (deliver.c) 166758702Seric ** Tweak this to match your syslog implementation. It will have to 166858702Seric ** allow for the extra information printed. 166958702Seric */ 167058702Seric 167158702Seric #ifndef TOBUFSIZE 167265053Seric # if (SYSLOG_BUFSIZE) > 512 167365053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 167465053Seric # else 167565053Seric # define TOBUFSIZE 256 167665053Seric # endif 167758702Seric #endif 167860219Seric 167965015Seric /* 168065015Seric ** Size of prescan buffer. 168165015Seric ** Despite comments in the _sendmail_ book, this probably should 168265015Seric ** not be changed; there are some hard-to-define dependencies. 168365015Seric */ 168465015Seric 168565015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 168660219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 168760219Seric # ifndef FORK 168860219Seric # define FORK vfork /* function to call to fork mailer */ 168960219Seric # endif 169065955Seric 169165955Seric /* 169269935Seric ** Default to using scanf in readcf. 169365955Seric */ 169465955Seric 169569935Seric #ifndef SCANF 169665955Seric # define SCANF 1 169765955Seric #endif 1698