xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 69401)
19147Seric /*
268839Seric  * Copyright (c) 1983, 1995 Eric P. Allman
362522Sbostic  * Copyright (c) 1988, 1993
462522Sbostic  *	The Regents of the University of California.  All rights reserved.
533728Sbostic  *
642825Sbostic  * %sccs.include.redist.c%
733728Sbostic  *
8*69401Seric  *	@(#)conf.h	8.156 (Berkeley) 05/13/95
933728Sbostic  */
109147Seric 
1122726Sdist /*
1222726Sdist **  CONF.H -- All user-configurable parameters for sendmail
1322726Sdist */
149147Seric 
1557232Seric # include <sys/param.h>
1664705Seric # include <sys/types.h>
1759389Seric # include <sys/stat.h>
1864380Seric # include <sys/file.h>
1964500Seric # include <sys/wait.h>
2058689Seric # include <fcntl.h>
2164035Seric # include <signal.h>
2268693Seric # include <netdb.h>
2368693Seric # include <pwd.h>
2457232Seric 
2563902Seric /**********************************************************************
269147Seric **  Table sizes, etc....
279147Seric **	There shouldn't be much need to change these....
2863902Seric **********************************************************************/
299147Seric 
3059303Seric # define MAXLINE	2048		/* max line length */
3124945Seric # define MAXNAME	256		/* max length of a name */
329147Seric # define MAXPV		40		/* max # of parms to mailers */
3359303Seric # define MAXATOM	200		/* max atoms per address */
349147Seric # define MAXMAILERS	25		/* maximum mailers known to system */
3568384Seric # define MAXRWSETS	200		/* max # of sets of rewriting rules */
369147Seric # define MAXPRIORITIES	25		/* max values for Precedence: field */
3757143Seric # define MAXMXHOSTS	20		/* max # of MX records */
3852106Seric # define SMTPLINELIM	990		/* maximum SMTP line length */
3957232Seric # define MAXKEY		128		/* maximum size of a database key */
4057232Seric # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
4159056Seric # define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
4259667Seric # define MAXALIASDB	12		/* max # of alias databases */
4367729Seric # define MAXMAPSTACK	12		/* max # of stacked or sequenced maps */
4467729Seric # define MAXTOCLASS	8		/* max # of message timeout classes */
4568517Seric # define MAXMIMEARGS	20		/* max args in Content-Type: */
4668517Seric # define MAXMIMENESTING	20		/* max MIME multipart nesting */
4757143Seric 
4857143Seric # ifndef QUEUESIZE
4957143Seric # define QUEUESIZE	1000		/* max # of jobs per queue run */
5057143Seric # endif
5157143Seric 
5263902Seric /**********************************************************************
539147Seric **  Compilation options.
5425673Seric **
5525673Seric **	#define these if they are available; comment them out otherwise.
5663902Seric **********************************************************************/
579147Seric 
5825673Seric # define LOG		1	/* enable logging */
5925673Seric # define UGLYUUCP	1	/* output ugly UUCP From lines */
6064813Seric # define NETUNIX	1	/* include unix domain support */
6158778Seric # define NETINET	1	/* include internet support */
6253735Seric # define MATCHGECOS	1	/* match user names from gecos field */
6363753Seric # define XDEBUG		1	/* enable extended debugging */
6468785Seric # if (defined(NEWDB) || defined(HESIOD)) && !defined(USERDB)
6568848Seric #  define USERDB	1	/* look in user database */
6656337Seric # endif
6756337Seric 
6866334Seric /**********************************************************************
6966334Seric **  0/1 Compilation options.
7066334Seric **	#define these to 1 if they are available;
7166334Seric **	#define them to 0 otherwise.
7266334Seric **********************************************************************/
7366334Seric 
7466334Seric # ifndef NAMED_BIND
7566334Seric #  define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
7666334Seric # endif
7766334Seric 
7868848Seric # ifndef DSN
7968848Seric #  define DSN		1	/* include delivery status notification code */
8068848Seric # endif
8168848Seric 
8264032Seric /*
8364944Seric **  Most systems have symbolic links today, so default them on.  You
8464944Seric **  can turn them off by #undef'ing this below.
8564944Seric */
8664944Seric 
8764944Seric # define HASLSTAT	1	/* has lstat(2) call */
8864944Seric 
8964962Seric /*
9064962Seric **  General "standard C" defines.
9164962Seric **
9264962Seric **	These may be undone later, to cope with systems that claim to
9364962Seric **	be Standard C but aren't.  Gcc is the biggest offender -- it
9464962Seric **	doesn't realize that the library is part of the language.
9564962Seric **
9664962Seric **	Life would be much easier if we could get rid of this sort
9764962Seric **	of bozo problems.
9864962Seric */
9964962Seric 
10064962Seric #ifdef __STDC__
10164962Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
10264962Seric #endif
10364962Seric 
10463902Seric /**********************************************************************
10559023Seric **  Operating system configuration.
10659023Seric **
10759023Seric **	Unless you are porting to a new OS, you shouldn't have to
10859023Seric **	change these.
10963902Seric **********************************************************************/
11056823Seric 
11163787Seric /*
11263787Seric **  Per-Operating System defines
11363787Seric */
11463787Seric 
11564314Seric 
11663902Seric /*
11765565Seric **  HP-UX -- tested for 8.07, 9.00, and 9.01.
11868889Seric **
11968889Seric **	If V4FS is defined, compile for HP-UX 10.0.
12063902Seric */
12163902Seric 
12267626Seric #ifdef __hpux
12368889Seric 		/* common definitions for HP-UX 9.x and 10.x */
12468889Seric # undef m_flags		/* conflict between db.h & sys/sysmacros.h on HP 300 */
12563787Seric # define SYSTEM5	1	/* include all the System V defines */
12664035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
12764035Seric # define HASSETREUID	1	/* has setreuid(2) call */
12865982Seric # define setreuid(r, e)		setresuid(r, e, -1)
12968294Seric # define LA_TYPE	LA_SUBR
13068873Seric # define SPT_TYPE	SPT_PSTAT
13165749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
13265354Seric # define GIDSET_T	gid_t
13365581Seric # ifndef HASGETUSERSHELL
13465581Seric #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
13565581Seric # endif
13665504Seric # define syslog		hard_syslog
13765581Seric # ifdef __STDC__
13865581Seric extern int	syslog(int, char *, ...);
13965167Seric # endif
14068889Seric 
14168889Seric # ifdef V4FS
14268889Seric 		/* HP-UX 10.x */
14368889Seric #  define _PATH_UNIX	"/stand/vmunix"
14468889Seric #  ifndef _PATH_SENDMAILCF
14568889Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
14668889Seric #  endif
14768889Seric #  ifndef _PATH_SENDMAILPID
14868889Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
14968889Seric #  endif
15068889Seric #  ifndef IDENTPROTO
15168889Seric #   define IDENTPROTO	1	/* TCP/IP implementation fixed in 10.0 */
15268889Seric #  endif
15368889Seric 
15468889Seric # else
15568889Seric 		/* HP-UX 9.x */
15668889Seric #  define _PATH_UNIX	"/hp-ux"
15768889Seric #  ifndef _PATH_SENDMAILCF
15868889Seric #   define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
15968889Seric #  endif
16068889Seric #  ifndef IDENTPROTO
16168889Seric #   define IDENTPROTO	0	/* TCP/IP implementation is broken */
16268889Seric #  endif
16368889Seric # endif
16468889Seric 
16567626Seric #endif
16656823Seric 
16764314Seric 
16863902Seric /*
16963902Seric **  IBM AIX 3.x -- actually tested for 3.2.3
17063902Seric */
17163902Seric 
17267626Seric #ifdef _AIX3
17364035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
17464840Seric # define HASUNAME	1	/* use System V uname(2) system call */
17565211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
17660219Seric # define FORK		fork	/* no vfork primitive available */
17765749Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
17867771Seric # define SPT_PADCHAR	'\0'	/* pad process title with nulls */
17968145Seric # define LA_TYPE	LA_INT
18067626Seric #endif
18160219Seric 
18264314Seric 
18363902Seric /*
18463902Seric **  Silicon Graphics IRIX
18563902Seric **
18663965Seric **	Compiles on 4.0.1.
18767967Seric **
18868686Seric **	Use IRIX64 instead of IRIX for 64-bit IRIX (6.0).
18968686Seric **	Use IRIX5 instead of IRIX for IRIX 5.x.
19067967Seric **
19167967Seric **	IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
19268686Seric **	IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>.
19363902Seric */
19463902Seric 
19568686Seric #if defined(IRIX64) || defined(IRIX5)
19667967Seric # define IRIX
19767967Seric #endif
19867967Seric 
19967626Seric #ifdef IRIX
20066763Seric # define SYSTEM5	1	/* this is a System-V derived system */
20164035Seric # define HASSETREUID	1	/* has setreuid(2) call */
20264035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
20365211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
20463753Seric # define FORK		fork	/* no vfork primitive available */
20568686Seric # if !defined(IRIX64) && !defined(IRIX5)
20668225Seric #  define WAITUNION	1	/* use "union wait" as wait argument type */
20768225Seric # endif
20864155Seric # define setpgid	BSDsetpgrp
20963937Seric # define GIDSET_T	gid_t
21068705Seric # define ARGV_T		const char **
21165749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
21268439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
21366763Seric # define LA_TYPE	LA_INT
21467967Seric # ifdef IRIX64
21567967Seric #  define NAMELISTMASK	0x7fffffffffffffff	/* mask for nlist() values */
21667967Seric # else
21767967Seric #  define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
21867967Seric # endif
21967626Seric #endif
22063753Seric 
22163902Seric 
22263902Seric /*
22364813Seric **  SunOS and Solaris
22464813Seric **
22564813Seric **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
22664813Seric **	Solaris 2.2 (a.k.a. SunOS 5.2).
22763902Seric */
22863902Seric 
22963787Seric #if defined(sun) && !defined(BSD)
23059074Seric 
23164035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
23264813Seric # define HASUNAME	1	/* use System V uname(2) system call */
23365211Seric # define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
23465749Seric # define LA_TYPE	LA_INT
23560564Seric 
23664842Seric # ifdef SOLARIS_2_3
23768813Seric #  define SOLARIS	203	/* for back compat only -- use -DSOLARIS=203 */
23864842Seric # endif
23964842Seric 
24060602Seric # ifdef SOLARIS
24163902Seric 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
24265222Seric #  ifndef __svr4__
24365222Seric #   define __svr4__		/* use all System V Releae 4 defines below */
24465222Seric #  endif
24563787Seric #  include <sys/time.h>
24665172Seric #  define GIDSET_T	gid_t
24765189Seric #  ifndef _PATH_UNIX
24867129Seric #   define _PATH_UNIX	"/dev/ksyms"
24965189Seric #  endif
25063962Seric #  ifndef _PATH_SENDMAILCF
25163962Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
25264072Seric #  endif
25364072Seric #  ifndef _PATH_SENDMAILPID
25463962Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
25563962Seric #  endif
256*69401Seric #  ifndef _PATH_HOSTS
257*69401Seric #   define _PATH_HOSTS		"/etc/inet/hosts"
258*69401Seric #  endif
25966022Seric #  ifndef SYSLOG_BUFSIZE
26066022Seric #   define SYSLOG_BUFSIZE	1024	/* allow full size syslog buffer */
26166022Seric #  endif
26263787Seric 
26360602Seric # else
26465105Seric 			/* SunOS 4.0.3 or 4.1.x */
26565189Seric #  define HASSETREUID	1	/* has setreuid(2) call */
26665830Seric #  ifndef HASFLOCK
26765830Seric #   define HASFLOCK	1	/* has flock(2) call */
26865830Seric #  endif
26965749Seric #  define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
27060564Seric #  include <vfork.h>
27163787Seric 
27265105Seric #  ifdef SUNOS403
27365105Seric 			/* special tweaking for SunOS 4.0.3 */
27465105Seric #   include <malloc.h>
27565105Seric #   define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
27665105Seric #   define WAITUNION	1	/* use "union wait" as wait argument type */
27765105Seric #   undef WIFEXITED
27865105Seric #   undef WEXITSTATUS
27965105Seric #   undef HASUNAME
28065105Seric #   define setpgid	setpgrp
28165105Seric typedef int		pid_t;
28265105Seric extern char		*getenv();
28365105Seric 
28466732Seric #  else
28566732Seric 			/* 4.1.x specifics */
28666732Seric #   define HASSETSID	1	/* has Posix setsid(2) call */
28766732Seric #   define HASSETVBUF	1	/* we have setvbuf(3) in libc */
28866732Seric 
28965105Seric #  endif
29060564Seric # endif
29159023Seric #endif
29259023Seric 
29364718Seric /*
29464813Seric **  DG/UX
29564813Seric **
29667427Seric **	Tested on 5.4.2 and 5.4.3.  Use DGUX_5_4_2 to get the
29767427Seric **	older support.
29867427Seric **	5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
29964718Seric */
30064314Seric 
30167427Seric #ifdef DGUX_5_4_2
30267427Seric # define DGUX		1
30367427Seric #endif
30467427Seric 
30564718Seric #ifdef	DGUX
30664718Seric # define SYSTEM5	1
30764718Seric # define LA_TYPE	LA_SUBR
30864718Seric # define HASSETREUID	1	/* has setreuid(2) call */
30964718Seric # define HASUNAME	1	/* use System V uname(2) system call */
31064718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
31164718Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
31266036Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) */
31365167Seric # ifndef IDENTPROTO
31465167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
31565167Seric # endif
31667771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
31765749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
31864813Seric 
31964813Seric /* these include files must be included early on DG/UX */
32064813Seric # include <netinet/in.h>
32164813Seric # include <arpa/inet.h>
32264813Seric 
32367427Seric # ifdef DGUX_5_4_2
32467427Seric #  define inet_addr	dgux_inet_addr
32564718Seric extern long	dgux_inet_addr();
32667427Seric # endif
32764718Seric #endif
32864718Seric 
32964718Seric 
33063902Seric /*
33163902Seric **  Digital Ultrix 4.2A or 4.3
33264264Seric **
33364264Seric **	Apparently, fcntl locking is broken on 4.2A, in that locks are
33464264Seric **	not dropped when the process exits.  This causes major problems,
33564264Seric **	so flock is the only alternative.
33663902Seric */
33763902Seric 
33860564Seric #ifdef ultrix
33964035Seric # define HASSETREUID	1	/* has setreuid(2) call */
34063962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
34164035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
34266242Seric # define HASUNAME	1	/* use System V uname(2) system call */
34365830Seric # ifndef HASFLOCK
34465830Seric #  define HASFLOCK	1	/* has flock(2) call */
34565830Seric # endif
34665211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
34769279Seric # ifndef BROKEN_RES_SEARCH
34869279Seric #  define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
34969279Seric # endif
35065135Seric # ifdef vax
35165135Seric #  define LA_TYPE	LA_FLOAT
35265135Seric # else
35365135Seric #  define LA_TYPE	LA_INT
35465135Seric #  define LA_AVENRUN	"avenrun"
35565135Seric # endif
35665749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
35765167Seric # ifndef IDENTPROTO
35869279Seric #  define IDENTPROTO	0	/* pre-4.4 TCP/IP implementation is broken */
35965167Seric # endif
36060564Seric #endif
36160564Seric 
36264314Seric 
36363902Seric /*
36468072Seric **  OSF/1 for Intel Paragon.
36568072Seric **
36668082Seric **	Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
36768082Seric **	of Intel Scalable Systems Divison.
36868072Seric */
36968072Seric 
37068072Seric #ifdef __PARAGON__
37168072Seric # define __osf__	1	/* get OSF/1 defines below */
37268072Seric # ifndef _PATH_SENDMAILCF
37368072Seric #  define _PATH_SENDMAILCF	"/var/adm/sendmail/sendmail.cf"
37468072Seric # endif
37568072Seric #endif
37668072Seric 
37768072Seric 
37868072Seric /*
37963902Seric **  OSF/1 (tested on Alpha)
38063902Seric */
38163902Seric 
38263787Seric #ifdef __osf__
38363962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
38464035Seric # define HASSETREUID	1	/* has setreuid(2) call */
38564035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
38666226Seric # ifndef HASFLOCK
38765830Seric #  define HASFLOCK	1	/* has flock(2) call */
38865830Seric # endif
38963962Seric # define LA_TYPE	LA_INT
39065749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
39164813Seric # ifndef _PATH_SENDMAILPID
39265504Seric #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
39364813Seric # endif
39459287Seric #endif
39559287Seric 
39664314Seric 
39763902Seric /*
39863902Seric **  NeXTstep
39963902Seric */
40063902Seric 
40164076Seric #ifdef NeXT
40264035Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
40365830Seric # ifndef HASFLOCK
40465830Seric #  define HASFLOCK	1	/* has flock(2) call */
40565830Seric # endif
40664125Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
40764563Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
40868705Seric # define UID_T		int	/* compiler gripes on uid_t */
40963753Seric # define sleep		sleepX
41064155Seric # define setpgid	setpgrp
41164295Seric # ifndef LA_TYPE
41264295Seric #  define LA_TYPE	LA_MACH
41364295Seric # endif
41465749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
41564500Seric # ifndef _POSIX_SOURCE
41664035Seric typedef int		pid_t;
41764500Seric #  undef WEXITSTATUS
41864500Seric #  undef WIFEXITED
41964500Seric # endif
42064072Seric # ifndef _PATH_SENDMAILCF
42164072Seric #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
42264072Seric # endif
42364072Seric # ifndef _PATH_SENDMAILPID
42464072Seric #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
42564072Seric # endif
42659288Seric #endif
42759288Seric 
42864314Seric 
42963902Seric /*
43063962Seric **  4.4 BSD
43164831Seric **
43264831Seric **	See also BSD defines.
43363902Seric */
43463902Seric 
43560568Seric #ifdef BSD4_4
43664072Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
43760568Seric # include <sys/cdefs.h>
43863838Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
43964072Seric # ifndef LA_TYPE
44064072Seric #  define LA_TYPE	LA_SUBR
44164072Seric # endif
44265749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
44367771Seric # define SPT_TYPE	SPT_PSSTRINGS	/* use PS_STRINGS pointer */
44460568Seric #endif
44560568Seric 
44664314Seric 
44763902Seric /*
44865982Seric **  BSD/386 (all versions)
44965982Seric **	From Tony Sanders, BSDI
45065982Seric */
45165982Seric 
45265982Seric #ifdef __bsdi__
45365982Seric # define HASUNSETENV	1	/* has the unsetenv(3) call */
45465982Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
45566843Seric # include <sys/cdefs.h>
45666843Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
45766030Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
45866843Seric # ifndef LA_TYPE
45966843Seric #  define LA_TYPE	LA_SUBR
46066843Seric # endif
46168753Seric # define GIDSET_T	gid_t
46265982Seric # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
46366843Seric 			/* version 1.1 or later */
46467771Seric #  undef SPT_TYPE
46567771Seric #  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
46666843Seric # else
46766843Seric 			/* version 1.0 or earlier */
46866843Seric #  ifndef OLD_NEWDB
46966843Seric #   define OLD_NEWDB	1	/* old version of newdb library */
47066843Seric #  endif
47167771Seric #  define SPT_PADCHAR	'\0'	/* pad process title with nulls */
47265982Seric # endif
47365982Seric #endif
47465982Seric 
47565982Seric 
47665982Seric 
47765982Seric /*
47865049Seric **  386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
47964733Seric **
48064733Seric **  4.3BSD clone, closer to 4.4BSD
48164831Seric **
48264831Seric **	See also BSD defines.
48364733Seric */
48464733Seric 
48565049Seric #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
48664733Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
48764733Seric # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
48866754Seric # ifdef __NetBSD__
48966754Seric #  define HASUNAME	1	/* has uname(2) syscall */
49066754Seric # endif
49164733Seric # include <sys/cdefs.h>
49264733Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
49364733Seric # ifndef LA_TYPE
49464733Seric #  define LA_TYPE	LA_SUBR
49564733Seric # endif
49665749Seric # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
49764733Seric #endif
49864733Seric 
49964733Seric 
50064733Seric /*
50164813Seric **  Mach386
50264813Seric **
50364813Seric **	For mt Xinu's Mach386 system.
50464813Seric */
50564813Seric 
50664813Seric #if defined(MACH) && defined(i386)
50764813Seric # define MACH386	1
50864813Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
50964813Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
51066226Seric # ifndef HASFLOCK
51165830Seric #  define HASFLOCK	1	/* has flock(2) call */
51265830Seric # endif
51364813Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
51464813Seric # define NEEDSTRTOL	1	/* need the strtol() function */
51564813Seric # define setpgid	setpgrp
51664813Seric # ifndef LA_TYPE
51764813Seric #  define LA_TYPE	LA_FLOAT
51864813Seric # endif
51965749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
52064962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
52164813Seric # undef WEXITSTATUS
52264813Seric # undef WIFEXITED
52364813Seric # ifndef _PATH_SENDMAILCF
52464813Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
52564813Seric # endif
52664813Seric # ifndef _PATH_SENDMAILPID
52764813Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
52864813Seric # endif
52964813Seric #endif
53064813Seric 
53164813Seric 
53264813Seric /*
53363969Seric **  4.3 BSD -- this is for very old systems
53463969Seric **
53565949Seric **	Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
53665949Seric **
53763969Seric **	You'll also have to install a new resolver library.
53863969Seric **	I don't guarantee that support for this environment is complete.
53963969Seric */
54063969Seric 
54165949Seric #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
54263969Seric # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
54363969Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
54463970Seric # define ARBPTR_T	char *
54564155Seric # define setpgid	setpgrp
54663969Seric # ifndef LA_TYPE
54763969Seric #  define LA_TYPE	LA_FLOAT
54863969Seric # endif
54963969Seric # ifndef _PATH_SENDMAILCF
55063969Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
55163969Seric # endif
55265167Seric # ifndef IDENTPROTO
55365167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
55465167Seric # endif
55564834Seric # undef WEXITSTATUS
55664834Seric # undef WIFEXITED
55764834Seric typedef short		pid_t;
55864834Seric extern int		errno;
55963969Seric #endif
56063969Seric 
56164314Seric 
56263969Seric /*
56363902Seric **  SCO Unix
56465087Seric **
56565087Seric **	This includes two parts -- the first is for SCO Open Server 3.2v4
56665087Seric **	(contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
56765087Seric **	The second is, I believe, for an older version.
56863902Seric */
56963902Seric 
57065087Seric #ifdef _SCO_unix_4_2
57165087Seric # define _SCO_unix_
57265087Seric # define HASSETREUID	1	/* has setreuid(2) call */
57366757Seric # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
57465087Seric # define _PATH_UNIX	"/unix"
57565087Seric # ifndef _PATH_SENDMAILCF
57665087Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
57765087Seric # endif
57865087Seric # ifndef _PATH_SENDMAILPID
57965087Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
58065087Seric # endif
58165087Seric #endif
58265087Seric 
58363838Seric #ifdef _SCO_unix_
58463838Seric # define SYSTEM5	1	/* include all the System V defines */
58564035Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
58665212Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
58763838Seric # define FORK		fork
58863838Seric # define MAXPATHLEN	PATHSIZE
58964718Seric # define LA_TYPE	LA_SHORT
59067812Seric # define SFS_TYPE	SFS_4ARGS	/* use <sys/statfs.h> 4-arg impl */
59168439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
59267608Seric # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
59364813Seric # undef NETUNIX			/* no unix domain socket support */
59463838Seric #endif
59563838Seric 
59664314Seric 
59763962Seric /*
59868442Seric **  ISC (SunSoft) Unix.
59968442Seric **
60068442Seric **	Contributed by J.J. Bailey <jjb@jagware.bcc.com>
60168442Seric */
60268442Seric 
60368442Seric #ifdef ISC_UNIX
60468442Seric # include <net/errno.h>
60568442Seric # define SYSTEM5	1	/* include all the System V defines */
60668442Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
60768442Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
60868442Seric # define HASSETREUID	1	/* has setreuid(2) call */
60968442Seric # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
61068442Seric # undef NETUNIX			/* no unix domain socket support */
61168442Seric # define FORK		fork
61268442Seric # define MAXPATHLEN	1024
61368442Seric # define LA_TYPE	LA_SHORT
61468442Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
61568442Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
61668442Seric # define _PATH_UNIX	"/unix"
61768442Seric # ifndef _PATH_SENDMAILCF
61868442Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
61968442Seric # endif
62068442Seric # ifndef _PATH_SENDMAILPID
62168442Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
62268442Seric # endif
62368442Seric 
62468442Seric typedef short		pid_t;
62568442Seric 
62668442Seric #endif
62768442Seric 
62868442Seric 
62968442Seric /*
63068040Seric **  Altos System V.
63168040Seric **	Contributed by Tim Rice <timr@crl.com>.
63268040Seric */
63368040Seric 
63468040Seric #ifdef ALTOS_SYS_V
63568040Seric # include <limits.h>
63668040Seric # define SYSTEM5	1	/* include all the System V defines */
63768040Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
63868040Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
63968040Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
64068040Seric # define NEEDFSYNC	1	/* no fsync(2) in system library */
64168040Seric # define FORK		fork
64268040Seric # define MAXPATHLEN	PATHSIZE
64368040Seric # define LA_TYPE	LA_SHORT
64468040Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
64568439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
64668040Seric # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
64768040Seric # undef NETUNIX			/* no unix domain socket support */
64868040Seric # undef WIFEXITED
64968040Seric # undef WEXITSTATUS
65068040Seric # define strtoul	strtol	/* gcc library bogosity */
65168040Seric 
65268040Seric typedef unsigned short	uid_t;
65368040Seric typedef unsigned short	gid_t;
65468040Seric typedef short		pid_t;
65568040Seric #endif
65668040Seric 
65768040Seric 
65868040Seric /*
65963962Seric **  ConvexOS 11.0 and later
66065949Seric **
66165949Seric **	"Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
66265949Seric **	works on 9.1 as well.
66363962Seric */
66463962Seric 
66563962Seric #ifdef _CONVEX_SOURCE
66663977Seric # define BSD		1	/* include all the BSD defines */
66763977Seric # define HASUNAME	1	/* use System V uname(2) system call */
66863962Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
66963977Seric # define NEEDGETOPT	1	/* need replacement for getopt(3) */
67063962Seric # define LA_TYPE	LA_FLOAT
67165749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
67265949Seric # ifndef _PATH_SENDMAILCF
67365949Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
67465949Seric # endif
67565949Seric # ifndef S_IREAD
67665949Seric #  define S_IREAD	_S_IREAD
67765949Seric #  define S_IWRITE	_S_IWRITE
67865949Seric #  define S_IEXEC	_S_IEXEC
67965949Seric #  define S_IFMT	_S_IFMT
68065949Seric #  define S_IFCHR	_S_IFCHR
68165949Seric #  define S_IFBLK	_S_IFBLK
68265949Seric # endif
68365167Seric # ifndef IDENTPROTO
68465167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
68565167Seric # endif
68663962Seric #endif
68763962Seric 
68864314Seric 
68963962Seric /*
69064999Seric **  RISC/os 4.52
69163962Seric **
69264999Seric **	Gives a ton of warning messages, but otherwise compiles.
69363962Seric */
69463962Seric 
69563965Seric #ifdef RISCOS
69664999Seric 
69763962Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
69866226Seric # ifndef HASFLOCK
69965830Seric #  define HASFLOCK	1	/* has flock(2) call */
70065830Seric # endif
70164999Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
70264999Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
70363962Seric # define LA_TYPE	LA_INT
70463962Seric # define LA_AVENRUN	"avenrun"
70563962Seric # define _PATH_UNIX	"/unix"
70664999Seric # undef WIFEXITED
70764999Seric 
70864999Seric # define setpgid	setpgrp
70964999Seric 
71064999Seric extern int		errno;
71164999Seric typedef int		pid_t;
71264999Seric #define			SIGFUNC_DEFINED
71364999Seric typedef int		(*sigfunc_t)();
71464999Seric extern char		*getenv();
71564999Seric extern void		*malloc();
71664999Seric 
71763962Seric #endif
71863962Seric 
71964314Seric 
72064155Seric /*
72164155Seric **  Linux 0.99pl10 and above...
72266300Seric **
72366300Seric **  Thanks to, in reverse order of contact:
72466300Seric **
72568093Seric **	John Kennedy <warlock@csuchico.edu>
72667885Seric **	Andrew Pam <avatar@aus.xanadu.com>
72766300Seric **	Florian La Roche <rzsfl@rz.uni-sb.de>
72866300Seric **	Karl London <karl@borg.demon.co.uk>
72966300Seric **
73068093Seric **  Last compiled against:	[12/14/94 @ 11:38:41 PM (Wednesday)]
73168093Seric **	sendmail 8.7.a.5	named 4.9.3-beta12-p1	db-1.85
73268093Seric **	gcc 2.6.2		libc.so.4.6.20
73368093Seric **	slackware 2.1.0		linux 1.1.70
73464155Seric */
73564155Seric 
73664770Seric #ifdef __linux__
73766298Seric # define BSD		1	/* include BSD defines */
73864155Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
73966298Seric # define HASUNAME	1	/* use System V uname(2) system call */
74064380Seric # define HASUNSETENV	1	/* has unsetenv(3) call */
74166298Seric # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
74266300Seric # define GIDSET_T	gid_t	/* from <linux/types.h> */
74367885Seric # define HASGETUSERSHELL 0	/* getusershell(3) broken in Slackware 2.0 */
74468518Seric # ifndef HASFLOCK
74568518Seric #  define HASFLOCK	0	/* flock(2) is broken after 0.99.13 */
74668518Seric # endif
74764155Seric # ifndef LA_TYPE
74866301Seric #  define LA_TYPE	LA_PROCSTR
74964155Seric # endif
75066300Seric # define SFS_TYPE	SFS_VFS		/* use <sys/vfs.h> statfs() impl */
75168093Seric # ifndef _PATH_SENDMAILPID
75268093Seric #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
75368093Seric # endif
75468093Seric # define TZ_TYPE	TZ_TNAME
75564763Seric # include <sys/sysmacros.h>
75666300Seric # undef atol			/* wounded in <stdlib.h> */
75764155Seric #endif
75864155Seric 
75964155Seric 
76064345Seric /*
76164345Seric **  DELL SVR4 Issue 2.2, and others
76264345Seric **	From Kimmo Suominen <kim@grendel.lut.fi>
76364345Seric **
76464345Seric **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
76564345Seric **	defined, and the definitions conflict.
76664924Seric **
76764924Seric **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
76864924Seric **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
76964924Seric **	(SVR4.0/386 version 3.0).
77064345Seric */
77164345Seric 
77264345Seric #ifdef DELL_SVR4
77365189Seric 				/* no changes necessary */
77465189Seric 				/* see general __svr4__ defines below */
77564345Seric #endif
77664345Seric 
77764345Seric 
77864380Seric /*
77964380Seric **  Apple A/UX 3.0
78064380Seric */
78164345Seric 
78264380Seric #ifdef _AUX_SOURCE
78364729Seric # include <sys/sysmacros.h>
78464380Seric # define BSD			/* has BSD routines */
78568803Seric # define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
78664380Seric # define HASUNAME	1	/* use System V uname(2) system call */
78764380Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
78864561Seric # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
78965167Seric # ifndef IDENTPROTO
79065167Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
79165167Seric # endif
79264380Seric # define FORK		fork
79364380Seric # ifndef _PATH_SENDMAILCF
79464380Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
79564380Seric # endif
79664380Seric # ifndef LA_TYPE
79764380Seric #  define LA_TYPE	LA_ZERO
79864380Seric # endif
79965749Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
80064560Seric # undef WIFEXITED
80164560Seric # undef WEXITSTATUS
80264380Seric #endif
80364380Seric 
80464380Seric 
80564705Seric /*
80664705Seric **  Encore UMAX V
80764705Seric **
80864705Seric **	Not extensively tested.
80964705Seric */
81064380Seric 
81164705Seric #ifdef UMAXV
81264705Seric # include <limits.h>
81364705Seric # define HASUNAME	1	/* use System V uname(2) system call */
81464705Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
81564705Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
81665211Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
81764705Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
81864705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
81964705Seric # define FORK		fork	/* no vfork(2) primitive available */
82065749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
82164705Seric # define MAXPATHLEN	PATH_MAX
82264705Seric extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
82364705Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
82464705Seric # undef WIFEXITED
82564705Seric # undef WEXITSTATUS
82664705Seric #endif
82764705Seric 
82864705Seric 
82964939Seric /*
83064939Seric **  Stardent Titan 3000 running TitanOS 4.2.
83164939Seric **
83264939Seric **	Must be compiled in "cc -43" mode.
83364939Seric **
83464944Seric **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
83564939Seric **
83664939Seric **	Note the tweaking below after the BSD defines are set.
83764939Seric */
83864705Seric 
83964939Seric #ifdef titan
84064939Seric # define setpgid	setpgrp
84164939Seric typedef int		pid_t;
84264939Seric # undef WIFEXITED
84364939Seric # undef WEXITSTATUS
84464939Seric #endif
84564939Seric 
84664939Seric 
84764962Seric /*
84864962Seric **  Sequent DYNIX 3.2.0
84964962Seric **
85064962Seric **	From Jim Davis <jdavis@cs.arizona.edu>.
85164962Seric */
85264939Seric 
85364962Seric #ifdef sequent
85466038Seric 
85564962Seric # define BSD		1
85664962Seric # define HASUNSETENV	1
85764962Seric # define BSD4_3		1	/* to get signal() in conf.c */
85864962Seric # define WAITUNION	1
85964962Seric # define LA_TYPE	LA_FLOAT
86064962Seric # ifdef	_POSIX_VERSION
86164962Seric #  undef _POSIX_VERSION		/* set in <unistd.h> */
86264962Seric # endif
86364962Seric # undef HASSETVBUF		/* don't actually have setvbuf(3) */
86464962Seric # define setpgid	setpgrp
86564962Seric 
86664962Seric /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
86764962Seric # undef	WIFEXITED
86864962Seric # define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
86964962Seric 			 ((union wait*)&(s))->w_termsig == 0)
87064962Seric # define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
87164962Seric typedef int		pid_t;
87264962Seric # define isgraph(c)	(isprint(c) && (c != ' '))
87364962Seric 
87466144Seric # ifndef IDENTPROTO
87566144Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
87666144Seric # endif
87766144Seric 
87864962Seric # ifndef _PATH_UNIX
87964962Seric #  define _PATH_UNIX	"/dynix"
88064962Seric # endif
88164962Seric # ifndef _PATH_SENDMAILCF
88264962Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
88364962Seric # endif
88464962Seric 
88564962Seric #endif
88664962Seric 
88764962Seric 
88865748Seric /*
88966038Seric **  Sequent DYNIX/ptx v2.0 (and higher)
89066038Seric **
89166038Seric **	For DYNIX/ptx v1.x, undefine HASSETREUID.
89266038Seric **
89366038Seric **	From Tim Wright <timw@sequent.com>.
89466038Seric */
89566038Seric 
89666038Seric #ifdef _SEQUENT_
89766038Seric # define SYSTEM5	1	/* include all the System V defines */
89866038Seric # define HASSETSID	1	/* has POSIX setsid(2) call */
89966038Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
90066038Seric # define HASSETREUID	1	/* has setreuid(2) call */
90166038Seric # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
90266038Seric # define GIDSET_T	gid_t
90366038Seric # define LA_TYPE	LA_INT
90466038Seric # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
90567771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
90666144Seric # ifndef IDENTPROTO
90766144Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
90866144Seric # endif
90966038Seric # ifndef _PATH_SENDMAILCF
91066038Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
91166038Seric # endif
91266038Seric # ifndef _PATH_SENDMAILPID
91366038Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
91466038Seric # endif
91566038Seric #endif
91666038Seric 
91766038Seric 
91866038Seric /*
91965748Seric **  Cray Unicos
92065748Seric **
92165748Seric **	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
92265748Seric */
92364962Seric 
92465748Seric #ifdef UNICOS
92565748Seric # define SYSTEM5	1	/* include all the System V defines */
92665748Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
92765748Seric # define MAXPATHLEN	PATHSIZE
92865748Seric # define LA_TYPE	LA_ZERO
92965749Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
93068439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
93165748Seric #endif
93264962Seric 
93365748Seric 
93465820Seric /*
93565820Seric **  Apollo DomainOS
93665820Seric **
93765820Seric **  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
93865982Seric **
93965820Seric **  15 Jan 1994
94065820Seric **
94165820Seric */
94265748Seric 
94365820Seric #ifdef apollo
94465820Seric # define HASSETREUID	1	/* has setreuid(2) call */
94565820Seric # define HASINITGROUPS	1	/* has initgroups(2) call */
94667771Seric # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
94765820Seric # define LA_TYPE	LA_SUBR		/* use getloadavg.c */
94866044Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
94968439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
95065820Seric # ifndef _PATH_SENDMAILCF
95165820Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
95265820Seric # endif
95365820Seric # ifndef _PATH_SENDMAILPID
95465820Seric #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
95565820Seric # endif
95665820Seric # undef  S_IFSOCK		/* S_IFSOCK and S_IFIFO are the same */
95765820Seric # undef  S_IFIFO
95865820Seric # define S_IFIFO	0010000
95965820Seric # ifndef IDENTPROTO
96065820Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
96165820Seric # endif
96265982Seric #endif
96365820Seric 
96465820Seric 
96566748Seric /*
96667745Seric **  UnixWare 1.1.2.
96766752Seric **
96866752Seric **	From Evan Champion <evanc@spatial.synapse.org>.
96966752Seric */
97066752Seric 
97166752Seric #ifdef UNIXWARE
97266752Seric # define SYSTEM5		1
97367745Seric # define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
97467745Seric # define HASGETDTABLESIZE	1
97567745Seric # define HASSETREUID		1
97667745Seric # define HASSETSID		1
97767745Seric # define HASINITGROUPS		1
97867745Seric # define GIDSET_T		gid_t
97967745Seric # define SLEEP_T		unsigned
98066752Seric # define SFS_TYPE		SFS_STATVFS
98166752Seric # define LA_TYPE		LA_ZERO
98266752Seric # undef WIFEXITED
98366752Seric # undef WEXITSTATUS
98466752Seric # define _PATH_UNIX		"/unix"
98566752Seric # ifndef _PATH_SENDMAILCF
98666752Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
98766752Seric # endif
98866752Seric # ifndef _PATH_SENDMAILPID
98966752Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
99066752Seric # endif
99166752Seric # define SYSLOG_BUFSIZE	128
99266752Seric #endif
99366752Seric 
99466752Seric 
99566752Seric /*
99666748Seric **  Intergraph CLIX 3.1
99766748Seric **
99866748Seric **	From Paul Southworth <pauls@locust.cic.net>
99966748Seric */
100065820Seric 
100166748Seric #ifdef CLIX
100266748Seric # define SYSTEM5	1	/* looks like System V */
100366752Seric # ifndef HASGETUSERSHELL
100466752Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
100566752Seric # endif
100666748Seric # define DEV_BSIZE	512	/* device block size not defined */
100766748Seric # define GIDSET_T	gid_t
100866748Seric # undef LOG			/* syslog not available */
100966748Seric # define NEEDFSYNC	1	/* no fsync in system library */
101066748Seric # define GETSHORT	_getshort
101166748Seric #endif
101265820Seric 
101366748Seric 
101466776Seric /*
101566776Seric **  NCR 3000 Series (SysVr4)
101666776Seric **
101767434Seric **	From Kevin Darcy <kevin@tech.mis.cfc.com>.
101866776Seric */
101966748Seric 
102066776Seric #ifdef NCR3000
102166776Seric # define __svr4__
102266776Seric # undef BSD
102366776Seric # define LA_AVENRUN	"avenrun"
102466776Seric #endif
102566748Seric 
102666776Seric 
102767434Seric /*
102867434Seric **  Tandem NonStop-UX SVR4
102967434Seric **
103067434Seric **	From Rick McCarty <mccarty@mpd.tandem.com>.
103167434Seric */
103266776Seric 
103367434Seric #ifdef NonStop_UX_BXX
103467434Seric # define __svr4__
103567434Seric #endif
103666776Seric 
103767434Seric 
103867488Seric /*
103967488Seric **  Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.
104067488Seric **
104167488Seric **	Tested for 1.04 and 1.03
104267488Seric **	From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
104367488Seric */
104467434Seric 
104567488Seric #ifdef __H3050R
104667488Seric # define SYSTEM5	1	/* include all the System V defines */
104767488Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
104867488Seric # define setreuid(r, e)	setresuid(r, e, -1)
104967488Seric # define LA_TYPE	LA_FLOAT
105067488Seric # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
105167488Seric # define HASSETVBUF	/* HI-UX has no setlinebuf */
105267488Seric # ifndef GIDSET_T
105367488Seric #  define GIDSET_T	gid_t
105467488Seric # endif
105567488Seric # ifndef _PATH_UNIX
105667488Seric #  define _PATH_UNIX	"/HI-UX"
105767488Seric # endif
105867488Seric # ifndef _PATH_SENDMAILCF
105967488Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
106067488Seric # endif
106167488Seric # ifndef IDENTPROTO
106267488Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
106367488Seric # endif
106467488Seric # ifndef HASGETUSERSHELL
106567488Seric #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
106667488Seric # endif
106767488Seric 
106867488Seric /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */
106967488Seric # undef m_flags
107067488Seric 
107167488Seric # ifdef __STDC__
107267488Seric extern int	syslog(int, char *, ...);
107367488Seric # endif
107467488Seric 
107567488Seric #endif
107667488Seric 
107767488Seric 
107868099Seric /*
107968099Seric **  Amdahl UTS System V 2.1.5 (SVr3-based)
108068099Seric **
108168099Seric **    From: Janet Jackson <janet@dialix.oz.au>.
108268099Seric */
108367488Seric 
108468099Seric #ifdef _UTS
108568099Seric # include <sys/sysmacros.h>
108668099Seric # undef HASLSTAT	/* has symlinks, but they cause problems */
108768099Seric # define NEEDFSYNC	1	/* system fsync(2) fails on non-EFS filesys */
108868099Seric # define SYS5SIGNALS	1	/* System V signal semantics */
108968099Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
109068099Seric # define HASUNAME	1	/* use System V uname(2) system call */
109168099Seric # define HASINITGROUPS	1	/* has initgroups(3) function */
109268099Seric # define HASSETVBUF	1	/* has setvbuf(3) function */
109368099Seric # define HASSIGSETMASK	0	/* does not have sigsetmask(2) function */
109468099Seric # ifndef HASGETUSERSHELL
109568099Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) function */
109668099Seric # endif
109768099Seric # define GIDSET_T	gid_t	/* type of 2nd arg to getgroups(2) isn't int */
109868099Seric # define LA_TYPE	LA_ZERO		/* doesn't have load average */
109968099Seric # define SFS_TYPE	SFS_4ARGS	/* use 4-arg statfs() */
110068439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
110168099Seric # define _PATH_UNIX	"/unix"
110268099Seric # ifndef _PATH_SENDMAILCF
110368099Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
110468099Seric # endif
110568099Seric #endif
110668099Seric 
110768357Seric /*
110868357Seric **  Cray Computer Corporation's CSOS
110968357Seric **
111068357Seric **	Contributed by Scott Bolte <scott@craycos.com>.
111168357Seric */
111268099Seric 
111368357Seric #ifdef _CRAYCOM
111468357Seric # define SYSTEM5	1	/* include all the System V defines */
111568357Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
111668357Seric # define NEEDFSYNC	1	/* no fsync in system library */
111768357Seric # define MAXPATHLEN	PATHSIZE
111868357Seric # define LA_TYPE	LA_ZERO
111968357Seric # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
112068439Seric # define SFS_BAVAIL	f_bfree		/* alternate field name */
112168357Seric # define _POSIX_CHOWN_RESTRICTED	-1
112268357Seric extern struct group	*getgrent(), *getgrnam(), *getgrgid();
112368357Seric #endif
112468099Seric 
112568099Seric 
112668742Seric /*
112768742Seric **  Sony NEWS-OS 4.2.1R and 6.0.3
112868742Seric */
112968742Seric 
113068742Seric #ifdef sony_news
113168742Seric # ifndef __svr4
113268742Seric 			/* NEWS-OS 4.2.1R */
113368742Seric #  ifndef BSD
113468742Seric #   define BSD			/* has BSD routines */
113568742Seric #  endif
113668742Seric #  define HASUNSETENV	1	/* has unsetenv(2) call */
113768742Seric #  undef HASSETVBUF		/* don't actually have setvbuf(3) */
113868742Seric #  define WAITUNION	1	/* use "union wait" as wait argument type */
113968742Seric #  define LA_TYPE	LA_INT
114068742Seric #  define SFS_TYPE	SFS_VFS /* use <sys/vfs.h> statfs() implementation */
114168742Seric #  ifndef HASFLOCK
114268742Seric #   define HASFLOCK	1	/* has flock(2) call */
114368742Seric #  endif
114468742Seric #  define setpgid	setpgrp
114568742Seric #  undef WIFEXITED
114668742Seric #  undef WEXITSTATUS
114768742Seric typedef int		pid_t;
114868742Seric typedef int		(*sigfunc_t)();
114968742Seric #  define SIGFUNC_DEFINED
115068742Seric 
115168742Seric # else
115268742Seric 			/* NEWS-OS 6.0.3 with /bin/cc */
115368742Seric #  define SYSTEM5	1	/* include all the System V defines */
115468742Seric #  define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
115568742Seric #  define HASINITGROUPS	1	/* has initgroups(3) call */
115668742Seric #  define HASSETREUID	1	/* has setreuid(2) call */
115768742Seric #  define HASSETSID	1	/* has Posix setsid(2) call */
115868742Seric #  define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
115968742Seric #  define LA_TYPE	LA_INT
116068742Seric #  define SFS_TYPE	SFS_STATVFS	/* use <sys/statvfs.h> statvfs() impl */
116168742Seric #  define GIDSET_T	gid_t
116268742Seric #  define setreuid(r, e)	seteuid(e)
116368742Seric #  undef WIFEXITED
116468742Seric #  undef WEXITSTATUS
116568742Seric #  define _PATH_UNIX  "/stand/unix"
116668742Seric #  ifndef _PATH_SENDMAILCF
116768742Seric #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
116868742Seric #  endif
116968742Seric #  ifndef _PATH_SENDMAILPID
117068742Seric #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
117168742Seric #  endif
117268742Seric 
117368742Seric # endif
117468742Seric #endif
117568742Seric 
117668742Seric 
117768742Seric /*
117868742Seric **  Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach
117968742Seric */
118068742Seric 
118168742Seric #ifdef luna
118268742Seric # ifndef IDENTPROTO
118368742Seric #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
118468742Seric # endif
118568742Seric # ifdef uniosb
118668742Seric #  define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
118768742Seric # endif
118868742Seric # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
118968742Seric # define WAITUNION	1	/* use "union wait" as wait argument type */
119068742Seric # ifdef uniosb
119168742Seric #  define LA_TYPE	LA_INT
119268742Seric # endif
119368742Seric # ifdef luna2m
119468742Seric #  define LA_TYPE	LA_SUBR
119568742Seric # endif
119668742Seric # ifdef luna88k
119768742Seric #  define LA_TYPE	LA_INT
119868742Seric # endif
119968742Seric # define SFS_TYPE	SFS_VFS /* use <sys/vfs.h> statfs() implementation */
120068742Seric # define setpgid	setpgrp
120168742Seric # undef WIFEXITED
120268742Seric # undef WEXITSTATUS
120368742Seric typedef int		pid_t;
120468742Seric typedef int		(*sigfunc_t)();
120568742Seric # define SIGFUNC_DEFINED
120668742Seric extern char	*getenv();
120768742Seric extern int	errno;
120868742Seric # ifndef _PATH_SENDMAILCF
120968742Seric #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
121068742Seric # endif
121168742Seric #endif
121268742Seric 
121368742Seric 
121468742Seric /*
121568742Seric **  NEC EWS-UX/V 4.2
121668742Seric **
121768742Seric **  with /usr/ucb/cc
121868742Seric */
121968742Seric 
122068742Seric #ifdef nec_ews_svr4
122168742Seric # define SYSTEM5	1	/* include all the System V defines */
122268742Seric # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
122368742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
122468742Seric # define HASSETREUID	1	/* has setreuid(2) call */
122568742Seric # define setreuid(r, e)	seteuid(e)
122668742Seric # define HASSETSID	1	/* has Posix setsid(2) call */
122768742Seric # define LA_TYPE	LA_INT
122868742Seric # define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
122968742Seric # define GIDSET_T	gid_t
123068742Seric # ifndef HASGETUSERSHELL
123168742Seric #  define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
123268742Seric # endif
123368742Seric # undef WIFEXITED
123468742Seric # undef WEXITSTATUS
123568742Seric # ifndef _PATH_UNIX
123668742Seric #  define _PATH_UNIX		"/unix"
123768742Seric # endif
123868742Seric # ifndef _PATH_SENDMAILCF
123968742Seric #  define _PATH_SENDMAILCF	"/var/ucblib/sendmail.cf"
124068742Seric # endif
124168742Seric # ifndef _PATH_SENDMAILPID
124268742Seric #  define _PATH_SENDMAILPID	"/var/ucblib/sendmail.pid"
124368742Seric # endif
124468742Seric # define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
124568742Seric #endif
124668742Seric 
124768742Seric 
124868742Seric 
124963902Seric /**********************************************************************
125063787Seric **  End of Per-Operating System defines
125163902Seric **********************************************************************/
125263787Seric 
125363949Seric /**********************************************************************
125463949Seric **  More general defines
125563949Seric **********************************************************************/
125663949Seric 
125763962Seric /* general BSD defines */
125863962Seric #ifdef BSD
125964035Seric # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
126064035Seric # define HASSETREUID	1	/* has setreuid(2) call */
126167742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
126267430Seric # ifndef HASSETRLIMIT
126367430Seric #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
126467430Seric # endif
126565830Seric # ifndef HASFLOCK
126665830Seric #  define HASFLOCK	1	/* has flock(2) call */
126765830Seric # endif
126867602Seric # ifndef TZ_TYPE
126967608Seric #  define TZ_TYPE	TZ_TM_ZONE	/* use tm->tm_zone variable */
127067602Seric # endif
127163962Seric #endif
127263962Seric 
127365189Seric /* general System V Release 4 defines */
127465189Seric #ifdef __svr4__
127565189Seric # define SYSTEM5	1
127665189Seric # define HASSETREUID	1	/* has seteuid(2) call & working saved uids */
127767742Seric # define HASINITGROUPS	1	/* has initgroups(3) call */
127867742Seric # ifndef HASSETRLIMIT
127967742Seric #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
128067742Seric # endif
128165211Seric # ifndef HASGETUSERSHELL
128265211Seric #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
128365210Seric # endif
128465189Seric # define setreuid(r, e)	seteuid(e)
128565189Seric 
128665189Seric # ifndef _PATH_UNIX
128765189Seric #  define _PATH_UNIX		"/unix"
128865189Seric # endif
128965189Seric # ifndef _PATH_SENDMAILCF
129065189Seric #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
129165189Seric # endif
129265189Seric # ifndef _PATH_SENDMAILPID
129365189Seric #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
129465189Seric # endif
129565189Seric # ifndef SYSLOG_BUFSIZE
129665189Seric #  define SYSLOG_BUFSIZE	128
129765189Seric # endif
129867159Seric # ifndef SFS_TYPE
129967159Seric #  define SFS_TYPE		SFS_STATVFS
130067159Seric # endif
130165189Seric #endif
130265189Seric 
130363787Seric /* general System V defines */
130466298Seric #ifdef SYSTEM5
130564813Seric # include <sys/sysmacros.h>
130663949Seric # define HASUNAME	1	/* use System V uname(2) system call */
130764705Seric # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
130864962Seric # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
130967430Seric # ifndef HASULIMIT
131067430Seric #  define HASULIMIT	1	/* has the ulimit(2) syscall */
131167430Seric # endif
131263962Seric # ifndef LA_TYPE
131365749Seric #  define LA_TYPE	LA_INT		/* assume integer load average */
131463962Seric # endif
131565749Seric # ifndef SFS_TYPE
131665749Seric #  define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
131765749Seric # endif
131867602Seric # ifndef TZ_TYPE
131967608Seric #  define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
132067602Seric # endif
132168442Seric # define bcopy(s, d, l)		(memmove((d), (s), (l)))
132268442Seric # define bzero(d, l)		(memset((d), '\0', (l)))
132368442Seric # define bcmp(s, d, l)		(memcmp((s), (d), (l)))
132466298Seric #endif
132563787Seric 
132663949Seric /* general POSIX defines */
132763949Seric #ifdef _POSIX_VERSION
132864718Seric # define HASSETSID	1	/* has Posix setsid(2) call */
132964718Seric # define HASWAITPID	1	/* has Posix waitpid(2) call */
133063949Seric #endif
133163949Seric 
133263787Seric /*
133363937Seric **  If no type for argument two of getgroups call is defined, assume
133463937Seric **  it's an integer -- unfortunately, there seem to be several choices
133563937Seric **  here.
133663937Seric */
133763937Seric 
133863937Seric #ifndef GIDSET_T
133963937Seric # define GIDSET_T	int
134063937Seric #endif
134163937Seric 
134264939Seric /*
134368357Seric **  Tweaking for systems that (for example) claim to be BSD or POSIX
134468357Seric **  but don't have all the standard BSD or POSIX routines (boo hiss).
134564939Seric */
134664439Seric 
134764939Seric #ifdef titan
134864939Seric # undef HASINITGROUPS		/* doesn't have initgroups(3) call */
134964939Seric #endif
135064939Seric 
135168357Seric #ifdef _CRAYCOM
135268357Seric # undef HASSETSID		/* despite POSIX claim, doesn't have setsid */
135368357Seric #endif
135465830Seric 
135568442Seric #ifdef ISC_UNIX
135668442Seric # undef bcopy			/* despite SystemV claim, uses BSD bcopy */
135768442Seric #endif
135868357Seric 
135968442Seric #ifdef ALTOS_SYS_V
136068442Seric # undef bcopy			/* despite SystemV claim, uses BSD bcopy */
136168442Seric # undef bzero			/* despite SystemV claim, uses BSD bzero */
136268442Seric # undef bcmp			/* despite SystemV claim, uses BSD bcmp */
136368442Seric #endif
136468442Seric 
136568442Seric 
136665167Seric /*
136765167Seric **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
136865167Seric **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
136965167Seric **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
137065167Seric **  are closed.  Some firewalls return this error if you try to connect
137165167Seric **  to the IDENT port (113), so you can't receive email from these hosts
137265167Seric **  on these systems.  The firewall really should use a more specific
137365167Seric **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.  If
137465167Seric **  not explicitly set to zero above, default it on.
137565167Seric */
137664939Seric 
137765167Seric #ifndef IDENTPROTO
137865167Seric # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
137965167Seric #endif
138065167Seric 
138165211Seric #ifndef HASGETUSERSHELL
138265211Seric # define HASGETUSERSHELL 1	/* libc has getusershell(3) call */
138365210Seric #endif
138465167Seric 
138565830Seric #ifndef HASFLOCK
138665830Seric # define HASFLOCK	0	/* assume no flock(2) support */
138765830Seric #endif
138865210Seric 
138967430Seric #ifndef HASSETRLIMIT
139067430Seric # define HASSETRLIMIT	0	/* assume no setrlimit(2) support */
139167430Seric #endif
139267430Seric 
139367430Seric #ifndef HASULIMIT
139467430Seric # define HASULIMIT	0	/* assume no ulimit(2) support */
139567430Seric #endif
139667430Seric 
139766843Seric #ifndef OLD_NEWDB
139866843Seric # define OLD_NEWDB	0	/* assume newer version of newdb */
139966843Seric #endif
140065830Seric 
140168099Seric /* heuristic setting of HASSETSIGMASK; can override above */
140268099Seric #ifndef HASSIGSETMASK
140368099Seric # ifdef SIGVTALRM
140468099Seric #  define HASSETSIGMASK	1
140568099Seric # else
140668099Seric #  define HASSETSIGMASK	0
140768099Seric # endif
140868099Seric #endif
140966843Seric 
141068705Seric #ifndef UID_T
141168705Seric # define UID_T		uid_t
141268705Seric #endif
141368099Seric 
141468706Seric #ifndef SIZE_T
141568706Seric # define SIZE_T		size_t
141668706Seric #endif
141768706Seric 
141868705Seric #ifndef ARGV_T
141968705Seric # define ARGV_T		char **
142068705Seric #endif
142168705Seric 
142268705Seric 
142364439Seric /**********************************************************************
142459023Seric **  Remaining definitions should never have to be changed.  They are
142559023Seric **  primarily to provide back compatibility for older systems -- for
142659287Seric **  example, it includes some POSIX compatibility definitions
142764439Seric **********************************************************************/
142859023Seric 
142959388Seric /* System 5 compatibility */
143059388Seric #ifndef S_ISREG
143164944Seric # define S_ISREG(foo)	((foo & S_IFMT) == S_IFREG)
143259388Seric #endif
143364944Seric #if !defined(S_ISLNK) && defined(S_IFLNK)
143464944Seric # define S_ISLNK(foo)	((foo & S_IFMT) == S_IFLNK)
143564944Seric #endif
143668494Seric #ifndef S_IWUSR
143768494Seric # define S_IWUSR		0200
143868494Seric #endif
143959388Seric #ifndef S_IWGRP
144068494Seric # define S_IWGRP		0020
144159388Seric #endif
144259388Seric #ifndef S_IWOTH
144368494Seric # define S_IWOTH		0002
144459388Seric #endif
144559388Seric 
144659023Seric /*
144750537Seric **  Older systems don't have this error code -- it should be in
144850537Seric **  /usr/include/sysexits.h.
144950537Seric */
145050537Seric 
145150537Seric # ifndef EX_CONFIG
145250537Seric # define EX_CONFIG	78	/* configuration error */
145350537Seric # endif
145456852Seric 
145564718Seric /* pseudo-code used in server SMTP */
145664718Seric # define EX_QUIT	22	/* drop out of server immediately */
145764718Seric 
145864718Seric 
145963993Seric /*
146063993Seric **  These are used in a few cases where we need some special
146163993Seric **  error codes, but where the system doesn't provide something
146263993Seric **  reasonable.  They are printed in errstring.
146363993Seric */
146463993Seric 
146563993Seric #ifndef E_PSEUDOBASE
146663993Seric # define E_PSEUDOBASE	256
146763993Seric #endif
146863993Seric 
146963993Seric #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
147063993Seric #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
147163993Seric 
147263970Seric /* type of arbitrary pointer */
147363970Seric #ifndef ARBPTR_T
147463970Seric # define ARBPTR_T	void *
147563970Seric #endif
147663970Seric 
147760568Seric #ifndef __P
147860568Seric # include "cdefs.h"
147960568Seric #endif
148060568Seric 
148167421Seric #if NAMED_BIND
148267421Seric # include <arpa/nameser.h>
148367434Seric # ifdef __svr4__
148467434Seric #  ifdef NOERROR
148567434Seric #   undef NOERROR		/* avoid compiler conflict with stream.h */
148667434Seric #  endif
148767434Seric # endif
148867421Seric #endif
148967421Seric 
149056852Seric /*
149167419Seric **  The size of an IP address -- can't use sizeof because of problems
149267419Seric **  on Crays, where everything is 64 bits.  This will break if/when
149367419Seric **  IP addresses are expanded to eight bytes.
149467419Seric */
149567419Seric 
149667421Seric #ifndef INADDRSZ
149767421Seric # define INADDRSZ	4
149867421Seric #endif
149967419Seric 
150067419Seric /*
150167421Seric **  The size of various known types -- for reading network protocols.
150267421Seric **  Again, we can't use sizeof because of compiler randomness.
150367421Seric */
150467421Seric 
150567421Seric #ifndef INT16SZ
150667421Seric # define INT16SZ	2
150767421Seric #endif
150867421Seric #ifndef INT32SZ
150967421Seric # define INT32SZ	4
151067421Seric #endif
151167421Seric 
151267421Seric /*
151358778Seric **  Do some required dependencies
151458778Seric */
151558778Seric 
151658778Seric #if defined(NETINET) || defined(NETISO)
151759107Seric # define SMTP		1	/* enable user and server SMTP */
151859107Seric # define QUEUE		1	/* enable queueing */
151959107Seric # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
152058778Seric #endif
152158778Seric 
152258778Seric 
152358778Seric /*
152456852Seric **  Arrange to use either varargs or stdargs
152556852Seric */
152656852Seric 
152756852Seric # ifdef __STDC__
152856852Seric 
152956852Seric # include <stdarg.h>
153056852Seric 
153156852Seric # define VA_LOCAL_DECL	va_list ap;
153256852Seric # define VA_START(f)	va_start(ap, f)
153356852Seric # define VA_END		va_end(ap)
153456852Seric 
153556852Seric # else
153656852Seric 
153756852Seric # include <varargs.h>
153856852Seric 
153956852Seric # define VA_LOCAL_DECL	va_list ap;
154056852Seric # define VA_START(f)	va_start(ap)
154156852Seric # define VA_END		va_end(ap)
154256852Seric 
154356852Seric # endif
154457631Seric 
154557943Seric #ifdef HASUNAME
154657631Seric # include <sys/utsname.h>
154757631Seric # ifdef newstr
154857631Seric #  undef newstr
154957631Seric # endif
155057943Seric #else /* ! HASUNAME */
155157631Seric # define NODE_LENGTH 32
155257631Seric struct utsname
155357631Seric {
155457631Seric 	char nodename[NODE_LENGTH+1];
155557631Seric };
155657943Seric #endif /* HASUNAME */
155757642Seric 
155868040Seric #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V)
155963838Seric # define MAXHOSTNAMELEN	256
156057735Seric #endif
156158153Seric 
156258153Seric #if !defined(SIGCHLD) && defined(SIGCLD)
156358153Seric # define SIGCHLD	SIGCLD
156458153Seric #endif
156558153Seric 
156658153Seric #ifndef STDIN_FILENO
156768742Seric # define STDIN_FILENO	0
156858153Seric #endif
156958153Seric 
157058153Seric #ifndef STDOUT_FILENO
157168742Seric # define STDOUT_FILENO	1
157258153Seric #endif
157358153Seric 
157458153Seric #ifndef STDERR_FILENO
157568742Seric # define STDERR_FILENO	2
157658153Seric #endif
157758689Seric 
157864072Seric #ifndef LOCK_SH
157964035Seric # define LOCK_SH	0x01	/* shared lock */
158064035Seric # define LOCK_EX	0x02	/* exclusive lock */
158164035Seric # define LOCK_NB	0x04	/* non-blocking lock */
158264035Seric # define LOCK_UN	0x08	/* unlock */
158364035Seric #endif
158458692Seric 
158568742Seric #ifndef SEEK_SET
158668742Seric # define SEEK_SET	0
158768742Seric # define SEEK_CUR	1
158868742Seric # define SEEK_END	2
158968742Seric #endif
159068742Seric 
159164035Seric #ifndef SIG_ERR
159264035Seric # define SIG_ERR	((void (*)()) -1)
159358689Seric #endif
159458702Seric 
159564500Seric #ifndef WEXITSTATUS
159664500Seric # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
159764500Seric #endif
159864500Seric #ifndef WIFEXITED
159964500Seric # define WIFEXITED(st)		(((st) & 0377) == 0)
160064500Seric #endif
160164500Seric 
160264561Seric #ifndef SIGFUNC_DEFINED
160364561Seric typedef void		(*sigfunc_t) __P((int));
160464561Seric #endif
160564561Seric 
160665053Seric /* size of syslog buffer */
160765053Seric #ifndef SYSLOG_BUFSIZE
160865053Seric # define SYSLOG_BUFSIZE	1024
160965053Seric #endif
161065053Seric 
161158702Seric /*
161258702Seric **  Size of tobuf (deliver.c)
161358702Seric **	Tweak this to match your syslog implementation.  It will have to
161458702Seric **	allow for the extra information printed.
161558702Seric */
161658702Seric 
161758702Seric #ifndef TOBUFSIZE
161865053Seric # if (SYSLOG_BUFSIZE) > 512
161965053Seric #  define TOBUFSIZE	(SYSLOG_BUFSIZE - 256)
162065053Seric # else
162165053Seric #  define TOBUFSIZE	256
162265053Seric # endif
162358702Seric #endif
162460219Seric 
162565015Seric /*
162665015Seric **  Size of prescan buffer.
162765015Seric **	Despite comments in the _sendmail_ book, this probably should
162865015Seric **	not be changed; there are some hard-to-define dependencies.
162965015Seric */
163065015Seric 
163165015Seric # define PSBUFSIZE	(MAXNAME + MAXATOM)	/* size of prescan buffer */
163260219Seric /* fork routine -- set above using #ifdef _osname_ or in Makefile */
163360219Seric # ifndef FORK
163460219Seric # define FORK		vfork		/* function to call to fork mailer */
163560219Seric # endif
163665955Seric 
163765955Seric /*
163865955Seric **  If we are going to link scanf anyway, use it in readcf
163965955Seric */
164065955Seric 
164165955Seric #if !defined(HASUNAME) && !defined(SCANF)
164265955Seric # define SCANF		1
164365955Seric #endif
1644