xref: /csrg-svn/usr.sbin/sendmail/src/conf.h (revision 68099)
1 /*
2  * Copyright (c) 1983 Eric P. Allman
3  * Copyright (c) 1988, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * %sccs.include.redist.c%
7  *
8  *	@(#)conf.h	8.128 (Berkeley) 12/28/94
9  */
10 
11 /*
12 **  CONF.H -- All user-configurable parameters for sendmail
13 */
14 
15 # include <sys/param.h>
16 # include <sys/types.h>
17 # include <sys/stat.h>
18 # include <sys/file.h>
19 # include <sys/wait.h>
20 # include <fcntl.h>
21 # include <signal.h>
22 
23 /**********************************************************************
24 **  Table sizes, etc....
25 **	There shouldn't be much need to change these....
26 **********************************************************************/
27 
28 # define MAXLINE	2048		/* max line length */
29 # define MAXNAME	256		/* max length of a name */
30 # define MAXPV		40		/* max # of parms to mailers */
31 # define MAXATOM	200		/* max atoms per address */
32 # define MAXMAILERS	25		/* maximum mailers known to system */
33 # define MAXRWSETS	100		/* max # of sets of rewriting rules */
34 # define MAXPRIORITIES	25		/* max values for Precedence: field */
35 # define MAXMXHOSTS	20		/* max # of MX records */
36 # define SMTPLINELIM	990		/* maximum SMTP line length */
37 # define MAXKEY		128		/* maximum size of a database key */
38 # define MEMCHUNKSIZE	1024		/* chunk size for memory allocation */
39 # define MAXUSERENVIRON	100		/* max envars saved, must be >= 3 */
40 # define MAXALIASDB	12		/* max # of alias databases */
41 # define MAXMAPSTACK	12		/* max # of stacked or sequenced maps */
42 # define MAXTOCLASS	8		/* max # of message timeout classes */
43 
44 # ifndef QUEUESIZE
45 # define QUEUESIZE	1000		/* max # of jobs per queue run */
46 # endif
47 
48 /**********************************************************************
49 **  Compilation options.
50 **
51 **	#define these if they are available; comment them out otherwise.
52 **********************************************************************/
53 
54 # define LOG		1	/* enable logging */
55 # define UGLYUUCP	1	/* output ugly UUCP From lines */
56 # define NETUNIX	1	/* include unix domain support */
57 # define NETINET	1	/* include internet support */
58 # define MATCHGECOS	1	/* match user names from gecos field */
59 # define XDEBUG		1	/* enable extended debugging */
60 # ifdef NEWDB
61 # define USERDB		1	/* look in user database (requires NEWDB) */
62 # endif
63 
64 /**********************************************************************
65 **  0/1 Compilation options.
66 **	#define these to 1 if they are available;
67 **	#define them to 0 otherwise.
68 **********************************************************************/
69 
70 # ifndef NAMED_BIND
71 #  define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
72 # endif
73 
74 /*
75 **  Most systems have symbolic links today, so default them on.  You
76 **  can turn them off by #undef'ing this below.
77 */
78 
79 # define HASLSTAT	1	/* has lstat(2) call */
80 
81 /*
82 **  General "standard C" defines.
83 **
84 **	These may be undone later, to cope with systems that claim to
85 **	be Standard C but aren't.  Gcc is the biggest offender -- it
86 **	doesn't realize that the library is part of the language.
87 **
88 **	Life would be much easier if we could get rid of this sort
89 **	of bozo problems.
90 */
91 
92 #ifdef __STDC__
93 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
94 #endif
95 
96 /**********************************************************************
97 **  Operating system configuration.
98 **
99 **	Unless you are porting to a new OS, you shouldn't have to
100 **	change these.
101 **********************************************************************/
102 
103 /*
104 **  Per-Operating System defines
105 */
106 
107 
108 /*
109 **  HP-UX -- tested for 8.07, 9.00, and 9.01.
110 */
111 
112 #ifdef __hpux
113 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HP 300 */
114 # undef m_flags
115 # define SYSTEM5	1	/* include all the System V defines */
116 # define HASINITGROUPS	1	/* has initgroups(3) call */
117 # define HASSETREUID	1	/* has setreuid(2) call */
118 # define setreuid(r, e)		setresuid(r, e, -1)
119 # define LA_TYPE	LA_FLOAT
120 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
121 # define GIDSET_T	gid_t
122 # define _PATH_UNIX	"/hp-ux"
123 # ifndef _PATH_SENDMAILCF
124 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
125 # endif
126 # ifndef IDENTPROTO
127 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
128 # endif
129 # ifndef HASGETUSERSHELL
130 #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
131 # endif
132 # define syslog		hard_syslog
133 # ifdef __STDC__
134 extern int	syslog(int, char *, ...);
135 # endif
136 #endif
137 
138 
139 /*
140 **  IBM AIX 3.x -- actually tested for 3.2.3
141 */
142 
143 #ifdef _AIX3
144 # define HASINITGROUPS	1	/* has initgroups(3) call */
145 # define HASUNAME	1	/* use System V uname(2) system call */
146 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
147 # define FORK		fork	/* no vfork primitive available */
148 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
149 # define SPT_PADCHAR	'\0'	/* pad process title with nulls */
150 #endif
151 
152 
153 /*
154 **  Silicon Graphics IRIX
155 **
156 **	Compiles on 4.0.1.
157 **
158 **	Use IRIX64 instead of IRIX for 64-bit IRIX.
159 **
160 **	IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
161 */
162 
163 #ifdef IRIX64
164 # define IRIX
165 #endif
166 
167 #ifdef IRIX
168 # define SYSTEM5	1	/* this is a System-V derived system */
169 # define HASSETREUID	1	/* has setreuid(2) call */
170 # define HASINITGROUPS	1	/* has initgroups(3) call */
171 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
172 # define FORK		fork	/* no vfork primitive available */
173 # define WAITUNION	1	/* use "union wait" as wait argument type */
174 # define setpgid	BSDsetpgrp
175 # define GIDSET_T	gid_t
176 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
177 # define LA_TYPE	LA_INT
178 # ifdef IRIX64
179 #  define NAMELISTMASK	0x7fffffffffffffff	/* mask for nlist() values */
180 # else
181 #  define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
182 # endif
183 #endif
184 
185 
186 /*
187 **  SunOS and Solaris
188 **
189 **	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
190 **	Solaris 2.2 (a.k.a. SunOS 5.2).
191 */
192 
193 #if defined(sun) && !defined(BSD)
194 
195 # define HASINITGROUPS	1	/* has initgroups(3) call */
196 # define HASUNAME	1	/* use System V uname(2) system call */
197 # define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
198 # define LA_TYPE	LA_INT
199 
200 # ifdef SOLARIS_2_3
201 #  define SOLARIS
202 # endif
203 
204 # ifdef SOLARIS
205 			/* Solaris 2.x (a.k.a. SunOS 5.x) */
206 #  ifndef __svr4__
207 #   define __svr4__		/* use all System V Releae 4 defines below */
208 #  endif
209 #  include <sys/time.h>
210 #  define gethostbyname	solaris_gethostbyname	/* get working version */
211 #  define gethostbyaddr	solaris_gethostbyaddr	/* get working version */
212 #  define GIDSET_T	gid_t
213 #  ifndef _PATH_UNIX
214 #   define _PATH_UNIX	"/dev/ksyms"
215 #  endif
216 #  ifndef _PATH_SENDMAILCF
217 #   define _PATH_SENDMAILCF	"/etc/mail/sendmail.cf"
218 #  endif
219 #  ifndef _PATH_SENDMAILPID
220 #   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
221 #  endif
222 #  ifndef SYSLOG_BUFSIZE
223 #   define SYSLOG_BUFSIZE	1024	/* allow full size syslog buffer */
224 #  endif
225 
226 # else
227 			/* SunOS 4.0.3 or 4.1.x */
228 #  define HASSETREUID	1	/* has setreuid(2) call */
229 #  ifndef HASFLOCK
230 #   define HASFLOCK	1	/* has flock(2) call */
231 #  endif
232 #  define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
233 #  include <vfork.h>
234 
235 #  ifdef SUNOS403
236 			/* special tweaking for SunOS 4.0.3 */
237 #   include <malloc.h>
238 #   define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
239 #   define WAITUNION	1	/* use "union wait" as wait argument type */
240 #   undef WIFEXITED
241 #   undef WEXITSTATUS
242 #   undef HASUNAME
243 #   define setpgid	setpgrp
244 typedef int		pid_t;
245 extern char		*getenv();
246 
247 #  else
248 			/* 4.1.x specifics */
249 #   define HASSETSID	1	/* has Posix setsid(2) call */
250 #   define HASSETVBUF	1	/* we have setvbuf(3) in libc */
251 
252 #  endif
253 # endif
254 #endif
255 
256 /*
257 **  DG/UX
258 **
259 **	Tested on 5.4.2 and 5.4.3.  Use DGUX_5_4_2 to get the
260 **	older support.
261 **	5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
262 */
263 
264 #ifdef DGUX_5_4_2
265 # define DGUX		1
266 #endif
267 
268 #ifdef	DGUX
269 # define SYSTEM5	1
270 # define LA_TYPE	LA_SUBR
271 # define HASSETREUID	1	/* has setreuid(2) call */
272 # define HASUNAME	1	/* use System V uname(2) system call */
273 # define HASSETSID	1	/* has Posix setsid(2) call */
274 # define HASINITGROUPS	1	/* has initgroups(3) call */
275 # define HASGETUSERSHELL 0	/* does not have getusershell(3) */
276 # ifndef IDENTPROTO
277 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
278 # endif
279 # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
280 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
281 
282 /* these include files must be included early on DG/UX */
283 # include <netinet/in.h>
284 # include <arpa/inet.h>
285 
286 # ifdef DGUX_5_4_2
287 #  define inet_addr	dgux_inet_addr
288 extern long	dgux_inet_addr();
289 # endif
290 #endif
291 
292 
293 /*
294 **  Digital Ultrix 4.2A or 4.3
295 **
296 **	Apparently, fcntl locking is broken on 4.2A, in that locks are
297 **	not dropped when the process exits.  This causes major problems,
298 **	so flock is the only alternative.
299 */
300 
301 #ifdef ultrix
302 # define HASSETREUID	1	/* has setreuid(2) call */
303 # define HASUNSETENV	1	/* has unsetenv(3) call */
304 # define HASINITGROUPS	1	/* has initgroups(3) call */
305 # define HASUNAME	1	/* use System V uname(2) system call */
306 # ifndef HASFLOCK
307 #  define HASFLOCK	1	/* has flock(2) call */
308 # endif
309 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
310 # define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
311 # ifdef vax
312 #  define LA_TYPE	LA_FLOAT
313 # else
314 #  define LA_TYPE	LA_INT
315 #  define LA_AVENRUN	"avenrun"
316 # endif
317 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
318 # ifndef IDENTPROTO
319 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
320 # endif
321 #endif
322 
323 
324 /*
325 **  OSF/1 for Intel Paragon.
326 **
327 **	Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
328 **	of Intel Scalable Systems Divison.
329 */
330 
331 #ifdef __PARAGON__
332 # define __osf__	1	/* get OSF/1 defines below */
333 # ifndef _PATH_SENDMAILCF
334 #  define _PATH_SENDMAILCF	"/var/adm/sendmail/sendmail.cf"
335 # endif
336 #endif
337 
338 
339 /*
340 **  OSF/1 (tested on Alpha)
341 */
342 
343 #ifdef __osf__
344 # define HASUNSETENV	1	/* has unsetenv(3) call */
345 # define HASSETREUID	1	/* has setreuid(2) call */
346 # define HASINITGROUPS	1	/* has initgroups(3) call */
347 # ifndef HASFLOCK
348 #  define HASFLOCK	1	/* has flock(2) call */
349 # endif
350 # define LA_TYPE	LA_INT
351 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
352 # ifndef _PATH_SENDMAILPID
353 #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
354 # endif
355 #endif
356 
357 
358 /*
359 **  NeXTstep
360 */
361 
362 #ifdef NeXT
363 # define HASINITGROUPS	1	/* has initgroups(3) call */
364 # ifndef HASFLOCK
365 #  define HASFLOCK	1	/* has flock(2) call */
366 # endif
367 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
368 # define WAITUNION	1	/* use "union wait" as wait argument type */
369 # define sleep		sleepX
370 # define setpgid	setpgrp
371 # ifndef LA_TYPE
372 #  define LA_TYPE	LA_MACH
373 # endif
374 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
375 # ifndef _POSIX_SOURCE
376 typedef int		pid_t;
377 #  undef WEXITSTATUS
378 #  undef WIFEXITED
379 # endif
380 # ifndef _PATH_SENDMAILCF
381 #  define _PATH_SENDMAILCF	"/etc/sendmail/sendmail.cf"
382 # endif
383 # ifndef _PATH_SENDMAILPID
384 #  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
385 # endif
386 #endif
387 
388 
389 /*
390 **  4.4 BSD
391 **
392 **	See also BSD defines.
393 */
394 
395 #ifdef BSD4_4
396 # define HASUNSETENV	1	/* has unsetenv(3) call */
397 # include <sys/cdefs.h>
398 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
399 # ifndef LA_TYPE
400 #  define LA_TYPE	LA_SUBR
401 # endif
402 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
403 # define SPT_TYPE	SPT_PSSTRINGS	/* use PS_STRINGS pointer */
404 #endif
405 
406 
407 /*
408 **  BSD/386 (all versions)
409 **	From Tony Sanders, BSDI
410 */
411 
412 #ifdef __bsdi__
413 # define HASUNSETENV	1	/* has the unsetenv(3) call */
414 # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
415 # include <sys/cdefs.h>
416 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
417 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
418 # ifndef LA_TYPE
419 #  define LA_TYPE	LA_SUBR
420 # endif
421 # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
422 			/* version 1.1 or later */
423 #  undef SPT_TYPE
424 #  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
425 # else
426 			/* version 1.0 or earlier */
427 #  ifndef OLD_NEWDB
428 #   define OLD_NEWDB	1	/* old version of newdb library */
429 #  endif
430 #  define SPT_PADCHAR	'\0'	/* pad process title with nulls */
431 # endif
432 #endif
433 
434 
435 
436 /*
437 **  386BSD / FreeBSD 1.0E / NetBSD (all architectures, all versions)
438 **
439 **  4.3BSD clone, closer to 4.4BSD
440 **
441 **	See also BSD defines.
442 */
443 
444 #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
445 # define HASUNSETENV	1	/* has unsetenv(3) call */
446 # define HASSETSID	1	/* has the setsid(2) POSIX syscall */
447 # ifdef __NetBSD__
448 #  define HASUNAME	1	/* has uname(2) syscall */
449 # endif
450 # include <sys/cdefs.h>
451 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
452 # ifndef LA_TYPE
453 #  define LA_TYPE	LA_SUBR
454 # endif
455 # define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
456 #endif
457 
458 
459 /*
460 **  Mach386
461 **
462 **	For mt Xinu's Mach386 system.
463 */
464 
465 #if defined(MACH) && defined(i386)
466 # define MACH386	1
467 # define HASUNSETENV	1	/* has unsetenv(3) call */
468 # define HASINITGROUPS	1	/* has initgroups(3) call */
469 # ifndef HASFLOCK
470 #  define HASFLOCK	1	/* has flock(2) call */
471 # endif
472 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
473 # define NEEDSTRTOL	1	/* need the strtol() function */
474 # define setpgid	setpgrp
475 # ifndef LA_TYPE
476 #  define LA_TYPE	LA_FLOAT
477 # endif
478 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
479 # undef HASSETVBUF		/* don't actually have setvbuf(3) */
480 # undef WEXITSTATUS
481 # undef WIFEXITED
482 # ifndef _PATH_SENDMAILCF
483 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
484 # endif
485 # ifndef _PATH_SENDMAILPID
486 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
487 # endif
488 #endif
489 
490 
491 /*
492 **  4.3 BSD -- this is for very old systems
493 **
494 **	Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
495 **
496 **	You'll also have to install a new resolver library.
497 **	I don't guarantee that support for this environment is complete.
498 */
499 
500 #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
501 # define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
502 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
503 # define ARBPTR_T	char *
504 # define setpgid	setpgrp
505 # ifndef LA_TYPE
506 #  define LA_TYPE	LA_FLOAT
507 # endif
508 # ifndef _PATH_SENDMAILCF
509 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
510 # endif
511 # ifndef IDENTPROTO
512 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
513 # endif
514 # undef WEXITSTATUS
515 # undef WIFEXITED
516 typedef short		pid_t;
517 extern int		errno;
518 #endif
519 
520 
521 /*
522 **  SCO Unix
523 **
524 **	This includes two parts -- the first is for SCO Open Server 3.2v4
525 **	(contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
526 **	The second is, I believe, for an older version.
527 */
528 
529 #ifdef _SCO_unix_4_2
530 # define _SCO_unix_
531 # define HASSETREUID	1	/* has setreuid(2) call */
532 # define NEEDFSYNC	1	/* needs the fsync(2) call stub */
533 # define _PATH_UNIX	"/unix"
534 # ifndef _PATH_SENDMAILCF
535 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
536 # endif
537 # ifndef _PATH_SENDMAILPID
538 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
539 # endif
540 #endif
541 
542 #ifdef _SCO_unix_
543 # define SYSTEM5	1	/* include all the System V defines */
544 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
545 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
546 # define FORK		fork
547 # define MAXPATHLEN	PATHSIZE
548 # define LA_TYPE	LA_SHORT
549 # define SFS_TYPE	SFS_4ARGS	/* use <sys/statfs.h> 4-arg impl */
550 # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
551 # undef NETUNIX			/* no unix domain socket support */
552 #endif
553 
554 
555 /*
556 **  Altos System V.
557 **	Contributed by Tim Rice <timr@crl.com>.
558 */
559 
560 #ifdef ALTOS_SYS_V
561 # include <limits.h>
562 # define SYSTEM5	1	/* include all the System V defines */
563 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
564 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
565 # define WAITUNION	1	/* use "union wait" as wait argument type */
566 # define NEEDFSYNC	1	/* no fsync(2) in system library */
567 # define FORK		fork
568 # define MAXPATHLEN	PATHSIZE
569 # define LA_TYPE	LA_SHORT
570 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
571 # define TZ_TYPE	TZ_TM_NAME	/* use tm->tm_name */
572 # undef NETUNIX			/* no unix domain socket support */
573 # undef WIFEXITED
574 # undef WEXITSTATUS
575 # define strtoul	strtol	/* gcc library bogosity */
576 
577 typedef unsigned short	uid_t;
578 typedef unsigned short	gid_t;
579 typedef short		pid_t;
580 #endif
581 
582 
583 /*
584 **  ConvexOS 11.0 and later
585 **
586 **	"Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
587 **	works on 9.1 as well.
588 */
589 
590 #ifdef _CONVEX_SOURCE
591 # define BSD		1	/* include all the BSD defines */
592 # define HASUNAME	1	/* use System V uname(2) system call */
593 # define HASSETSID	1	/* has POSIX setsid(2) call */
594 # define NEEDGETOPT	1	/* need replacement for getopt(3) */
595 # define LA_TYPE	LA_FLOAT
596 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
597 # ifndef _PATH_SENDMAILCF
598 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
599 # endif
600 # ifndef S_IREAD
601 #  define S_IREAD	_S_IREAD
602 #  define S_IWRITE	_S_IWRITE
603 #  define S_IEXEC	_S_IEXEC
604 #  define S_IFMT	_S_IFMT
605 #  define S_IFCHR	_S_IFCHR
606 #  define S_IFBLK	_S_IFBLK
607 # endif
608 # ifndef IDENTPROTO
609 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
610 # endif
611 #endif
612 
613 
614 /*
615 **  RISC/os 4.52
616 **
617 **	Gives a ton of warning messages, but otherwise compiles.
618 */
619 
620 #ifdef RISCOS
621 
622 # define HASUNSETENV	1	/* has unsetenv(3) call */
623 # ifndef HASFLOCK
624 #  define HASFLOCK	1	/* has flock(2) call */
625 # endif
626 # define WAITUNION	1	/* use "union wait" as wait argument type */
627 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
628 # define LA_TYPE	LA_INT
629 # define LA_AVENRUN	"avenrun"
630 # define _PATH_UNIX	"/unix"
631 # undef WIFEXITED
632 
633 # define setpgid	setpgrp
634 
635 extern int		errno;
636 typedef int		pid_t;
637 #define			SIGFUNC_DEFINED
638 typedef int		(*sigfunc_t)();
639 extern char		*getenv();
640 extern void		*malloc();
641 
642 #endif
643 
644 
645 /*
646 **  Linux 0.99pl10 and above...
647 **
648 **  Thanks to, in reverse order of contact:
649 **
650 **	John Kennedy <warlock@csuchico.edu>
651 **	Andrew Pam <avatar@aus.xanadu.com>
652 **	Florian La Roche <rzsfl@rz.uni-sb.de>
653 **	Karl London <karl@borg.demon.co.uk>
654 **
655 **  Last compiled against:	[12/14/94 @ 11:38:41 PM (Wednesday)]
656 **	sendmail 8.7.a.5	named 4.9.3-beta12-p1	db-1.85
657 **	gcc 2.6.2		libc.so.4.6.20
658 **	slackware 2.1.0		linux 1.1.70
659 */
660 
661 #ifdef __linux__
662 # define BSD		1	/* include BSD defines */
663 # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
664 # define HASUNAME	1	/* use System V uname(2) system call */
665 # define HASUNSETENV	1	/* has unsetenv(3) call */
666 # define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
667 # define GIDSET_T	gid_t	/* from <linux/types.h> */
668 # define HASGETUSERSHELL 0	/* getusershell(3) broken in Slackware 2.0 */
669 # ifndef LA_TYPE
670 #  define LA_TYPE	LA_PROCSTR
671 # endif
672 # define SFS_TYPE	SFS_VFS		/* use <sys/vfs.h> statfs() impl */
673 # ifndef _PATH_SENDMAILPID
674 #  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
675 # endif
676 # define TZ_TYPE	TZ_TNAME
677 # include <sys/sysmacros.h>
678 # undef atol			/* wounded in <stdlib.h> */
679 #endif
680 
681 
682 /*
683 **  DELL SVR4 Issue 2.2, and others
684 **	From Kimmo Suominen <kim@grendel.lut.fi>
685 **
686 **	It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
687 **	defined, and the definitions conflict.
688 **
689 **	Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
690 **	trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
691 **	(SVR4.0/386 version 3.0).
692 */
693 
694 #ifdef DELL_SVR4
695 				/* no changes necessary */
696 				/* see general __svr4__ defines below */
697 #endif
698 
699 
700 /*
701 **  Apple A/UX 3.0
702 */
703 
704 #ifdef _AUX_SOURCE
705 # include <sys/sysmacros.h>
706 # define BSD			/* has BSD routines */
707 # define HASUNAME	1	/* use System V uname(2) system call */
708 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
709 # define SIGFUNC_DEFINED	/* sigfunc_t already defined */
710 # ifndef IDENTPROTO
711 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
712 # endif
713 # define FORK		fork
714 # ifndef _PATH_SENDMAILCF
715 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
716 # endif
717 # ifndef LA_TYPE
718 #  define LA_TYPE	LA_ZERO
719 # endif
720 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
721 # undef WIFEXITED
722 # undef WEXITSTATUS
723 #endif
724 
725 
726 /*
727 **  Encore UMAX V
728 **
729 **	Not extensively tested.
730 */
731 
732 #ifdef UMAXV
733 # include <limits.h>
734 # define HASUNAME	1	/* use System V uname(2) system call */
735 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
736 # define HASINITGROUPS	1	/* has initgroups(3) call */
737 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
738 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
739 # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
740 # define FORK		fork	/* no vfork(2) primitive available */
741 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
742 # define MAXPATHLEN	PATH_MAX
743 extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
744 extern struct group	*getgrent(), *getgrnam(), *getgrgid();
745 # undef WIFEXITED
746 # undef WEXITSTATUS
747 #endif
748 
749 
750 /*
751 **  Stardent Titan 3000 running TitanOS 4.2.
752 **
753 **	Must be compiled in "cc -43" mode.
754 **
755 **	From Kate Hedstrom <kate@ahab.rutgers.edu>.
756 **
757 **	Note the tweaking below after the BSD defines are set.
758 */
759 
760 #ifdef titan
761 # define setpgid	setpgrp
762 typedef int		pid_t;
763 # undef WIFEXITED
764 # undef WEXITSTATUS
765 #endif
766 
767 
768 /*
769 **  Sequent DYNIX 3.2.0
770 **
771 **	From Jim Davis <jdavis@cs.arizona.edu>.
772 */
773 
774 #ifdef sequent
775 
776 # define BSD		1
777 # define HASUNSETENV	1
778 # define BSD4_3		1	/* to get signal() in conf.c */
779 # define WAITUNION	1
780 # define LA_TYPE	LA_FLOAT
781 # ifdef	_POSIX_VERSION
782 #  undef _POSIX_VERSION		/* set in <unistd.h> */
783 # endif
784 # undef HASSETVBUF		/* don't actually have setvbuf(3) */
785 # define setpgid	setpgrp
786 
787 /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
788 # undef	WIFEXITED
789 # define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
790 			 ((union wait*)&(s))->w_termsig == 0)
791 # define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
792 typedef int		pid_t;
793 # define isgraph(c)	(isprint(c) && (c != ' '))
794 
795 # ifndef IDENTPROTO
796 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
797 # endif
798 
799 # ifndef _PATH_UNIX
800 #  define _PATH_UNIX	"/dynix"
801 # endif
802 # ifndef _PATH_SENDMAILCF
803 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
804 # endif
805 
806 #endif
807 
808 
809 /*
810 **  Sequent DYNIX/ptx v2.0 (and higher)
811 **
812 **	For DYNIX/ptx v1.x, undefine HASSETREUID.
813 **
814 **	From Tim Wright <timw@sequent.com>.
815 */
816 
817 #ifdef _SEQUENT_
818 # define SYSTEM5	1	/* include all the System V defines */
819 # define HASSETSID	1	/* has POSIX setsid(2) call */
820 # define HASINITGROUPS	1	/* has initgroups(3) call */
821 # define HASSETREUID	1	/* has setreuid(2) call */
822 # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
823 # define GIDSET_T	gid_t
824 # define LA_TYPE	LA_INT
825 # define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
826 # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
827 # ifndef IDENTPROTO
828 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
829 # endif
830 # ifndef _PATH_SENDMAILCF
831 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
832 # endif
833 # ifndef _PATH_SENDMAILPID
834 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
835 # endif
836 #endif
837 
838 
839 /*
840 **  Cray Unicos
841 **
842 **	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
843 */
844 
845 #ifdef UNICOS
846 # define SYSTEM5	1	/* include all the System V defines */
847 # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
848 # define MAXPATHLEN	PATHSIZE
849 # define LA_TYPE	LA_ZERO
850 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
851 #endif
852 
853 
854 /*
855 **  Apollo DomainOS
856 **
857 **  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
858 **
859 **  15 Jan 1994
860 **
861 */
862 
863 #ifdef apollo
864 # define HASSETREUID	1	/* has setreuid(2) call */
865 # define HASINITGROUPS	1	/* has initgroups(2) call */
866 # define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
867 # define LA_TYPE	LA_SUBR		/* use getloadavg.c */
868 # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
869 # ifndef _PATH_SENDMAILCF
870 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
871 # endif
872 # ifndef _PATH_SENDMAILPID
873 #  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
874 # endif
875 # undef  S_IFSOCK		/* S_IFSOCK and S_IFIFO are the same */
876 # undef  S_IFIFO
877 # define S_IFIFO	0010000
878 # ifndef IDENTPROTO
879 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
880 # endif
881 #endif
882 
883 
884 /*
885 **  UnixWare 1.1.2.
886 **
887 **	From Evan Champion <evanc@spatial.synapse.org>.
888 */
889 
890 #ifdef UNIXWARE
891 # define SYSTEM5		1
892 # define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
893 # define HASGETDTABLESIZE	1
894 # define HASSETREUID		1
895 # define HASSETSID		1
896 # define HASINITGROUPS		1
897 # define GIDSET_T		gid_t
898 # define SLEEP_T		unsigned
899 # define SFS_TYPE		SFS_STATVFS
900 # define LA_TYPE		LA_ZERO
901 # undef WIFEXITED
902 # undef WEXITSTATUS
903 # define _PATH_UNIX		"/unix"
904 # ifndef _PATH_SENDMAILCF
905 #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
906 # endif
907 # ifndef _PATH_SENDMAILPID
908 #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
909 # endif
910 # define SYSLOG_BUFSIZE	128
911 #endif
912 
913 
914 /*
915 **  Intergraph CLIX 3.1
916 **
917 **	From Paul Southworth <pauls@locust.cic.net>
918 */
919 
920 #ifdef CLIX
921 # define SYSTEM5	1	/* looks like System V */
922 # ifndef HASGETUSERSHELL
923 #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
924 # endif
925 # define DEV_BSIZE	512	/* device block size not defined */
926 # define GIDSET_T	gid_t
927 # undef LOG			/* syslog not available */
928 # define NEEDFSYNC	1	/* no fsync in system library */
929 # define GETSHORT	_getshort
930 #endif
931 
932 
933 /*
934 **  NCR 3000 Series (SysVr4)
935 **
936 **	From Kevin Darcy <kevin@tech.mis.cfc.com>.
937 */
938 
939 #ifdef NCR3000
940 # define __svr4__
941 # undef BSD
942 # define LA_AVENRUN	"avenrun"
943 #endif
944 
945 
946 /*
947 **  Tandem NonStop-UX SVR4
948 **
949 **	From Rick McCarty <mccarty@mpd.tandem.com>.
950 */
951 
952 #ifdef NonStop_UX_BXX
953 # define __svr4__
954 #endif
955 
956 
957 /*
958 **  Hitachi 3050R & 3050RX Workstations running HI-UX/WE2.
959 **
960 **	Tested for 1.04 and 1.03
961 **	From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
962 */
963 
964 #ifdef __H3050R
965 # define SYSTEM5	1	/* include all the System V defines */
966 # define HASINITGROUPS	1	/* has initgroups(3) call */
967 # define setreuid(r, e)	setresuid(r, e, -1)
968 # define LA_TYPE	LA_FLOAT
969 # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
970 # define HASSETVBUF	/* HI-UX has no setlinebuf */
971 # ifndef GIDSET_T
972 #  define GIDSET_T	gid_t
973 # endif
974 # ifndef _PATH_UNIX
975 #  define _PATH_UNIX	"/HI-UX"
976 # endif
977 # ifndef _PATH_SENDMAILCF
978 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
979 # endif
980 # ifndef IDENTPROTO
981 #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
982 # endif
983 # ifndef HASGETUSERSHELL
984 #  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
985 # endif
986 
987 /* avoid m_flags conflict between db.h & sys/sysmacros.h on HIUX 3050 */
988 # undef m_flags
989 
990 # ifdef __STDC__
991 extern int	syslog(int, char *, ...);
992 # endif
993 
994 #endif
995 
996 
997 /*
998 **  Amdahl UTS System V 2.1.5 (SVr3-based)
999 **
1000 **    From: Janet Jackson <janet@dialix.oz.au>.
1001 */
1002 
1003 #ifdef _UTS
1004 # include <sys/sysmacros.h>
1005 # undef HASLSTAT	/* has symlinks, but they cause problems */
1006 # define NEEDFSYNC	1	/* system fsync(2) fails on non-EFS filesys */
1007 # define SYS5SIGNALS	1	/* System V signal semantics */
1008 # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
1009 # define HASUNAME	1	/* use System V uname(2) system call */
1010 # define HASINITGROUPS	1	/* has initgroups(3) function */
1011 # define HASSETVBUF	1	/* has setvbuf(3) function */
1012 # define HASSIGSETMASK	0	/* does not have sigsetmask(2) function */
1013 # ifndef HASGETUSERSHELL
1014 #  define HASGETUSERSHELL 0	/* does not have getusershell(3) function */
1015 # endif
1016 # define GIDSET_T	gid_t	/* type of 2nd arg to getgroups(2) isn't int */
1017 # define LA_TYPE	LA_ZERO		/* doesn't have load average */
1018 # define SFS_TYPE	SFS_4ARGS	/* use 4-arg statfs() */
1019 # define _PATH_UNIX	"/unix"
1020 # ifndef _PATH_SENDMAILCF
1021 #  define _PATH_SENDMAILCF	"/usr/lib/sendmail.cf"
1022 # endif
1023 #endif
1024 
1025 
1026 
1027 
1028 /**********************************************************************
1029 **  End of Per-Operating System defines
1030 **********************************************************************/
1031 
1032 /**********************************************************************
1033 **  More general defines
1034 **********************************************************************/
1035 
1036 /* general BSD defines */
1037 #ifdef BSD
1038 # define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
1039 # define HASSETREUID	1	/* has setreuid(2) call */
1040 # define HASINITGROUPS	1	/* has initgroups(3) call */
1041 # ifndef HASSETRLIMIT
1042 #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
1043 # endif
1044 # ifndef HASFLOCK
1045 #  define HASFLOCK	1	/* has flock(2) call */
1046 # endif
1047 # ifndef TZ_TYPE
1048 #  define TZ_TYPE	TZ_TM_ZONE	/* use tm->tm_zone variable */
1049 # endif
1050 #endif
1051 
1052 /* general System V Release 4 defines */
1053 #ifdef __svr4__
1054 # define SYSTEM5	1
1055 # define HASSETREUID	1	/* has seteuid(2) call & working saved uids */
1056 # define HASINITGROUPS	1	/* has initgroups(3) call */
1057 # ifndef HASSETRLIMIT
1058 #  define HASSETRLIMIT	1	/* has setrlimit(2) call */
1059 # endif
1060 # ifndef HASGETUSERSHELL
1061 #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
1062 # endif
1063 # define setreuid(r, e)	seteuid(e)
1064 
1065 # ifndef _PATH_UNIX
1066 #  define _PATH_UNIX		"/unix"
1067 # endif
1068 # ifndef _PATH_SENDMAILCF
1069 #  define _PATH_SENDMAILCF	"/usr/ucblib/sendmail.cf"
1070 # endif
1071 # ifndef _PATH_SENDMAILPID
1072 #  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
1073 # endif
1074 # ifndef SYSLOG_BUFSIZE
1075 #  define SYSLOG_BUFSIZE	128
1076 # endif
1077 # ifndef SFS_TYPE
1078 #  define SFS_TYPE		SFS_STATVFS
1079 # endif
1080 #endif
1081 
1082 /* general System V defines */
1083 #ifdef SYSTEM5
1084 # include <sys/sysmacros.h>
1085 # define HASUNAME	1	/* use System V uname(2) system call */
1086 # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
1087 # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
1088 # ifndef HASULIMIT
1089 #  define HASULIMIT	1	/* has the ulimit(2) syscall */
1090 # endif
1091 # ifndef LA_TYPE
1092 #  define LA_TYPE	LA_INT		/* assume integer load average */
1093 # endif
1094 # ifndef SFS_TYPE
1095 #  define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
1096 # endif
1097 # ifndef TZ_TYPE
1098 #  define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
1099 # endif
1100 # ifndef ALTOS_SYS_V
1101 #  define bcopy(s, d, l)	(memmove((d), (s), (l)))
1102 #  define bzero(d, l)		(memset((d), '\0', (l)))
1103 #  define bcmp(s, d, l)		(memcmp((s), (d), (l)))
1104 # endif
1105 #endif
1106 
1107 /* general POSIX defines */
1108 #ifdef _POSIX_VERSION
1109 # define HASSETSID	1	/* has Posix setsid(2) call */
1110 # define HASWAITPID	1	/* has Posix waitpid(2) call */
1111 #endif
1112 
1113 /*
1114 **  If no type for argument two of getgroups call is defined, assume
1115 **  it's an integer -- unfortunately, there seem to be several choices
1116 **  here.
1117 */
1118 
1119 #ifndef GIDSET_T
1120 # define GIDSET_T	int
1121 #endif
1122 
1123 /*
1124 **  Tweaking for systems that (for example) claim to be BSD but
1125 **  don't have all the standard BSD routines (boo hiss).
1126 */
1127 
1128 #ifdef titan
1129 # undef HASINITGROUPS		/* doesn't have initgroups(3) call */
1130 #endif
1131 
1132 
1133 /*
1134 **  Due to a "feature" in some operating systems such as Ultrix 4.3 and
1135 **  HPUX 8.0, if you receive a "No route to host" message (ICMP message
1136 **  ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
1137 **  are closed.  Some firewalls return this error if you try to connect
1138 **  to the IDENT port (113), so you can't receive email from these hosts
1139 **  on these systems.  The firewall really should use a more specific
1140 **  message such as ICMP_UNREACH_PROTOCOL or _PORT or _NET_PROHIB.  If
1141 **  not explicitly set to zero above, default it on.
1142 */
1143 
1144 #ifndef IDENTPROTO
1145 # define IDENTPROTO	1	/* use IDENT proto (RFC 1413) */
1146 #endif
1147 
1148 #ifndef HASGETUSERSHELL
1149 # define HASGETUSERSHELL 1	/* libc has getusershell(3) call */
1150 #endif
1151 
1152 #ifndef HASFLOCK
1153 # define HASFLOCK	0	/* assume no flock(2) support */
1154 #endif
1155 
1156 #ifndef HASSETRLIMIT
1157 # define HASSETRLIMIT	0	/* assume no setrlimit(2) support */
1158 #endif
1159 
1160 #ifndef HASULIMIT
1161 # define HASULIMIT	0	/* assume no ulimit(2) support */
1162 #endif
1163 
1164 #ifndef OLD_NEWDB
1165 # define OLD_NEWDB	0	/* assume newer version of newdb */
1166 #endif
1167 
1168 /* heuristic setting of HASSETSIGMASK; can override above */
1169 #ifndef HASSIGSETMASK
1170 # ifdef SIGVTALRM
1171 #  define HASSETSIGMASK	1
1172 # else
1173 #  define HASSETSIGMASK	0
1174 # endif
1175 #endif
1176 
1177 
1178 /**********************************************************************
1179 **  Remaining definitions should never have to be changed.  They are
1180 **  primarily to provide back compatibility for older systems -- for
1181 **  example, it includes some POSIX compatibility definitions
1182 **********************************************************************/
1183 
1184 /* System 5 compatibility */
1185 #ifndef S_ISREG
1186 # define S_ISREG(foo)	((foo & S_IFMT) == S_IFREG)
1187 #endif
1188 #if !defined(S_ISLNK) && defined(S_IFLNK)
1189 # define S_ISLNK(foo)	((foo & S_IFMT) == S_IFLNK)
1190 #endif
1191 #ifndef S_IWGRP
1192 #define S_IWGRP		020
1193 #endif
1194 #ifndef S_IWOTH
1195 #define S_IWOTH		002
1196 #endif
1197 
1198 /*
1199 **  Older systems don't have this error code -- it should be in
1200 **  /usr/include/sysexits.h.
1201 */
1202 
1203 # ifndef EX_CONFIG
1204 # define EX_CONFIG	78	/* configuration error */
1205 # endif
1206 
1207 /* pseudo-code used in server SMTP */
1208 # define EX_QUIT	22	/* drop out of server immediately */
1209 
1210 
1211 /*
1212 **  These are used in a few cases where we need some special
1213 **  error codes, but where the system doesn't provide something
1214 **  reasonable.  They are printed in errstring.
1215 */
1216 
1217 #ifndef E_PSEUDOBASE
1218 # define E_PSEUDOBASE	256
1219 #endif
1220 
1221 #define EOPENTIMEOUT	(E_PSEUDOBASE + 0)	/* timeout on open */
1222 #define E_DNSBASE	(E_PSEUDOBASE + 20)	/* base for DNS h_errno */
1223 
1224 /* type of arbitrary pointer */
1225 #ifndef ARBPTR_T
1226 # define ARBPTR_T	void *
1227 #endif
1228 
1229 #ifndef __P
1230 # include "cdefs.h"
1231 #endif
1232 
1233 #if NAMED_BIND
1234 # include <arpa/nameser.h>
1235 # ifdef __svr4__
1236 #  ifdef NOERROR
1237 #   undef NOERROR		/* avoid compiler conflict with stream.h */
1238 #  endif
1239 # endif
1240 #endif
1241 
1242 /*
1243 **  The size of an IP address -- can't use sizeof because of problems
1244 **  on Crays, where everything is 64 bits.  This will break if/when
1245 **  IP addresses are expanded to eight bytes.
1246 */
1247 
1248 #ifndef INADDRSZ
1249 # define INADDRSZ	4
1250 #endif
1251 
1252 /*
1253 **  The size of various known types -- for reading network protocols.
1254 **  Again, we can't use sizeof because of compiler randomness.
1255 */
1256 
1257 #ifndef INT16SZ
1258 # define INT16SZ	2
1259 #endif
1260 #ifndef INT32SZ
1261 # define INT32SZ	4
1262 #endif
1263 
1264 /*
1265 **  Do some required dependencies
1266 */
1267 
1268 #if defined(NETINET) || defined(NETISO)
1269 # define SMTP		1	/* enable user and server SMTP */
1270 # define QUEUE		1	/* enable queueing */
1271 # define DAEMON		1	/* include the daemon (requires IPC & SMTP) */
1272 #endif
1273 
1274 
1275 /*
1276 **  Arrange to use either varargs or stdargs
1277 */
1278 
1279 # ifdef __STDC__
1280 
1281 # include <stdarg.h>
1282 
1283 # define VA_LOCAL_DECL	va_list ap;
1284 # define VA_START(f)	va_start(ap, f)
1285 # define VA_END		va_end(ap)
1286 
1287 # else
1288 
1289 # include <varargs.h>
1290 
1291 # define VA_LOCAL_DECL	va_list ap;
1292 # define VA_START(f)	va_start(ap)
1293 # define VA_END		va_end(ap)
1294 
1295 # endif
1296 
1297 #ifdef HASUNAME
1298 # include <sys/utsname.h>
1299 # ifdef newstr
1300 #  undef newstr
1301 # endif
1302 #else /* ! HASUNAME */
1303 # define NODE_LENGTH 32
1304 struct utsname
1305 {
1306 	char nodename[NODE_LENGTH+1];
1307 };
1308 #endif /* HASUNAME */
1309 
1310 #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYS_V)
1311 # define MAXHOSTNAMELEN	256
1312 #endif
1313 
1314 #if !defined(SIGCHLD) && defined(SIGCLD)
1315 # define SIGCHLD	SIGCLD
1316 #endif
1317 
1318 #ifndef STDIN_FILENO
1319 #define STDIN_FILENO	0
1320 #endif
1321 
1322 #ifndef STDOUT_FILENO
1323 #define STDOUT_FILENO	1
1324 #endif
1325 
1326 #ifndef STDERR_FILENO
1327 #define STDERR_FILENO	2
1328 #endif
1329 
1330 #ifndef LOCK_SH
1331 # define LOCK_SH	0x01	/* shared lock */
1332 # define LOCK_EX	0x02	/* exclusive lock */
1333 # define LOCK_NB	0x04	/* non-blocking lock */
1334 # define LOCK_UN	0x08	/* unlock */
1335 #endif
1336 
1337 #ifndef SIG_ERR
1338 # define SIG_ERR	((void (*)()) -1)
1339 #endif
1340 
1341 #ifndef WEXITSTATUS
1342 # define WEXITSTATUS(st)	(((st) >> 8) & 0377)
1343 #endif
1344 #ifndef WIFEXITED
1345 # define WIFEXITED(st)		(((st) & 0377) == 0)
1346 #endif
1347 
1348 #ifndef SIGFUNC_DEFINED
1349 typedef void		(*sigfunc_t) __P((int));
1350 #endif
1351 
1352 /* size of syslog buffer */
1353 #ifndef SYSLOG_BUFSIZE
1354 # define SYSLOG_BUFSIZE	1024
1355 #endif
1356 
1357 /*
1358 **  Size of tobuf (deliver.c)
1359 **	Tweak this to match your syslog implementation.  It will have to
1360 **	allow for the extra information printed.
1361 */
1362 
1363 #ifndef TOBUFSIZE
1364 # if (SYSLOG_BUFSIZE) > 512
1365 #  define TOBUFSIZE	(SYSLOG_BUFSIZE - 256)
1366 # else
1367 #  define TOBUFSIZE	256
1368 # endif
1369 #endif
1370 
1371 /*
1372 **  Size of prescan buffer.
1373 **	Despite comments in the _sendmail_ book, this probably should
1374 **	not be changed; there are some hard-to-define dependencies.
1375 */
1376 
1377 # define PSBUFSIZE	(MAXNAME + MAXATOM)	/* size of prescan buffer */
1378 /* fork routine -- set above using #ifdef _osname_ or in Makefile */
1379 # ifndef FORK
1380 # define FORK		vfork		/* function to call to fork mailer */
1381 # endif
1382 
1383 /*
1384 **  If we are going to link scanf anyway, use it in readcf
1385 */
1386 
1387 #if !defined(HASUNAME) && !defined(SCANF)
1388 # define SCANF		1
1389 #endif
1390