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*68889Seric * @(#)conf.h 8.154 (Berkeley) 04/25/95 933728Sbostic */ 109147Seric 1122726Sdist /* 1222726Sdist ** CONF.H -- All user-configurable parameters for sendmail 1322726Sdist */ 149147Seric 1557232Seric # include <sys/param.h> 1664705Seric # include <sys/types.h> 1759389Seric # include <sys/stat.h> 1864380Seric # include <sys/file.h> 1964500Seric # include <sys/wait.h> 2058689Seric # include <fcntl.h> 2164035Seric # include <signal.h> 2268693Seric # include <netdb.h> 2368693Seric # include <pwd.h> 2457232Seric 2563902Seric /********************************************************************** 269147Seric ** Table sizes, etc.... 279147Seric ** There shouldn't be much need to change these.... 2863902Seric **********************************************************************/ 299147Seric 3059303Seric # define MAXLINE 2048 /* max line length */ 3124945Seric # define MAXNAME 256 /* max length of a name */ 329147Seric # define MAXPV 40 /* max # of parms to mailers */ 3359303Seric # define MAXATOM 200 /* max atoms per address */ 349147Seric # define MAXMAILERS 25 /* maximum mailers known to system */ 3568384Seric # define MAXRWSETS 200 /* max # of sets of rewriting rules */ 369147Seric # define MAXPRIORITIES 25 /* max values for Precedence: field */ 3757143Seric # define MAXMXHOSTS 20 /* max # of MX records */ 3852106Seric # define SMTPLINELIM 990 /* maximum SMTP line length */ 3957232Seric # define MAXKEY 128 /* maximum size of a database key */ 4057232Seric # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ 4159056Seric # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ 4259667Seric # define MAXALIASDB 12 /* max # of alias databases */ 4367729Seric # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ 4467729Seric # define MAXTOCLASS 8 /* max # of message timeout classes */ 4568517Seric # define MAXMIMEARGS 20 /* max args in Content-Type: */ 4668517Seric # define MAXMIMENESTING 20 /* max MIME multipart nesting */ 4757143Seric 4857143Seric # ifndef QUEUESIZE 4957143Seric # define QUEUESIZE 1000 /* max # of jobs per queue run */ 5057143Seric # endif 5157143Seric 5263902Seric /********************************************************************** 539147Seric ** Compilation options. 5425673Seric ** 5525673Seric ** #define these if they are available; comment them out otherwise. 5663902Seric **********************************************************************/ 579147Seric 5825673Seric # define LOG 1 /* enable logging */ 5925673Seric # define UGLYUUCP 1 /* output ugly UUCP From lines */ 6064813Seric # define NETUNIX 1 /* include unix domain support */ 6158778Seric # define NETINET 1 /* include internet support */ 6253735Seric # define MATCHGECOS 1 /* match user names from gecos field */ 6363753Seric # define XDEBUG 1 /* enable extended debugging */ 6468785Seric # if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB) 6568848Seric # define USERDB 1 /* look in user database */ 6656337Seric # endif 6756337Seric 6866334Seric /********************************************************************** 6966334Seric ** 0/1 Compilation options. 7066334Seric ** #define these to 1 if they are available; 7166334Seric ** #define them to 0 otherwise. 7266334Seric **********************************************************************/ 7366334Seric 7466334Seric # ifndef NAMED_BIND 7566334Seric # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ 7666334Seric # endif 7766334Seric 7868848Seric # ifndef DSN 7968848Seric # define DSN 1 /* include delivery status notification code */ 8068848Seric # endif 8168848Seric 8264032Seric /* 8364944Seric ** Most systems have symbolic links today, so default them on. You 8464944Seric ** can turn them off by #undef'ing this below. 8564944Seric */ 8664944Seric 8764944Seric # define HASLSTAT 1 /* has lstat(2) call */ 8864944Seric 8964962Seric /* 9064962Seric ** General "standard C" defines. 9164962Seric ** 9264962Seric ** These may be undone later, to cope with systems that claim to 9364962Seric ** be Standard C but aren't. Gcc is the biggest offender -- it 9464962Seric ** doesn't realize that the library is part of the language. 9564962Seric ** 9664962Seric ** Life would be much easier if we could get rid of this sort 9764962Seric ** of bozo problems. 9864962Seric */ 9964962Seric 10064962Seric #ifdef __STDC__ 10164962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 10264962Seric #endif 10364962Seric 10463902Seric /********************************************************************** 10559023Seric ** Operating system configuration. 10659023Seric ** 10759023Seric ** Unless you are porting to a new OS, you shouldn't have to 10859023Seric ** change these. 10963902Seric **********************************************************************/ 11056823Seric 11163787Seric /* 11263787Seric ** Per-Operating System defines 11363787Seric */ 11463787Seric 11564314Seric 11663902Seric /* 11765565Seric ** HP-UX -- tested for 8.07, 9.00, and 9.01. 118*68889Seric ** 119*68889Seric ** If V4FS is defined, compile for HP-UX 10.0. 12063902Seric */ 12163902Seric 12267626Seric #ifdef __hpux 123*68889Seric /* common definitions for HP-UX 9.x and 10.x */ 124*68889Seric # undef m_flags /* conflict between db.h & sys/sysmacros.h on HP 300 */ 12563787Seric # define SYSTEM5 1 /* include all the System V defines */ 12664035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 12764035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 12865982Seric # define setreuid(r, e) setresuid(r, e, -1) 12968294Seric # define LA_TYPE LA_SUBR 13068873Seric # define SPT_TYPE SPT_PSTAT 13165749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 13265354Seric # define GIDSET_T gid_t 13365581Seric # ifndef HASGETUSERSHELL 13465581Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 13565581Seric # endif 13665504Seric # define syslog hard_syslog 13765581Seric # ifdef __STDC__ 13865581Seric extern int syslog(int, char *, ...); 13965167Seric # endif 140*68889Seric 141*68889Seric # ifdef V4FS 142*68889Seric /* HP-UX 10.x */ 143*68889Seric # define _PATH_UNIX "/stand/vmunix" 144*68889Seric # ifndef _PATH_SENDMAILCF 145*68889Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 146*68889Seric # endif 147*68889Seric # ifndef _PATH_SENDMAILPID 148*68889Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 149*68889Seric # endif 150*68889Seric # ifndef IDENTPROTO 151*68889Seric # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ 152*68889Seric # endif 153*68889Seric 154*68889Seric # else 155*68889Seric /* HP-UX 9.x */ 156*68889Seric # define _PATH_UNIX "/hp-ux" 157*68889Seric # ifndef _PATH_SENDMAILCF 158*68889Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 159*68889Seric # endif 160*68889Seric # ifndef IDENTPROTO 161*68889Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 162*68889Seric # endif 163*68889Seric # endif 164*68889Seric 16567626Seric #endif 16656823Seric 16764314Seric 16863902Seric /* 16963902Seric ** IBM AIX 3.x -- actually tested for 3.2.3 17063902Seric */ 17163902Seric 17267626Seric #ifdef _AIX3 17364035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 17464840Seric # define HASUNAME 1 /* use System V uname(2) system call */ 17565211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 17660219Seric # define FORK fork /* no vfork primitive available */ 17765749Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 17867771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 17968145Seric # define LA_TYPE LA_INT 18067626Seric #endif 18160219Seric 18264314Seric 18363902Seric /* 18463902Seric ** Silicon Graphics IRIX 18563902Seric ** 18663965Seric ** Compiles on 4.0.1. 18767967Seric ** 18868686Seric ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). 18968686Seric ** Use IRIX5 instead of IRIX for IRIX 5.x. 19067967Seric ** 19167967Seric ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 19268686Seric ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. 19363902Seric */ 19463902Seric 19568686Seric #if defined(IRIX64) || defined(IRIX5) 19667967Seric # define IRIX 19767967Seric #endif 19867967Seric 19967626Seric #ifdef IRIX 20066763Seric # define SYSTEM5 1 /* this is a System-V derived system */ 20164035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 20264035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 20365211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 20463753Seric # define FORK fork /* no vfork primitive available */ 20568686Seric # if !defined(IRIX64) && !defined(IRIX5) 20668225Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 20768225Seric # endif 20864155Seric # define setpgid BSDsetpgrp 20963937Seric # define GIDSET_T gid_t 21068705Seric # define ARGV_T const char ** 21165749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 21268439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 21366763Seric # define LA_TYPE LA_INT 21467967Seric # ifdef IRIX64 21567967Seric # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 21667967Seric # else 21767967Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 21867967Seric # endif 21967626Seric #endif 22063753Seric 22163902Seric 22263902Seric /* 22364813Seric ** SunOS and Solaris 22464813Seric ** 22564813Seric ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 22664813Seric ** Solaris 2.2 (a.k.a. SunOS 5.2). 22763902Seric */ 22863902Seric 22963787Seric #if defined(sun) && !defined(BSD) 23059074Seric 23164035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 23264813Seric # define HASUNAME 1 /* use System V uname(2) system call */ 23365211Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 23465749Seric # define LA_TYPE LA_INT 23560564Seric 23664842Seric # ifdef SOLARIS_2_3 23768813Seric # define SOLARIS 203 /* for back compat only -- use -DSOLARIS=203 */ 23864842Seric # endif 23964842Seric 24060602Seric # ifdef SOLARIS 24163902Seric /* Solaris 2.x (a.k.a. SunOS 5.x) */ 24265222Seric # ifndef __svr4__ 24365222Seric # define __svr4__ /* use all System V Releae 4 defines below */ 24465222Seric # endif 24563787Seric # include <sys/time.h> 24665172Seric # define GIDSET_T gid_t 24765189Seric # ifndef _PATH_UNIX 24867129Seric # define _PATH_UNIX "/dev/ksyms" 24965189Seric # endif 25063962Seric # ifndef _PATH_SENDMAILCF 25163962Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 25264072Seric # endif 25364072Seric # ifndef _PATH_SENDMAILPID 25463962Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 25563962Seric # endif 25666022Seric # ifndef SYSLOG_BUFSIZE 25766022Seric # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 25866022Seric # endif 25963787Seric 26060602Seric # else 26165105Seric /* SunOS 4.0.3 or 4.1.x */ 26265189Seric # define HASSETREUID 1 /* has setreuid(2) call */ 26365830Seric # ifndef HASFLOCK 26465830Seric # define HASFLOCK 1 /* has flock(2) call */ 26565830Seric # endif 26665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 26760564Seric # include <vfork.h> 26863787Seric 26965105Seric # ifdef SUNOS403 27065105Seric /* special tweaking for SunOS 4.0.3 */ 27165105Seric # include <malloc.h> 27265105Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 27365105Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 27465105Seric # undef WIFEXITED 27565105Seric # undef WEXITSTATUS 27665105Seric # undef HASUNAME 27765105Seric # define setpgid setpgrp 27865105Seric typedef int pid_t; 27965105Seric extern char *getenv(); 28065105Seric 28166732Seric # else 28266732Seric /* 4.1.x specifics */ 28366732Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 28466732Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 28566732Seric 28665105Seric # endif 28760564Seric # endif 28859023Seric #endif 28959023Seric 29064718Seric /* 29164813Seric ** DG/UX 29264813Seric ** 29367427Seric ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 29467427Seric ** older support. 29567427Seric ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 29664718Seric */ 29764314Seric 29867427Seric #ifdef DGUX_5_4_2 29967427Seric # define DGUX 1 30067427Seric #endif 30167427Seric 30264718Seric #ifdef DGUX 30364718Seric # define SYSTEM5 1 30464718Seric # define LA_TYPE LA_SUBR 30564718Seric # define HASSETREUID 1 /* has setreuid(2) call */ 30664718Seric # define HASUNAME 1 /* use System V uname(2) system call */ 30764718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 30864718Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 30966036Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 31065167Seric # ifndef IDENTPROTO 31165167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 31265167Seric # endif 31367771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 31465749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 31564813Seric 31664813Seric /* these include files must be included early on DG/UX */ 31764813Seric # include <netinet/in.h> 31864813Seric # include <arpa/inet.h> 31964813Seric 32067427Seric # ifdef DGUX_5_4_2 32167427Seric # define inet_addr dgux_inet_addr 32264718Seric extern long dgux_inet_addr(); 32367427Seric # endif 32464718Seric #endif 32564718Seric 32664718Seric 32763902Seric /* 32863902Seric ** Digital Ultrix 4.2A or 4.3 32964264Seric ** 33064264Seric ** Apparently, fcntl locking is broken on 4.2A, in that locks are 33164264Seric ** not dropped when the process exits. This causes major problems, 33264264Seric ** so flock is the only alternative. 33363902Seric */ 33463902Seric 33560564Seric #ifdef ultrix 33664035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 33763962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 33864035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 33966242Seric # define HASUNAME 1 /* use System V uname(2) system call */ 34065830Seric # ifndef HASFLOCK 34165830Seric # define HASFLOCK 1 /* has flock(2) call */ 34265830Seric # endif 34365211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 34466318Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 34565135Seric # ifdef vax 34665135Seric # define LA_TYPE LA_FLOAT 34765135Seric # else 34865135Seric # define LA_TYPE LA_INT 34965135Seric # define LA_AVENRUN "avenrun" 35065135Seric # endif 35165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 35265167Seric # ifndef IDENTPROTO 35365167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 35465167Seric # endif 35560564Seric #endif 35660564Seric 35764314Seric 35863902Seric /* 35968072Seric ** OSF/1 for Intel Paragon. 36068072Seric ** 36168082Seric ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 36268082Seric ** of Intel Scalable Systems Divison. 36368072Seric */ 36468072Seric 36568072Seric #ifdef __PARAGON__ 36668072Seric # define __osf__ 1 /* get OSF/1 defines below */ 36768072Seric # ifndef _PATH_SENDMAILCF 36868072Seric # define _PATH_SENDMAILCF "/var/adm/sendmail/sendmail.cf" 36968072Seric # endif 37068072Seric #endif 37168072Seric 37268072Seric 37368072Seric /* 37463902Seric ** OSF/1 (tested on Alpha) 37563902Seric */ 37663902Seric 37763787Seric #ifdef __osf__ 37863962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 37964035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 38064035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 38166226Seric # ifndef HASFLOCK 38265830Seric # define HASFLOCK 1 /* has flock(2) call */ 38365830Seric # endif 38463962Seric # define LA_TYPE LA_INT 38565749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 38664813Seric # ifndef _PATH_SENDMAILPID 38765504Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 38864813Seric # endif 38959287Seric #endif 39059287Seric 39164314Seric 39263902Seric /* 39363902Seric ** NeXTstep 39463902Seric */ 39563902Seric 39664076Seric #ifdef NeXT 39764035Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 39865830Seric # ifndef HASFLOCK 39965830Seric # define HASFLOCK 1 /* has flock(2) call */ 40065830Seric # endif 40164125Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 40264563Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 40368705Seric # define UID_T int /* compiler gripes on uid_t */ 40463753Seric # define sleep sleepX 40564155Seric # define setpgid setpgrp 40664295Seric # ifndef LA_TYPE 40764295Seric # define LA_TYPE LA_MACH 40864295Seric # endif 40965749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 41064500Seric # ifndef _POSIX_SOURCE 41164035Seric typedef int pid_t; 41264500Seric # undef WEXITSTATUS 41364500Seric # undef WIFEXITED 41464500Seric # endif 41564072Seric # ifndef _PATH_SENDMAILCF 41664072Seric # define _PATH_SENDMAILCF "/etc/sendmail/sendmail.cf" 41764072Seric # endif 41864072Seric # ifndef _PATH_SENDMAILPID 41964072Seric # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 42064072Seric # endif 42159288Seric #endif 42259288Seric 42364314Seric 42463902Seric /* 42563962Seric ** 4.4 BSD 42664831Seric ** 42764831Seric ** See also BSD defines. 42863902Seric */ 42963902Seric 43060568Seric #ifdef BSD4_4 43164072Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 43260568Seric # include <sys/cdefs.h> 43363838Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 43464072Seric # ifndef LA_TYPE 43564072Seric # define LA_TYPE LA_SUBR 43664072Seric # endif 43765749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 43867771Seric # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 43960568Seric #endif 44060568Seric 44164314Seric 44263902Seric /* 44365982Seric ** BSD/386 (all versions) 44465982Seric ** From Tony Sanders, BSDI 44565982Seric */ 44665982Seric 44765982Seric #ifdef __bsdi__ 44865982Seric # define HASUNSETENV 1 /* has the unsetenv(3) call */ 44965982Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 45066843Seric # include <sys/cdefs.h> 45166843Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 45266030Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 45366843Seric # ifndef LA_TYPE 45466843Seric # define LA_TYPE LA_SUBR 45566843Seric # endif 45668753Seric # define GIDSET_T gid_t 45765982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 45866843Seric /* version 1.1 or later */ 45967771Seric # undef SPT_TYPE 46067771Seric # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 46166843Seric # else 46266843Seric /* version 1.0 or earlier */ 46366843Seric # ifndef OLD_NEWDB 46466843Seric # define OLD_NEWDB 1 /* old version of newdb library */ 46566843Seric # endif 46667771Seric # define SPT_PADCHAR '\0' /* pad process title with nulls */ 46765982Seric # endif 46865982Seric #endif 46965982Seric 47065982Seric 47165982Seric 47265982Seric /* 47365049Seric ** 386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions) 47464733Seric ** 47564733Seric ** 4.3BSD clone, closer to 4.4BSD 47664831Seric ** 47764831Seric ** See also BSD defines. 47864733Seric */ 47964733Seric 48065049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) 48164733Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 48264733Seric # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ 48366754Seric # ifdef __NetBSD__ 48466754Seric # define HASUNAME 1 /* has uname(2) syscall */ 48566754Seric # endif 48664733Seric # include <sys/cdefs.h> 48764733Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 48864733Seric # ifndef LA_TYPE 48964733Seric # define LA_TYPE LA_SUBR 49064733Seric # endif 49165749Seric # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 49264733Seric #endif 49364733Seric 49464733Seric 49564733Seric /* 49664813Seric ** Mach386 49764813Seric ** 49864813Seric ** For mt Xinu's Mach386 system. 49964813Seric */ 50064813Seric 50164813Seric #if defined(MACH) && defined(i386) 50264813Seric # define MACH386 1 50364813Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 50464813Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 50566226Seric # ifndef HASFLOCK 50665830Seric # define HASFLOCK 1 /* has flock(2) call */ 50765830Seric # endif 50864813Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 50964813Seric # define NEEDSTRTOL 1 /* need the strtol() function */ 51064813Seric # define setpgid setpgrp 51164813Seric # ifndef LA_TYPE 51264813Seric # define LA_TYPE LA_FLOAT 51364813Seric # endif 51465749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 51564962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 51664813Seric # undef WEXITSTATUS 51764813Seric # undef WIFEXITED 51864813Seric # ifndef _PATH_SENDMAILCF 51964813Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 52064813Seric # endif 52164813Seric # ifndef _PATH_SENDMAILPID 52264813Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 52364813Seric # endif 52464813Seric #endif 52564813Seric 52664813Seric 52764813Seric /* 52863969Seric ** 4.3 BSD -- this is for very old systems 52963969Seric ** 53065949Seric ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 53165949Seric ** 53263969Seric ** You'll also have to install a new resolver library. 53363969Seric ** I don't guarantee that support for this environment is complete. 53463969Seric */ 53563969Seric 53665949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 53763969Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 53863969Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 53963970Seric # define ARBPTR_T char * 54064155Seric # define setpgid setpgrp 54163969Seric # ifndef LA_TYPE 54263969Seric # define LA_TYPE LA_FLOAT 54363969Seric # endif 54463969Seric # ifndef _PATH_SENDMAILCF 54563969Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 54663969Seric # endif 54765167Seric # ifndef IDENTPROTO 54865167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 54965167Seric # endif 55064834Seric # undef WEXITSTATUS 55164834Seric # undef WIFEXITED 55264834Seric typedef short pid_t; 55364834Seric extern int errno; 55463969Seric #endif 55563969Seric 55664314Seric 55763969Seric /* 55863902Seric ** SCO Unix 55965087Seric ** 56065087Seric ** This includes two parts -- the first is for SCO Open Server 3.2v4 56165087Seric ** (contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 56265087Seric ** The second is, I believe, for an older version. 56363902Seric */ 56463902Seric 56565087Seric #ifdef _SCO_unix_4_2 56665087Seric # define _SCO_unix_ 56765087Seric # define HASSETREUID 1 /* has setreuid(2) call */ 56866757Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 56965087Seric # define _PATH_UNIX "/unix" 57065087Seric # ifndef _PATH_SENDMAILCF 57165087Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 57265087Seric # endif 57365087Seric # ifndef _PATH_SENDMAILPID 57465087Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 57565087Seric # endif 57665087Seric #endif 57765087Seric 57863838Seric #ifdef _SCO_unix_ 57963838Seric # define SYSTEM5 1 /* include all the System V defines */ 58064035Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 58165212Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 58263838Seric # define FORK fork 58363838Seric # define MAXPATHLEN PATHSIZE 58464718Seric # define LA_TYPE LA_SHORT 58567812Seric # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 58668439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 58767608Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 58864813Seric # undef NETUNIX /* no unix domain socket support */ 58963838Seric #endif 59063838Seric 59164314Seric 59263962Seric /* 59368442Seric ** ISC (SunSoft) Unix. 59468442Seric ** 59568442Seric ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> 59668442Seric */ 59768442Seric 59868442Seric #ifdef ISC_UNIX 59968442Seric # include <net/errno.h> 60068442Seric # define SYSTEM5 1 /* include all the System V defines */ 60168442Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 60268442Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 60368442Seric # define HASSETREUID 1 /* has setreuid(2) call */ 60468442Seric # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 60568442Seric # undef NETUNIX /* no unix domain socket support */ 60668442Seric # define FORK fork 60768442Seric # define MAXPATHLEN 1024 60868442Seric # define LA_TYPE LA_SHORT 60968442Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 61068442Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 61168442Seric # define _PATH_UNIX "/unix" 61268442Seric # ifndef _PATH_SENDMAILCF 61368442Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 61468442Seric # endif 61568442Seric # ifndef _PATH_SENDMAILPID 61668442Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 61768442Seric # endif 61868442Seric 61968442Seric typedef short pid_t; 62068442Seric 62168442Seric #endif 62268442Seric 62368442Seric 62468442Seric /* 62568040Seric ** Altos System V. 62668040Seric ** Contributed by Tim Rice <timr@crl.com>. 62768040Seric */ 62868040Seric 62968040Seric #ifdef ALTOS_SYS_V 63068040Seric # include <limits.h> 63168040Seric # define SYSTEM5 1 /* include all the System V defines */ 63268040Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 63368040Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 63468040Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 63568040Seric # define NEEDFSYNC 1 /* no fsync(2) in system library */ 63668040Seric # define FORK fork 63768040Seric # define MAXPATHLEN PATHSIZE 63868040Seric # define LA_TYPE LA_SHORT 63968040Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 64068439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 64168040Seric # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 64268040Seric # undef NETUNIX /* no unix domain socket support */ 64368040Seric # undef WIFEXITED 64468040Seric # undef WEXITSTATUS 64568040Seric # define strtoul strtol /* gcc library bogosity */ 64668040Seric 64768040Seric typedef unsigned short uid_t; 64868040Seric typedef unsigned short gid_t; 64968040Seric typedef short pid_t; 65068040Seric #endif 65168040Seric 65268040Seric 65368040Seric /* 65463962Seric ** ConvexOS 11.0 and later 65565949Seric ** 65665949Seric ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 65765949Seric ** works on 9.1 as well. 65863962Seric */ 65963962Seric 66063962Seric #ifdef _CONVEX_SOURCE 66163977Seric # define BSD 1 /* include all the BSD defines */ 66263977Seric # define HASUNAME 1 /* use System V uname(2) system call */ 66363962Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 66463977Seric # define NEEDGETOPT 1 /* need replacement for getopt(3) */ 66563962Seric # define LA_TYPE LA_FLOAT 66665749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 66765949Seric # ifndef _PATH_SENDMAILCF 66865949Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 66965949Seric # endif 67065949Seric # ifndef S_IREAD 67165949Seric # define S_IREAD _S_IREAD 67265949Seric # define S_IWRITE _S_IWRITE 67365949Seric # define S_IEXEC _S_IEXEC 67465949Seric # define S_IFMT _S_IFMT 67565949Seric # define S_IFCHR _S_IFCHR 67665949Seric # define S_IFBLK _S_IFBLK 67765949Seric # endif 67865167Seric # ifndef IDENTPROTO 67965167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 68065167Seric # endif 68163962Seric #endif 68263962Seric 68364314Seric 68463962Seric /* 68564999Seric ** RISC/os 4.52 68663962Seric ** 68764999Seric ** Gives a ton of warning messages, but otherwise compiles. 68863962Seric */ 68963962Seric 69063965Seric #ifdef RISCOS 69164999Seric 69263962Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 69366226Seric # ifndef HASFLOCK 69465830Seric # define HASFLOCK 1 /* has flock(2) call */ 69565830Seric # endif 69664999Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 69764999Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 69863962Seric # define LA_TYPE LA_INT 69963962Seric # define LA_AVENRUN "avenrun" 70063962Seric # define _PATH_UNIX "/unix" 70164999Seric # undef WIFEXITED 70264999Seric 70364999Seric # define setpgid setpgrp 70464999Seric 70564999Seric extern int errno; 70664999Seric typedef int pid_t; 70764999Seric #define SIGFUNC_DEFINED 70864999Seric typedef int (*sigfunc_t)(); 70964999Seric extern char *getenv(); 71064999Seric extern void *malloc(); 71164999Seric 71263962Seric #endif 71363962Seric 71464314Seric 71564155Seric /* 71664155Seric ** Linux 0.99pl10 and above... 71766300Seric ** 71866300Seric ** Thanks to, in reverse order of contact: 71966300Seric ** 72068093Seric ** John Kennedy <warlock@csuchico.edu> 72167885Seric ** Andrew Pam <avatar@aus.xanadu.com> 72266300Seric ** Florian La Roche <rzsfl@rz.uni-sb.de> 72366300Seric ** Karl London <karl@borg.demon.co.uk> 72466300Seric ** 72568093Seric ** Last compiled against: [12/14/94 @ 11:38:41 PM (Wednesday)] 72668093Seric ** sendmail 8.7.a.5 named 4.9.3-beta12-p1 db-1.85 72768093Seric ** gcc 2.6.2 libc.so.4.6.20 72868093Seric ** slackware 2.1.0 linux 1.1.70 72964155Seric */ 73064155Seric 73164770Seric #ifdef __linux__ 73266298Seric # define BSD 1 /* include BSD defines */ 73364155Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 73466298Seric # define HASUNAME 1 /* use System V uname(2) system call */ 73564380Seric # define HASUNSETENV 1 /* has unsetenv(3) call */ 73666298Seric # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 73766300Seric # define GIDSET_T gid_t /* from <linux/types.h> */ 73867885Seric # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 73968518Seric # ifndef HASFLOCK 74068518Seric # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 74168518Seric # endif 74264155Seric # ifndef LA_TYPE 74366301Seric # define LA_TYPE LA_PROCSTR 74464155Seric # endif 74566300Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 74668093Seric # ifndef _PATH_SENDMAILPID 74768093Seric # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 74868093Seric # endif 74968093Seric # define TZ_TYPE TZ_TNAME 75064763Seric # include <sys/sysmacros.h> 75166300Seric # undef atol /* wounded in <stdlib.h> */ 75264155Seric #endif 75364155Seric 75464155Seric 75564345Seric /* 75664345Seric ** DELL SVR4 Issue 2.2, and others 75764345Seric ** From Kimmo Suominen <kim@grendel.lut.fi> 75864345Seric ** 75964345Seric ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 76064345Seric ** defined, and the definitions conflict. 76164924Seric ** 76264924Seric ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 76364924Seric ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 76464924Seric ** (SVR4.0/386 version 3.0). 76564345Seric */ 76664345Seric 76764345Seric #ifdef DELL_SVR4 76865189Seric /* no changes necessary */ 76965189Seric /* see general __svr4__ defines below */ 77064345Seric #endif 77164345Seric 77264345Seric 77364380Seric /* 77464380Seric ** Apple A/UX 3.0 77564380Seric */ 77664345Seric 77764380Seric #ifdef _AUX_SOURCE 77864729Seric # include <sys/sysmacros.h> 77964380Seric # define BSD /* has BSD routines */ 78068803Seric # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 78164380Seric # define HASUNAME 1 /* use System V uname(2) system call */ 78264380Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 78364561Seric # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 78465167Seric # ifndef IDENTPROTO 78565167Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 78665167Seric # endif 78764380Seric # define FORK fork 78864380Seric # ifndef _PATH_SENDMAILCF 78964380Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 79064380Seric # endif 79164380Seric # ifndef LA_TYPE 79264380Seric # define LA_TYPE LA_ZERO 79364380Seric # endif 79465749Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 79564560Seric # undef WIFEXITED 79664560Seric # undef WEXITSTATUS 79764380Seric #endif 79864380Seric 79964380Seric 80064705Seric /* 80164705Seric ** Encore UMAX V 80264705Seric ** 80364705Seric ** Not extensively tested. 80464705Seric */ 80564380Seric 80664705Seric #ifdef UMAXV 80764705Seric # include <limits.h> 80864705Seric # define HASUNAME 1 /* use System V uname(2) system call */ 80964705Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 81064705Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 81165211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 81264705Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 81364705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 81464705Seric # define FORK fork /* no vfork(2) primitive available */ 81565749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 81664705Seric # define MAXPATHLEN PATH_MAX 81764705Seric extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 81864705Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 81964705Seric # undef WIFEXITED 82064705Seric # undef WEXITSTATUS 82164705Seric #endif 82264705Seric 82364705Seric 82464939Seric /* 82564939Seric ** Stardent Titan 3000 running TitanOS 4.2. 82664939Seric ** 82764939Seric ** Must be compiled in "cc -43" mode. 82864939Seric ** 82964944Seric ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 83064939Seric ** 83164939Seric ** Note the tweaking below after the BSD defines are set. 83264939Seric */ 83364705Seric 83464939Seric #ifdef titan 83564939Seric # define setpgid setpgrp 83664939Seric typedef int pid_t; 83764939Seric # undef WIFEXITED 83864939Seric # undef WEXITSTATUS 83964939Seric #endif 84064939Seric 84164939Seric 84264962Seric /* 84364962Seric ** Sequent DYNIX 3.2.0 84464962Seric ** 84564962Seric ** From Jim Davis <jdavis@cs.arizona.edu>. 84664962Seric */ 84764939Seric 84864962Seric #ifdef sequent 84966038Seric 85064962Seric # define BSD 1 85164962Seric # define HASUNSETENV 1 85264962Seric # define BSD4_3 1 /* to get signal() in conf.c */ 85364962Seric # define WAITUNION 1 85464962Seric # define LA_TYPE LA_FLOAT 85564962Seric # ifdef _POSIX_VERSION 85664962Seric # undef _POSIX_VERSION /* set in <unistd.h> */ 85764962Seric # endif 85864962Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 85964962Seric # define setpgid setpgrp 86064962Seric 86164962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 86264962Seric # undef WIFEXITED 86364962Seric # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 86464962Seric ((union wait*)&(s))->w_termsig == 0) 86564962Seric # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 86664962Seric typedef int pid_t; 86764962Seric # define isgraph(c) (isprint(c) && (c != ' ')) 86864962Seric 86966144Seric # ifndef IDENTPROTO 87066144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 87166144Seric # endif 87266144Seric 87364962Seric # ifndef _PATH_UNIX 87464962Seric # define _PATH_UNIX "/dynix" 87564962Seric # endif 87664962Seric # ifndef _PATH_SENDMAILCF 87764962Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 87864962Seric # endif 87964962Seric 88064962Seric #endif 88164962Seric 88264962Seric 88365748Seric /* 88466038Seric ** Sequent DYNIX/ptx v2.0 (and higher) 88566038Seric ** 88666038Seric ** For DYNIX/ptx v1.x, undefine HASSETREUID. 88766038Seric ** 88866038Seric ** From Tim Wright <timw@sequent.com>. 88966038Seric */ 89066038Seric 89166038Seric #ifdef _SEQUENT_ 89266038Seric # define SYSTEM5 1 /* include all the System V defines */ 89366038Seric # define HASSETSID 1 /* has POSIX setsid(2) call */ 89466038Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 89566038Seric # define HASSETREUID 1 /* has setreuid(2) call */ 89666038Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 89766038Seric # define GIDSET_T gid_t 89866038Seric # define LA_TYPE LA_INT 89966038Seric # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 90067771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 90166144Seric # ifndef IDENTPROTO 90266144Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 90366144Seric # endif 90466038Seric # ifndef _PATH_SENDMAILCF 90566038Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 90666038Seric # endif 90766038Seric # ifndef _PATH_SENDMAILPID 90866038Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 90966038Seric # endif 91066038Seric #endif 91166038Seric 91266038Seric 91366038Seric /* 91465748Seric ** Cray Unicos 91565748Seric ** 91665748Seric ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> 91765748Seric */ 91864962Seric 91965748Seric #ifdef UNICOS 92065748Seric # define SYSTEM5 1 /* include all the System V defines */ 92165748Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 92265748Seric # define MAXPATHLEN PATHSIZE 92365748Seric # define LA_TYPE LA_ZERO 92465749Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 92568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 92665748Seric #endif 92764962Seric 92865748Seric 92965820Seric /* 93065820Seric ** Apollo DomainOS 93165820Seric ** 93265820Seric ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 93365982Seric ** 93465820Seric ** 15 Jan 1994 93565820Seric ** 93665820Seric */ 93765748Seric 93865820Seric #ifdef apollo 93965820Seric # define HASSETREUID 1 /* has setreuid(2) call */ 94065820Seric # define HASINITGROUPS 1 /* has initgroups(2) call */ 94167771Seric # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 94265820Seric # define LA_TYPE LA_SUBR /* use getloadavg.c */ 94366044Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 94468439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 94565820Seric # ifndef _PATH_SENDMAILCF 94665820Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 94765820Seric # endif 94865820Seric # ifndef _PATH_SENDMAILPID 94965820Seric # define _PATH_SENDMAILPID "/etc/sendmail.pid" 95065820Seric # endif 95165820Seric # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 95265820Seric # undef S_IFIFO 95365820Seric # define S_IFIFO 0010000 95465820Seric # ifndef IDENTPROTO 95565820Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 95665820Seric # endif 95765982Seric #endif 95865820Seric 95965820Seric 96066748Seric /* 96167745Seric ** UnixWare 1.1.2. 96266752Seric ** 96366752Seric ** From Evan Champion <evanc@spatial.synapse.org>. 96466752Seric */ 96566752Seric 96666752Seric #ifdef UNIXWARE 96766752Seric # define SYSTEM5 1 96867745Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 96967745Seric # define HASGETDTABLESIZE 1 97067745Seric # define HASSETREUID 1 97167745Seric # define HASSETSID 1 97267745Seric # define HASINITGROUPS 1 97367745Seric # define GIDSET_T gid_t 97467745Seric # define SLEEP_T unsigned 97566752Seric # define SFS_TYPE SFS_STATVFS 97666752Seric # define LA_TYPE LA_ZERO 97766752Seric # undef WIFEXITED 97866752Seric # undef WEXITSTATUS 97966752Seric # define _PATH_UNIX "/unix" 98066752Seric # ifndef _PATH_SENDMAILCF 98166752Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 98266752Seric # endif 98366752Seric # ifndef _PATH_SENDMAILPID 98466752Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 98566752Seric # endif 98666752Seric # define SYSLOG_BUFSIZE 128 98766752Seric #endif 98866752Seric 98966752Seric 99066752Seric /* 99166748Seric ** Intergraph CLIX 3.1 99266748Seric ** 99366748Seric ** From Paul Southworth <pauls@locust.cic.net> 99466748Seric */ 99565820Seric 99666748Seric #ifdef CLIX 99766748Seric # define SYSTEM5 1 /* looks like System V */ 99866752Seric # ifndef HASGETUSERSHELL 99966752Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 100066752Seric # endif 100166748Seric # define DEV_BSIZE 512 /* device block size not defined */ 100266748Seric # define GIDSET_T gid_t 100366748Seric # undef LOG /* syslog not available */ 100466748Seric # define NEEDFSYNC 1 /* no fsync in system library */ 100566748Seric # define GETSHORT _getshort 100666748Seric #endif 100765820Seric 100866748Seric 100966776Seric /* 101066776Seric ** NCR 3000 Series (SysVr4) 101166776Seric ** 101267434Seric ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 101366776Seric */ 101466748Seric 101566776Seric #ifdef NCR3000 101666776Seric # define __svr4__ 101766776Seric # undef BSD 101866776Seric # define LA_AVENRUN "avenrun" 101966776Seric #endif 102066748Seric 102166776Seric 102267434Seric /* 102367434Seric ** Tandem NonStop-UX SVR4 102467434Seric ** 102567434Seric ** From Rick McCarty <mccarty@mpd.tandem.com>. 102667434Seric */ 102766776Seric 102867434Seric #ifdef NonStop_UX_BXX 102967434Seric # define __svr4__ 103067434Seric #endif 103166776Seric 103267434Seric 103367488Seric /* 103467488Seric ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. 103567488Seric ** 103667488Seric ** Tested for 1.04 and 1.03 103767488Seric ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 103867488Seric */ 103967434Seric 104067488Seric #ifdef __H3050R 104167488Seric # define SYSTEM5 1 /* include all the System V defines */ 104267488Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 104367488Seric # define setreuid(r, e) setresuid(r, e, -1) 104467488Seric # define LA_TYPE LA_FLOAT 104567488Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 104667488Seric # define HASSETVBUF /* HI-UX has no setlinebuf */ 104767488Seric # ifndef GIDSET_T 104867488Seric # define GIDSET_T gid_t 104967488Seric # endif 105067488Seric # ifndef _PATH_UNIX 105167488Seric # define _PATH_UNIX "/HI-UX" 105267488Seric # endif 105367488Seric # ifndef _PATH_SENDMAILCF 105467488Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 105567488Seric # endif 105667488Seric # ifndef IDENTPROTO 105767488Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 105867488Seric # endif 105967488Seric # ifndef HASGETUSERSHELL 106067488Seric # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 106167488Seric # endif 106267488Seric 106367488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */ 106467488Seric # undef m_flags 106567488Seric 106667488Seric # ifdef __STDC__ 106767488Seric extern int syslog(int, char *, ...); 106867488Seric # endif 106967488Seric 107067488Seric #endif 107167488Seric 107267488Seric 107368099Seric /* 107468099Seric ** Amdahl UTS System V 2.1.5 (SVr3-based) 107568099Seric ** 107668099Seric ** From: Janet Jackson <janet@dialix.oz.au>. 107768099Seric */ 107867488Seric 107968099Seric #ifdef _UTS 108068099Seric # include <sys/sysmacros.h> 108168099Seric # undef HASLSTAT /* has symlinks, but they cause problems */ 108268099Seric # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 108368099Seric # define SYS5SIGNALS 1 /* System V signal semantics */ 108468099Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 108568099Seric # define HASUNAME 1 /* use System V uname(2) system call */ 108668099Seric # define HASINITGROUPS 1 /* has initgroups(3) function */ 108768099Seric # define HASSETVBUF 1 /* has setvbuf(3) function */ 108868099Seric # define HASSIGSETMASK 0 /* does not have sigsetmask(2) function */ 108968099Seric # ifndef HASGETUSERSHELL 109068099Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 109168099Seric # endif 109268099Seric # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 109368099Seric # define LA_TYPE LA_ZERO /* doesn't have load average */ 109468099Seric # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 109568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 109668099Seric # define _PATH_UNIX "/unix" 109768099Seric # ifndef _PATH_SENDMAILCF 109868099Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 109968099Seric # endif 110068099Seric #endif 110168099Seric 110268357Seric /* 110368357Seric ** Cray Computer Corporation's CSOS 110468357Seric ** 110568357Seric ** Contributed by Scott Bolte <scott@craycos.com>. 110668357Seric */ 110768099Seric 110868357Seric #ifdef _CRAYCOM 110968357Seric # define SYSTEM5 1 /* include all the System V defines */ 111068357Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 111168357Seric # define NEEDFSYNC 1 /* no fsync in system library */ 111268357Seric # define MAXPATHLEN PATHSIZE 111368357Seric # define LA_TYPE LA_ZERO 111468357Seric # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 111568439Seric # define SFS_BAVAIL f_bfree /* alternate field name */ 111668357Seric # define _POSIX_CHOWN_RESTRICTED -1 111768357Seric extern struct group *getgrent(), *getgrnam(), *getgrgid(); 111868357Seric #endif 111968099Seric 112068099Seric 112168742Seric /* 112268742Seric ** Sony NEWS-OS 4.2.1R and 6.0.3 112368742Seric */ 112468742Seric 112568742Seric #ifdef sony_news 112668742Seric # ifndef __svr4 112768742Seric /* NEWS-OS 4.2.1R */ 112868742Seric # ifndef BSD 112968742Seric # define BSD /* has BSD routines */ 113068742Seric # endif 113168742Seric # define HASUNSETENV 1 /* has unsetenv(2) call */ 113268742Seric # undef HASSETVBUF /* don't actually have setvbuf(3) */ 113368742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 113468742Seric # define LA_TYPE LA_INT 113568742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 113668742Seric # ifndef HASFLOCK 113768742Seric # define HASFLOCK 1 /* has flock(2) call */ 113868742Seric # endif 113968742Seric # define setpgid setpgrp 114068742Seric # undef WIFEXITED 114168742Seric # undef WEXITSTATUS 114268742Seric typedef int pid_t; 114368742Seric typedef int (*sigfunc_t)(); 114468742Seric # define SIGFUNC_DEFINED 114568742Seric 114668742Seric # else 114768742Seric /* NEWS-OS 6.0.3 with /bin/cc */ 114868742Seric # define SYSTEM5 1 /* include all the System V defines */ 114968742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 115068742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 115168742Seric # define HASSETREUID 1 /* has setreuid(2) call */ 115268742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 115368742Seric # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 115468742Seric # define LA_TYPE LA_INT 115568742Seric # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statvfs() impl */ 115668742Seric # define GIDSET_T gid_t 115768742Seric # define setreuid(r, e) seteuid(e) 115868742Seric # undef WIFEXITED 115968742Seric # undef WEXITSTATUS 116068742Seric # define _PATH_UNIX "/stand/unix" 116168742Seric # ifndef _PATH_SENDMAILCF 116268742Seric # define _PATH_SENDMAILCF "/etc/mail/sendmail.cf" 116368742Seric # endif 116468742Seric # ifndef _PATH_SENDMAILPID 116568742Seric # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 116668742Seric # endif 116768742Seric 116868742Seric # endif 116968742Seric #endif 117068742Seric 117168742Seric 117268742Seric /* 117368742Seric ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach 117468742Seric */ 117568742Seric 117668742Seric #ifdef luna 117768742Seric # ifndef IDENTPROTO 117868742Seric # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 117968742Seric # endif 118068742Seric # ifdef uniosb 118168742Seric # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 118268742Seric # endif 118368742Seric # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ 118468742Seric # define WAITUNION 1 /* use "union wait" as wait argument type */ 118568742Seric # ifdef uniosb 118668742Seric # define LA_TYPE LA_INT 118768742Seric # endif 118868742Seric # ifdef luna2m 118968742Seric # define LA_TYPE LA_SUBR 119068742Seric # endif 119168742Seric # ifdef luna88k 119268742Seric # define LA_TYPE LA_INT 119368742Seric # endif 119468742Seric # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 119568742Seric # define setpgid setpgrp 119668742Seric # undef WIFEXITED 119768742Seric # undef WEXITSTATUS 119868742Seric typedef int pid_t; 119968742Seric typedef int (*sigfunc_t)(); 120068742Seric # define SIGFUNC_DEFINED 120168742Seric extern char *getenv(); 120268742Seric extern int errno; 120368742Seric # ifndef _PATH_SENDMAILCF 120468742Seric # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" 120568742Seric # endif 120668742Seric #endif 120768742Seric 120868742Seric 120968742Seric /* 121068742Seric ** NEC EWS-UX/V 4.2 121168742Seric ** 121268742Seric ** with /usr/ucb/cc 121368742Seric */ 121468742Seric 121568742Seric #ifdef nec_ews_svr4 121668742Seric # define SYSTEM5 1 /* include all the System V defines */ 121768742Seric # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 121868742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 121968742Seric # define HASSETREUID 1 /* has setreuid(2) call */ 122068742Seric # define setreuid(r, e) seteuid(e) 122168742Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 122268742Seric # define LA_TYPE LA_INT 122368742Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 122468742Seric # define GIDSET_T gid_t 122568742Seric # ifndef HASGETUSERSHELL 122668742Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 122768742Seric # endif 122868742Seric # undef WIFEXITED 122968742Seric # undef WEXITSTATUS 123068742Seric # ifndef _PATH_UNIX 123168742Seric # define _PATH_UNIX "/unix" 123268742Seric # endif 123368742Seric # ifndef _PATH_SENDMAILCF 123468742Seric # define _PATH_SENDMAILCF "/var/ucblib/sendmail.cf" 123568742Seric # endif 123668742Seric # ifndef _PATH_SENDMAILPID 123768742Seric # define _PATH_SENDMAILPID "/var/ucblib/sendmail.pid" 123868742Seric # endif 123968742Seric # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 124068742Seric #endif 124168742Seric 124268742Seric 124368742Seric 124463902Seric /********************************************************************** 124563787Seric ** End of Per-Operating System defines 124663902Seric **********************************************************************/ 124763787Seric 124863949Seric /********************************************************************** 124963949Seric ** More general defines 125063949Seric **********************************************************************/ 125163949Seric 125263962Seric /* general BSD defines */ 125363962Seric #ifdef BSD 125464035Seric # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 125564035Seric # define HASSETREUID 1 /* has setreuid(2) call */ 125667742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 125767430Seric # ifndef HASSETRLIMIT 125867430Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 125967430Seric # endif 126065830Seric # ifndef HASFLOCK 126165830Seric # define HASFLOCK 1 /* has flock(2) call */ 126265830Seric # endif 126367602Seric # ifndef TZ_TYPE 126467608Seric # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 126567602Seric # endif 126663962Seric #endif 126763962Seric 126865189Seric /* general System V Release 4 defines */ 126965189Seric #ifdef __svr4__ 127065189Seric # define SYSTEM5 1 127165189Seric # define HASSETREUID 1 /* has seteuid(2) call & working saved uids */ 127267742Seric # define HASINITGROUPS 1 /* has initgroups(3) call */ 127367742Seric # ifndef HASSETRLIMIT 127467742Seric # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 127567742Seric # endif 127665211Seric # ifndef HASGETUSERSHELL 127765211Seric # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 127865210Seric # endif 127965189Seric # define setreuid(r, e) seteuid(e) 128065189Seric 128165189Seric # ifndef _PATH_UNIX 128265189Seric # define _PATH_UNIX "/unix" 128365189Seric # endif 128465189Seric # ifndef _PATH_SENDMAILCF 128565189Seric # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" 128665189Seric # endif 128765189Seric # ifndef _PATH_SENDMAILPID 128865189Seric # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 128965189Seric # endif 129065189Seric # ifndef SYSLOG_BUFSIZE 129165189Seric # define SYSLOG_BUFSIZE 128 129265189Seric # endif 129367159Seric # ifndef SFS_TYPE 129467159Seric # define SFS_TYPE SFS_STATVFS 129567159Seric # endif 129665189Seric #endif 129765189Seric 129863787Seric /* general System V defines */ 129966298Seric #ifdef SYSTEM5 130064813Seric # include <sys/sysmacros.h> 130163949Seric # define HASUNAME 1 /* use System V uname(2) system call */ 130264705Seric # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 130364962Seric # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 130467430Seric # ifndef HASULIMIT 130567430Seric # define HASULIMIT 1 /* has the ulimit(2) syscall */ 130667430Seric # endif 130763962Seric # ifndef LA_TYPE 130865749Seric # define LA_TYPE LA_INT /* assume integer load average */ 130963962Seric # endif 131065749Seric # ifndef SFS_TYPE 131165749Seric # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 131265749Seric # endif 131367602Seric # ifndef TZ_TYPE 131467608Seric # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 131567602Seric # endif 131668442Seric # define bcopy(s, d, l) (memmove((d), (s), (l))) 131768442Seric # define bzero(d, l) (memset((d), '\0', (l))) 131868442Seric # define bcmp(s, d, l) (memcmp((s), (d), (l))) 131966298Seric #endif 132063787Seric 132163949Seric /* general POSIX defines */ 132263949Seric #ifdef _POSIX_VERSION 132364718Seric # define HASSETSID 1 /* has Posix setsid(2) call */ 132464718Seric # define HASWAITPID 1 /* has Posix waitpid(2) call */ 132563949Seric #endif 132663949Seric 132763787Seric /* 132863937Seric ** If no type for argument two of getgroups call is defined, assume 132963937Seric ** it's an integer -- unfortunately, there seem to be several choices 133063937Seric ** here. 133163937Seric */ 133263937Seric 133363937Seric #ifndef GIDSET_T 133463937Seric # define GIDSET_T int 133563937Seric #endif 133663937Seric 133764939Seric /* 133868357Seric ** Tweaking for systems that (for example) claim to be BSD or POSIX 133968357Seric ** but don't have all the standard BSD or POSIX routines (boo hiss). 134064939Seric */ 134164439Seric 134264939Seric #ifdef titan 134364939Seric # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 134464939Seric #endif 134564939Seric 134668357Seric #ifdef _CRAYCOM 134768357Seric # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 134868357Seric #endif 134965830Seric 135068442Seric #ifdef ISC_UNIX 135168442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 135268442Seric #endif 135368357Seric 135468442Seric #ifdef ALTOS_SYS_V 135568442Seric # undef bcopy /* despite SystemV claim, uses BSD bcopy */ 135668442Seric # undef bzero /* despite SystemV claim, uses BSD bzero */ 135768442Seric # undef bcmp /* despite SystemV claim, uses BSD bcmp */ 135868442Seric #endif 135968442Seric 136068442Seric 136165167Seric /* 136265167Seric ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 136365167Seric ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 136465167Seric ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 136565167Seric ** are closed. Some firewalls return this error if you try to connect 136665167Seric ** to the IDENT port (113), so you can't receive email from these hosts 136765167Seric ** on these systems. The firewall really should use a more specific 136865167Seric ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB. If 136965167Seric ** not explicitly set to zero above, default it on. 137065167Seric */ 137164939Seric 137265167Seric #ifndef IDENTPROTO 137365167Seric # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 137465167Seric #endif 137565167Seric 137665211Seric #ifndef HASGETUSERSHELL 137765211Seric # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 137865210Seric #endif 137965167Seric 138065830Seric #ifndef HASFLOCK 138165830Seric # define HASFLOCK 0 /* assume no flock(2) support */ 138265830Seric #endif 138365210Seric 138467430Seric #ifndef HASSETRLIMIT 138567430Seric # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 138667430Seric #endif 138767430Seric 138867430Seric #ifndef HASULIMIT 138967430Seric # define HASULIMIT 0 /* assume no ulimit(2) support */ 139067430Seric #endif 139167430Seric 139266843Seric #ifndef OLD_NEWDB 139366843Seric # define OLD_NEWDB 0 /* assume newer version of newdb */ 139466843Seric #endif 139565830Seric 139668099Seric /* heuristic setting of HASSETSIGMASK; can override above */ 139768099Seric #ifndef HASSIGSETMASK 139868099Seric # ifdef SIGVTALRM 139968099Seric # define HASSETSIGMASK 1 140068099Seric # else 140168099Seric # define HASSETSIGMASK 0 140268099Seric # endif 140368099Seric #endif 140466843Seric 140568705Seric #ifndef UID_T 140668705Seric # define UID_T uid_t 140768705Seric #endif 140868099Seric 140968706Seric #ifndef SIZE_T 141068706Seric # define SIZE_T size_t 141168706Seric #endif 141268706Seric 141368705Seric #ifndef ARGV_T 141468705Seric # define ARGV_T char ** 141568705Seric #endif 141668705Seric 141768705Seric 141864439Seric /********************************************************************** 141959023Seric ** Remaining definitions should never have to be changed. They are 142059023Seric ** primarily to provide back compatibility for older systems -- for 142159287Seric ** example, it includes some POSIX compatibility definitions 142264439Seric **********************************************************************/ 142359023Seric 142459388Seric /* System 5 compatibility */ 142559388Seric #ifndef S_ISREG 142664944Seric # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 142759388Seric #endif 142864944Seric #if !defined(S_ISLNK) && defined(S_IFLNK) 142964944Seric # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 143064944Seric #endif 143168494Seric #ifndef S_IWUSR 143268494Seric # define S_IWUSR 0200 143368494Seric #endif 143459388Seric #ifndef S_IWGRP 143568494Seric # define S_IWGRP 0020 143659388Seric #endif 143759388Seric #ifndef S_IWOTH 143868494Seric # define S_IWOTH 0002 143959388Seric #endif 144059388Seric 144159023Seric /* 144250537Seric ** Older systems don't have this error code -- it should be in 144350537Seric ** /usr/include/sysexits.h. 144450537Seric */ 144550537Seric 144650537Seric # ifndef EX_CONFIG 144750537Seric # define EX_CONFIG 78 /* configuration error */ 144850537Seric # endif 144956852Seric 145064718Seric /* pseudo-code used in server SMTP */ 145164718Seric # define EX_QUIT 22 /* drop out of server immediately */ 145264718Seric 145364718Seric 145463993Seric /* 145563993Seric ** These are used in a few cases where we need some special 145663993Seric ** error codes, but where the system doesn't provide something 145763993Seric ** reasonable. They are printed in errstring. 145863993Seric */ 145963993Seric 146063993Seric #ifndef E_PSEUDOBASE 146163993Seric # define E_PSEUDOBASE 256 146263993Seric #endif 146363993Seric 146463993Seric #define EOPENTIMEOUT (E_PSEUDOBASE + 0) /* timeout on open */ 146563993Seric #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 146663993Seric 146763970Seric /* type of arbitrary pointer */ 146863970Seric #ifndef ARBPTR_T 146963970Seric # define ARBPTR_T void * 147063970Seric #endif 147163970Seric 147260568Seric #ifndef __P 147360568Seric # include "cdefs.h" 147460568Seric #endif 147560568Seric 147667421Seric #if NAMED_BIND 147767421Seric # include <arpa/nameser.h> 147867434Seric # ifdef __svr4__ 147967434Seric # ifdef NOERROR 148067434Seric # undef NOERROR /* avoid compiler conflict with stream.h */ 148167434Seric # endif 148267434Seric # endif 148367421Seric #endif 148467421Seric 148556852Seric /* 148667419Seric ** The size of an IP address -- can't use sizeof because of problems 148767419Seric ** on Crays, where everything is 64 bits. This will break if/when 148867419Seric ** IP addresses are expanded to eight bytes. 148967419Seric */ 149067419Seric 149167421Seric #ifndef INADDRSZ 149267421Seric # define INADDRSZ 4 149367421Seric #endif 149467419Seric 149567419Seric /* 149667421Seric ** The size of various known types -- for reading network protocols. 149767421Seric ** Again, we can't use sizeof because of compiler randomness. 149867421Seric */ 149967421Seric 150067421Seric #ifndef INT16SZ 150167421Seric # define INT16SZ 2 150267421Seric #endif 150367421Seric #ifndef INT32SZ 150467421Seric # define INT32SZ 4 150567421Seric #endif 150667421Seric 150767421Seric /* 150858778Seric ** Do some required dependencies 150958778Seric */ 151058778Seric 151158778Seric #if defined(NETINET) || defined(NETISO) 151259107Seric # define SMTP 1 /* enable user and server SMTP */ 151359107Seric # define QUEUE 1 /* enable queueing */ 151459107Seric # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ 151558778Seric #endif 151658778Seric 151758778Seric 151858778Seric /* 151956852Seric ** Arrange to use either varargs or stdargs 152056852Seric */ 152156852Seric 152256852Seric # ifdef __STDC__ 152356852Seric 152456852Seric # include <stdarg.h> 152556852Seric 152656852Seric # define VA_LOCAL_DECL va_list ap; 152756852Seric # define VA_START(f) va_start(ap, f) 152856852Seric # define VA_END va_end(ap) 152956852Seric 153056852Seric # else 153156852Seric 153256852Seric # include <varargs.h> 153356852Seric 153456852Seric # define VA_LOCAL_DECL va_list ap; 153556852Seric # define VA_START(f) va_start(ap) 153656852Seric # define VA_END va_end(ap) 153756852Seric 153856852Seric # endif 153957631Seric 154057943Seric #ifdef HASUNAME 154157631Seric # include <sys/utsname.h> 154257631Seric # ifdef newstr 154357631Seric # undef newstr 154457631Seric # endif 154557943Seric #else /* ! HASUNAME */ 154657631Seric # define NODE_LENGTH 32 154757631Seric struct utsname 154857631Seric { 154957631Seric char nodename[NODE_LENGTH+1]; 155057631Seric }; 155157943Seric #endif /* HASUNAME */ 155257642Seric 155368040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V) 155463838Seric # define MAXHOSTNAMELEN 256 155557735Seric #endif 155658153Seric 155758153Seric #if !defined(SIGCHLD) && defined(SIGCLD) 155858153Seric # define SIGCHLD SIGCLD 155958153Seric #endif 156058153Seric 156158153Seric #ifndef STDIN_FILENO 156268742Seric # define STDIN_FILENO 0 156358153Seric #endif 156458153Seric 156558153Seric #ifndef STDOUT_FILENO 156668742Seric # define STDOUT_FILENO 1 156758153Seric #endif 156858153Seric 156958153Seric #ifndef STDERR_FILENO 157068742Seric # define STDERR_FILENO 2 157158153Seric #endif 157258689Seric 157364072Seric #ifndef LOCK_SH 157464035Seric # define LOCK_SH 0x01 /* shared lock */ 157564035Seric # define LOCK_EX 0x02 /* exclusive lock */ 157664035Seric # define LOCK_NB 0x04 /* non-blocking lock */ 157764035Seric # define LOCK_UN 0x08 /* unlock */ 157864035Seric #endif 157958692Seric 158068742Seric #ifndef SEEK_SET 158168742Seric # define SEEK_SET 0 158268742Seric # define SEEK_CUR 1 158368742Seric # define SEEK_END 2 158468742Seric #endif 158568742Seric 158664035Seric #ifndef SIG_ERR 158764035Seric # define SIG_ERR ((void (*)()) -1) 158858689Seric #endif 158958702Seric 159064500Seric #ifndef WEXITSTATUS 159164500Seric # define WEXITSTATUS(st) (((st) >> 8) & 0377) 159264500Seric #endif 159364500Seric #ifndef WIFEXITED 159464500Seric # define WIFEXITED(st) (((st) & 0377) == 0) 159564500Seric #endif 159664500Seric 159764561Seric #ifndef SIGFUNC_DEFINED 159864561Seric typedef void (*sigfunc_t) __P((int)); 159964561Seric #endif 160064561Seric 160165053Seric /* size of syslog buffer */ 160265053Seric #ifndef SYSLOG_BUFSIZE 160365053Seric # define SYSLOG_BUFSIZE 1024 160465053Seric #endif 160565053Seric 160658702Seric /* 160758702Seric ** Size of tobuf (deliver.c) 160858702Seric ** Tweak this to match your syslog implementation. It will have to 160958702Seric ** allow for the extra information printed. 161058702Seric */ 161158702Seric 161258702Seric #ifndef TOBUFSIZE 161365053Seric # if (SYSLOG_BUFSIZE) > 512 161465053Seric # define TOBUFSIZE (SYSLOG_BUFSIZE - 256) 161565053Seric # else 161665053Seric # define TOBUFSIZE 256 161765053Seric # endif 161858702Seric #endif 161960219Seric 162065015Seric /* 162165015Seric ** Size of prescan buffer. 162265015Seric ** Despite comments in the _sendmail_ book, this probably should 162365015Seric ** not be changed; there are some hard-to-define dependencies. 162465015Seric */ 162565015Seric 162665015Seric # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 162760219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 162860219Seric # ifndef FORK 162960219Seric # define FORK vfork /* function to call to fork mailer */ 163060219Seric # endif 163165955Seric 163265955Seric /* 163365955Seric ** If we are going to link scanf anyway, use it in readcf 163465955Seric */ 163565955Seric 163665955Seric #if !defined(HASUNAME) && !defined(SCANF) 163765955Seric # define SCANF 1 163865955Seric #endif 1639