xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 68785)
19147Seric /*
234920Sbostic  * Copyright (c) 1983 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*68785Seric  *	@(#)conf.h	8.148 (Berkeley) 04/12/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 */
64*68785Seric # if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB)
65*68785Seric # 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 
7864032Seric /*
7964944Seric **  Most systems have symbolic links today, so default them on.  You
8064944Seric **  can turn them off by #undef'ing this below.
8164944Seric */
8264944Seric 
8364944Seric # define HASLSTAT	1	/* has lstat(2) call */
8464944Seric 
8564962Seric /*
8664962Seric **  General "standard C" defines.
8764962Seric **
8864962Seric **	These may be undone later, to cope with systems that claim to
8964962Seric **	be Standard C but aren't.  Gcc is the biggest offender -- it
9064962Seric **	doesn't realize that the library is part of the language.
9164962Seric **
9264962Seric **	Life would be much easier if we could get rid of this sort
9364962Seric **	of bozo problems.
9464962Seric */
9564962Seric 
9664962Seric #ifdef __STDC__
9764962Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
9864962Seric #endif
9964962Seric 
10063902Seric /**********************************************************************
10159023Seric **  Operating system configuration.
10259023Seric **
10359023Seric **	Unless you are porting to a new OS, you shouldn't have to
10459023Seric **	change these.
10563902Seric **********************************************************************/
10656823Seric 
10763787Seric /*
10863787Seric **  Per-Operating System defines
10963787Seric */
11063787Seric 
11164314Seric 
11263902Seric /*
11365565Seric **  HP-UX -- tested for 8.07, 9.00, and 9.01.
11463902Seric */
11563902Seric 
11667626Seric #ifdef __hpux
11764727Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
11864727Seric # undef m_flags
11963787Seric # define SYSTEM5	1	/* include all the System V defines */
12064035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
12164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
12265982Seric # define setreuid(r, e)		setresuid(r, e, -1)
12368294Seric # define LA_TYPE	LA_SUBR
12465749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
12565354Seric # define GIDSET_T	gid_t
12663962Seric # define _PATH_UNIX	"/hp-ux"
12765354Seric # ifndef _PATH_SENDMAILCF
12865354Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
12965354Seric # endif
13065167Seric # ifndef IDENTPROTO
13165167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
13256823Seric # endif
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
14067626Seric #endif
14156823Seric 
14264314Seric 
14363902Seric /*
14463902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
14563902Seric */
14663902Seric 
14767626Seric #ifdef _AIX3
14864035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
14964840Seric # define HASUNAME	1	/* use System V uname(2) system call */
15065211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
15160219Seric # define FORK		fork	/* no vfork primitive available */
15265749Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
15367771Seric # define SPT_PADCHAR	'\0'	/* pad process title with nulls */
15468145Seric # define LA_TYPE	LA_INT
15567626Seric #endif
15660219Seric 
15764314Seric 
15863902Seric /*
15963902Seric **  Silicon Graphics IRIX
16063902Seric **
16163965Seric **	Compiles on 4.0.1.
16267967Seric **
16368686Seric **	Use IRIX64 instead of IRIX for 64-bit IRIX (6.0).
16468686Seric **	Use IRIX5 instead of IRIX for IRIX 5.x.
16567967Seric **
16667967Seric **	IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
16768686Seric **	IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>.
16863902Seric */
16963902Seric 
17068686Seric #if defined(IRIX64) || defined(IRIX5)
17167967Seric # define IRIX
17267967Seric #endif
17367967Seric 
17467626Seric #ifdef IRIX
17566763Seric # define SYSTEM5	1	/* this is a System-V derived system */
17664035Seric # define HASSETREUID	1	/* has setreuid(2) call */
17764035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
17865211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
17963753Seric # define FORK		fork	/* no vfork primitive available */
18068686Seric # if !defined(IRIX64) && !defined(IRIX5)
18168225Seric #  define WAITUNION	1	/* use "union wait" as wait argument type */
18268225Seric # endif
18364155Seric # define setpgid	BSDsetpgrp
18463937Seric # define GIDSET_T	gid_t
18568705Seric # define ARGV_T		const char **
18665749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
18768439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
18866763Seric # define LA_TYPE	LA_INT
18967967Seric # ifdef IRIX64
19067967Seric #  define NAMELISTMASK	0x7fffffffffffffff	/* mask for nlist() values */
19167967Seric # else
19267967Seric #  define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
19367967Seric # endif
19467626Seric #endif
19563753Seric 
19663902Seric 
19763902Seric /*
19864813Seric **  SunOS and Solaris
19964813Seric **
20064813Seric **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
20164813Seric **	Solaris 2.2 (a.k.a. SunOS 5.2).
20263902Seric */
20363902Seric 
20463787Seric #if defined(sun) && !defined(BSD)
20559074Seric 
20664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
20764813Seric # define HASUNAME	1	/* use System V uname(2) system call */
20865211Seric # define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
20965749Seric # define LA_TYPE	LA_INT
21060564Seric 
21164842Seric # ifdef SOLARIS_2_3
21268486Seric #  define SOLARIS		/* for back compat only -- use -DSOLARIS=203 */
21364842Seric # endif
21464842Seric 
21560602Seric # ifdef SOLARIS
21663902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
21765222Seric #  ifndef __svr4__
21865222Seric #   define __svr4__		/* use all System V Releae 4 defines below */
21965222Seric #  endif
22063787Seric #  include <sys/time.h>
22165172Seric #  define GIDSET_T	gid_t
22265189Seric #  ifndef _PATH_UNIX
22367129Seric #   define _PATH_UNIX	"/dev/ksyms"
22465189Seric #  endif
22563962Seric #  ifndef _PATH_SENDMAILCF
22663962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
22764072Seric #  endif
22864072Seric #  ifndef _PATH_SENDMAILPID
22963962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
23063962Seric #  endif
23166022Seric #  ifndef SYSLOG_BUFSIZE
23266022Seric #   define SYSLOG_BUFSIZE	1024	/* allow full size syslog buffer */
23366022Seric #  endif
23463787Seric 
23560602Seric # else
23665105Seric 			/* SunOS 4.0.3 or 4.1.x */
23765189Seric #  define HASSETREUID	1	/* has setreuid(2) call */
23865830Seric #  ifndef HASFLOCK
23965830Seric #   define HASFLOCK	1	/* has flock(2) call */
24065830Seric #  endif
24165749Seric #  define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
24260564Seric #  include <vfork.h>
24363787Seric 
24465105Seric #  ifdef SUNOS403
24565105Seric 			/* special tweaking for SunOS 4.0.3 */
24665105Seric #   include <malloc.h>
24765105Seric #   define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
24865105Seric #   define WAITUNION	1	/* use "union wait" as wait argument type */
24965105Seric #   undef WIFEXITED
25065105Seric #   undef WEXITSTATUS
25165105Seric #   undef HASUNAME
25265105Seric #   define setpgid	setpgrp
25365105Seric typedef int		pid_t;
25465105Seric extern char		*getenv();
25565105Seric 
25666732Seric #  else
25766732Seric 			/* 4.1.x specifics */
25866732Seric #   define HASSETSID	1	/* has Posix setsid(2) call */
25966732Seric #   define HASSETVBUF	1	/* we have setvbuf(3) in libc */
26066732Seric 
26165105Seric #  endif
26260564Seric # endif
26359023Seric #endif
26459023Seric 
26564718Seric /*
26664813Seric **  DG/UX
26764813Seric **
26867427Seric **	Tested on 5.4.2 and 5.4.3.  Use DGUX_5_4_2 to get the
26967427Seric **	older support.
27067427Seric **	5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
27164718Seric */
27264314Seric 
27367427Seric #ifdef DGUX_5_4_2
27467427Seric # define DGUX		1
27567427Seric #endif
27667427Seric 
27764718Seric #ifdef	DGUX
27864718Seric # define SYSTEM5	1
27964718Seric # define LA_TYPE	LA_SUBR
28064718Seric # define HASSETREUID	1	/* has setreuid(2) call */
28164718Seric # define HASUNAME	1	/* use System V uname(2) system call */
28264718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
28364718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
28466036Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) */
28565167Seric # ifndef IDENTPROTO
28665167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
28765167Seric # endif
28867771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
28965749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
29064813Seric 
29164813Seric /* these include files must be included early on DG/UX */
29264813Seric # include <netinet/in.h>
29364813Seric # include <arpa/inet.h>
29464813Seric 
29567427Seric # ifdef DGUX_5_4_2
29667427Seric #  define inet_addr	dgux_inet_addr
29764718Seric extern long	dgux_inet_addr();
29867427Seric # endif
29964718Seric #endif
30064718Seric 
30164718Seric 
30263902Seric /*
30363902Seric **  Digital Ultrix 4.2A or 4.3
30464264Seric **
30564264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
30664264Seric **	not dropped when the process exits.  This causes major problems,
30764264Seric **	so flock is the only alternative.
30863902Seric */
30963902Seric 
31060564Seric #ifdef ultrix
31164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
31263962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
31364035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
31466242Seric # define HASUNAME	1	/* use System V uname(2) system call */
31565830Seric # ifndef HASFLOCK
31665830Seric #  define HASFLOCK	1	/* has flock(2) call */
31765830Seric # endif
31865211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
31966318Seric # define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
32065135Seric # ifdef vax
32165135Seric #  define LA_TYPE	LA_FLOAT
32265135Seric # else
32365135Seric #  define LA_TYPE	LA_INT
32465135Seric #  define LA_AVENRUN	"avenrun"
32565135Seric # endif
32665749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
32765167Seric # ifndef IDENTPROTO
32865167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
32965167Seric # endif
33060564Seric #endif
33160564Seric 
33264314Seric 
33363902Seric /*
33468072Seric **  OSF/1 for Intel Paragon.
33568072Seric **
33668082Seric **	Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
33768082Seric **	of Intel Scalable Systems Divison.
33868072Seric */
33968072Seric 
34068072Seric #ifdef __PARAGON__
34168072Seric # define __osf__	1	/* get OSF/1 defines below */
34268072Seric # ifndef _PATH_SENDMAILCF
34368072Seric #  define _PATH_SENDMAILCF	"/var/adm/sendmail/sendmail.cf"
34468072Seric # endif
34568072Seric #endif
34668072Seric 
34768072Seric 
34868072Seric /*
34963902Seric **  OSF/1 (tested on Alpha)
35063902Seric */
35163902Seric 
35263787Seric #ifdef __osf__
35363962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
35464035Seric # define HASSETREUID	1	/* has setreuid(2) call */
35564035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
35666226Seric # ifndef HASFLOCK
35765830Seric #  define HASFLOCK	1	/* has flock(2) call */
35865830Seric # endif
35963962Seric # define LA_TYPE	LA_INT
36065749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
36164813Seric # ifndef _PATH_SENDMAILPID
36265504Seric #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
36364813Seric # endif
36459287Seric #endif
36559287Seric 
36664314Seric 
36763902Seric /*
36863902Seric **  NeXTstep
36963902Seric */
37063902Seric 
37164076Seric #ifdef NeXT
37264035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
37365830Seric # ifndef HASFLOCK
37465830Seric #  define HASFLOCK	1	/* has flock(2) call */
37565830Seric # endif
37664125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
37764563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
37868705Seric # define UID_T		int	/* compiler gripes on uid_t */
37963753Seric # define sleep		sleepX
38064155Seric # define setpgid	setpgrp
38164295Seric # ifndef LA_TYPE
38264295Seric #  define LA_TYPE	LA_MACH
38364295Seric # endif
38465749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
38564500Seric # ifndef _POSIX_SOURCE
38664035Seric typedef int		pid_t;
38764500Seric #  undef WEXITSTATUS
38864500Seric #  undef WIFEXITED
38964500Seric # endif
39064072Seric # ifndef _PATH_SENDMAILCF
39164072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
39264072Seric # endif
39364072Seric # ifndef _PATH_SENDMAILPID
39464072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
39564072Seric # endif
39659288Seric #endif
39759288Seric 
39864314Seric 
39963902Seric /*
40063962Seric **  4.4 BSD
40164831Seric **
40264831Seric **	See also BSD defines.
40363902Seric */
40463902Seric 
40560568Seric #ifdef BSD4_4
40664072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
40760568Seric # include <sys/cdefs.h>
40863838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
40964072Seric # ifndef LA_TYPE
41064072Seric #  define LA_TYPE	LA_SUBR
41164072Seric # endif
41265749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
41367771Seric # define SPT_TYPE	SPT_PSSTRINGS	/* use PS_STRINGS pointer */
41460568Seric #endif
41560568Seric 
41664314Seric 
41763902Seric /*
41865982Seric **  BSD/386 (all versions)
41965982Seric **	From Tony Sanders, BSDI
42065982Seric */
42165982Seric 
42265982Seric #ifdef __bsdi__
42365982Seric # define HASUNSETENV	1	/* has the unsetenv(3) call */
42465982Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
42566843Seric # include <sys/cdefs.h>
42666843Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
42766030Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
42866843Seric # ifndef LA_TYPE
42966843Seric #  define LA_TYPE	LA_SUBR
43066843Seric # endif
43168753Seric # define GIDSET_T	gid_t
43265982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
43366843Seric 			/* version 1.1 or later */
43467771Seric #  undef SPT_TYPE
43567771Seric #  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
43666843Seric # else
43766843Seric 			/* version 1.0 or earlier */
43866843Seric #  ifndef OLD_NEWDB
43966843Seric #   define OLD_NEWDB	1	/* old version of newdb library */
44066843Seric #  endif
44167771Seric #  define SPT_PADCHAR	'\0'	/* pad process title with nulls */
44265982Seric # endif
44365982Seric #endif
44465982Seric 
44565982Seric 
44665982Seric 
44765982Seric /*
44865049Seric **  386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
44964733Seric **
45064733Seric **  4.3BSD clone, closer to 4.4BSD
45164831Seric **
45264831Seric **	See also BSD defines.
45364733Seric */
45464733Seric 
45565049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
45664733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
45764733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
45866754Seric # ifdef __NetBSD__
45966754Seric #  define HASUNAME	1	/* has uname(2) syscall */
46066754Seric # endif
46164733Seric # include <sys/cdefs.h>
46264733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
46364733Seric # ifndef LA_TYPE
46464733Seric #  define LA_TYPE	LA_SUBR
46564733Seric # endif
46665749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
46764733Seric #endif
46864733Seric 
46964733Seric 
47064733Seric /*
47164813Seric **  Mach386
47264813Seric **
47364813Seric **	For mt Xinu's Mach386 system.
47464813Seric */
47564813Seric 
47664813Seric #if defined(MACH) && defined(i386)
47764813Seric # define MACH386	1
47864813Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
47964813Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
48066226Seric # ifndef HASFLOCK
48165830Seric #  define HASFLOCK	1	/* has flock(2) call */
48265830Seric # endif
48364813Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
48464813Seric # define NEEDSTRTOL	1	/* need the strtol() function */
48564813Seric # define setpgid	setpgrp
48664813Seric # ifndef LA_TYPE
48764813Seric #  define LA_TYPE	LA_FLOAT
48864813Seric # endif
48965749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
49064962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
49164813Seric # undef WEXITSTATUS
49264813Seric # undef WIFEXITED
49364813Seric # ifndef _PATH_SENDMAILCF
49464813Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
49564813Seric # endif
49664813Seric # ifndef _PATH_SENDMAILPID
49764813Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
49864813Seric # endif
49964813Seric #endif
50064813Seric 
50164813Seric 
50264813Seric /*
50363969Seric **  4.3 BSD -- this is for very old systems
50463969Seric **
50565949Seric **	Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
50665949Seric **
50763969Seric **	You'll also have to install a new resolver library.
50863969Seric **	I don't guarantee that support for this environment is complete.
50963969Seric */
51063969Seric 
51165949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
51263969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
51363969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
51463970Seric # define ARBPTR_T	char *
51564155Seric # define setpgid	setpgrp
51663969Seric # ifndef LA_TYPE
51763969Seric #  define LA_TYPE	LA_FLOAT
51863969Seric # endif
51963969Seric # ifndef _PATH_SENDMAILCF
52063969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
52163969Seric # endif
52265167Seric # ifndef IDENTPROTO
52365167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
52465167Seric # endif
52564834Seric # undef WEXITSTATUS
52664834Seric # undef WIFEXITED
52764834Seric typedef short		pid_t;
52864834Seric extern int		errno;
52963969Seric #endif
53063969Seric 
53164314Seric 
53263969Seric /*
53363902Seric **  SCO Unix
53465087Seric **
53565087Seric **	This includes two parts -- the first is for SCO Open Server 3.2v4
53665087Seric **	(contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
53765087Seric **	The second is, I believe, for an older version.
53863902Seric */
53963902Seric 
54065087Seric #ifdef _SCO_unix_4_2
54165087Seric # define _SCO_unix_
54265087Seric # define HASSETREUID	1	/* has setreuid(2) call */
54366757Seric # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
54465087Seric # define _PATH_UNIX	"/unix"
54565087Seric # ifndef _PATH_SENDMAILCF
54665087Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
54765087Seric # endif
54865087Seric # ifndef _PATH_SENDMAILPID
54965087Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
55065087Seric # endif
55165087Seric #endif
55265087Seric 
55363838Seric #ifdef _SCO_unix_
55463838Seric # define SYSTEM5	1	/* include all the System V defines */
55564035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
55665212Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
55763838Seric # define FORK		fork
55863838Seric # define MAXPATHLEN	PATHSIZE
55964718Seric # define LA_TYPE	LA_SHORT
56067812Seric # define SFS_TYPE	SFS_4ARGS	/* use <sys/statfs.h> 4-arg impl */
56168439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
56267608Seric # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
56364813Seric # undef NETUNIX			/* no unix domain socket support */
56463838Seric #endif
56563838Seric 
56664314Seric 
56763962Seric /*
56868442Seric **  ISC (SunSoft) Unix.
56968442Seric **
57068442Seric **	Contributed by J.J. Bailey <jjb@jagware.bcc.com>
57168442Seric */
57268442Seric 
57368442Seric #ifdef ISC_UNIX
57468442Seric # include <net/errno.h>
57568442Seric # define SYSTEM5	1	/* include all the System V defines */
57668442Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
57768442Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
57868442Seric # define HASSETREUID	1	/* has setreuid(2) call */
57968442Seric # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
58068442Seric # undef NETUNIX			/* no unix domain socket support */
58168442Seric # define FORK		fork
58268442Seric # define MAXPATHLEN	1024
58368442Seric # define LA_TYPE	LA_SHORT
58468442Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
58568442Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
58668442Seric # define _PATH_UNIX	"/unix"
58768442Seric # ifndef _PATH_SENDMAILCF
58868442Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
58968442Seric # endif
59068442Seric # ifndef _PATH_SENDMAILPID
59168442Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
59268442Seric # endif
59368442Seric 
59468442Seric typedef short		pid_t;
59568442Seric 
59668442Seric #endif
59768442Seric 
59868442Seric 
59968442Seric /*
60068040Seric **  Altos System V.
60168040Seric **	Contributed by Tim Rice <timr@crl.com>.
60268040Seric */
60368040Seric 
60468040Seric #ifdef ALTOS_SYS_V
60568040Seric # include <limits.h>
60668040Seric # define SYSTEM5	1	/* include all the System V defines */
60768040Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
60868040Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
60968040Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
61068040Seric # define NEEDFSYNC	1	/* no fsync(2) in system library */
61168040Seric # define FORK		fork
61268040Seric # define MAXPATHLEN	PATHSIZE
61368040Seric # define LA_TYPE	LA_SHORT
61468040Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
61568439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
61668040Seric # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
61768040Seric # undef NETUNIX			/* no unix domain socket support */
61868040Seric # undef WIFEXITED
61968040Seric # undef WEXITSTATUS
62068040Seric # define strtoul	strtol	/* gcc library bogosity */
62168040Seric 
62268040Seric typedef unsigned short	uid_t;
62368040Seric typedef unsigned short	gid_t;
62468040Seric typedef short		pid_t;
62568040Seric #endif
62668040Seric 
62768040Seric 
62868040Seric /*
62963962Seric **  ConvexOS 11.0 and later
63065949Seric **
63165949Seric **	"Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
63265949Seric **	works on 9.1 as well.
63363962Seric */
63463962Seric 
63563962Seric #ifdef _CONVEX_SOURCE
63663977Seric # define BSD		1	/* include all the BSD defines */
63763977Seric # define HASUNAME	1	/* use System V uname(2) system call */
63863962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
63963977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
64063962Seric # define LA_TYPE	LA_FLOAT
64165749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
64265949Seric # ifndef _PATH_SENDMAILCF
64365949Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
64465949Seric # endif
64565949Seric # ifndef S_IREAD
64665949Seric #  define S_IREAD	_S_IREAD
64765949Seric #  define S_IWRITE	_S_IWRITE
64865949Seric #  define S_IEXEC	_S_IEXEC
64965949Seric #  define S_IFMT	_S_IFMT
65065949Seric #  define S_IFCHR	_S_IFCHR
65165949Seric #  define S_IFBLK	_S_IFBLK
65265949Seric # endif
65365167Seric # ifndef IDENTPROTO
65465167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
65565167Seric # endif
65663962Seric #endif
65763962Seric 
65864314Seric 
65963962Seric /*
66064999Seric **  RISC/os 4.52
66163962Seric **
66264999Seric **	Gives a ton of warning messages, but otherwise compiles.
66363962Seric */
66463962Seric 
66563965Seric #ifdef RISCOS
66664999Seric 
66763962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
66866226Seric # ifndef HASFLOCK
66965830Seric #  define HASFLOCK	1	/* has flock(2) call */
67065830Seric # endif
67164999Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
67264999Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
67363962Seric # define LA_TYPE	LA_INT
67463962Seric # define LA_AVENRUN	"avenrun"
67563962Seric # define _PATH_UNIX	"/unix"
67664999Seric # undef WIFEXITED
67764999Seric 
67864999Seric # define setpgid	setpgrp
67964999Seric 
68064999Seric extern int		errno;
68164999Seric typedef int		pid_t;
68264999Seric #define			SIGFUNC_DEFINED
68364999Seric typedef int		(*sigfunc_t)();
68464999Seric extern char		*getenv();
68564999Seric extern void		*malloc();
68664999Seric 
68763962Seric #endif
68863962Seric 
68964314Seric 
69064155Seric /*
69164155Seric **  Linux 0.99pl10 and above...
69266300Seric **
69366300Seric **  Thanks to, in reverse order of contact:
69466300Seric **
69568093Seric **	John Kennedy <warlock@csuchico.edu>
69667885Seric **	Andrew Pam <avatar@aus.xanadu.com>
69766300Seric **	Florian La Roche <rzsfl@rz.uni-sb.de>
69866300Seric **	Karl London <karl@borg.demon.co.uk>
69966300Seric **
70068093Seric **  Last compiled against:	[12/14/94 @ 11:38:41 PM (Wednesday)]
70168093Seric **	sendmail 8.7.a.5	named 4.9.3-beta12-p1	db-1.85
70268093Seric **	gcc 2.6.2		libc.so.4.6.20
70368093Seric **	slackware 2.1.0		linux 1.1.70
70464155Seric */
70564155Seric 
70664770Seric #ifdef __linux__
70766298Seric # define BSD		1	/* include BSD defines */
70864155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
70966298Seric # define HASUNAME	1	/* use System V uname(2) system call */
71064380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
71166298Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
71266300Seric # define GIDSET_T	gid_t	/* from <linux/types.h> */
71367885Seric # define HASGETUSERSHELL 0	/* getusershell(3) broken in Slackware 2.0 */
71468518Seric # ifndef HASFLOCK
71568518Seric #  define HASFLOCK	0	/* flock(2) is broken after 0.99.13 */
71668518Seric # endif
71764155Seric # ifndef LA_TYPE
71866301Seric #  define LA_TYPE	LA_PROCSTR
71964155Seric # endif
72066300Seric # define SFS_TYPE	SFS_VFS		/* use <sys/vfs.h> statfs() impl */
72168093Seric # ifndef _PATH_SENDMAILPID
72268093Seric #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
72368093Seric # endif
72468093Seric # define TZ_TYPE	TZ_TNAME
72564763Seric # include <sys/sysmacros.h>
72666300Seric # undef atol			/* wounded in <stdlib.h> */
72764155Seric #endif
72864155Seric 
72964155Seric 
73064345Seric /*
73164345Seric **  DELL SVR4 Issue 2.2, and others
73264345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
73364345Seric **
73464345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
73564345Seric **	defined, and the definitions conflict.
73664924Seric **
73764924Seric **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
73864924Seric **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
73964924Seric **	(SVR4.0/386 version 3.0).
74064345Seric */
74164345Seric 
74264345Seric #ifdef DELL_SVR4
74365189Seric 				/* no changes necessary */
74465189Seric 				/* see general __svr4__ defines below */
74564345Seric #endif
74664345Seric 
74764345Seric 
74864380Seric /*
74964380Seric **  Apple A/UX 3.0
75064380Seric */
75164345Seric 
75264380Seric #ifdef _AUX_SOURCE
75364729Seric # include <sys/sysmacros.h>
75464380Seric # define BSD			/* has BSD routines */
75564380Seric # define HASUNAME	1	/* use System V uname(2) system call */
75664380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
75764561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
75865167Seric # ifndef IDENTPROTO
75965167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
76065167Seric # endif
76164380Seric # define FORK		fork
76264380Seric # ifndef _PATH_SENDMAILCF
76364380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
76464380Seric # endif
76564380Seric # ifndef LA_TYPE
76664380Seric #  define LA_TYPE	LA_ZERO
76764380Seric # endif
76865749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
76964560Seric # undef WIFEXITED
77064560Seric # undef WEXITSTATUS
77164380Seric #endif
77264380Seric 
77364380Seric 
77464705Seric /*
77564705Seric **  Encore UMAX V
77664705Seric **
77764705Seric **	Not extensively tested.
77864705Seric */
77964380Seric 
78064705Seric #ifdef UMAXV
78164705Seric # include <limits.h>
78264705Seric # define HASUNAME	1	/* use System V uname(2) system call */
78364705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
78464705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
78565211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
78664705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
78764705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
78864705Seric # define FORK		fork	/* no vfork(2) primitive available */
78965749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
79064705Seric # define MAXPATHLEN	PATH_MAX
79164705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
79264705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
79364705Seric # undef WIFEXITED
79464705Seric # undef WEXITSTATUS
79564705Seric #endif
79664705Seric 
79764705Seric 
79864939Seric /*
79964939Seric **  Stardent Titan 3000 running TitanOS 4.2.
80064939Seric **
80164939Seric **	Must be compiled in "cc -43" mode.
80264939Seric **
80364944Seric **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
80464939Seric **
80564939Seric **	Note the tweaking below after the BSD defines are set.
80664939Seric */
80764705Seric 
80864939Seric #ifdef titan
80964939Seric # define setpgid	setpgrp
81064939Seric typedef int		pid_t;
81164939Seric # undef WIFEXITED
81264939Seric # undef WEXITSTATUS
81364939Seric #endif
81464939Seric 
81564939Seric 
81664962Seric /*
81764962Seric **  Sequent DYNIX 3.2.0
81864962Seric **
81964962Seric **	From Jim Davis <jdavis@cs.arizona.edu>.
82064962Seric */
82164939Seric 
82264962Seric #ifdef sequent
82366038Seric 
82464962Seric # define BSD		1
82564962Seric # define HASUNSETENV	1
82664962Seric # define BSD4_3		1	/* to get signal() in conf.c */
82764962Seric # define WAITUNION	1
82864962Seric # define LA_TYPE	LA_FLOAT
82964962Seric # ifdef	_POSIX_VERSION
83064962Seric #  undef _POSIX_VERSION		/* set in <unistd.h> */
83164962Seric # endif
83264962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
83364962Seric # define setpgid	setpgrp
83464962Seric 
83564962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
83664962Seric # undef	WIFEXITED
83764962Seric # define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
83864962Seric 			 ((union wait*)&(s))->w_termsig == 0)
83964962Seric # define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
84064962Seric typedef int		pid_t;
84164962Seric # define isgraph(c)	(isprint(c) && (c != ' '))
84264962Seric 
84366144Seric # ifndef IDENTPROTO
84466144Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
84566144Seric # endif
84666144Seric 
84764962Seric # ifndef _PATH_UNIX
84864962Seric #  define _PATH_UNIX	"/dynix"
84964962Seric # endif
85064962Seric # ifndef _PATH_SENDMAILCF
85164962Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
85264962Seric # endif
85364962Seric 
85464962Seric #endif
85564962Seric 
85664962Seric 
85765748Seric /*
85866038Seric **  Sequent DYNIX/ptx v2.0 (and higher)
85966038Seric **
86066038Seric **	For DYNIX/ptx v1.x, undefine HASSETREUID.
86166038Seric **
86266038Seric **	From Tim Wright <timw@sequent.com>.
86366038Seric */
86466038Seric 
86566038Seric #ifdef _SEQUENT_
86666038Seric # define SYSTEM5	1	/* include all the System V defines */
86766038Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
86866038Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
86966038Seric # define HASSETREUID	1	/* has setreuid(2) call */
87066038Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
87166038Seric # define GIDSET_T	gid_t
87266038Seric # define LA_TYPE	LA_INT
87366038Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
87467771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
87566144Seric # ifndef IDENTPROTO
87666144Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
87766144Seric # endif
87866038Seric # ifndef _PATH_SENDMAILCF
87966038Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
88066038Seric # endif
88166038Seric # ifndef _PATH_SENDMAILPID
88266038Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
88366038Seric # endif
88466038Seric #endif
88566038Seric 
88666038Seric 
88766038Seric /*
88865748Seric **  Cray Unicos
88965748Seric **
89065748Seric **	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
89165748Seric */
89264962Seric 
89365748Seric #ifdef UNICOS
89465748Seric # define SYSTEM5	1	/* include all the System V defines */
89565748Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
89665748Seric # define MAXPATHLEN	PATHSIZE
89765748Seric # define LA_TYPE	LA_ZERO
89865749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
89968439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
90065748Seric #endif
90164962Seric 
90265748Seric 
90365820Seric /*
90465820Seric **  Apollo DomainOS
90565820Seric **
90665820Seric **  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
90765982Seric **
90865820Seric **  15 Jan 1994
90965820Seric **
91065820Seric */
91165748Seric 
91265820Seric #ifdef apollo
91365820Seric # define HASSETREUID	1	/* has setreuid(2) call */
91465820Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
91567771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
91665820Seric # define LA_TYPE	LA_SUBR		/* use getloadavg.c */
91766044Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
91868439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
91965820Seric # ifndef _PATH_SENDMAILCF
92065820Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
92165820Seric # endif
92265820Seric # ifndef _PATH_SENDMAILPID
92365820Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
92465820Seric # endif
92565820Seric # undef  S_IFSOCK		/* S_IFSOCK and S_IFIFO are the same */
92665820Seric # undef  S_IFIFO
92765820Seric # define S_IFIFO	0010000
92865820Seric # ifndef IDENTPROTO
92965820Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
93065820Seric # endif
93165982Seric #endif
93265820Seric 
93365820Seric 
93466748Seric /*
93567745Seric **  UnixWare 1.1.2.
93666752Seric **
93766752Seric **	From Evan Champion <evanc@spatial.synapse.org>.
93866752Seric */
93966752Seric 
94066752Seric #ifdef UNIXWARE
94166752Seric # define SYSTEM5		1
94267745Seric # define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
94367745Seric # define HASGETDTABLESIZE	1
94467745Seric # define HASSETREUID		1
94567745Seric # define HASSETSID		1
94667745Seric # define HASINITGROUPS		1
94767745Seric # define GIDSET_T		gid_t
94867745Seric # define SLEEP_T		unsigned
94966752Seric # define SFS_TYPE		SFS_STATVFS
95066752Seric # define LA_TYPE		LA_ZERO
95166752Seric # undef WIFEXITED
95266752Seric # undef WEXITSTATUS
95366752Seric # define _PATH_UNIX		"/unix"
95466752Seric # ifndef _PATH_SENDMAILCF
95566752Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
95666752Seric # endif
95766752Seric # ifndef _PATH_SENDMAILPID
95866752Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
95966752Seric # endif
96066752Seric # define SYSLOG_BUFSIZE	128
96166752Seric #endif
96266752Seric 
96366752Seric 
96466752Seric /*
96566748Seric **  Intergraph CLIX 3.1
96666748Seric **
96766748Seric **	From Paul Southworth <pauls@locust.cic.net>
96866748Seric */
96965820Seric 
97066748Seric #ifdef CLIX
97166748Seric # define SYSTEM5	1	/* looks like System V */
97266752Seric # ifndef HASGETUSERSHELL
97366752Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
97466752Seric # endif
97566748Seric # define DEV_BSIZE	512	/* device block size not defined */
97666748Seric # define GIDSET_T	gid_t
97766748Seric # undef LOG			/* syslog not available */
97866748Seric # define NEEDFSYNC	1	/* no fsync in system library */
97966748Seric # define GETSHORT	_getshort
98066748Seric #endif
98165820Seric 
98266748Seric 
98366776Seric /*
98466776Seric **  NCR 3000 Series (SysVr4)
98566776Seric **
98667434Seric **	From Kevin Darcy <kevin@tech.mis.cfc.com>.
98766776Seric */
98866748Seric 
98966776Seric #ifdef NCR3000
99066776Seric # define __svr4__
99166776Seric # undef BSD
99266776Seric # define LA_AVENRUN	"avenrun"
99366776Seric #endif
99466748Seric 
99566776Seric 
99667434Seric /*
99767434Seric **  Tandem NonStop-UX SVR4
99867434Seric **
99967434Seric **	From Rick McCarty <mccarty@mpd.tandem.com>.
100067434Seric */
100166776Seric 
100267434Seric #ifdef NonStop_UX_BXX
100367434Seric # define __svr4__
100467434Seric #endif
100566776Seric 
100667434Seric 
100767488Seric /*
100867488Seric **  Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.
100967488Seric **
101067488Seric **	Tested for 1.04 and 1.03
101167488Seric **	From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
101267488Seric */
101367434Seric 
101467488Seric #ifdef __H3050R
101567488Seric # define SYSTEM5	1	/* include all the System V defines */
101667488Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
101767488Seric # define setreuid(r, e)	setresuid(r, e, -1)
101867488Seric # define LA_TYPE	LA_FLOAT
101967488Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
102067488Seric # define HASSETVBUF	/* HI-UX has no setlinebuf */
102167488Seric # ifndef GIDSET_T
102267488Seric #  define GIDSET_T	gid_t
102367488Seric # endif
102467488Seric # ifndef _PATH_UNIX
102567488Seric #  define _PATH_UNIX	"/HI-UX"
102667488Seric # endif
102767488Seric # ifndef _PATH_SENDMAILCF
102867488Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
102967488Seric # endif
103067488Seric # ifndef IDENTPROTO
103167488Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
103267488Seric # endif
103367488Seric # ifndef HASGETUSERSHELL
103467488Seric #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
103567488Seric # endif
103667488Seric 
103767488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */
103867488Seric # undef m_flags
103967488Seric 
104067488Seric # ifdef __STDC__
104167488Seric extern int	syslog(int, char *, ...);
104267488Seric # endif
104367488Seric 
104467488Seric #endif
104567488Seric 
104667488Seric 
104768099Seric /*
104868099Seric **  Amdahl UTS System V 2.1.5 (SVr3-based)
104968099Seric **
105068099Seric **    From: Janet Jackson <janet@dialix.oz.au>.
105168099Seric */
105267488Seric 
105368099Seric #ifdef _UTS
105468099Seric # include <sys/sysmacros.h>
105568099Seric # undef HASLSTAT	/* has symlinks, but they cause problems */
105668099Seric # define NEEDFSYNC	1	/* system fsync(2) fails on non-EFS filesys */
105768099Seric # define SYS5SIGNALS	1	/* System V signal semantics */
105868099Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
105968099Seric # define HASUNAME	1	/* use System V uname(2) system call */
106068099Seric # define HASINITGROUPS	1	/* has initgroups(3) function */
106168099Seric # define HASSETVBUF	1	/* has setvbuf(3) function */
106268099Seric # define HASSIGSETMASK	0	/* does not have sigsetmask(2) function */
106368099Seric # ifndef HASGETUSERSHELL
106468099Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) function */
106568099Seric # endif
106668099Seric # define GIDSET_T	gid_t	/* type of 2nd arg to getgroups(2) isn't int */
106768099Seric # define LA_TYPE	LA_ZERO		/* doesn't have load average */
106868099Seric # define SFS_TYPE	SFS_4ARGS	/* use 4-arg statfs() */
106968439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
107068099Seric # define _PATH_UNIX	"/unix"
107168099Seric # ifndef _PATH_SENDMAILCF
107268099Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
107368099Seric # endif
107468099Seric #endif
107568099Seric 
107668357Seric /*
107768357Seric **  Cray Computer Corporation's CSOS
107868357Seric **
107968357Seric **	Contributed by Scott Bolte <scott@craycos.com>.
108068357Seric */
108168099Seric 
108268357Seric #ifdef _CRAYCOM
108368357Seric # define SYSTEM5	1	/* include all the System V defines */
108468357Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
108568357Seric # define NEEDFSYNC	1	/* no fsync in system library */
108668357Seric # define MAXPATHLEN	PATHSIZE
108768357Seric # define LA_TYPE	LA_ZERO
108868357Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
108968439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
109068357Seric # define _POSIX_CHOWN_RESTRICTED	-1
109168357Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
109268357Seric #endif
109368099Seric 
109468099Seric 
109568742Seric /*
109668742Seric **  Sony NEWS-OS 4.2.1R and 6.0.3
109768742Seric */
109868742Seric 
109968742Seric #ifdef sony_news
110068742Seric # ifndef __svr4
110168742Seric 			/* NEWS-OS 4.2.1R */
110268742Seric #  ifndef BSD
110368742Seric #   define BSD			/* has BSD routines */
110468742Seric #  endif
110568742Seric #  define HASUNSETENV	1	/* has unsetenv(2) call */
110668742Seric #  undef HASSETVBUF		/* don't actually have setvbuf(3) */
110768742Seric #  define WAITUNION	1	/* use "union wait" as wait argument type */
110868742Seric #  define LA_TYPE	LA_INT
110968742Seric #  define SFS_TYPE	SFS_VFS /* use <sys/vfs.h> statfs() implementation */
111068742Seric #  ifndef HASFLOCK
111168742Seric #   define HASFLOCK	1	/* has flock(2) call */
111268742Seric #  endif
111368742Seric #  define setpgid	setpgrp
111468742Seric #  undef WIFEXITED
111568742Seric #  undef WEXITSTATUS
111668742Seric typedef int		pid_t;
111768742Seric typedef int		(*sigfunc_t)();
111868742Seric #  define SIGFUNC_DEFINED
111968742Seric 
112068742Seric # else
112168742Seric 			/* NEWS-OS 6.0.3 with /bin/cc */
112268742Seric #  define SYSTEM5	1	/* include all the System V defines */
112368742Seric #  define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
112468742Seric #  define HASINITGROUPS	1	/* has initgroups(3) call */
112568742Seric #  define HASSETREUID	1	/* has setreuid(2) call */
112668742Seric #  define HASSETSID	1	/* has Posix setsid(2) call */
112768742Seric #  define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
112868742Seric #  define LA_TYPE	LA_INT
112968742Seric #  define SFS_TYPE	SFS_STATVFS	/* use <sys/statvfs.h> statvfs() impl */
113068742Seric #  define GIDSET_T	gid_t
113168742Seric #  define setreuid(r, e)	seteuid(e)
113268742Seric #  undef WIFEXITED
113368742Seric #  undef WEXITSTATUS
113468742Seric #  define _PATH_UNIX  "/stand/unix"
113568742Seric #  ifndef _PATH_SENDMAILCF
113668742Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
113768742Seric #  endif
113868742Seric #  ifndef _PATH_SENDMAILPID
113968742Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
114068742Seric #  endif
114168742Seric 
114268742Seric # endif
114368742Seric #endif
114468742Seric 
114568742Seric 
114668742Seric /*
114768742Seric **  Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach
114868742Seric */
114968742Seric 
115068742Seric #ifdef luna
115168742Seric # ifndef IDENTPROTO
115268742Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
115368742Seric # endif
115468742Seric # ifdef uniosb
115568742Seric #  define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
115668742Seric # endif
115768742Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
115868742Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
115968742Seric # ifdef uniosb
116068742Seric #  define LA_TYPE	LA_INT
116168742Seric # endif
116268742Seric # ifdef luna2m
116368742Seric #  define LA_TYPE	LA_SUBR
116468742Seric # endif
116568742Seric # ifdef luna88k
116668742Seric #  define LA_TYPE	LA_INT
116768742Seric # endif
116868742Seric # define SFS_TYPE	SFS_VFS /* use <sys/vfs.h> statfs() implementation */
116968742Seric # define setpgid	setpgrp
117068742Seric # undef WIFEXITED
117168742Seric # undef WEXITSTATUS
117268742Seric typedef int		pid_t;
117368742Seric typedef int		(*sigfunc_t)();
117468742Seric # define SIGFUNC_DEFINED
117568742Seric extern char	*getenv();
117668742Seric extern int	errno;
117768742Seric # ifndef _PATH_SENDMAILCF
117868742Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
117968742Seric # endif
118068742Seric #endif
118168742Seric 
118268742Seric 
118368742Seric /*
118468742Seric **  NEC EWS-UX/V 4.2
118568742Seric **
118668742Seric **  with /usr/ucb/cc
118768742Seric */
118868742Seric 
118968742Seric #ifdef nec_ews_svr4
119068742Seric # define SYSTEM5	1	/* include all the System V defines */
119168742Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
119268742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
119368742Seric # define HASSETREUID	1	/* has setreuid(2) call */
119468742Seric # define setreuid(r, e)	seteuid(e)
119568742Seric # define HASSETSID	1	/* has Posix setsid(2) call */
119668742Seric # define LA_TYPE	LA_INT
119768742Seric # define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
119868742Seric # define GIDSET_T	gid_t
119968742Seric # ifndef HASGETUSERSHELL
120068742Seric #  define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
120168742Seric # endif
120268742Seric # undef WIFEXITED
120368742Seric # undef WEXITSTATUS
120468742Seric # ifndef _PATH_UNIX
120568742Seric #  define _PATH_UNIX		"/unix"
120668742Seric # endif
120768742Seric # ifndef _PATH_SENDMAILCF
120868742Seric #  define _PATH_SENDMAILCF	"/var/ucblib/sendmail.cf"
120968742Seric # endif
121068742Seric # ifndef _PATH_SENDMAILPID
121168742Seric #  define _PATH_SENDMAILPID	"/var/ucblib/sendmail.pid"
121268742Seric # endif
121368742Seric # define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
121468742Seric #endif
121568742Seric 
121668742Seric 
121768742Seric 
121863902Seric /**********************************************************************
121963787Seric **  End of Per-Operating System defines
122063902Seric **********************************************************************/
122163787Seric 
122263949Seric /**********************************************************************
122363949Seric **  More general defines
122463949Seric **********************************************************************/
122563949Seric 
122663962Seric /* general BSD defines */
122763962Seric #ifdef BSD
122864035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
122964035Seric # define HASSETREUID	1	/* has setreuid(2) call */
123067742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
123167430Seric # ifndef HASSETRLIMIT
123267430Seric #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
123367430Seric # endif
123465830Seric # ifndef HASFLOCK
123565830Seric #  define HASFLOCK	1	/* has flock(2) call */
123665830Seric # endif
123767602Seric # ifndef TZ_TYPE
123867608Seric #  define TZ_TYPE	TZ_TM_ZONE	/* use tm->tm_zone variable */
123967602Seric # endif
124063962Seric #endif
124163962Seric 
124265189Seric /* general System V Release 4 defines */
124365189Seric #ifdef __svr4__
124465189Seric # define SYSTEM5	1
124565189Seric # define HASSETREUID	1	/* has seteuid(2) call & working saved uids */
124667742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
124767742Seric # ifndef HASSETRLIMIT
124867742Seric #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
124967742Seric # endif
125065211Seric # ifndef HASGETUSERSHELL
125165211Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
125265210Seric # endif
125365189Seric # define setreuid(r, e)	seteuid(e)
125465189Seric 
125565189Seric # ifndef _PATH_UNIX
125665189Seric #  define _PATH_UNIX		"/unix"
125765189Seric # endif
125865189Seric # ifndef _PATH_SENDMAILCF
125965189Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
126065189Seric # endif
126165189Seric # ifndef _PATH_SENDMAILPID
126265189Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
126365189Seric # endif
126465189Seric # ifndef SYSLOG_BUFSIZE
126565189Seric #  define SYSLOG_BUFSIZE	128
126665189Seric # endif
126767159Seric # ifndef SFS_TYPE
126867159Seric #  define SFS_TYPE		SFS_STATVFS
126967159Seric # endif
127065189Seric #endif
127165189Seric 
127263787Seric /* general System V defines */
127366298Seric #ifdef SYSTEM5
127464813Seric # include <sys/sysmacros.h>
127563949Seric # define HASUNAME	1	/* use System V uname(2) system call */
127664705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
127764962Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
127867430Seric # ifndef HASULIMIT
127967430Seric #  define HASULIMIT	1	/* has the ulimit(2) syscall */
128067430Seric # endif
128163962Seric # ifndef LA_TYPE
128265749Seric #  define LA_TYPE	LA_INT		/* assume integer load average */
128363962Seric # endif
128465749Seric # ifndef SFS_TYPE
128565749Seric #  define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
128665749Seric # endif
128767602Seric # ifndef TZ_TYPE
128867608Seric #  define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
128967602Seric # endif
129068442Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
129168442Seric # define bzero(d, l)		(memset((d), '\0', (l)))
129268442Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
129366298Seric #endif
129463787Seric 
129563949Seric /* general POSIX defines */
129663949Seric #ifdef _POSIX_VERSION
129764718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
129864718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
129963949Seric #endif
130063949Seric 
130163787Seric /*
130263937Seric **  If no type for argument two of getgroups call is defined, assume
130363937Seric **  it's an integer -- unfortunately, there seem to be several choices
130463937Seric **  here.
130563937Seric */
130663937Seric 
130763937Seric #ifndef GIDSET_T
130863937Seric # define GIDSET_T	int
130963937Seric #endif
131063937Seric 
131164939Seric /*
131268357Seric **  Tweaking for systems that (for example) claim to be BSD or POSIX
131368357Seric **  but don't have all the standard BSD or POSIX routines (boo hiss).
131464939Seric */
131564439Seric 
131664939Seric #ifdef titan
131764939Seric # undef HASINITGROUPS		/* doesn't have initgroups(3) call */
131864939Seric #endif
131964939Seric 
132068357Seric #ifdef _CRAYCOM
132168357Seric # undef HASSETSID		/* despite POSIX claim, doesn't have setsid */
132268357Seric #endif
132365830Seric 
132468442Seric #ifdef ISC_UNIX
132568442Seric # undef bcopy			/* despite SystemV claim, uses BSD bcopy */
132668442Seric #endif
132768357Seric 
132868442Seric #ifdef ALTOS_SYS_V
132968442Seric # undef bcopy			/* despite SystemV claim, uses BSD bcopy */
133068442Seric # undef bzero			/* despite SystemV claim, uses BSD bzero */
133168442Seric # undef bcmp			/* despite SystemV claim, uses BSD bcmp */
133268442Seric #endif
133368442Seric 
133468442Seric 
133565167Seric /*
133665167Seric **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
133765167Seric **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
133865167Seric **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
133965167Seric **  are closed.  Some firewalls return this error if you try to connect
134065167Seric **  to the IDENT port (113), so you can't receive email from these hosts
134165167Seric **  on these systems.  The firewall really should use a more specific
134265167Seric **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.  If
134365167Seric **  not explicitly set to zero above, default it on.
134465167Seric */
134564939Seric 
134665167Seric #ifndef IDENTPROTO
134765167Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
134865167Seric #endif
134965167Seric 
135065211Seric #ifndef HASGETUSERSHELL
135165211Seric # define HASGETUSERSHELL 1	/* libc has getusershell(3) call */
135265210Seric #endif
135365167Seric 
135465830Seric #ifndef HASFLOCK
135565830Seric # define HASFLOCK	0	/* assume no flock(2) support */
135665830Seric #endif
135765210Seric 
135867430Seric #ifndef HASSETRLIMIT
135967430Seric # define HASSETRLIMIT	0	/* assume no setrlimit(2) support */
136067430Seric #endif
136167430Seric 
136267430Seric #ifndef HASULIMIT
136367430Seric # define HASULIMIT	0	/* assume no ulimit(2) support */
136467430Seric #endif
136567430Seric 
136666843Seric #ifndef OLD_NEWDB
136766843Seric # define OLD_NEWDB	0	/* assume newer version of newdb */
136866843Seric #endif
136965830Seric 
137068099Seric /* heuristic setting of HASSETSIGMASK; can override above */
137168099Seric #ifndef HASSIGSETMASK
137268099Seric # ifdef SIGVTALRM
137368099Seric #  define HASSETSIGMASK	1
137468099Seric # else
137568099Seric #  define HASSETSIGMASK	0
137668099Seric # endif
137768099Seric #endif
137866843Seric 
137968705Seric #ifndef UID_T
138068705Seric # define UID_T		uid_t
138168705Seric #endif
138268099Seric 
138368706Seric #ifndef SIZE_T
138468706Seric # define SIZE_T		size_t
138568706Seric #endif
138668706Seric 
138768705Seric #ifndef ARGV_T
138868705Seric # define ARGV_T		char **
138968705Seric #endif
139068705Seric 
139168705Seric 
139264439Seric /**********************************************************************
139359023Seric **  Remaining definitions should never have to be changed.  They are
139459023Seric **  primarily to provide back compatibility for older systems -- for
139559287Seric **  example, it includes some POSIX compatibility definitions
139664439Seric **********************************************************************/
139759023Seric 
139859388Seric /* System 5 compatibility */
139959388Seric #ifndef S_ISREG
140064944Seric # define S_ISREG(foo)	((foo & S_IFMT) == S_IFREG)
140159388Seric #endif
140264944Seric #if !defined(S_ISLNK) && defined(S_IFLNK)
140364944Seric # define S_ISLNK(foo)	((foo & S_IFMT) == S_IFLNK)
140464944Seric #endif
140568494Seric #ifndef S_IWUSR
140668494Seric # define S_IWUSR		0200
140768494Seric #endif
140859388Seric #ifndef S_IWGRP
140968494Seric # define S_IWGRP		0020
141059388Seric #endif
141159388Seric #ifndef S_IWOTH
141268494Seric # define S_IWOTH		0002
141359388Seric #endif
141459388Seric 
141559023Seric /*
141650537Seric **  Older systems don't have this error code -- it should be in
141750537Seric **  /usr/include/sysexits.h.
141850537Seric */
141950537Seric 
142050537Seric # ifndef EX_CONFIG
142150537Seric # define EX_CONFIG	78	/* configuration error */
142250537Seric # endif
142356852Seric 
142464718Seric /* pseudo-code used in server SMTP */
142564718Seric # define EX_QUIT	22	/* drop out of server immediately */
142664718Seric 
142764718Seric 
142863993Seric /*
142963993Seric **  These are used in a few cases where we need some special
143063993Seric **  error codes, but where the system doesn't provide something
143163993Seric **  reasonable.  They are printed in errstring.
143263993Seric */
143363993Seric 
143463993Seric #ifndef E_PSEUDOBASE
143563993Seric # define E_PSEUDOBASE	256
143663993Seric #endif
143763993Seric 
143863993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
143963993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
144063993Seric 
144163970Seric /* type of arbitrary pointer */
144263970Seric #ifndef ARBPTR_T
144363970Seric # define ARBPTR_T	void *
144463970Seric #endif
144563970Seric 
144660568Seric #ifndef __P
144760568Seric # include "cdefs.h"
144860568Seric #endif
144960568Seric 
145067421Seric #if NAMED_BIND
145167421Seric # include <arpa/nameser.h>
145267434Seric # ifdef __svr4__
145367434Seric #  ifdef NOERROR
145467434Seric #   undef NOERROR		/* avoid compiler conflict with stream.h */
145567434Seric #  endif
145667434Seric # endif
145767421Seric #endif
145867421Seric 
145956852Seric /*
146067419Seric **  The size of an IP address -- can't use sizeof because of problems
146167419Seric **  on Crays, where everything is 64 bits.  This will break if/when
146267419Seric **  IP addresses are expanded to eight bytes.
146367419Seric */
146467419Seric 
146567421Seric #ifndef INADDRSZ
146667421Seric # define INADDRSZ	4
146767421Seric #endif
146867419Seric 
146967419Seric /*
147067421Seric **  The size of various known types -- for reading network protocols.
147167421Seric **  Again, we can't use sizeof because of compiler randomness.
147267421Seric */
147367421Seric 
147467421Seric #ifndef INT16SZ
147567421Seric # define INT16SZ	2
147667421Seric #endif
147767421Seric #ifndef INT32SZ
147867421Seric # define INT32SZ	4
147967421Seric #endif
148067421Seric 
148167421Seric /*
148258778Seric **  Do some required dependencies
148358778Seric */
148458778Seric 
148558778Seric #if defined(NETINET) || defined(NETISO)
148659107Seric # define SMTP		1	/* enable user and server SMTP */
148759107Seric # define QUEUE		1	/* enable queueing */
148859107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
148958778Seric #endif
149058778Seric 
149158778Seric 
149258778Seric /*
149356852Seric **  Arrange to use either varargs or stdargs
149456852Seric */
149556852Seric 
149656852Seric # ifdef __STDC__
149756852Seric 
149856852Seric # include <stdarg.h>
149956852Seric 
150056852Seric # define VA_LOCAL_DECL	va_list ap;
150156852Seric # define VA_START(f)	va_start(ap, f)
150256852Seric # define VA_END		va_end(ap)
150356852Seric 
150456852Seric # else
150556852Seric 
150656852Seric # include <varargs.h>
150756852Seric 
150856852Seric # define VA_LOCAL_DECL	va_list ap;
150956852Seric # define VA_START(f)	va_start(ap)
151056852Seric # define VA_END		va_end(ap)
151156852Seric 
151256852Seric # endif
151357631Seric 
151457943Seric #ifdef HASUNAME
151557631Seric # include <sys/utsname.h>
151657631Seric # ifdef newstr
151757631Seric #  undef newstr
151857631Seric # endif
151957943Seric #else /* ! HASUNAME */
152057631Seric # define NODE_LENGTH 32
152157631Seric struct utsname
152257631Seric {
152357631Seric 	char nodename[NODE_LENGTH+1];
152457631Seric };
152557943Seric #endif /* HASUNAME */
152657642Seric 
152768040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V)
152863838Seric # define MAXHOSTNAMELEN	256
152957735Seric #endif
153058153Seric 
153158153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
153258153Seric # define SIGCHLD	SIGCLD
153358153Seric #endif
153458153Seric 
153558153Seric #ifndef STDIN_FILENO
153668742Seric # define STDIN_FILENO	0
153758153Seric #endif
153858153Seric 
153958153Seric #ifndef STDOUT_FILENO
154068742Seric # define STDOUT_FILENO	1
154158153Seric #endif
154258153Seric 
154358153Seric #ifndef STDERR_FILENO
154468742Seric # define STDERR_FILENO	2
154558153Seric #endif
154658689Seric 
154764072Seric #ifndef LOCK_SH
154864035Seric # define LOCK_SH	0x01	/* shared lock */
154964035Seric # define LOCK_EX	0x02	/* exclusive lock */
155064035Seric # define LOCK_NB	0x04	/* non-blocking lock */
155164035Seric # define LOCK_UN	0x08	/* unlock */
155264035Seric #endif
155358692Seric 
155468742Seric #ifndef SEEK_SET
155568742Seric # define SEEK_SET	0
155668742Seric # define SEEK_CUR	1
155768742Seric # define SEEK_END	2
155868742Seric #endif
155968742Seric 
156064035Seric #ifndef SIG_ERR
156164035Seric # define SIG_ERR	((void (*)()) -1)
156258689Seric #endif
156358702Seric 
156464500Seric #ifndef WEXITSTATUS
156564500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
156664500Seric #endif
156764500Seric #ifndef WIFEXITED
156864500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
156964500Seric #endif
157064500Seric 
157164561Seric #ifndef SIGFUNC_DEFINED
157264561Seric typedef void		(*sigfunc_t) __P((int));
157364561Seric #endif
157464561Seric 
157565053Seric /* size of syslog buffer */
157665053Seric #ifndef SYSLOG_BUFSIZE
157765053Seric # define SYSLOG_BUFSIZE	1024
157865053Seric #endif
157965053Seric 
158058702Seric /*
158158702Seric **  Size of tobuf (deliver.c)
158258702Seric **	Tweak this to match your syslog implementation.  It will have to
158358702Seric **	allow for the extra information printed.
158458702Seric */
158558702Seric 
158658702Seric #ifndef TOBUFSIZE
158765053Seric # if (SYSLOG_BUFSIZE) > 512
158865053Seric #  define TOBUFSIZE	(SYSLOG_BUFSIZE - 256)
158965053Seric # else
159065053Seric #  define TOBUFSIZE	256
159165053Seric # endif
159258702Seric #endif
159360219Seric 
159465015Seric /*
159565015Seric **  Size of prescan buffer.
159665015Seric **	Despite comments in the _sendmail_ book, this probably should
159765015Seric **	not be changed; there are some hard-to-define dependencies.
159865015Seric */
159965015Seric 
160065015Seric # define PSBUFSIZE	(MAXNAME + MAXATOM)	/* size of prescan buffer */
160160219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
160260219Seric # ifndef FORK
160360219Seric # define FORK		vfork		/* function to call to fork mailer */
160460219Seric # endif
160565955Seric 
160665955Seric /*
160765955Seric **  If we are going to link scanf anyway, use it in readcf
160865955Seric */
160965955Seric 
161065955Seric #if !defined(HASUNAME) && !defined(SCANF)
161165955Seric # define SCANF		1
161265955Seric #endif
1613