xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 68742)
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*68742Seric  *	@(#)conf.h	8.146 (Berkeley) 04/07/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 */
6456337Seric # ifdef NEWDB
6556337Seric # define USERDB		1	/* look in user database (requires NEWDB) */
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
43165982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
43266843Seric 			/* version 1.1 or later */
43367771Seric #  undef SPT_TYPE
43467771Seric #  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
43566843Seric # else
43666843Seric 			/* version 1.0 or earlier */
43766843Seric #  ifndef OLD_NEWDB
43866843Seric #   define OLD_NEWDB	1	/* old version of newdb library */
43966843Seric #  endif
44067771Seric #  define SPT_PADCHAR	'\0'	/* pad process title with nulls */
44165982Seric # endif
44265982Seric #endif
44365982Seric 
44465982Seric 
44565982Seric 
44665982Seric /*
44765049Seric **  386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
44864733Seric **
44964733Seric **  4.3BSD clone, closer to 4.4BSD
45064831Seric **
45164831Seric **	See also BSD defines.
45264733Seric */
45364733Seric 
45465049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
45564733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
45664733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
45766754Seric # ifdef __NetBSD__
45866754Seric #  define HASUNAME	1	/* has uname(2) syscall */
45966754Seric # endif
46064733Seric # include <sys/cdefs.h>
46164733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
46264733Seric # ifndef LA_TYPE
46364733Seric #  define LA_TYPE	LA_SUBR
46464733Seric # endif
46565749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
46664733Seric #endif
46764733Seric 
46864733Seric 
46964733Seric /*
47064813Seric **  Mach386
47164813Seric **
47264813Seric **	For mt Xinu's Mach386 system.
47364813Seric */
47464813Seric 
47564813Seric #if defined(MACH) && defined(i386)
47664813Seric # define MACH386	1
47764813Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
47864813Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
47966226Seric # ifndef HASFLOCK
48065830Seric #  define HASFLOCK	1	/* has flock(2) call */
48165830Seric # endif
48264813Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
48364813Seric # define NEEDSTRTOL	1	/* need the strtol() function */
48464813Seric # define setpgid	setpgrp
48564813Seric # ifndef LA_TYPE
48664813Seric #  define LA_TYPE	LA_FLOAT
48764813Seric # endif
48865749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
48964962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
49064813Seric # undef WEXITSTATUS
49164813Seric # undef WIFEXITED
49264813Seric # ifndef _PATH_SENDMAILCF
49364813Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
49464813Seric # endif
49564813Seric # ifndef _PATH_SENDMAILPID
49664813Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
49764813Seric # endif
49864813Seric #endif
49964813Seric 
50064813Seric 
50164813Seric /*
50263969Seric **  4.3 BSD -- this is for very old systems
50363969Seric **
50465949Seric **	Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
50565949Seric **
50663969Seric **	You'll also have to install a new resolver library.
50763969Seric **	I don't guarantee that support for this environment is complete.
50863969Seric */
50963969Seric 
51065949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
51163969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
51263969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
51363970Seric # define ARBPTR_T	char *
51464155Seric # define setpgid	setpgrp
51563969Seric # ifndef LA_TYPE
51663969Seric #  define LA_TYPE	LA_FLOAT
51763969Seric # endif
51863969Seric # ifndef _PATH_SENDMAILCF
51963969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
52063969Seric # endif
52165167Seric # ifndef IDENTPROTO
52265167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
52365167Seric # endif
52464834Seric # undef WEXITSTATUS
52564834Seric # undef WIFEXITED
52664834Seric typedef short		pid_t;
52764834Seric extern int		errno;
52863969Seric #endif
52963969Seric 
53064314Seric 
53163969Seric /*
53263902Seric **  SCO Unix
53365087Seric **
53465087Seric **	This includes two parts -- the first is for SCO Open Server 3.2v4
53565087Seric **	(contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
53665087Seric **	The second is, I believe, for an older version.
53763902Seric */
53863902Seric 
53965087Seric #ifdef _SCO_unix_4_2
54065087Seric # define _SCO_unix_
54165087Seric # define HASSETREUID	1	/* has setreuid(2) call */
54266757Seric # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
54365087Seric # define _PATH_UNIX	"/unix"
54465087Seric # ifndef _PATH_SENDMAILCF
54565087Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
54665087Seric # endif
54765087Seric # ifndef _PATH_SENDMAILPID
54865087Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
54965087Seric # endif
55065087Seric #endif
55165087Seric 
55263838Seric #ifdef _SCO_unix_
55363838Seric # define SYSTEM5	1	/* include all the System V defines */
55464035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
55565212Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
55663838Seric # define FORK		fork
55763838Seric # define MAXPATHLEN	PATHSIZE
55864718Seric # define LA_TYPE	LA_SHORT
55967812Seric # define SFS_TYPE	SFS_4ARGS	/* use <sys/statfs.h> 4-arg impl */
56068439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
56167608Seric # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
56264813Seric # undef NETUNIX			/* no unix domain socket support */
56363838Seric #endif
56463838Seric 
56564314Seric 
56663962Seric /*
56768442Seric **  ISC (SunSoft) Unix.
56868442Seric **
56968442Seric **	Contributed by J.J. Bailey <jjb@jagware.bcc.com>
57068442Seric */
57168442Seric 
57268442Seric #ifdef ISC_UNIX
57368442Seric # include <net/errno.h>
57468442Seric # define SYSTEM5	1	/* include all the System V defines */
57568442Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
57668442Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
57768442Seric # define HASSETREUID	1	/* has setreuid(2) call */
57868442Seric # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
57968442Seric # undef NETUNIX			/* no unix domain socket support */
58068442Seric # define FORK		fork
58168442Seric # define MAXPATHLEN	1024
58268442Seric # define LA_TYPE	LA_SHORT
58368442Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
58468442Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
58568442Seric # define _PATH_UNIX	"/unix"
58668442Seric # ifndef _PATH_SENDMAILCF
58768442Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
58868442Seric # endif
58968442Seric # ifndef _PATH_SENDMAILPID
59068442Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
59168442Seric # endif
59268442Seric 
59368442Seric typedef short		pid_t;
59468442Seric 
59568442Seric #endif
59668442Seric 
59768442Seric 
59868442Seric /*
59968040Seric **  Altos System V.
60068040Seric **	Contributed by Tim Rice <timr@crl.com>.
60168040Seric */
60268040Seric 
60368040Seric #ifdef ALTOS_SYS_V
60468040Seric # include <limits.h>
60568040Seric # define SYSTEM5	1	/* include all the System V defines */
60668040Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
60768040Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
60868040Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
60968040Seric # define NEEDFSYNC	1	/* no fsync(2) in system library */
61068040Seric # define FORK		fork
61168040Seric # define MAXPATHLEN	PATHSIZE
61268040Seric # define LA_TYPE	LA_SHORT
61368040Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
61468439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
61568040Seric # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
61668040Seric # undef NETUNIX			/* no unix domain socket support */
61768040Seric # undef WIFEXITED
61868040Seric # undef WEXITSTATUS
61968040Seric # define strtoul	strtol	/* gcc library bogosity */
62068040Seric 
62168040Seric typedef unsigned short	uid_t;
62268040Seric typedef unsigned short	gid_t;
62368040Seric typedef short		pid_t;
62468040Seric #endif
62568040Seric 
62668040Seric 
62768040Seric /*
62863962Seric **  ConvexOS 11.0 and later
62965949Seric **
63065949Seric **	"Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
63165949Seric **	works on 9.1 as well.
63263962Seric */
63363962Seric 
63463962Seric #ifdef _CONVEX_SOURCE
63563977Seric # define BSD		1	/* include all the BSD defines */
63663977Seric # define HASUNAME	1	/* use System V uname(2) system call */
63763962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
63863977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
63963962Seric # define LA_TYPE	LA_FLOAT
64065749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
64165949Seric # ifndef _PATH_SENDMAILCF
64265949Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
64365949Seric # endif
64465949Seric # ifndef S_IREAD
64565949Seric #  define S_IREAD	_S_IREAD
64665949Seric #  define S_IWRITE	_S_IWRITE
64765949Seric #  define S_IEXEC	_S_IEXEC
64865949Seric #  define S_IFMT	_S_IFMT
64965949Seric #  define S_IFCHR	_S_IFCHR
65065949Seric #  define S_IFBLK	_S_IFBLK
65165949Seric # endif
65265167Seric # ifndef IDENTPROTO
65365167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
65465167Seric # endif
65563962Seric #endif
65663962Seric 
65764314Seric 
65863962Seric /*
65964999Seric **  RISC/os 4.52
66063962Seric **
66164999Seric **	Gives a ton of warning messages, but otherwise compiles.
66263962Seric */
66363962Seric 
66463965Seric #ifdef RISCOS
66564999Seric 
66663962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
66766226Seric # ifndef HASFLOCK
66865830Seric #  define HASFLOCK	1	/* has flock(2) call */
66965830Seric # endif
67064999Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
67164999Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
67263962Seric # define LA_TYPE	LA_INT
67363962Seric # define LA_AVENRUN	"avenrun"
67463962Seric # define _PATH_UNIX	"/unix"
67564999Seric # undef WIFEXITED
67664999Seric 
67764999Seric # define setpgid	setpgrp
67864999Seric 
67964999Seric extern int		errno;
68064999Seric typedef int		pid_t;
68164999Seric #define			SIGFUNC_DEFINED
68264999Seric typedef int		(*sigfunc_t)();
68364999Seric extern char		*getenv();
68464999Seric extern void		*malloc();
68564999Seric 
68663962Seric #endif
68763962Seric 
68864314Seric 
68964155Seric /*
69064155Seric **  Linux 0.99pl10 and above...
69166300Seric **
69266300Seric **  Thanks to, in reverse order of contact:
69366300Seric **
69468093Seric **	John Kennedy <warlock@csuchico.edu>
69567885Seric **	Andrew Pam <avatar@aus.xanadu.com>
69666300Seric **	Florian La Roche <rzsfl@rz.uni-sb.de>
69766300Seric **	Karl London <karl@borg.demon.co.uk>
69866300Seric **
69968093Seric **  Last compiled against:	[12/14/94 @ 11:38:41 PM (Wednesday)]
70068093Seric **	sendmail 8.7.a.5	named 4.9.3-beta12-p1	db-1.85
70168093Seric **	gcc 2.6.2		libc.so.4.6.20
70268093Seric **	slackware 2.1.0		linux 1.1.70
70364155Seric */
70464155Seric 
70564770Seric #ifdef __linux__
70666298Seric # define BSD		1	/* include BSD defines */
70764155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
70866298Seric # define HASUNAME	1	/* use System V uname(2) system call */
70964380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
71066298Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
71166300Seric # define GIDSET_T	gid_t	/* from <linux/types.h> */
71267885Seric # define HASGETUSERSHELL 0	/* getusershell(3) broken in Slackware 2.0 */
71368518Seric # ifndef HASFLOCK
71468518Seric #  define HASFLOCK	0	/* flock(2) is broken after 0.99.13 */
71568518Seric # endif
71664155Seric # ifndef LA_TYPE
71766301Seric #  define LA_TYPE	LA_PROCSTR
71864155Seric # endif
71966300Seric # define SFS_TYPE	SFS_VFS		/* use <sys/vfs.h> statfs() impl */
72068093Seric # ifndef _PATH_SENDMAILPID
72168093Seric #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
72268093Seric # endif
72368093Seric # define TZ_TYPE	TZ_TNAME
72464763Seric # include <sys/sysmacros.h>
72566300Seric # undef atol			/* wounded in <stdlib.h> */
72664155Seric #endif
72764155Seric 
72864155Seric 
72964345Seric /*
73064345Seric **  DELL SVR4 Issue 2.2, and others
73164345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
73264345Seric **
73364345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
73464345Seric **	defined, and the definitions conflict.
73564924Seric **
73664924Seric **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
73764924Seric **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
73864924Seric **	(SVR4.0/386 version 3.0).
73964345Seric */
74064345Seric 
74164345Seric #ifdef DELL_SVR4
74265189Seric 				/* no changes necessary */
74365189Seric 				/* see general __svr4__ defines below */
74464345Seric #endif
74564345Seric 
74664345Seric 
74764380Seric /*
74864380Seric **  Apple A/UX 3.0
74964380Seric */
75064345Seric 
75164380Seric #ifdef _AUX_SOURCE
75264729Seric # include <sys/sysmacros.h>
75364380Seric # define BSD			/* has BSD routines */
75464380Seric # define HASUNAME	1	/* use System V uname(2) system call */
75564380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
75664561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
75765167Seric # ifndef IDENTPROTO
75865167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
75965167Seric # endif
76064380Seric # define FORK		fork
76164380Seric # ifndef _PATH_SENDMAILCF
76264380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
76364380Seric # endif
76464380Seric # ifndef LA_TYPE
76564380Seric #  define LA_TYPE	LA_ZERO
76664380Seric # endif
76765749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
76864560Seric # undef WIFEXITED
76964560Seric # undef WEXITSTATUS
77064380Seric #endif
77164380Seric 
77264380Seric 
77364705Seric /*
77464705Seric **  Encore UMAX V
77564705Seric **
77664705Seric **	Not extensively tested.
77764705Seric */
77864380Seric 
77964705Seric #ifdef UMAXV
78064705Seric # include <limits.h>
78164705Seric # define HASUNAME	1	/* use System V uname(2) system call */
78264705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
78364705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
78465211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
78564705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
78664705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
78764705Seric # define FORK		fork	/* no vfork(2) primitive available */
78865749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
78964705Seric # define MAXPATHLEN	PATH_MAX
79064705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
79164705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
79264705Seric # undef WIFEXITED
79364705Seric # undef WEXITSTATUS
79464705Seric #endif
79564705Seric 
79664705Seric 
79764939Seric /*
79864939Seric **  Stardent Titan 3000 running TitanOS 4.2.
79964939Seric **
80064939Seric **	Must be compiled in "cc -43" mode.
80164939Seric **
80264944Seric **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
80364939Seric **
80464939Seric **	Note the tweaking below after the BSD defines are set.
80564939Seric */
80664705Seric 
80764939Seric #ifdef titan
80864939Seric # define setpgid	setpgrp
80964939Seric typedef int		pid_t;
81064939Seric # undef WIFEXITED
81164939Seric # undef WEXITSTATUS
81264939Seric #endif
81364939Seric 
81464939Seric 
81564962Seric /*
81664962Seric **  Sequent DYNIX 3.2.0
81764962Seric **
81864962Seric **	From Jim Davis <jdavis@cs.arizona.edu>.
81964962Seric */
82064939Seric 
82164962Seric #ifdef sequent
82266038Seric 
82364962Seric # define BSD		1
82464962Seric # define HASUNSETENV	1
82564962Seric # define BSD4_3		1	/* to get signal() in conf.c */
82664962Seric # define WAITUNION	1
82764962Seric # define LA_TYPE	LA_FLOAT
82864962Seric # ifdef	_POSIX_VERSION
82964962Seric #  undef _POSIX_VERSION		/* set in <unistd.h> */
83064962Seric # endif
83164962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
83264962Seric # define setpgid	setpgrp
83364962Seric 
83464962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
83564962Seric # undef	WIFEXITED
83664962Seric # define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
83764962Seric 			 ((union wait*)&(s))->w_termsig == 0)
83864962Seric # define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
83964962Seric typedef int		pid_t;
84064962Seric # define isgraph(c)	(isprint(c) && (c != ' '))
84164962Seric 
84266144Seric # ifndef IDENTPROTO
84366144Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
84466144Seric # endif
84566144Seric 
84664962Seric # ifndef _PATH_UNIX
84764962Seric #  define _PATH_UNIX	"/dynix"
84864962Seric # endif
84964962Seric # ifndef _PATH_SENDMAILCF
85064962Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
85164962Seric # endif
85264962Seric 
85364962Seric #endif
85464962Seric 
85564962Seric 
85665748Seric /*
85766038Seric **  Sequent DYNIX/ptx v2.0 (and higher)
85866038Seric **
85966038Seric **	For DYNIX/ptx v1.x, undefine HASSETREUID.
86066038Seric **
86166038Seric **	From Tim Wright <timw@sequent.com>.
86266038Seric */
86366038Seric 
86466038Seric #ifdef _SEQUENT_
86566038Seric # define SYSTEM5	1	/* include all the System V defines */
86666038Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
86766038Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
86866038Seric # define HASSETREUID	1	/* has setreuid(2) call */
86966038Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
87066038Seric # define GIDSET_T	gid_t
87166038Seric # define LA_TYPE	LA_INT
87266038Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
87367771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
87466144Seric # ifndef IDENTPROTO
87566144Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
87666144Seric # endif
87766038Seric # ifndef _PATH_SENDMAILCF
87866038Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
87966038Seric # endif
88066038Seric # ifndef _PATH_SENDMAILPID
88166038Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
88266038Seric # endif
88366038Seric #endif
88466038Seric 
88566038Seric 
88666038Seric /*
88765748Seric **  Cray Unicos
88865748Seric **
88965748Seric **	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
89065748Seric */
89164962Seric 
89265748Seric #ifdef UNICOS
89365748Seric # define SYSTEM5	1	/* include all the System V defines */
89465748Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
89565748Seric # define MAXPATHLEN	PATHSIZE
89665748Seric # define LA_TYPE	LA_ZERO
89765749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
89868439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
89965748Seric #endif
90064962Seric 
90165748Seric 
90265820Seric /*
90365820Seric **  Apollo DomainOS
90465820Seric **
90565820Seric **  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
90665982Seric **
90765820Seric **  15 Jan 1994
90865820Seric **
90965820Seric */
91065748Seric 
91165820Seric #ifdef apollo
91265820Seric # define HASSETREUID	1	/* has setreuid(2) call */
91365820Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
91467771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
91565820Seric # define LA_TYPE	LA_SUBR		/* use getloadavg.c */
91666044Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
91768439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
91865820Seric # ifndef _PATH_SENDMAILCF
91965820Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
92065820Seric # endif
92165820Seric # ifndef _PATH_SENDMAILPID
92265820Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
92365820Seric # endif
92465820Seric # undef  S_IFSOCK		/* S_IFSOCK and S_IFIFO are the same */
92565820Seric # undef  S_IFIFO
92665820Seric # define S_IFIFO	0010000
92765820Seric # ifndef IDENTPROTO
92865820Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
92965820Seric # endif
93065982Seric #endif
93165820Seric 
93265820Seric 
93366748Seric /*
93467745Seric **  UnixWare 1.1.2.
93566752Seric **
93666752Seric **	From Evan Champion <evanc@spatial.synapse.org>.
93766752Seric */
93866752Seric 
93966752Seric #ifdef UNIXWARE
94066752Seric # define SYSTEM5		1
94167745Seric # define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
94267745Seric # define HASGETDTABLESIZE	1
94367745Seric # define HASSETREUID		1
94467745Seric # define HASSETSID		1
94567745Seric # define HASINITGROUPS		1
94667745Seric # define GIDSET_T		gid_t
94767745Seric # define SLEEP_T		unsigned
94866752Seric # define SFS_TYPE		SFS_STATVFS
94966752Seric # define LA_TYPE		LA_ZERO
95066752Seric # undef WIFEXITED
95166752Seric # undef WEXITSTATUS
95266752Seric # define _PATH_UNIX		"/unix"
95366752Seric # ifndef _PATH_SENDMAILCF
95466752Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
95566752Seric # endif
95666752Seric # ifndef _PATH_SENDMAILPID
95766752Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
95866752Seric # endif
95966752Seric # define SYSLOG_BUFSIZE	128
96066752Seric #endif
96166752Seric 
96266752Seric 
96366752Seric /*
96466748Seric **  Intergraph CLIX 3.1
96566748Seric **
96666748Seric **	From Paul Southworth <pauls@locust.cic.net>
96766748Seric */
96865820Seric 
96966748Seric #ifdef CLIX
97066748Seric # define SYSTEM5	1	/* looks like System V */
97166752Seric # ifndef HASGETUSERSHELL
97266752Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
97366752Seric # endif
97466748Seric # define DEV_BSIZE	512	/* device block size not defined */
97566748Seric # define GIDSET_T	gid_t
97666748Seric # undef LOG			/* syslog not available */
97766748Seric # define NEEDFSYNC	1	/* no fsync in system library */
97866748Seric # define GETSHORT	_getshort
97966748Seric #endif
98065820Seric 
98166748Seric 
98266776Seric /*
98366776Seric **  NCR 3000 Series (SysVr4)
98466776Seric **
98567434Seric **	From Kevin Darcy <kevin@tech.mis.cfc.com>.
98666776Seric */
98766748Seric 
98866776Seric #ifdef NCR3000
98966776Seric # define __svr4__
99066776Seric # undef BSD
99166776Seric # define LA_AVENRUN	"avenrun"
99266776Seric #endif
99366748Seric 
99466776Seric 
99567434Seric /*
99667434Seric **  Tandem NonStop-UX SVR4
99767434Seric **
99867434Seric **	From Rick McCarty <mccarty@mpd.tandem.com>.
99967434Seric */
100066776Seric 
100167434Seric #ifdef NonStop_UX_BXX
100267434Seric # define __svr4__
100367434Seric #endif
100466776Seric 
100567434Seric 
100667488Seric /*
100767488Seric **  Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.
100867488Seric **
100967488Seric **	Tested for 1.04 and 1.03
101067488Seric **	From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
101167488Seric */
101267434Seric 
101367488Seric #ifdef __H3050R
101467488Seric # define SYSTEM5	1	/* include all the System V defines */
101567488Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
101667488Seric # define setreuid(r, e)	setresuid(r, e, -1)
101767488Seric # define LA_TYPE	LA_FLOAT
101867488Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
101967488Seric # define HASSETVBUF	/* HI-UX has no setlinebuf */
102067488Seric # ifndef GIDSET_T
102167488Seric #  define GIDSET_T	gid_t
102267488Seric # endif
102367488Seric # ifndef _PATH_UNIX
102467488Seric #  define _PATH_UNIX	"/HI-UX"
102567488Seric # endif
102667488Seric # ifndef _PATH_SENDMAILCF
102767488Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
102867488Seric # endif
102967488Seric # ifndef IDENTPROTO
103067488Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
103167488Seric # endif
103267488Seric # ifndef HASGETUSERSHELL
103367488Seric #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
103467488Seric # endif
103567488Seric 
103667488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */
103767488Seric # undef m_flags
103867488Seric 
103967488Seric # ifdef __STDC__
104067488Seric extern int	syslog(int, char *, ...);
104167488Seric # endif
104267488Seric 
104367488Seric #endif
104467488Seric 
104567488Seric 
104668099Seric /*
104768099Seric **  Amdahl UTS System V 2.1.5 (SVr3-based)
104868099Seric **
104968099Seric **    From: Janet Jackson <janet@dialix.oz.au>.
105068099Seric */
105167488Seric 
105268099Seric #ifdef _UTS
105368099Seric # include <sys/sysmacros.h>
105468099Seric # undef HASLSTAT	/* has symlinks, but they cause problems */
105568099Seric # define NEEDFSYNC	1	/* system fsync(2) fails on non-EFS filesys */
105668099Seric # define SYS5SIGNALS	1	/* System V signal semantics */
105768099Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
105868099Seric # define HASUNAME	1	/* use System V uname(2) system call */
105968099Seric # define HASINITGROUPS	1	/* has initgroups(3) function */
106068099Seric # define HASSETVBUF	1	/* has setvbuf(3) function */
106168099Seric # define HASSIGSETMASK	0	/* does not have sigsetmask(2) function */
106268099Seric # ifndef HASGETUSERSHELL
106368099Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) function */
106468099Seric # endif
106568099Seric # define GIDSET_T	gid_t	/* type of 2nd arg to getgroups(2) isn't int */
106668099Seric # define LA_TYPE	LA_ZERO		/* doesn't have load average */
106768099Seric # define SFS_TYPE	SFS_4ARGS	/* use 4-arg statfs() */
106868439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
106968099Seric # define _PATH_UNIX	"/unix"
107068099Seric # ifndef _PATH_SENDMAILCF
107168099Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
107268099Seric # endif
107368099Seric #endif
107468099Seric 
107568357Seric /*
107668357Seric **  Cray Computer Corporation's CSOS
107768357Seric **
107868357Seric **	Contributed by Scott Bolte <scott@craycos.com>.
107968357Seric */
108068099Seric 
108168357Seric #ifdef _CRAYCOM
108268357Seric # define SYSTEM5	1	/* include all the System V defines */
108368357Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
108468357Seric # define NEEDFSYNC	1	/* no fsync in system library */
108568357Seric # define MAXPATHLEN	PATHSIZE
108668357Seric # define LA_TYPE	LA_ZERO
108768357Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
108868439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
108968357Seric # define _POSIX_CHOWN_RESTRICTED	-1
109068357Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
109168357Seric #endif
109268099Seric 
109368099Seric 
1094*68742Seric /*
1095*68742Seric **  Sony NEWS-OS 4.2.1R and 6.0.3
1096*68742Seric */
1097*68742Seric 
1098*68742Seric #ifdef sony_news
1099*68742Seric # ifndef __svr4
1100*68742Seric 			/* NEWS-OS 4.2.1R */
1101*68742Seric #  ifndef BSD
1102*68742Seric #   define BSD			/* has BSD routines */
1103*68742Seric #  endif
1104*68742Seric #  define HASUNSETENV	1	/* has unsetenv(2) call */
1105*68742Seric #  undef HASSETVBUF		/* don't actually have setvbuf(3) */
1106*68742Seric #  define WAITUNION	1	/* use "union wait" as wait argument type */
1107*68742Seric #  define LA_TYPE	LA_INT
1108*68742Seric #  define SFS_TYPE	SFS_VFS /* use <sys/vfs.h> statfs() implementation */
1109*68742Seric #  ifndef HASFLOCK
1110*68742Seric #   define HASFLOCK	1	/* has flock(2) call */
1111*68742Seric #  endif
1112*68742Seric #  define setpgid	setpgrp
1113*68742Seric #  undef WIFEXITED
1114*68742Seric #  undef WEXITSTATUS
1115*68742Seric typedef int		pid_t;
1116*68742Seric typedef int		(*sigfunc_t)();
1117*68742Seric #  define SIGFUNC_DEFINED
1118*68742Seric 
1119*68742Seric # else
1120*68742Seric 			/* NEWS-OS 6.0.3 with /bin/cc */
1121*68742Seric #  define SYSTEM5	1	/* include all the System V defines */
1122*68742Seric #  define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
1123*68742Seric #  define HASINITGROUPS	1	/* has initgroups(3) call */
1124*68742Seric #  define HASSETREUID	1	/* has setreuid(2) call */
1125*68742Seric #  define HASSETSID	1	/* has Posix setsid(2) call */
1126*68742Seric #  define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
1127*68742Seric #  define LA_TYPE	LA_INT
1128*68742Seric #  define SFS_TYPE	SFS_STATVFS	/* use <sys/statvfs.h> statvfs() impl */
1129*68742Seric #  define GIDSET_T	gid_t
1130*68742Seric #  define setreuid(r, e)	seteuid(e)
1131*68742Seric #  undef WIFEXITED
1132*68742Seric #  undef WEXITSTATUS
1133*68742Seric #  define _PATH_UNIX  "/stand/unix"
1134*68742Seric #  ifndef _PATH_SENDMAILCF
1135*68742Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
1136*68742Seric #  endif
1137*68742Seric #  ifndef _PATH_SENDMAILPID
1138*68742Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
1139*68742Seric #  endif
1140*68742Seric 
1141*68742Seric # endif
1142*68742Seric #endif
1143*68742Seric 
1144*68742Seric 
1145*68742Seric /*
1146*68742Seric **  Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach
1147*68742Seric */
1148*68742Seric 
1149*68742Seric #ifdef luna
1150*68742Seric # ifndef IDENTPROTO
1151*68742Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
1152*68742Seric # endif
1153*68742Seric # ifdef uniosb
1154*68742Seric #  define SYS_TIME	1	/* use <sys/time.h> instead of <time.h> */
1155*68742Seric #  define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
1156*68742Seric # endif
1157*68742Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
1158*68742Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
1159*68742Seric # ifdef uniosb
1160*68742Seric #  define LA_TYPE	LA_INT
1161*68742Seric # endif
1162*68742Seric # ifdef luna2m
1163*68742Seric #  define LA_TYPE	LA_SUBR
1164*68742Seric # endif
1165*68742Seric # ifdef luna88k
1166*68742Seric #  define LA_TYPE	LA_INT
1167*68742Seric # endif
1168*68742Seric # define SFS_TYPE	SFS_VFS /* use <sys/vfs.h> statfs() implementation */
1169*68742Seric # define setpgid	setpgrp
1170*68742Seric # undef WIFEXITED
1171*68742Seric # undef WEXITSTATUS
1172*68742Seric typedef int		pid_t;
1173*68742Seric typedef int		(*sigfunc_t)();
1174*68742Seric # define SIGFUNC_DEFINED
1175*68742Seric extern char	*getenv();
1176*68742Seric extern int	errno;
1177*68742Seric # ifndef _PATH_SENDMAILCF
1178*68742Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
1179*68742Seric # endif
1180*68742Seric #endif
1181*68742Seric 
1182*68742Seric 
1183*68742Seric /*
1184*68742Seric **  NEC EWS-UX/V 4.2
1185*68742Seric **
1186*68742Seric **  with /usr/ucb/cc
1187*68742Seric */
1188*68742Seric 
1189*68742Seric #ifdef nec_ews_svr4
1190*68742Seric # define SYSTEM5	1	/* include all the System V defines */
1191*68742Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
1192*68742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
1193*68742Seric # define HASSETREUID	1	/* has setreuid(2) call */
1194*68742Seric # define setreuid(r, e)	seteuid(e)
1195*68742Seric # define HASSETSID	1	/* has Posix setsid(2) call */
1196*68742Seric # define LA_TYPE	LA_INT
1197*68742Seric # define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
1198*68742Seric # define GIDSET_T	gid_t
1199*68742Seric # ifndef HASGETUSERSHELL
1200*68742Seric #  define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
1201*68742Seric # endif
1202*68742Seric # undef WIFEXITED
1203*68742Seric # undef WEXITSTATUS
1204*68742Seric # ifndef _PATH_UNIX
1205*68742Seric #  define _PATH_UNIX		"/unix"
1206*68742Seric # endif
1207*68742Seric # ifndef _PATH_SENDMAILCF
1208*68742Seric #  define _PATH_SENDMAILCF	"/var/ucblib/sendmail.cf"
1209*68742Seric # endif
1210*68742Seric # ifndef _PATH_SENDMAILPID
1211*68742Seric #  define _PATH_SENDMAILPID	"/var/ucblib/sendmail.pid"
1212*68742Seric # endif
1213*68742Seric # define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
1214*68742Seric #endif
1215*68742Seric 
1216*68742Seric 
1217*68742Seric 
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
1536*68742Seric # define STDIN_FILENO	0
153758153Seric #endif
153858153Seric 
153958153Seric #ifndef STDOUT_FILENO
1540*68742Seric # define STDOUT_FILENO	1
154158153Seric #endif
154258153Seric 
154358153Seric #ifndef STDERR_FILENO
1544*68742Seric # 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 
1554*68742Seric #ifndef SEEK_SET
1555*68742Seric # define SEEK_SET	0
1556*68742Seric # define SEEK_CUR	1
1557*68742Seric # define SEEK_END	2
1558*68742Seric #endif
1559*68742Seric 
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