2 * Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
13 * $Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $
17 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
18 * Use is subject to license terms.
22 ** CONF.H -- All user-configurable parameters for sendmail
24 ** Send updates to Sendmail.ORG so they will be
25 ** included in the next release; see
26 ** http://www.sendmail.org/email-addresses.html
27 ** for current e-mail address.
34 # include <sm/config.h>
35 # include <sm/varargs.h>
38 ** General "standard C" defines.
40 ** These may be undone later, to cope with systems that claim to
41 ** be Standard C but aren't. Gcc is the biggest offender -- it
42 ** doesn't realize that the library is part of the language.
44 ** Life would be much easier if we could get rid of this sort
49 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */
50 # endif /* __STDC__ */
53 ** Assume you have standard calls; can be #undefed below if necessary.
57 # define HASLSTAT 1 /* has lstat(2) call */
58 # endif /* ! HASLSTAT */
61 # define HASNICE 1 /* has nice(2) call */
62 # endif /* ! HASNICE */
65 # define HASRRESVPORT 1 /* has rrsevport(3) call */
66 # endif /* ! HASRRESVPORT */
68 /**********************************************************************
69 ** "Hard" compilation options.
70 ** #define these if they are available; comment them out otherwise.
71 ** These cannot be overridden from the Makefile, and should really not
72 ** be turned off unless absolutely necessary.
73 **********************************************************************/
75 #define LOG 1 /* enable logging -- don't turn off */
77 /**********************************************************************
78 ** Operating system configuration.
80 ** Unless you are porting to a new OS, you shouldn't have to
82 **********************************************************************/
85 ** HP-UX -- tested for 8.07, 9.00, and 9.01.
87 ** If V4FS is defined, compile for HP-UX 10.0.
88 ** 11.x support from Richard Allen <ra@hp.is>.
92 /* common definitions for HP-UX 9.x and 10.x */
93 # undef m_flags /* conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h on HP 300 */
94 # define SYSTEM5 1 /* include all the System V defines */
95 # define HASINITGROUPS 1 /* has initgroups(3) call */
96 # define HASFCHMOD 1 /* has fchmod(2) syscall */
97 # define USESETEUID 1 /* has usable seteuid(2) call */
98 # define HASSETRESGID 1 /* use setresgid(2) to set saved gid */
99 # define BOGUS_O_EXCL 1 /* exclusive open follows symlinks */
100 # define seteuid(e) setresuid(-1, e, -1)
101 # define IP_SRCROUTE 1 /* can check IP source routing */
102 # define LA_TYPE LA_HPUX
103 # define SPT_TYPE SPT_PSTAT
104 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
105 # define GIDSET_T gid_t
106 # define LDA_USE_LOCKF 1
107 # ifndef HASGETUSERSHELL
108 # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */
109 # endif /* ! HASGETUSERSHELL */
111 # define _PATH_SENDMAIL "/usr/sbin/sendmail"
112 # ifndef SMRSH_CMDDIR
113 # define SMRSH_CMDDIR "/var/adm/sm.bin"
114 # endif /* ! SMRSH_CMDDIR */
117 # define HASSETREUID 1 /* setreuid(2) works on HP-UX 11.x */
118 # define HASFCHOWN 1 /* has fchown(2) */
119 # ifndef BROKEN_RES_SEARCH
120 # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */
121 # endif /* ! BROKEN_RES_SEARCH */
122 # ifndef SMRSH_CMDDIR
123 # define SMRSH_CMDDIR "/var/adm/sm.bin"
124 # endif /* ! SMRSH_CMDDIR */
125 # define _PATH_SENDMAIL "/usr/sbin/sendmail"
127 # ifndef NOT_SENDMAIL
128 # define syslog hard_syslog
129 # endif /* ! NOT_SENDMAIL */
131 # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
135 # define _PATH_UNIX "/stand/vmunix"
136 # ifndef _PATH_VENDOR_CF
137 # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf"
138 # endif /* ! _PATH_VENDOR_CF */
139 # ifndef _PATH_SENDMAILPID
140 # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
141 # endif /* ! _PATH_SENDMAILPID */
143 # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */
144 # endif /* ! IDENTPROTO */
145 # include <sys/mpctl.h> /* for mpctl() in get_num_procs_online() */
148 # define _PATH_UNIX "/hp-ux"
149 # ifndef _PATH_VENDOR_CF
150 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
151 # endif /* ! _PATH_VENDOR_CF */
153 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
154 # endif /* ! IDENTPROTO */
156 extern void hard_syslog(int, char *, ...);
157 # else /* __STDC__ */
158 extern void hard_syslog();
159 # endif /* __STDC__ */
160 # define FDSET_CAST (int *) /* cast for fd_set parameters to select */
170 # include <sys/signal.h>
171 # include <sys/wait.h>
173 # define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */
174 # define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */
176 # define HASUNSETENV 1 /* has unsetenv(3) call */
177 # endif /* _AIX5 >= 50200 */
185 # define _AIX3 1 /* pull in AIX3 stuff */
186 # define BSD4_4_SOCKADDR /* has sa_len */
187 # define USESETEUID 1 /* seteuid(2) works */
188 # define TZ_TYPE TZ_NAME /* use tzname[] vector */
189 # ifndef SOCKOPT_LEN_T
190 # define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
191 # endif /* SOCKOPT_LEN_T */
193 # define HASSETREUID 1 /* setreuid(2) works as of AIX 4.2 */
194 # ifndef SOCKADDR_LEN_T
195 # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
196 # endif /* SOCKADDR_LEN_T */
197 # endif /* _AIX4 >= 40200 */
198 # if defined(_ILS_MACROS) /* IBM versions aren't side-effect clean */
200 # define isascii(c) !(c & ~0177)
202 # define isdigit(__a) (_IS(__a,_ISDIGIT))
204 # define isspace(__a) (_IS(__a,_ISSPACE))
205 # endif /* defined(_ILS_MACROS) */
210 ** IBM AIX 3.x -- actually tested for 3.2.3
215 # include <sys/machine.h> /* to get byte order */
216 # include <sys/select.h>
217 # define HASFCHOWN 1 /* has fchown(2) */
218 # define HASINITGROUPS 1 /* has initgroups(3) call */
219 # define HASUNAME 1 /* use System V uname(2) system call */
220 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
221 # define HASFCHMOD 1 /* has fchmod(2) syscall */
222 # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
223 # define GIDSET_T gid_t
224 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
225 # define SPT_PADCHAR '\0' /* pad process title with nulls */
227 # define LA_TYPE LA_INT
228 # endif /* LA_TYPE */
230 # define LA_AVENRUN "avenrun"
231 # if !defined(_AIX4) || _AIX4 < 40300
232 # ifndef __BIT_TYPES_DEFINED__
233 # define SM_INT32 int
234 # endif /* __BIT_TYPES_DEFINED__ */
235 # endif /* !defined(_AIX4) || _AIX4 < 40300 */
236 # if !defined(_AIX4) || _AIX4 < 40200
237 # define SM_CONF_SYSLOG 0
238 # endif /* !defined(_AIX4) || _AIX4 < 40200 */
243 ** IBM AIX 2.2.1 -- actually tested for osupdate level 2706+1773
245 ** From Mark Whetzel <markw@wg.waii.com>.
248 # ifdef AIX /* AIX/RT compiler pre-defines this */
250 # include <sys/time.h> /* AIX/RT resource.h does NOT include this */
251 # define HASINITGROUPS 1 /* has initgroups(3) call */
252 # define HASUNAME 1 /* use System V uname(2) system call */
253 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
254 # define HASFCHMOD 0 /* does not have fchmod(2) syscall */
255 # define HASSETREUID 1 /* use setreuid(2) -lbsd system call */
256 # define HASSETVBUF 1 /* use setvbuf(2) system call */
257 # define HASSETRLIMIT 0 /* does not have setrlimit call */
258 # define HASFLOCK 0 /* does not have flock call - use fcntl */
259 # define HASULIMIT 1 /* use ulimit instead of setrlimit call */
260 # define SM_CONF_GETOPT 0 /* Do we need theirs or ours */
261 # define SYS5SETPGRP 1 /* don't have setpgid on AIX/RT */
262 # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
263 # define BSD4_3 1 /* NOT bsd 4.4 or posix signals */
264 # define GIDSET_T int
265 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
266 # define SPT_PADCHAR '\0' /* pad process title with nulls */
267 # define LA_TYPE LA_SUBR /* use our ported loadavgd daemon */
268 # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */
269 # define ARBPTR_T int *
272 /* RTisms for BSD compatibility, specified in the Makefile
274 define BSD_INCLUDES 1
275 define BSD_REMAP_SIGNAL_TO_SIGVEC
276 RTisms needed above */
277 /* make this sendmail in a completely different place */
278 # ifndef _PATH_VENDOR_CF
279 # define _PATH_VENDOR_CF "/usr/local/newmail/sendmail.cf"
280 # endif /* ! _PATH_VENDOR_CF */
281 # ifndef _PATH_SENDMAILPID
282 # define _PATH_SENDMAILPID "/usr/local/newmail/sendmail.pid"
283 # endif /* ! _PATH_SENDMAILPID */
287 # define LDA_USE_LOCKF 1
288 # define LDA_USE_SETEUID 1
289 # endif /* defined(_AIX) */
292 ** Silicon Graphics IRIX
294 ** Compiles on 4.0.1.
296 ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0).
297 ** Use IRIX5 instead of IRIX for IRIX 5.x.
299 ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
300 ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>.
304 # define SYSTEM5 1 /* this is a System-V derived system */
305 # define HASSETREUID 1 /* has setreuid(2) call */
306 # define HASINITGROUPS 1 /* has initgroups(3) call */
307 # define HASFCHMOD 1 /* has fchmod(2) syscall */
308 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
309 # define IP_SRCROUTE 1 /* can check IP source routing */
310 # define setpgid BSDsetpgrp
311 # define GIDSET_T gid_t
312 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
313 # define SFS_BAVAIL f_bfree /* alternate field name */
314 # define SYSLOG_BUFSIZE 512
315 # if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN)
316 /* _SC_NPROC_ONLN is 'mpadmin -u', total # of unrestricted processors */
317 # define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
318 # endif /* if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) */
321 # define QUAD_T unsigned long long
322 # define LA_TYPE LA_IRIX6 /* figure out at run time */
323 # define SAFENFSPATHCONF 0 /* pathconf(2) lies on NFS filesystems */
325 # define LA_TYPE LA_INT
329 # define QUAD_T unsigned long long
330 # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */
333 # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */
336 # if defined(IRIX64) || defined(IRIX5) || defined(IRIX6)
337 # include <sys/cdefs.h>
339 # define ARGV_T char *const *
340 # define HASFCHOWN 1 /* has fchown(2) */
341 # define HASSETRLIMIT 1 /* has setrlimit(2) syscall */
342 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */
343 # define HASSTRERROR 1 /* has strerror(3) */
344 # else /* defined(IRIX64) || defined(IRIX5) || defined(IRIX6) */
345 # define ARGV_T const char **
346 # define WAITUNION 1 /* use "union wait" as wait argument type */
347 # endif /* defined(IRIX64) || defined(IRIX5) || defined(IRIX6) */
354 ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
355 ** Solaris 2.4 (a.k.a. SunOS 5.4).
358 # if defined(sun) && !defined(BSD)
360 # include <sys/time.h>
361 # define HASINITGROUPS 1 /* has initgroups(3) call */
362 # define HASUNAME 1 /* use System V uname(2) system call */
363 # define HASFCHMOD 1 /* has fchmod(2) syscall */
364 # define IP_SRCROUTE 1 /* can check IP source routing */
365 # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
367 # define HASFCHOWN 1 /* fchown(2) */
368 # endif /* ! HASFCHOWN */
371 # define LDA_USE_LOCKF 1
372 # define LDA_USE_SETEUID 1
373 # define _PATH_MAILDIR "/var/mail"
374 # endif /* __svr4__ */
377 # define SOLARIS 20300 /* for back compat only -- use -DSOLARIS=20300 */
378 # endif /* SOLARIS_2_3 */
380 # if defined(NOT_SENDMAIL) && !defined(SOLARIS) && defined(sun) && (defined(__svr4__) || defined(__SVR4))
381 # define SOLARIS 1 /* unknown Solaris version */
382 # endif /* defined(NOT_SENDMAIL) && !defined(SOLARIS) && defined(sun) && (defined(__svr4__) || defined(__SVR4)) */
385 /* Solaris 2.x (a.k.a. SunOS 5.x) */
387 # define __svr4__ /* use all System V Release 4 defines below */
388 # endif /* ! __svr4__ */
389 # define GIDSET_T gid_t
390 # define USE_SA_SIGACTION 1 /* use sa_sigaction field */
391 # define BROKEN_PTHREAD_SLEEP 1 /* sleep after pthread_create() fails */
392 # define HASSTRERROR 1 /* has strerror(3) */
394 # define _PATH_UNIX "/dev/ksyms"
395 # endif /* ! _PATH_UNIX */
396 # ifndef _PATH_VENDOR_CF
397 # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf"
398 # endif /* ! _PATH_VENDOR_CF */
399 # ifndef _PATH_SENDMAILPID
400 # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
401 # endif /* ! _PATH_SENDMAILPID */
403 # define _PATH_HOSTS "/etc/inet/hosts"
404 # endif /* ! _PATH_HOSTS */
405 # ifndef SYSLOG_BUFSIZE
406 # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */
407 # endif /* ! SYSLOG_BUFSIZE */
409 # define TZ_TYPE TZ_TZNAME
410 # endif /* ! TZ_TYPE */
411 # if SOLARIS >= 20300 || (SOLARIS < 10000 && SOLARIS >= 203)
412 # define USESETEUID 1 /* seteuid works as of 2.3 */
413 # define LDA_CONTENTLENGTH 1 /* Needs the Content-Length header */
414 # endif /* SOLARIS >= 20300 || (SOLARIS < 10000 && SOLARIS >= 203) */
415 # if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205)
416 # define HASSETREUID 1 /* setreuid works as of 2.5 */
417 # define HASSETREGID 1 /* use setregid(2) to set saved gid */
418 # if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206)
419 # define HASSNPRINTF 1 /* has snprintf(3c) starting in 2.6 */
420 # endif /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
421 # if SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700)
423 # define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */
424 # endif /* ! LA_TYPE */
425 # ifndef RANDOMSHIFT /* random() doesn't work well (sometimes) */
426 # define RANDOMSHIFT 8
427 # endif /* ! RANDOMSHIFT */
428 # endif /* SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700) */
429 # else /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */
431 # define HASRANDOM 0 /* doesn't have random(3) */
432 # endif /* ! HASRANDOM */
433 # endif /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */
434 # if (SOLARIS > 10000 && SOLARIS < 20600) || SOLARIS < 206
435 # define SM_INT32 int /* 32bit integer */
436 # endif /* (SOLARIS > 10000 && SOLARIS < 20600) || SOLARIS < 206 */
437 # if SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207)
439 # include <sys/loadavg.h>
440 # if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
441 # include <sys/pset.h>
442 # define LA_TYPE LA_PSET /* pset_getloadavg(3c) appears in 2.9 */
443 # else /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */
444 # define LA_TYPE LA_SUBR /* getloadavg(3c) appears in 2.7 */
445 # endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */
446 # endif /* ! LA_TYPE */
447 # define HASGETUSERSHELL 1 /* getusershell(3c) bug fixed in 2.7 */
448 # endif /* SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) */
449 # if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208)
450 # undef _PATH_SENDMAILPID /* tmpfs /var/run added in 2.8 */
451 # define _PATH_SENDMAILPID "/var/run/sendmail.pid"
452 # ifndef SMRSH_CMDDIR
453 # define SMRSH_CMDDIR "/var/adm/sm.bin"
454 # endif /* ! SMRSH_CMDDIR */
455 # define SL_FUDGE 34 /* fudge offset for SyslogPrefixLen */
456 # define HASLDAPGETALIASBYNAME 1 /* added in S8 */
457 # endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
458 # if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
459 # define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */
460 # define HASCLOSEFROM 1 /* closefrom(3c) added in S9 */
461 # define HASFDWALK 1 /* fdwalk(3c) added in S9 */
462 # endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */
463 # if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210)
464 # define HASUNSETENV 1 /* unsetenv() added in S10 */
465 # endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */
466 # if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211)
467 # define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */
468 # define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */
469 # endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */
470 # ifndef HASGETUSERSHELL
471 # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */
472 # endif /* ! HASGETUSERSHELL */
475 /* SunOS 4.0.3 or 4.1.x */
476 # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */
477 # define HASSETREUID 1 /* has setreuid(2) call */
479 # define HASFLOCK 1 /* has flock(2) call */
480 # endif /* ! HASFLOCK */
481 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
482 # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */
486 # define strtoul strtol /* gcc library bogosity */
487 # endif /* __GNUC__ */
488 # define memmove(d, s, l) (bcopy((s), (d), (l)))
489 # define atexit(f) on_exit((f), 0) /* ugly hack for SunOS */
490 # define SM_INT32 int /* 32bit integer */
491 # define SM_ALIGN_SIZE (sizeof(long))
492 # define GIDSET_T int
493 # define SM_CONF_SYSLOG 0
496 /* special tweaking for SunOS 4.0.3 */
498 # define BSD4_3 1 /* 4.3 BSD-based */
499 # define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */
500 # define WAITUNION 1 /* use "union wait" as wait argument type */
504 # define setpgid setpgrp
507 extern char *getenv();
509 # else /* SUNOS403 */
510 /* 4.1.x specifics */
511 # define HASSETSID 1 /* has POSIX setsid(2) call */
512 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */
514 # endif /* SUNOS403 */
515 # endif /* SOLARIS */
518 # define LA_TYPE LA_INT
519 # endif /* ! LA_TYPE */
521 # endif /* defined(sun) && !defined(BSD) */
526 ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the
528 ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
533 # endif /* DGUX_5_4_2 */
537 # define LA_TYPE LA_DGUX
538 # define HASSETREUID 1 /* has setreuid(2) call */
539 # define HASUNAME 1 /* use System V uname(2) system call */
540 # define HASSETSID 1 /* has POSIX setsid(2) call */
541 # define HASINITGROUPS 1 /* has initgroups(3) call */
542 # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */
543 # define HASGETUSERSHELL 0 /* does not have getusershell(3) */
545 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
546 # endif /* ! IDENTPROTO */
547 # define SPT_TYPE SPT_NONE /* don't use setproctitle */
548 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
549 # define LDA_USE_LOCKF 1
551 /* these include files must be included early on DG/UX */
552 # include <netinet/in.h>
553 # include <arpa/inet.h>
555 /* compiler doesn't understand const? */
559 # define inet_addr dgux_inet_addr
560 extern long dgux_inet_addr();
561 # endif /* DGUX_5_4_2 */
566 ** Digital Ultrix 4.2 - 4.5
568 ** Apparently, fcntl locking is broken on 4.2A, in that locks are
569 ** not dropped when the process exits. This causes major problems,
570 ** so flock is the only alternative.
574 # define HASSETREUID 1 /* has setreuid(2) call */
575 # define HASUNSETENV 1 /* has unsetenv(3) call */
576 # define HASINITGROUPS 1 /* has initgroups(3) call */
577 # define HASUNAME 1 /* use System V uname(2) system call */
578 # define HASFCHMOD 1 /* has fchmod(2) syscall */
579 # define HASFCHOWN 1 /* has fchown(2) syscall */
581 # define HASFLOCK 1 /* has flock(2) call */
582 # endif /* ! HASFLOCK */
583 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
584 # ifndef BROKEN_RES_SEARCH
585 # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */
586 # endif /* ! BROKEN_RES_SEARCH */
587 # if !defined(NEEDLOCAL_HOSTNAME_LENGTH) && NAMED_BIND && __RES >= 19931104 && __RES < 19950621
588 # define NEEDLOCAL_HOSTNAME_LENGTH 1 /* see sendmail/README */
589 # endif /* !defined(NEEDLOCAL_HOSTNAME_LENGTH) && NAMED_BIND && __RES >= 19931104 && __RES < 19950621 */
591 # define LA_TYPE LA_FLOAT
593 # define LA_TYPE LA_INT
594 # define LA_AVENRUN "avenrun"
596 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
598 # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */
599 # endif /* ! IDENTPROTO */
600 # define SYSLOG_BUFSIZE 256
601 # define SM_CONF_SYSLOG 0
608 ** Contributed by Todd C. Miller <Todd.Miller@cs.colorado.edu>
612 # define __osf__ 1 /* get OSF/1 defines below */
614 # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */
615 # endif /* ! TZ_TYPE */
616 # endif /* __ksr__ */
620 ** OSF/1 for Intel Paragon.
622 ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
623 ** of Intel Scalable Systems Divison.
627 # define __osf__ 1 /* get OSF/1 defines below */
629 # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */
630 # endif /* ! TZ_TYPE */
631 # define GIDSET_T gid_t
632 # define MAXNAMLEN NAME_MAX
633 # endif /* __PARAGON__ */
637 ** Tru64 UNIX, formerly known as Digital UNIX, formerly known as DEC OSF/1
639 ** Tested for 3.2 and 4.0.
643 # define HASUNAME 1 /* has uname(2) call */
644 # define HASUNSETENV 1 /* has unsetenv(3) call */
645 # define USESETEUID 1 /* has usable seteuid(2) call */
646 # define HASINITGROUPS 1 /* has initgroups(3) call */
647 # define HASFCHMOD 1 /* has fchmod(2) syscall */
648 # define HASFCHOWN 1 /* has fchown(2) syscall */
649 # define HASSETLOGIN 1 /* has setlogin(2) */
650 # define IP_SRCROUTE 1 /* can check IP source routing */
651 # define HAS_ST_GEN 1 /* has st_gen field in stat struct */
652 # define GIDSET_T gid_t
653 # define SM_INT32 int /* 32bit integer */
655 # include <standards.h>
656 # if _XOPEN_SOURCE+0 >= 400
657 # define HASFLOCK 0 /* 5.0 and later has bad flock(2) call */
658 # else /* _XOPEN_SOURCE+0 >= 400 */
659 # define HASFLOCK 1 /* has flock(2) call */
660 # endif /* _XOPEN_SOURCE+0 >= 400 */
661 # endif /* ! HASFLOCK */
662 # define LA_TYPE LA_ALPHAOSF
663 # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statfs() impl */
664 # ifndef _PATH_VENDOR_CF
665 # define _PATH_VENDOR_CF "/var/adm/sendmail/sendmail.cf"
666 # endif /* ! _PATH_VENDOR_CF */
667 # ifndef _PATH_SENDMAILPID
668 # define _PATH_SENDMAILPID "/var/run/sendmail.pid"
669 # endif /* ! _PATH_SENDMAILPID */
670 # if _FFR_DIGUNIX_SAFECHOWN
672 ** Testing on a Digital UNIX 4.0a system showed this to be the correct
673 ** setting but given the security consequences, more testing and
674 ** verification is needed. Unfortunately, the man page offers no
677 # define IS_SAFE_CHOWN >= 0
678 # endif /* _FFR_DIGUNIX_SAFECHOWN */
679 # endif /* __osf__ */
687 # define HASINITGROUPS 1 /* has initgroups(3) call */
688 # define NEEDPUTENV 2 /* need putenv(3) call; no setenv(3) call */
690 # define HASFLOCK 1 /* has flock(2) call */
691 # endif /* ! HASFLOCK */
692 # define UID_T int /* compiler gripes on uid_t */
693 # define GID_T int /* ditto for gid_t */
694 # define MODE_T int /* and mode_t */
695 # define setpgid setpgrp
696 # ifndef NOT_SENDMAIL
697 # define sleep sleepX
698 # endif /* ! NOT_SENDMAIL */
700 # define LA_TYPE LA_MACH
701 # endif /* ! LA_TYPE */
702 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
703 # ifdef _POSIX_SOURCE
704 extern struct passwd
*getpwent();
705 # else /* _POSIX_SOURCE */
706 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
707 # define WAITUNION 1 /* use "union wait" as wait argument type */
713 # endif /* _POSIX_SOURCE */
714 # ifndef _PATH_VENDOR_CF
715 # define _PATH_VENDOR_CF "/etc/sendmail/sendmail.cf"
716 # endif /* ! _PATH_VENDOR_CF */
717 # ifndef _PATH_SENDMAILPID
718 # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid"
719 # endif /* ! _PATH_SENDMAILPID */
720 # define SM_INT32 int /* 32bit integer */
724 # define HASUNSETENV 1
725 # endif /* ! HASUNSETENV */
727 # endif /* TCPWRAPPERS */
731 # define S_IRUSR S_IREAD
732 # endif /* ! S_IRUSR */
734 # define S_IWUSR S_IWRITE
735 # endif /* ! S_IWUSR */
736 # define _PATH_MAILDIR "/usr/spool/mail"
737 # endif /* ! __APPLE__ */
739 # define isascii(c) ((unsigned)(c) <= 0177)
740 # endif /* ! isascii */
745 ** Contributed by Wilfredo Sanchez <wsanchez@mit.edu>
749 # define HASFCHMOD 1 /* has fchmod(2) */
750 # define HASFCHOWN 1 /* has fchown(2) */
751 # define HASFLOCK 1 /* has flock(2) */
752 # define HASUNAME 1 /* has uname(2) */
753 # define HASUNSETENV 1 /* has unsetenv(3) */
754 # define HASSETSID 1 /* has POSIX setsid(2) call */
755 # define HASINITGROUPS 1 /* has initgroups(3) */
756 # define HASSETVBUF 1 /* has setvbuf (3) */
757 # define HASSETREUID 0 /* setreuid(2) unusable */
758 # define HASSETEUID 1 /* has seteuid(2) */
759 # define USESETEUID 1 /* has seteuid(2) */
760 # define HASSETEGID 1 /* has setegid(2) */
761 # define HASSETREGID 1 /* has setregid(2) */
762 # define HASSETRESGID 0 /* no setresgid(2) */
763 # define HASLSTAT 1 /* has lstat(2) */
764 # define HASSETRLIMIT 1 /* has setrlimit(2) */
765 # define HASWAITPID 1 /* has waitpid(2) */
766 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) */
767 # define HAS_ST_GEN 1 /* has st_gen field in struct stat */
768 # define HASURANDOMDEV 1 /* has urandom(4) */
769 # define HASSTRERROR 1 /* has strerror(3) */
770 # define HASGETUSERSHELL 1 /* had getusershell(3) */
771 # define GIDSET_T gid_t /* getgroups(2) takes gid_t */
772 # define LA_TYPE LA_SUBR /* use getloadavg(3) */
773 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
775 # define SOCKADDR_LEN_T socklen_t
778 # define SPT_TYPE SPT_REUSEARGV
779 # define SPT_PADCHAR '\0'
780 # define SOCKOPT_LEN_T socklen_t
782 # define SPT_TYPE SPT_PSSTRINGS /* use magic PS_STRINGS pointer for setproctitle */
784 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
785 # define BSD4_4_SOCKADDR /* struct sockaddr has sa_len */
786 # define SAFENFSPATHCONF 0 /* unverified: pathconf(2) doesn't work on NFS */
788 # define NETLINK 1 /* supports AF_LINK */
789 # ifndef NOT_SENDMAIL
790 # define sleep sleepX
791 extern unsigned int sleepX
__P((unsigned int seconds
));
792 # endif /* ! NOT_SENDMAIL */
793 # endif /* defined(DARWIN) */
799 ** See also BSD defines.
802 # if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)
804 # define HASUNSETENV 1 /* has unsetenv(3) call */
805 # define USESETEUID 1 /* has usable seteuid(2) call */
806 # define HASFCHMOD 1 /* has fchmod(2) syscall */
807 # define HASFCHOWN 1 /* has fchown(2) syscall */
808 # define HASSTRERROR 1 /* has strerror(3) */
809 # define HAS_ST_GEN 1 /* has st_gen field in stat struct */
810 # include <sys/cdefs.h>
811 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
812 # define BSD4_4_SOCKADDR /* has sa_len */
813 # define NEED_PRINTF_PERCENTQ 1 /* doesn't have %lld */
814 # define NETLINK 1 /* supports AF_LINK */
816 # define LA_TYPE LA_SUBR
817 # endif /* ! LA_TYPE */
818 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
819 # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */
820 # endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)*/
824 ** BSD/OS (was BSD/386) (all versions)
825 ** From Tony Sanders, BSDI
830 # define HASUNSETENV 1 /* has the unsetenv(3) call */
831 # define HASSETREUID 0 /* BSD-OS has broken setreuid(2) emulation */
832 # define HASSETSID 1 /* has POSIX setsid(2) call */
833 # define USESETEUID 1 /* has usable seteuid(2) call */
834 # define HASFCHMOD 1 /* has fchmod(2) syscall */
835 # define HASSETLOGIN 1 /* has setlogin(2) */
836 # define HASUNAME 1 /* has uname(2) syscall */
837 # define HASSTRERROR 1 /* has strerror(3) */
838 # define HAS_ST_GEN 1 /* has st_gen field in stat struct */
839 # include <sys/cdefs.h>
840 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
841 # define BSD4_4_SOCKADDR /* has sa_len */
842 # define NETLINK 1 /* supports AF_LINK */
843 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
845 # define LA_TYPE LA_SUBR
846 # endif /* ! LA_TYPE */
847 # define GIDSET_T gid_t
848 # define QUAD_T quad_t
849 # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
850 /* version 1.1 or later */
852 # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */
853 # else /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 */
854 /* version 1.0 or earlier */
855 # define SPT_PADCHAR '\0' /* pad process title with nulls */
856 # endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 */
857 # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701 /* on 3.x */
858 # define HASSETUSERCONTEXT 1 /* has setusercontext */
859 # endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701 */
860 # if defined(_BSDI_VERSION) && _BSDI_VERSION <= 199701 /* 3.1 and earlier */
861 # define MODE_T int /* va_arg() can't handle less than int */
862 # endif /* defined(_BSDI_VERSION) && _BSDI_VERSION <= 199701 */
863 # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199910 /* on 4.x */
864 # define HASURANDOMDEV 1 /* has /dev/urandom(4) */
865 # endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199910 */
866 # endif /* __bsdi__ */
869 # if defined(__QNX__)
870 # if defined(__QNXNTO__)
873 # define HASUNSETENV 1 /* has unsetenv(3) call */
874 # define HASINITGROUPS 1 /* has initgroups(3) call */
875 # define HASSETSID 1 /* has POSIX setsid(2) call */
876 # define USESETEUID 1 /* has usable seteuid(2) call */
877 # define HASFCHMOD 1 /* has fchmod(2) syscall */
878 # define HASFCHOWN 1 /* has fchown(2) syscall */
879 # define HASUNAME 1 /* has uname(2) syscall */
880 # define HASSTRERROR 1 /* has strerror(3) */
881 # define BSD4_4_SOCKADDR /* has sa_len */
882 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
883 # define NETLINK 1 /* supports AF_LINK */
884 # define GIDSET_T gid_t
885 # define QUAD_T uint64_t
886 # define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */
887 # define HASGETUSERSHELL 0
890 ** We have a strrev() that doesn't allocate anything.
891 ** Make sure the one here is used.
894 # define strrev strrev_sendmail
896 # else /* defined(__QNXNTO__) */
900 ** Contributed by Glen McCready <glen@qnx.com>.
902 ** Should work with all versions of QNX 4.
906 # include <sys/select.h>
908 # define HASSETSID 1 /* has POSIX setsid(2) call */
909 # define USESETEUID 1 /* has usable seteuid(2) call */
910 # define HASFCHMOD 1 /* has fchmod(2) syscall */
911 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
912 # define HASSETREUID 1 /* has setreuid(2) call */
913 # define HASSTRERROR 1 /* has strerror(3) */
915 # undef HASINITGROUPS /* has initgroups(3) call */
916 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
917 # define IP_SRCROUTE 1 /* can check IP source routing */
918 # define TZ_TYPE TZ_TMNAME /* use tmname variable */
919 # define GIDSET_T gid_t
920 # define LA_TYPE LA_ZERO
921 # define SFS_TYPE SFS_NONE
922 # define SPT_TYPE SPT_REUSEARGV
923 # define SPT_PADCHAR '\0' /* pad process title with nulls */
924 # define HASGETUSERSHELL 0
925 # define _FILE_H_INCLUDED
926 # endif /* defined(__QNXNTO__) */
927 # endif /* defined(__QNX__) */
931 ** DragonFly BSD/ FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
933 ** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x
934 ** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x
936 ** See also BSD defines.
939 # if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
941 # define HASUNSETENV 1 /* has unsetenv(3) call */
942 # define HASSETSID 1 /* has POSIX setsid(2) call */
943 # define USESETEUID 1 /* has usable seteuid(2) call */
944 # define HASFCHMOD 1 /* has fchmod(2) syscall */
945 # define HASFCHOWN 1 /* has fchown(2) syscall */
946 # define HASUNAME 1 /* has uname(2) syscall */
947 # define HASSTRERROR 1 /* has strerror(3) */
948 # define HAS_ST_GEN 1 /* has st_gen field in stat struct */
949 # define NEED_PRINTF_PERCENTQ 1 /* doesn't have %lld */
950 # include <sys/cdefs.h>
951 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
952 # define BSD4_4_SOCKADDR /* has sa_len */
953 # define NETLINK 1 /* supports AF_LINK */
954 # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
955 # define GIDSET_T gid_t
956 # define QUAD_T unsigned long long
957 # define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */
959 # define LA_TYPE LA_SUBR
960 # endif /* ! LA_TYPE */
961 # if defined(__NetBSD__) && defined(__NetBSD_Version__) && \
962 ((__NetBSD_Version__ >= 200040000 && __NetBSD_Version__ < 200090000) || \
963 (__NetBSD_Version__ >= 299000900))
965 # define SFS_TYPE SFS_STATVFS
967 # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
969 # if defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1)
971 # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */
972 # endif /* defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1) */
973 # if defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3))
974 # define HASURANDOMDEV 1 /* has /dev/urandom(4) */
975 # endif /* defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) */
976 # if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000
977 # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
979 # if defined(__NetBSD__) && defined(__NetBSD_Version__) && \
980 ((__NetBSD_Version__ >= 200060000 && __NetBSD_Version__ < 200090000) || \
981 (__NetBSD_Version__ >= 299000900))
982 # define HASCLOSEFROM 1 /* closefrom(3) added in 2.0F */
984 # if defined(__NetBSD__)
985 # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
986 # include <sys/param.h>
987 # include <sys/sysctl.h>
989 # if defined(__DragonFly__)
990 # define HASSETLOGIN 1 /* has setlogin(2) */
991 # define HASSRANDOMDEV 1 /* has srandomdev(3) */
992 # define HASURANDOMDEV 1 /* has /dev/urandom(4) */
994 # include <libutil.h>
995 # define SPT_TYPE SPT_BUILTIN
996 # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
997 # ifndef SMRSH_CMDDIR
998 # define SMRSH_CMDDIR "/usr/libexec/sm.bin"
999 # endif /* ! SMRSH_CMDDIR */
1001 # define SMRSH_PATH "/bin:/usr/bin"
1002 # endif /* ! SMRSH_PATH */
1003 # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
1004 # include <sys/sysctl.h>
1005 # endif /* defined(__DragonFly__) */
1006 # if defined(__FreeBSD__)
1007 # define HASSETLOGIN 1 /* has setlogin(2) */
1008 # if __FreeBSD_version >= 227001
1009 # define HASSRANDOMDEV 1 /* has srandomdev(3) */
1010 # define HASURANDOMDEV 1 /* has /dev/urandom(4) */
1011 # endif /* __FreeBSD_version >= 227001 */
1013 # if __FreeBSD__ >= 2
1014 # include <osreldate.h>
1015 # if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */
1016 # include <libutil.h>
1017 # define SPT_TYPE SPT_BUILTIN
1018 # endif /* __FreeBSD_version >= 199512 */
1019 # if __FreeBSD_version >= 222000 /* 2.2.2-release and later */
1020 # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
1021 # endif /* __FreeBSD_version >= 222000 */
1022 # if __FreeBSD_version >= 330000 /* 3.3.0-release and later */
1023 # ifndef SMRSH_CMDDIR
1024 # define SMRSH_CMDDIR "/usr/libexec/sm.bin"
1025 # endif /* ! SMRSH_CMDDIR */
1027 # define SMRSH_PATH "/bin:/usr/bin"
1028 # endif /* ! SMRSH_PATH */
1029 # endif /* __FreeBSD_version >= 330000 */
1030 # if __FreeBSD_version >= 430000 /* 4.3.0-release and later */
1031 # define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */
1032 # define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */
1033 # endif /* __FreeBSD_version >= 430000 */
1034 # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
1035 # include <sys/sysctl.h>
1036 # endif /* __FreeBSD__ >= 2 */
1038 # define SPT_TYPE SPT_REUSEARGV
1039 # define SPT_PADCHAR '\0' /* pad process title with nulls */
1040 # endif /* ! SPT_TYPE */
1041 # endif /* defined(__FreeBSD__) */
1042 # if defined(__OpenBSD__)
1044 # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */
1045 # define HASSETLOGIN 1 /* has setlogin(2) */
1046 # if OpenBSD < 200305
1047 # define HASSETREUID 0 /* setreuid(2) broken in OpenBSD < 3.3 */
1048 # endif /* OpenBSD < 200305 */
1049 # define HASSETEGID 1 /* use setegid(2) to set saved gid */
1050 # define HASURANDOMDEV 1 /* has /dev/urandom(4) */
1051 # if OpenBSD >= 200006
1052 # define HASSRANDOMDEV 1 /* has srandomdev(3) */
1053 # endif /* OpenBSD >= 200006 */
1054 # if OpenBSD >= 200012
1055 # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
1056 # endif /* OpenBSD >= 200012 */
1057 # if OpenBSD >= 200405
1058 # define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */
1059 # endif /* OpenBSD >= 200405 */
1060 # if OpenBSD >= 200505
1061 # undef NETISO /* iso.h removed in 3.7 */
1062 # endif /* OpenBSD >= 200505 */
1063 # endif /* defined(__OpenBSD__) */
1064 # endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
1070 ** For mt Xinu's Mach386 system.
1073 # if defined(MACH) && defined(i386) && !defined(__GNU__)
1075 # define HASUNSETENV 1 /* has unsetenv(3) call */
1076 # define HASINITGROUPS 1 /* has initgroups(3) call */
1078 # define HASFLOCK 1 /* has flock(2) call */
1079 # endif /* ! HASFLOCK */
1080 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
1081 # define NEEDSTRTOL 1 /* need the strtol() function */
1082 # define setpgid setpgrp
1084 # define LA_TYPE LA_FLOAT
1085 # endif /* ! LA_TYPE */
1086 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
1087 # undef HASSETVBUF /* don't actually have setvbuf(3) */
1090 # ifndef _PATH_VENDOR_CF
1091 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1092 # endif /* ! _PATH_VENDOR_CF */
1093 # ifndef _PATH_SENDMAILPID
1094 # define _PATH_SENDMAILPID "/etc/sendmail.pid"
1095 # endif /* ! _PATH_SENDMAILPID */
1096 # endif /* defined(MACH) && defined(i386) && !defined(__GNU__) */
1102 ** Largely BSD & posix compatible.
1103 ** Port contributed by Miles Bader <miles@gnu.ai.mit.edu>.
1104 ** Updated by Mark Kettenis <kettenis@wins.uva.nl>.
1107 # if defined(__GNU__) && !defined(NeXT)
1109 # define HASFCHMOD 1 /* has fchmod(2) call */
1110 # define HASFCHOWN 1 /* has fchown(2) call */
1111 # define HASUNAME 1 /* has uname(2) call */
1112 # define HASUNSETENV 1 /* has unsetenv(3) call */
1113 # define HAS_ST_GEN 1 /* has st_gen field in stat struct */
1114 # define HASSTRERROR 1 /* has strerror(3) */
1115 # define GIDSET_T gid_t
1116 # define SOCKADDR_LEN_T socklen_t
1117 # define SOCKOPT_LEN_T socklen_t
1118 # if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2
1119 # define LA_TYPE LA_SUBR
1120 # else /* (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2 */
1121 # define LA_TYPE LA_MACH
1122 /* GNU uses mach[34], which renames some rpcs from mach2.x. */
1123 # define host_self mach_host_self
1124 # endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2 */
1125 # define SFS_TYPE SFS_STATFS
1126 # define SPT_TYPE SPT_CHANGEARGV
1127 # define ERRLIST_PREDEFINED 1 /* don't declare sys_errlist */
1128 # define BSD4_4_SOCKADDR 1 /* has sa_len */
1129 # define SIOCGIFCONF_IS_BROKEN 1 /* SIOCGFCONF doesn't work */
1130 # define HAS_IN_H 1 /* GNU has netinet/in.h. */
1131 /* GNU has no MAXPATHLEN; ideally the code should be changed to not use it. */
1132 # define MAXPATHLEN 2048
1133 # endif /* defined(__GNU__) && !defined(NeXT) */
1136 ** 4.3 BSD -- this is for very old systems
1138 ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
1140 ** You'll also have to install a new resolver library.
1141 ** I don't guarantee that support for this environment is complete.
1144 # if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
1145 # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */
1146 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
1147 # define ARBPTR_T char *
1148 # define setpgid setpgrp
1150 # define LA_TYPE LA_FLOAT
1151 # endif /* ! LA_TYPE */
1152 # ifndef _PATH_VENDOR_CF
1153 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1154 # endif /* ! _PATH_VENDOR_CF */
1156 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
1157 # endif /* ! IDENTPROTO */
1160 typedef short pid_t
;
1161 # endif /* defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) */
1167 ** This includes three parts:
1169 ** The first is for SCO OpenServer 5.
1170 ** (Contributed by Keith Reynolds <keithr@sco.COM>).
1172 ** SCO OpenServer 5 has a compiler version number macro,
1173 ** which we can use to figure out what version we're on.
1174 ** This may have to change in future releases.
1176 ** The second is for SCO UNIX 3.2v4.2/Open Desktop 3.0.
1177 ** (Contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
1179 ** The third is for SCO UNIX 3.2v4.0/Open Desktop 2.0 and earlier.
1182 /* SCO OpenServer 5 */
1185 # define SIOCGIFNUM_IS_BROKEN 1 /* SIOCGIFNUM returns bogus value */
1186 # define HASFCHMOD 1 /* has fchmod(2) call */
1187 # define HASFCHOWN 1 /* has fchown(2) call */
1188 # define HASSETRLIMIT 1 /* has setrlimit(2) call */
1189 # define USESETEUID 1 /* has seteuid(2) call */
1190 # define HASINITGROUPS 1 /* has initgroups(3) call */
1191 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
1192 # define RLIMIT_NEEDS_SYS_TIME_H 1
1193 # define LDA_USE_LOCKF 1
1195 # define LA_TYPE LA_DEVSHORT
1196 # endif /* ! LA_TYPE */
1197 # define _PATH_AVENRUN "/dev/table/avenrun"
1198 # ifndef _SCO_unix_4_2
1199 # define _SCO_unix_4_2
1200 # else /* ! _SCO_unix_4_2 */
1201 # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
1202 # define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
1203 # endif /* ! _SCO_unix_4_2 */
1204 # endif /* _SCO_DS >= 1 */
1206 /* SCO UNIX 3.2v4.2/Open Desktop 3.0 */
1207 # ifdef _SCO_unix_4_2
1209 # define HASSETREUID 1 /* has setreuid(2) call */
1210 # endif /* _SCO_unix_4_2 */
1212 /* SCO UNIX 3.2v4.0 Open Desktop 2.0 and earlier */
1214 # include <sys/stream.h> /* needed for IP_SRCROUTE */
1215 # define SYSTEM5 1 /* include all the System V defines */
1216 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1217 # define NOFTRUNCATE 0 /* has (simulated) ftruncate call */
1218 # ifndef USE_SIGLONGJMP
1219 # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
1220 # endif /* ! USE_SIGLONGJMP */
1221 # define MAXPATHLEN PATHSIZE
1222 # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */
1223 # define SFS_BAVAIL f_bfree /* alternate field name */
1224 # define SPT_TYPE SPT_SCO /* write kernel u. area */
1225 # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */
1226 # define UID_T uid_t
1227 # define GID_T gid_t
1228 # define GIDSET_T gid_t
1229 # define _PATH_UNIX "/unix"
1230 # ifndef _PATH_VENDOR_CF
1231 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1232 # endif /* ! _PATH_VENDOR_CF */
1233 # ifndef _PATH_SENDMAILPID
1234 # define _PATH_SENDMAILPID "/etc/sendmail.pid"
1235 # endif /* ! _PATH_SENDMAILPID */
1237 /* stuff fixed in later releases */
1238 # ifndef _SCO_unix_4_2
1239 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
1240 # endif /* ! _SCO_unix_4_2 */
1243 # define ftruncate chsize /* use chsize(2) to emulate ftruncate */
1244 # define NEEDFSYNC 1 /* needs the fsync(2) call stub */
1245 # define NETUNIX 0 /* no unix domain socket support */
1246 # define LA_TYPE LA_SHORT
1247 # endif /* ! _SCO_DS */
1249 # endif /* _SCO_unix_ */
1252 ** ISC (SunSoft) Unix.
1254 ** Contributed by J.J. Bailey <jjb@jagware.bcc.com>
1258 # include <net/errno.h>
1259 # include <sys/stream.h> /* needed for IP_SRCROUTE */
1260 # include <sys/bsdtypes.h>
1261 # define SYSTEM5 1 /* include all the System V defines */
1262 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
1263 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1264 # define HASSETREUID 1 /* has setreuid(2) call */
1265 # define NEEDFSYNC 1 /* needs the fsync(2) call stub */
1266 # define NETUNIX 0 /* no unix domain socket support */
1267 # define MAXPATHLEN 1024
1268 # define LA_TYPE LA_SHORT
1269 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
1270 # define SFS_BAVAIL f_bfree /* alternate field name */
1271 # define _PATH_UNIX "/unix"
1272 # ifndef _PATH_VENDOR_CF
1273 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1274 # endif /* ! _PATH_VENDOR_CF */
1275 # ifndef _PATH_SENDMAILPID
1276 # define _PATH_SENDMAILPID "/etc/sendmail.pid"
1277 # endif /* ! _PATH_SENDMAILPID */
1278 # endif /* ISC_UNIX */
1282 ** Altos System V (5.3.1)
1283 ** Contributed by Tim Rice <tim@trr.metro.net>.
1286 # ifdef ALTOS_SYSTEM_V
1287 # include <sys/stream.h>
1288 # include <limits.h>
1289 # define SYSTEM5 1 /* include all the System V defines */
1290 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
1291 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1292 # define WAITUNION 1 /* use "union wait" as wait argument type */
1293 # define NEEDFSYNC 1 /* no fsync(2) in system library */
1294 # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */
1295 # define NOFTRUNCATE 1 /* do not have ftruncate(2) */
1296 # define MAXPATHLEN PATH_MAX
1297 # define LA_TYPE LA_SHORT
1298 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
1299 # define SFS_BAVAIL f_bfree /* alternate field name */
1300 # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */
1301 # define NETUNIX 0 /* no unix domain socket support */
1304 # define strtoul strtol /* gcc library bogosity */
1306 typedef unsigned short uid_t
;
1307 typedef unsigned short gid_t
;
1308 typedef short pid_t
;
1309 typedef unsigned long mode_t
;
1311 /* some stuff that should have been in the include files */
1312 extern char *malloc();
1313 extern struct passwd
*getpwent();
1314 extern struct passwd
*getpwnam();
1315 extern struct passwd
*getpwuid();
1316 extern char *getenv();
1317 extern struct group
*getgrgid();
1318 extern struct group
*getgrnam();
1320 # endif /* ALTOS_SYSTEM_V */
1324 ** ConvexOS 11.0 and later
1326 ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this
1327 ** works on 9.1 as well.
1329 ** ConvexOS 11.5 and later, should work on 11.0 as defined.
1330 ** For pre-ConvexOOS 11.0, define SM_CONF_GETOPT=0, undef IDENTPROTO
1332 ** Eric Schnoebelen (eric@cirr.com) For CONVEX Computer Corp.
1333 ** (now the CONVEX Technologies Center of Hewlett Packard)
1336 # ifdef _CONVEX_SOURCE
1337 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) */
1338 # define HASINITGROUPS 1 /* has initgroups(3) */
1339 # define HASUNAME 1 /* use System V uname(2) system call */
1340 # define HASSETSID 1 /* has POSIX setsid(2) call */
1341 # define HASUNSETENV 1 /* has unsetenv(3) */
1342 # define HASFLOCK 1 /* has flock(2) */
1343 # define HASSETRLIMIT 1 /* has setrlimit(2) */
1344 # define HASSETREUID 1 /* has setreuid(2) */
1345 # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_error=0 */
1346 # define NEEDPUTENV 1 /* needs putenv (written in terms of setenv) */
1347 # define SM_CONF_GETOPT 1 /* need a replacement for getopt(3) */
1348 # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
1349 # define LA_TYPE LA_FLOAT
1350 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
1351 # ifndef _PATH_VENDOR_CF
1352 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1353 # endif /* ! _PATH_VENDOR_CF */
1355 # define S_IREAD _S_IREAD
1356 # define S_IWRITE _S_IWRITE
1357 # define S_IEXEC _S_IEXEC
1358 # define S_IFMT _S_IFMT
1359 # define S_IFCHR _S_IFCHR
1360 # define S_IFBLK _S_IFBLK
1361 # endif /* ! S_IREAD */
1363 # define TZ_TYPE TZ_TIMEZONE
1364 # endif /* ! TZ_TYPE */
1366 # define IDENTPROTO 1
1367 # endif /* ! IDENTPROTO */
1369 # define SHARE_V1 1 /* version 1 of the fair share scheduler */
1370 # endif /* ! SHARE_V1 */
1371 # if !defined(__GNUC__ )
1372 # define UID_T int /* GNUC gets it right, ConvexC botches */
1373 # define GID_T int /* GNUC gets it right, ConvexC botches */
1374 # endif /* !defined(__GNUC__ ) */
1376 # define FORK fork /* SecureWare wants the real fork! */
1377 # else /* SECUREWARE */
1378 # define FORK vfork /* the rest of the OS versions don't care */
1379 # endif /* SECUREWARE */
1380 # endif /* _CONVEX_SOURCE */
1386 ** Gives a ton of warning messages, but otherwise compiles.
1391 # define HASUNSETENV 1 /* has unsetenv(3) call */
1393 # define HASFLOCK 1 /* has flock(2) call */
1394 # endif /* ! HASFLOCK */
1395 # define WAITUNION 1 /* use "union wait" as wait argument type */
1396 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
1397 # define NEEDPUTENV 1 /* need putenv(3) call */
1398 # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */
1399 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
1400 # define LA_TYPE LA_INT
1401 # define LA_AVENRUN "avenrun"
1402 # define _PATH_UNIX "/unix"
1405 # define setpgid setpgrp
1408 # define SIGFUNC_DEFINED
1409 # define SIGFUNC_RETURN (0)
1410 # define SIGFUNC_DECL int
1411 typedef int (*sigfunc_t
)();
1412 extern char *getenv();
1413 extern void *malloc();
1415 /* added for RISC/os 4.01...which is dumber than 4.50 */
1418 # define ARBPTR_T char *
1419 # endif /* ! ARBPTR_T */
1422 # endif /* RISCOS_4_0 */
1424 # include <sys/time.h>
1426 # endif /* RISCOS */
1430 ** Linux 0.99pl10 and above...
1432 ** Thanks to, in reverse order of contact:
1434 ** John Kennedy <warlock@csuchico.edu>
1435 ** Andrew Pam <avatar@aus.xanadu.com>
1436 ** Florian La Roche <rzsfl@rz.uni-sb.de>
1437 ** Karl London <karl@borg.demon.co.uk>
1439 ** NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style
1440 ** file locking is no longer allowed. In particular, make sure
1441 ** your DBM library and sendmail are both using either flock(2)
1442 ** *or* fcntl(2) file locking, but not both.
1446 # include <linux/version.h>
1447 # if !defined(KERNEL_VERSION) /* not defined in 2.0.x kernel series */
1448 # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
1449 # endif /* !defined(KERNEL_VERSION) */
1450 # define BSD 1 /* include BSD defines */
1451 # define HASSETREGID 1 /* use setregid(2) to set saved gid */
1452 # ifndef REQUIRES_DIR_FSYNC
1453 # define REQUIRES_DIR_FSYNC 1 /* requires fsync() on directory */
1454 # endif /* REQUIRES_DIR_FSYNC */
1456 # define USESETEUID 0 /* has it due to POSIX, but doesn't work */
1457 # endif /* USESETEUID */
1458 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
1459 # define HASUNAME 1 /* use System V uname(2) system call */
1460 # define HASUNSETENV 1 /* has unsetenv(3) call */
1461 # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
1462 # define GIDSET_T gid_t /* from <linux/types.h> */
1463 # ifndef HASGETUSERSHELL
1464 # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
1465 # endif /* HASGETUSERSHELL */
1466 # ifndef IP_SRCROUTE
1467 # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
1468 # endif /* ! IP_SRCROUTE */
1470 # define HAS_IN_H 1 /* use netinet/in.h */
1471 # endif /* ! HAS_IN_H */
1472 # ifndef USE_SIGLONGJMP
1473 # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
1474 # endif /* ! USE_SIGLONGJMP */
1476 # if LINUX_VERSION_CODE < 66399
1477 # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */
1478 # else /* LINUX_VERSION_CODE < 66399 */
1479 # if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
1480 # define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */
1481 # else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */
1482 # define HASFLOCK 0 /* flock(2) is broken (again) after 2.4.0 */
1483 # endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */
1484 # endif /* LINUX_VERSION_CODE < 66399 */
1485 # endif /* ! HASFLOCK */
1487 # define LA_TYPE LA_PROCSTR
1488 # endif /* ! LA_TYPE */
1489 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */
1490 # define SPT_PADCHAR '\0' /* pad process title with nulls */
1491 # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0))
1492 # ifndef HASURANDOMDEV
1493 # define HASURANDOMDEV 1 /* 2.0 (at least) has linux/drivers/char/random.c */
1494 # endif /* ! HASURANDOMDEV */
1495 # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)) */
1496 # if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1497 # define HASSTRERROR 1 /* has strerror(3) */
1498 # endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */
1500 # define TZ_TYPE TZ_NONE /* no standard for Linux */
1501 # endif /* ! TZ_TYPE */
1502 # if (__GLIBC__ >= 2)
1504 # endif /* (__GLIBC__ >= 2) */
1505 # ifndef _PATH_SENDMAILPID
1506 # define _PATH_SENDMAILPID "/var/run/sendmail.pid"
1507 # endif /* ! _PATH_SENDMAILPID */
1508 # include <sys/sysmacros.h>
1509 # undef atol /* wounded in <stdlib.h> */
1512 ** Linux doesn't have a good way to tell userland what interfaces are
1513 ** IPv6-capable. Therefore, the BIND resolver can not determine if there
1514 ** are IPv6 interfaces to honor AI_ADDRCONFIG. Unfortunately, it assumes
1515 ** that none are present. (Excuse the macro name ADDRCONFIG_IS_BROKEN.)
1517 # define ADDRCONFIG_IS_BROKEN 1
1520 ** Indirectly included from glibc's <feature.h>. IPv6 support is native
1521 ** in 2.1 and later, but the APIs appear before the functions.
1523 # if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1524 # define GLIBC_VERSION ((__GLIBC__ << 8) + __GLIBC_MINOR__)
1525 # if (GLIBC_VERSION >= 0x201)
1526 # undef IPPROTO_ICMPV6 /* linux #defines, glibc enums */
1527 # else /* (GLIBC_VERSION >= 0x201) */
1528 # include <linux/in6.h> /* IPv6 support */
1529 # endif /* (GLIBC_VERSION >= 0x201) */
1530 # if (GLIBC_VERSION >= 0x201 && !defined(NEEDSGETIPNODE))
1531 /* Have APIs in <netdb.h>, but no support in glibc */
1532 # define NEEDSGETIPNODE 1
1533 # endif /* (GLIBC_VERSION >= 0x201 && !defined(NEEDSGETIPNODE)) */
1534 # undef GLIBC_VERSION
1535 # endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */
1536 # endif /* NETINET6 */
1538 # define HASFCHOWN 1 /* fchown(2) */
1539 # endif /* ! HASFCHOWN */
1540 # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) && !defined(HASFCHMOD)
1541 # define HASFCHMOD 1 /* fchmod(2) */
1542 # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) && !defined(HASFCHMOD) */
1543 # endif /* __linux__ */
1547 ** DELL SVR4 Issue 2.2, and others
1548 ** From Kimmo Suominen <kim@grendel.lut.fi>
1550 ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__
1551 ** defined, and the definitions conflict.
1553 ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid
1554 ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A
1555 ** (SVR4.0/386 version 3.0).
1559 /* no changes necessary */
1560 /* see general __svr4__ defines below */
1561 # endif /* DELL_SVR4 */
1569 # include <sys/sysmacros.h>
1570 # define BSD /* has BSD routines */
1571 # define HASSETRLIMIT 0 /* ... but not setrlimit(2) */
1572 # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */
1573 # define BOGUS_O_EXCL 1 /* exclusive open follows symlinks */
1574 # define HASUNAME 1 /* use System V uname(2) system call */
1575 # define HASFCHMOD 1 /* has fchmod(2) syscall */
1576 # define HASINITGROUPS 1 /* has initgroups(3) call */
1577 # define HASSETVBUF 1 /* has setvbuf(3) in libc */
1578 # define HASSTRERROR 1 /* has strerror(3) */
1579 # define SIGFUNC_DEFINED /* sigfunc_t already defined */
1580 # define SIGFUNC_RETURN /* POSIX-mode */
1581 # define SIGFUNC_DECL void /* POSIX-mode */
1582 # define ERRLIST_PREDEFINED 1
1584 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
1585 # endif /* ! IDENTPROTO */
1587 # define LA_TYPE LA_INT
1589 # endif /* ! LA_TYPE */
1590 # define LA_AVENRUN "avenrun"
1591 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
1592 # define TZ_TYPE TZ_TZNAME
1594 # define _PATH_UNIX "/unix" /* should be in <paths.h> */
1595 # endif /* ! _PATH_UNIX */
1596 # ifndef _PATH_VENDOR_CF
1597 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1598 # endif /* ! _PATH_VENDOR_CF */
1601 # endif /* _AUX_SOURCE */
1607 ** Not extensively tested.
1611 # define HASUNAME 1 /* use System V uname(2) system call */
1612 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */
1613 # define HASINITGROUPS 1 /* has initgroups(3) call */
1614 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1615 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
1616 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */
1617 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
1618 # define MAXPATHLEN PATH_MAX
1619 extern struct passwd
*getpwent(), *getpwnam(), *getpwuid();
1620 extern struct group
*getgrent(), *getgrnam(), *getgrgid();
1627 ** Stardent Titan 3000 running TitanOS 4.2.
1629 ** Must be compiled in "cc -43" mode.
1631 ** From Kate Hedstrom <kate@ahab.rutgers.edu>.
1633 ** Note the tweaking below after the BSD defines are set.
1637 # define setpgid setpgrp
1645 ** Sequent DYNIX 3.2.0
1647 ** From Jim Davis <jdavis@cs.arizona.edu>.
1653 # define HASUNSETENV 1
1654 # define BSD4_3 1 /* to get signal() in conf.c */
1655 # define WAITUNION 1
1656 # define LA_TYPE LA_FLOAT
1657 # ifdef _POSIX_VERSION
1658 # undef _POSIX_VERSION /* set in <unistd.h> */
1659 # endif /* _POSIX_VERSION */
1660 # undef HASSETVBUF /* don't actually have setvbuf(3) */
1661 # define setpgid setpgrp
1663 /* Have to redefine WIFEXITED to take an int, to work with waitfor() */
1665 # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \
1666 ((union wait*)&(s))->w_termsig == 0)
1667 # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode)
1669 # define isgraph(c) (isprint(c) && (c != ' '))
1672 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
1673 # endif /* ! IDENTPROTO */
1676 # define _PATH_UNIX "/dynix"
1677 # endif /* ! _PATH_UNIX */
1678 # ifndef _PATH_VENDOR_CF
1679 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1680 # endif /* ! _PATH_VENDOR_CF */
1681 # endif /* sequent */
1685 ** Sequent DYNIX/ptx v2.0 (and higher)
1687 ** For DYNIX/ptx v1.x, undefine HASSETREUID.
1689 ** From Tim Wright <timw@sequent.com>.
1690 ** Update from Jack Woolley <jwoolley@sctcorp.com>, 26 Dec 1995,
1691 ** for DYNIX/ptx 4.0.2.
1695 # include <sys/stream.h>
1696 # define SYSTEM5 1 /* include all the System V defines */
1697 # define HASSETSID 1 /* has POSIX setsid(2) call */
1698 # define HASINITGROUPS 1 /* has initgroups(3) call */
1699 # define HASSETREUID 1 /* has setreuid(2) call */
1700 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1701 # define GIDSET_T gid_t
1702 # define LA_TYPE LA_INT
1703 # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
1704 # define SPT_TYPE SPT_NONE /* don't use setproctitle */
1706 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
1707 # endif /* ! IDENTPROTO */
1708 # ifndef _PATH_VENDOR_CF
1709 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1710 # endif /* ! _PATH_VENDOR_CF */
1711 # ifndef _PATH_SENDMAILPID
1712 # define _PATH_SENDMAILPID "/etc/sendmail.pid"
1713 # endif /* ! _PATH_SENDMAILPID */
1714 # endif /* _SEQUENT_ */
1717 ** Cray UNICOS, UNICOS/mk, and UNICOS/mp
1720 ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
1721 ** Update Brian Ginsbach <ginsbach@cray.com>
1722 ** UNICOS/mk (Cray T3E):
1723 ** Contributed by Manu Mahonen <mailadm@csc.fi>
1724 ** of Center for Scientific Computing.
1725 ** Update Brian Ginsbach <ginsbach@cray.com>
1727 ** From Aaron Davis <awd@cray.com> & Brian Ginsbach <ginsbach@cray.com>
1730 # if defined(_CRAY) || defined(UNICOS) || defined(_UNICOSMP)
1731 # define SYSTEM5 1 /* include all the System V defines */
1732 # define HASFCHMOD 1 /* has fchmod(2) syscall */
1733 # define HASFCHOWN 1 /* has fchown(2) */
1734 # define HASUNSETENV 1 /* has unsetenv(3) call */
1735 # define HASINITGROUPS 1 /* has initgroups(3) call */
1736 # define HASSETREUID 1 /* has setreuid(2) call */
1737 # define USESETEUID 1 /* has usable seteuid(2) call */
1738 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */
1739 # define HASSTRERROR 1 /* has strerror(3) */
1740 # define GIDSET_T gid_t
1741 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
1742 # define SFS_BAVAIL f_bfree /* alternate field name */
1743 # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
1745 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
1746 # define LA_TYPE LA_ZERO
1747 # define _PATH_MAILDIR "/usr/spool/mail"
1748 # define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst)
1750 # define MAXPATHLEN PATHSIZE
1751 # endif /* ! MAXPATHLEN */
1754 # define _PATH_UNIX "/unicosmk.ar"
1756 # define _PATH_UNIX "/unicos"
1757 # endif /* UNICOSMK */
1758 # endif /* ! _PATH_UNIX */
1759 # ifndef _PATH_VENDOR_CF
1760 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1761 # endif /* ! _PATH_VENDOR_CF */
1762 # endif /* UNICOS */
1764 # if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN)
1765 /* _SC_NPROC_ONLN is 'mpadmin -u', total # of unrestricted processors */
1766 # define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
1767 # endif /* if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) */
1768 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1769 # define HASSETRLIMIT 1 /* has setrlimit(2) syscall */
1770 # define LA_TYPE LA_IRIX6 /* figure out at run time */
1771 # include <sys/cdefs.h>
1773 # define ARGV_T char *const *
1774 # endif /* _UNICOSMP */
1780 ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
1782 ** 15 Jan 1994; updated 2 Aug 1995
1787 # define HASSETREUID 1 /* has setreuid(2) call */
1788 # define HASINITGROUPS 1 /* has initgroups(2) call */
1789 # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */
1790 # define SPT_TYPE SPT_NONE /* don't use setproctitle */
1791 # define LA_TYPE LA_SUBR /* use getloadavg.c */
1792 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
1793 # define SFS_BAVAIL f_bfree /* alternate field name */
1794 # define TZ_TYPE TZ_TZNAME
1795 # ifndef _PATH_VENDOR_CF
1796 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
1797 # endif /* ! _PATH_VENDOR_CF */
1798 # ifndef _PATH_SENDMAILPID
1799 # define _PATH_SENDMAILPID "/etc/sendmail.pid"
1800 # endif /* ! _PATH_SENDMAILPID */
1801 # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */
1803 # define S_IFIFO 0010000
1805 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
1806 # endif /* ! IDENTPROTO */
1807 # define RLIMIT_NEEDS_SYS_TIME_H 1
1808 # if defined(NGROUPS_MAX) && !NGROUPS_MAX
1810 # endif /* defined(NGROUPS_MAX) && !NGROUPS_MAX */
1811 # endif /* apollo */
1816 ** Requires MPE 6.0 or greater. See sendmail/README for more info.
1818 ** From Mark Bixby <mark_bixby@hp.com> or <mark@bixby.org>.
1823 # include <sys/sysmacros.h>
1826 /* Sendmail stuff */
1827 # define HASFCHOWN 0 /* lacks fchown() */
1828 # define HASGETUSERSHELL 0 /* lacks getusershell() */
1831 # endif /* HASNICE */
1832 # define HASNICE 0 /* lacks nice() */
1833 # define HASRANDOM 0 /* lacks random() */
1834 # ifdef HASRRESVPORT
1835 # undef HASRRESVPORT
1836 # endif /* HASRRESVPORT */
1837 # define HASRRESVPORT 0 /* lacks rresvport() */
1838 # define IP_SRCROUTE 0 /* lacks IP source routing fields */
1841 # endif /* MATCHGECOS */
1842 # define MATCHGECOS 0 /* lacks an initialized GECOS field */
1843 # define NEEDFSYNC 1 /* use sendmail's fsync() */
1844 # define NEEDLINK 1 /* use sendmail's link() */
1845 # define NOFTRUNCATE 1 /* lacks ftruncate() */
1846 # define SFS_TYPE SFS_NONE /* can't determine disk space */
1847 # define SM_CONF_SYSLOG 0 /* use sendmail decl of syslog() */
1848 # define USE_DOUBLE_FORK 0 /* don't fork an intermediate zombie */
1849 # define USE_ENVIRON 1 /* use environ instead of envp */
1851 /* Missing header stuff */
1852 # define AF_UNSPEC 0
1853 # define AF_MAX AF_INET
1854 # define IFF_LOOPBACK 0x8
1855 # define IN_LOOPBACKNET 127
1856 # define MAXNAMLEN NAME_MAX
1857 # define S_IEXEC S_IXUSR
1858 # define S_IREAD S_IRUSR
1859 # define S_IWRITE S_IWUSR
1861 /* Present header stuff that needs to be missing */
1864 /* Shadow functions */
1865 # define bind sendmail_mpe_bind
1866 # define _exit sendmail_mpe__exit
1867 # define exit sendmail_mpe_exit
1868 # define fcntl sendmail_mpe_fcntl
1869 # define getegid sendmail_mpe_getegid
1870 # define geteuid sendmail_mpe_geteuid
1871 # define getpwnam sendmail_mpe_getpwnam
1872 # define getpwuid sendmail_mpe_getpwuid
1873 # define setgid sendmail_mpe_setgid
1874 # define setuid sendmail_mpe_setuid
1875 extern int sendmail_mpe_fcntl
__P((int, int, ...));
1876 extern struct passwd
* sendmail_mpe_getpwnam
__P((const char *));
1877 extern struct passwd
* sendmail_mpe_getpwuid
__P((uid_t
));
1881 ** System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatibility Libs ie. native)
1883 ** Contributed by Paul Gampe <paulg@apnic.net>
1887 # include <sys/mkdev.h>
1889 # define SYS5SIGNALS 1
1890 # define HASFCHOWN 1 /* has fchown(2) call */
1891 # define HASSETSID 1 /* has POSIX setsid(2) call */
1892 # define HASSETREUID 1
1893 # define HASWAITPID 1
1894 # define HASGETDTABLESIZE 1
1895 # define GIDSET_T gid_t
1896 # define SOCKADDR_LEN_T size_t
1897 # define SOCKOPT_LEN_T size_t
1899 # define _PATH_UNIX "/stand/unix"
1900 # endif /* ! _PATH_UNIX */
1901 # define SPT_PADCHAR '\0' /* pad process title with nulls */
1902 # ifndef SYSLOG_BUFSIZE
1903 # define SYSLOG_BUFSIZE 1024 /* unsure */
1904 # endif /* ! SYSLOG_BUFSIZE */
1905 # ifndef _PATH_VENDOR_CF
1906 # define _PATH_VENDOR_CF "/etc/sendmail.cf"
1907 # endif /* ! _PATH_VENDOR_CF */
1908 # ifndef _PATH_SENDMAILPID
1909 # define _PATH_SENDMAILPID "/etc/sendmail.pid"
1910 # endif /* ! _PATH_SENDMAILPID */
1911 # undef offsetof /* avoid stddefs.h, sys/sysmacros.h conflict */
1912 #if !defined(SM_SET_H_ERRNO) && defined(_REENTRANT)
1913 # define SM_SET_H_ERRNO(err) set_h_errno((err))
1914 #endif /* ! SM_SET_H_ERRNO && _REENTRANT */
1915 # endif /* __svr5__ */
1917 /* ###################################################################### */
1925 # undef offsetof /* avoid stddefs.h, sys/sysmacros.h conflict */
1926 # endif /* UNIXWARE2 */
1932 ** Updated by Petr Lampa <lampa@fee.vutbr.cz>.
1933 ** From Evan Champion <evanc@spatial.synapse.org>.
1937 # include <sys/mkdev.h>
1939 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1940 # define HASSETREUID 1
1941 # define HASSETSID 1 /* has POSIX setsid(2) call */
1942 # define HASINITGROUPS 1
1943 # define GIDSET_T gid_t
1944 # define SLEEP_T unsigned
1945 # define SFS_TYPE SFS_STATVFS
1946 # define LA_TYPE LA_ZERO
1950 # define _PATH_UNIX "/unix"
1951 # endif /* ! _PATH_UNIX */
1952 # ifndef _PATH_VENDOR_CF
1953 # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf"
1954 # endif /* ! _PATH_VENDOR_CF */
1955 # ifndef _PATH_SENDMAILPID
1956 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid"
1957 # endif /* ! _PATH_SENDMAILPID */
1958 # define SYSLOG_BUFSIZE 128
1959 # endif /* UNIXWARE */
1963 ** Intergraph CLIX 3.1
1965 ** From Paul Southworth <pauls@locust.cic.net>
1969 # define SYSTEM5 1 /* looks like System V */
1970 # ifndef HASGETUSERSHELL
1971 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
1972 # endif /* ! HASGETUSERSHELL */
1973 # define DEV_BSIZE 512 /* device block size not defined */
1974 # define GIDSET_T gid_t
1975 # undef LOG /* syslog not available */
1976 # define NEEDFSYNC 1 /* no fsync in system library */
1977 # define GETSHORT _getshort
1982 ** NCR MP-RAS 2.x (SysVr4) with Wollongong TCP/IP
1984 ** From Kevin Darcy <kevin@tech.mis.cfc.com>.
1988 # include <sys/sockio.h>
1990 # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */
1991 # define SYSLOG_BUFSIZE 1024
1992 # define SPT_TYPE SPT_NONE
1993 # endif /* NCR_MP_RAS2 */
1997 ** NCR MP-RAS 3.x (SysVr4) with STREAMware TCP/IP
1999 ** From Tom Moore <Tom.Moore@DaytonOH.NCR.COM>
2004 # define HASFCHOWN 1 /* has fchown(2) call */
2005 # define LDA_USE_LOCKF 1
2006 # define SIOCGIFNUM_IS_BROKEN 1 /* SIOCGIFNUM has non-std interface */
2007 # define SO_REUSEADDR_IS_BROKEN 1 /* doesn't work if accept() fails */
2008 # define SYSLOG_BUFSIZE 1024
2009 # define SPT_TYPE SPT_NONE
2010 # define _PATH_MAILDIR "/var/mail"
2011 # ifndef _XOPEN_SOURCE
2012 # define _XOPEN_SOURCE
2013 # define _XOPEN_SOURCE_EXTENDED 1
2014 # include <sys/resource.h>
2015 # undef _XOPEN_SOURCE
2016 # undef _XOPEN_SOURCE_EXTENDED
2017 # endif /* ! _XOPEN_SOURCE */
2018 # endif /* NCR_MP_RAS3 */
2022 ** Tandem NonStop-UX SVR4
2024 ** From Rick McCarty <mccarty@mpd.tandem.com>.
2027 # ifdef NonStop_UX_BXX
2029 # endif /* NonStop_UX_BXX */
2033 ** Hitachi 3050R/3050RX and 3500 Workstations running HI-UX/WE2.
2035 ** Tested for 1.04, 1.03
2036 ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
2038 ** Tested for 4.02, 6.10 and 7.10
2039 ** From Motonori NAKAMURA <motonori@media.kyoto-u.ac.jp>.
2042 # if !defined(__hpux) && (defined(_H3050R) || defined(_HIUX_SOURCE))
2043 # define SYSTEM5 1 /* include all the System V defines */
2044 # define HASINITGROUPS 1 /* has initgroups(3) call */
2045 # define HASFCHMOD 1 /* has fchmod(2) syscall */
2046 # define setreuid(r, e) setresuid(r, e, -1)
2047 # define LA_TYPE LA_FLOAT
2048 # define SPT_TYPE SPT_PSTAT
2049 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
2051 # define HASSETVBUF /* HI-UX has no setlinebuf */
2052 # endif /* ! HASSETVBUF */
2054 # define GIDSET_T gid_t
2055 # endif /* ! GIDSET_T */
2057 # define _PATH_UNIX "/HI-UX"
2058 # endif /* ! _PATH_UNIX */
2059 # ifndef _PATH_VENDOR_CF
2060 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
2061 # endif /* ! _PATH_VENDOR_CF */
2063 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
2064 # endif /* ! IDENTPROTO */
2065 # ifndef HASGETUSERSHELL
2066 # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */
2067 # endif /* ! HASGETUSERSHELL */
2068 # define FDSET_CAST (int *) /* cast for fd_set parameters to select */
2071 ** avoid m_flags conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h
2076 # define SM_CONF_SYSLOG 0
2078 # endif /* !defined(__hpux) && (defined(_H3050R) || defined(_HIUX_SOURCE)) */
2082 ** Amdahl UTS System V 2.1.5 (SVr3-based)
2084 ** From: Janet Jackson <janet@dialix.oz.au>.
2088 # include <sys/sysmacros.h>
2089 # undef HASLSTAT /* has symlinks, but they cause problems */
2090 # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */
2091 # define SYS5SIGNALS 1 /* System V signal semantics */
2092 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */
2093 # define HASUNAME 1 /* use System V uname(2) system call */
2094 # define HASINITGROUPS 1 /* has initgroups(3) function */
2095 # define HASSETVBUF 1 /* has setvbuf(3) function */
2096 # ifndef HASGETUSERSHELL
2097 # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */
2098 # endif /* ! HASGETUSERSHELL */
2099 # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */
2100 # define LA_TYPE LA_ZERO /* doesn't have load average */
2101 # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */
2102 # define SFS_BAVAIL f_bfree /* alternate field name */
2103 # define _PATH_UNIX "/unix"
2104 # ifndef _PATH_VENDOR_CF
2105 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
2106 # endif /* ! _PATH_VENDOR_CF */
2110 ** Cray Computer Corporation's CSOS
2112 ** From Scott Bolte <scott@craycos.com>.
2116 # define SYSTEM5 1 /* include all the System V defines */
2117 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
2118 # define NEEDFSYNC 1 /* no fsync in system library */
2119 # define MAXPATHLEN PATHSIZE
2120 # define LA_TYPE LA_ZERO
2121 # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
2122 # define SFS_BAVAIL f_bfree /* alternate field name */
2123 # define _POSIX_CHOWN_RESTRICTED -1
2124 extern struct group
*getgrent(), *getgrnam(), *getgrgid();
2125 # endif /* _CRAYCOM */
2129 ** Sony NEWS-OS 4.2.1R and 6.0.3
2131 ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>.
2136 /* NEWS-OS 4.2.1R */
2138 # define BSD /* has BSD routines */
2140 # define HASUNSETENV 1 /* has unsetenv(2) call */
2141 # undef HASSETVBUF /* don't actually have setvbuf(3) */
2142 # define WAITUNION 1 /* use "union wait" as wait argument type */
2143 # define LA_TYPE LA_INT
2144 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
2146 # define HASFLOCK 1 /* has flock(2) call */
2147 # endif /* ! HASFLOCK */
2148 # define setpgid setpgrp
2151 # define MODE_T int /* system include files have no mode_t */
2153 typedef int (*sigfunc_t
)();
2154 # define SIGFUNC_DEFINED
2155 # define SIGFUNC_RETURN (0)
2156 # define SIGFUNC_DECL int
2158 # else /* ! __svr4 */
2159 /* NEWS-OS 6.0.3 with /bin/cc */
2161 # define __svr4__ /* use all System V Release 4 defines below */
2162 # endif /* ! __svr4__ */
2163 # define HASSETSID 1 /* has POSIX setsid(2) call */
2164 # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */
2165 # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */
2167 # define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */
2168 # endif /* ! SPT_TYPE */
2169 # define GIDSET_T gid_t
2172 # ifndef SYSLOG_BUFSIZE
2173 # define SYSLOG_BUFSIZE 256
2174 # endif /* ! SYSLOG_BUFSIZE */
2175 # define _PATH_UNIX "/stand/unix"
2176 # ifndef _PATH_VENDOR_CF
2177 # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf"
2178 # endif /* ! _PATH_VENDOR_CF */
2179 # ifndef _PATH_SENDMAILPID
2180 # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
2181 # endif /* ! _PATH_SENDMAILPID */
2183 # endif /* ! __svr4 */
2184 # endif /* sony_news */
2188 ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach
2190 ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>.
2195 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
2196 # endif /* ! IDENTPROTO */
2197 # define HASUNSETENV 1 /* has unsetenv(2) call */
2198 # define NEEDPUTENV 1 /* need putenv(3) call */
2199 # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
2200 # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */
2201 # define WAITUNION 1 /* use "union wait" as wait argument type */
2203 # include <sys/time.h>
2204 # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */
2205 # define LA_TYPE LA_INT
2206 # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */
2207 # endif /* uniosb */
2209 # define LA_TYPE LA_SUBR
2210 # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */
2213 # define LA_TYPE LA_INT
2214 # endif /* luna88k */
2215 # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */
2216 # define setpgid setpgrp
2220 typedef int (*sigfunc_t
)();
2221 # define SIGFUNC_DEFINED
2222 # define SIGFUNC_RETURN (0)
2223 # define SIGFUNC_DECL int
2224 extern char *getenv();
2225 # ifndef _PATH_VENDOR_CF
2226 # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf"
2227 # endif /* ! _PATH_VENDOR_CF */
2232 ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc)
2234 ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>.
2237 # if defined(nec_ews_svr4) || defined(_nec_ews_svr4)
2239 # define __svr4__ /* use all System V Release 4 defines below */
2240 # endif /* ! __svr4__ */
2241 # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */
2242 # define HASSETSID 1 /* has POSIX setsid(2) call */
2243 # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */
2244 # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */
2245 # define GIDSET_T gid_t
2248 # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */
2249 # ifndef _PATH_VENDOR_CF
2250 # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf"
2251 # endif /* ! _PATH_VENDOR_CF */
2252 # ifndef _PATH_SENDMAILPID
2253 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid"
2254 # endif /* ! _PATH_SENDMAILPID */
2255 # ifndef SYSLOG_BUFSIZE
2256 # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */
2257 # endif /* ! SYSLOG_BUFSIZE */
2258 # endif /* defined(nec_ews_svr4) || defined(_nec_ews_svr4) */
2262 ** Fujitsu/ICL UXP/DS (For the DS/90 Series)
2264 ** From Diego R. Lopez <drlopez@cica.es>.
2265 ** Additional changes from Fumio Moriya and Toshiaki Nomura of the
2266 ** Fujitsu Fresoftware group <dsfrsoft@oai6.yk.fujitsu.co.jp>.
2270 # include <arpa/nameser.h>
2271 # include <sys/sysmacros.h>
2272 # include <sys/mkdev.h>
2274 # define HASGETUSERSHELL 0
2276 # define _PATH_UNIX "/stand/unix"
2277 # ifndef _PATH_VENDOR_CF
2278 # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf"
2279 # endif /* ! _PATH_VENDOR_CF */
2280 # ifndef _PATH_SENDMAILPID
2281 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid"
2282 # endif /* ! _PATH_SENDMAILPID */
2283 # endif /* __uxp__ */
2288 ** From Earle Ake <akee@wpdiss1.wpafb.af.mil>.
2292 # define GIDSET_T gid_t
2294 # define IDENTPROTO 0 /* TCP/IP implementation is broken */
2295 # endif /* ! IDENTPROTO */
2299 ** Concurrent Computer Corporation Maxion
2301 ** From Donald R. Laster Jr. <laster@access.digex.net>.
2306 # include <sys/stream.h>
2307 # define __svr4__ 1 /* SVR4.2MP */
2308 # define HASSETREUID 1 /* have setreuid(2) */
2309 # define HASLSTAT 1 /* have lstat(2) */
2310 # define HASSETRLIMIT 1 /* have setrlimit(2) */
2311 # define HASGETDTABLESIZE 1 /* have getdtablesize(2) */
2312 # define HASGETUSERSHELL 1 /* have getusershell(3) */
2313 # define NOFTRUNCATE 1 /* do not have ftruncate(2) */
2314 # define SLEEP_T unsigned
2315 # define SFS_TYPE SFS_STATVFS
2316 # define SFS_BAVAIL f_bavail
2317 # ifndef SYSLOG_BUFSIZE
2318 # define SYSLOG_BUFSIZE 256 /* Use 256 bytes */
2319 # endif /* ! SYSLOG_BUFSIZE */
2329 # endif /* __MAXION__ */
2332 ** Harris Nighthawk PowerUX (nh6000 box)
2334 ** Contributed by Bob Miorelli, Pratt & Whitney <miorelli@pweh.com>
2340 # endif /* ! __svr4__ */
2341 # ifndef _PATH_VENDOR_CF
2342 # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf"
2343 # endif /* ! _PATH_VENDOR_CF */
2344 # ifndef _PATH_SENDMAILPID
2345 # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
2346 # endif /* ! _PATH_SENDMAILPID */
2347 # define SYSLOG_BUFSIZE 1024
2348 # define LA_TYPE LA_ZERO
2349 typedef struct msgb mblk_t
;
2350 # undef offsetof /* avoid stddefs.h and sys/sysmacros.h conflict */
2351 # endif /* _PowerUX */
2354 ** Siemens Nixdorf Informationssysteme AG SINIX
2356 ** Contributed by Gerald Rinske of Siemens Business Services VAS.
2359 # define HASRANDOM 0 /* has random(3) */
2360 # define SYSLOG_BUFSIZE 1024
2361 # define SM_INT32 int /* 32bit integer */
2366 ** Motorola 922, MC88110, UNIX SYSTEM V/88 Release 4.0 Version 4.3
2368 ** Contributed by Sergey Rusanov <rsm@utfoms.udmnet.ru>
2372 # define HASFCHMOD 1
2373 # define HASSETRLIMIT 0
2374 # define HASSETSID 1 /* has POSIX setsid(2) call */
2375 # define HASSETREUID 1
2376 # define HASULIMIT 1
2377 # define HASWAITPID 1
2378 # define HASGETDTABLESIZE 1
2379 # define HASGETUSERSHELL 1
2380 # define IP_SRCROUTE 0
2381 # define IDENTPROTO 0
2382 # define RES_DNSRCH_VARIABLE _res_dnsrch
2383 # define _PATH_UNIX "/unix"
2384 # define _PATH_VENDOR_CF "/etc/sendmail.cf"
2385 # define _PATH_SENDMAILPID "/var/run/sendmail.pid"
2390 ** Contributed by Nedelcho Stanev <nedelcho.stanev@atlanticsky.com>
2392 ** Used for Interix support.
2395 # if defined(__INTERIX)
2396 # define HASURANDOMDEV 1
2397 # define HASGETUSERSHELL 0
2398 # define HASSTRERROR 1
2399 # define HASUNSETENV 1
2400 # define HASFCHOWN 1
2401 # undef HAVE_SYS_ERRLIST
2402 # define sys_errlist __sys_errlist
2403 # define sys_nerr __sys_nerr
2404 # include <sys/mkdev.h>
2406 # define major(dev) ((int)(((dev) >> 8) & 0xff))
2407 # endif /* ! major */
2409 # define minor(dev) ((int)((dev) & 0xff))
2410 # endif /* ! minor */
2411 # endif /* defined(__INTERIX) */
2414 /**********************************************************************
2415 ** End of Per-Operating System defines
2416 **********************************************************************/
2417 /**********************************************************************
2418 ** More general defines
2419 **********************************************************************/
2421 /* general BSD defines */
2423 # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
2424 # ifndef HASSETREUID
2425 # define HASSETREUID 1 /* has setreuid(2) call */
2426 # endif /* ! HASSETREUID */
2427 # define HASINITGROUPS 1 /* has initgroups(3) call */
2428 # ifndef IP_SRCROUTE
2429 # define IP_SRCROUTE 1 /* can check IP source routing */
2430 # endif /* ! IP_SRCROUTE */
2431 # ifndef HASSETRLIMIT
2432 # define HASSETRLIMIT 1 /* has setrlimit(2) call */
2433 # endif /* ! HASSETRLIMIT */
2435 # define HASFLOCK 1 /* has flock(2) call */
2436 # endif /* ! HASFLOCK */
2438 # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */
2439 # endif /* ! TZ_TYPE */
2442 /* general System V Release 4 defines */
2445 # define USESETEUID 1 /* has usable seteuid(2) call */
2446 # define HASINITGROUPS 1 /* has initgroups(3) call */
2447 # define BSD_COMP 1 /* get BSD ioctl calls */
2448 # ifndef HASSETRLIMIT
2449 # define HASSETRLIMIT 1 /* has setrlimit(2) call */
2450 # endif /* ! HASSETRLIMIT */
2451 # ifndef HASGETUSERSHELL
2452 # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */
2453 # endif /* ! HASGETUSERSHELL */
2455 # define HASFCHMOD 1 /* most (all?) SVr4s seem to have fchmod(2) */
2456 # endif /* ! HASFCHMOD */
2459 # define _PATH_UNIX "/unix"
2460 # endif /* ! _PATH_UNIX */
2461 # ifndef _PATH_VENDOR_CF
2462 # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf"
2463 # endif /* ! _PATH_VENDOR_CF */
2464 # ifndef _PATH_SENDMAILPID
2465 # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid"
2466 # endif /* ! _PATH_SENDMAILPID */
2467 # ifndef SYSLOG_BUFSIZE
2468 # define SYSLOG_BUFSIZE 128
2469 # endif /* ! SYSLOG_BUFSIZE */
2471 # define SFS_TYPE SFS_STATVFS
2472 # endif /* ! SFS_TYPE */
2474 # ifndef USE_SIGLONGJMP
2475 # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
2476 # endif /* ! USE_SIGLONGJMP */
2477 # endif /* __svr4__ */
2480 # define LDA_USE_LOCKF 1
2481 # define LDA_USE_SETEUID 1
2482 # define _PATH_MAILDIR "/var/mail"
2483 # endif /* __SVR4 */
2485 /* general System V defines */
2487 # include <sys/sysmacros.h>
2488 # define HASUNAME 1 /* use System V uname(2) system call */
2489 # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */
2490 # define HASSETVBUF 1 /* we have setvbuf(3) in libc */
2492 # define HASULIMIT 1 /* has the ulimit(2) syscall */
2493 # endif /* ! HASULIMIT */
2495 # ifdef MIOC_READKSYM
2496 # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */
2497 # else /* MIOC_READKSYM */
2498 # define LA_TYPE LA_INT /* assume integer load average */
2499 # endif /* MIOC_READKSYM */
2500 # endif /* ! LA_TYPE */
2502 # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */
2503 # endif /* ! SFS_TYPE */
2505 # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */
2506 # endif /* ! TZ_TYPE */
2507 # endif /* SYSTEM5 */
2509 /* general POSIX defines */
2510 # ifdef _POSIX_VERSION
2511 # define HASSETSID 1 /* has POSIX setsid(2) call */
2512 # define HASWAITPID 1 /* has POSIX waitpid(2) call */
2513 # if _POSIX_VERSION >= 199500 && !defined(USESETEUID)
2514 # define USESETEUID 1 /* has usable seteuid(2) call */
2515 # endif /* _POSIX_VERSION >= 199500 && !defined(USESETEUID) */
2516 # endif /* _POSIX_VERSION */
2518 ** Tweaking for systems that (for example) claim to be BSD or POSIX
2519 ** but don't have all the standard BSD or POSIX routines (boo hiss).
2523 # undef HASINITGROUPS /* doesn't have initgroups(3) call */
2527 # undef HASSETSID /* despite POSIX claim, doesn't have setsid */
2528 # endif /* _CRAYCOM */
2535 ** Due to a "feature" in some operating systems such as Ultrix 4.3 and
2536 ** HPUX 8.0, if you receive a "No route to host" message (ICMP message
2537 ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host
2538 ** are closed. Some firewalls return this error if you try to connect
2539 ** to the IDENT port (113), so you can't receive email from these hosts
2540 ** on these systems. The firewall really should use a more specific
2541 ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _FILTER_PROHIB. If
2542 ** not explicitly set to zero above, default it on.
2546 # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */
2547 # endif /* ! IDENTPROTO */
2549 # ifndef IP_SRCROUTE
2550 # define IP_SRCROUTE 1 /* Detect IP source routing */
2551 # endif /* ! IP_SRCROUTE */
2553 # ifndef HASGETUSERSHELL
2554 # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */
2555 # endif /* ! HASGETUSERSHELL */
2558 # define NETUNIX 1 /* include unix domain support */
2559 # endif /* ! NETUNIX */
2562 # define HASRANDOM 1 /* has random(3) support */
2563 # endif /* ! HASRANDOM */
2566 # define HASFLOCK 0 /* assume no flock(2) support */
2567 # endif /* ! HASFLOCK */
2569 # ifndef HASSETREUID
2570 # define HASSETREUID 0 /* assume no setreuid(2) call */
2571 # endif /* ! HASSETREUID */
2574 # define HASFCHMOD 0 /* assume no fchmod(2) syscall */
2575 # endif /* ! HASFCHMOD */
2578 # define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */
2579 # endif /* ! USESETEUID */
2581 # ifndef HASSETRLIMIT
2582 # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */
2583 # endif /* ! HASSETRLIMIT */
2586 # define HASULIMIT 0 /* assume no ulimit(2) support */
2587 # endif /* ! HASULIMIT */
2590 # define SECUREWARE 0 /* assume no SecureWare C2 auditing hooks */
2591 # endif /* ! SECUREWARE */
2593 # ifndef USE_DOUBLE_FORK
2594 # define USE_DOUBLE_FORK 1 /* avoid intermediate zombies */
2595 # endif /* ! USE_DOUBLE_FORK */
2597 # ifndef USE_ENVIRON
2598 # define USE_ENVIRON 0 /* use main() envp instead of extern environ */
2599 # endif /* ! USE_ENVIRON */
2601 # ifndef USE_SIGLONGJMP
2602 # define USE_SIGLONGJMP 0 /* assume setjmp handles signals properly */
2603 # endif /* ! USE_SIGLONGJMP */
2606 # define FDSET_CAST /* (empty) cast for fd_set arg to select */
2607 # endif /* ! FDSET_CAST */
2610 ** Pick a mailer setuid method for changing the current uid
2613 # define USE_SETEUID 0
2614 # define USE_SETREUID 1
2615 # define USE_SETUID 2
2618 # define MAILER_SETUID_METHOD USE_SETEUID
2619 # else /* USESETEUID */
2621 # define MAILER_SETUID_METHOD USE_SETREUID
2622 # else /* HASSETREUID */
2623 # define MAILER_SETUID_METHOD USE_SETUID
2624 # endif /* HASSETREUID */
2625 # endif /* USESETEUID */
2628 ** If no type for argument two of getgroups call is defined, assume
2629 ** it's an integer -- unfortunately, there seem to be several choices
2634 # define GIDSET_T int
2635 # endif /* ! GIDSET_T */
2638 # define UID_T uid_t
2639 # endif /* ! UID_T */
2642 # define GID_T gid_t
2643 # endif /* ! GID_T */
2646 # define MODE_T mode_t
2647 # endif /* ! MODE_T */
2650 # define ARGV_T char **
2651 # endif /* ! ARGV_T */
2653 # ifndef SOCKADDR_LEN_T
2654 # define SOCKADDR_LEN_T int
2655 # endif /* ! SOCKADDR_LEN_T */
2657 # ifndef SOCKOPT_LEN_T
2658 # define SOCKOPT_LEN_T int
2659 # endif /* ! SOCKOPT_LEN_T */
2662 # define QUAD_T unsigned long
2663 # endif /* ! QUAD_T */
2664 /**********************************************************************
2665 ** Remaining definitions should never have to be changed. They are
2666 ** primarily to provide back compatibility for older systems -- for
2667 ** example, it includes some POSIX compatibility definitions
2668 **********************************************************************/
2670 /* System 5 compatibility */
2672 # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG)
2673 # endif /* ! S_ISREG */
2675 # define S_ISDIR(foo) ((foo & S_IFMT) == S_IFDIR)
2676 # endif /* ! S_ISDIR */
2677 # if !defined(S_ISLNK) && defined(S_IFLNK)
2678 # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK)
2679 # endif /* !defined(S_ISLNK) && defined(S_IFLNK) */
2680 # if !defined(S_ISFIFO)
2681 # if defined(S_IFIFO)
2682 # define S_ISFIFO(foo) ((foo & S_IFMT) == S_IFIFO)
2683 # else /* defined(S_IFIFO) */
2684 # define S_ISFIFO(foo) false
2685 # endif /* defined(S_IFIFO) */
2686 # endif /* !defined(S_ISFIFO) */
2688 # define S_IRUSR 0400
2689 # endif /* ! S_IRUSR */
2691 # define S_IWUSR 0200
2692 # endif /* ! S_IWUSR */
2694 # define S_IRGRP 0040
2695 # endif /* ! S_IRGRP */
2697 # define S_IWGRP 0020
2698 # endif /* ! S_IWGRP */
2700 # define S_IROTH 0004
2701 # endif /* ! S_IROTH */
2703 # define S_IWOTH 0002
2704 # endif /* ! S_IWOTH */
2706 /* close-on-exec flag */
2708 # define FD_CLOEXEC 1
2709 # endif /* ! FD_CLOEXEC */
2712 ** Older systems don't have this error code -- it should be in
2713 ** /usr/include/sysexits.h.
2717 # define EX_CONFIG 78 /* configuration error */
2718 # endif /* ! EX_CONFIG */
2721 # define EX_QUIT 22 /* drop out of server immediately */
2722 # define EX_RESTART 23 /* restart sendmail daemon */
2723 # define EX_SHUTDOWN 24 /* shutdown sendmail daemon */
2726 # define EX_NOTFOUND EX_NOHOST
2727 #endif /* ! EX_NOTFOUND */
2729 /* pseudo-code used for mci_setstat */
2730 # define EX_NOTSTICKY (-5) /* don't save persistent status */
2734 ** An "impossible" file mode to indicate that the file does not exist.
2737 # define ST_MODE_NOFILE 0171147 /* unlikely to occur */
2740 /* type of arbitrary pointer */
2742 # define ARBPTR_T void *
2743 # endif /* ! ARBPTR_T */
2746 # include "sm/cdefs.h"
2749 # if HESIOD && !defined(NAMED_BIND)
2750 # define NAMED_BIND 1 /* not one without the other */
2751 # endif /* HESIOD && !defined(NAMED_BIND) */
2753 # if NAMED_BIND && !defined( __ksr__ ) && !defined( h_errno )
2755 # endif /* NAMED_BIND && !defined( __ksr__ ) && !defined( h_errno ) */
2758 extern int putenv
__P((char *));
2759 # endif /* NEEDPUTENV */
2762 extern void unsetenv
__P((char *));
2763 #endif /* !HASUNSETENV */
2766 # include <sys/time.h>
2770 /* Some LDAP constants */
2771 # define LDAPMAP_FALSE 0
2772 # define LDAPMAP_TRUE 1
2775 ** ldap_init(3) is broken in Umich 3.x and OpenLDAP 1.0/1.1.
2776 ** Use the lack of LDAP_OPT_SIZELIMIT to detect old API implementations
2777 ** and assume (falsely) that all old API implementations are broken.
2778 ** (OpenLDAP 1.2 and later have a working ldap_init(), add -DUSE_LDAP_INIT)
2781 # if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_INIT)
2782 # define USE_LDAP_INIT 1
2783 # endif /* defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_INIT) */
2786 ** LDAP_OPT_SIZELIMIT is not defined under Umich 3.x nor OpenLDAP 1.x,
2787 ** hence ldap_set_option() must not exist.
2790 # if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_SET_OPTION)
2791 # define USE_LDAP_SET_OPTION 1
2792 # endif /* defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_SET_OPTION) */
2794 # endif /* LDAPMAP */
2797 # include <sys/utsname.h>
2800 # endif /* newstr */
2801 # else /* HASUNAME */
2802 # define NODE_LENGTH 32
2805 char nodename
[NODE_LENGTH
+ 1];
2807 # endif /* HASUNAME */
2809 # if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V)
2810 # define MAXHOSTNAMELEN 256
2811 # endif /* !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) */
2814 # if _FFR_LINUX_MHNL && defined(__linux__) && MAXHOSTNAMELEN < 255
2816 ** override Linux wierdness: a FQHN can be 255 chars long
2817 ** SUSv3 requires HOST_NAME_MAX ("Maximum length of a host
2818 ** name (not including the terminating null) as returned from the
2819 ** gethostname() function.") to be at least 255. c.f.:
2820 ** http://www.opengroup.org/onlinepubs/009695399
2821 ** but Linux defines that to 64 too.
2823 # undef MAXHOSTNAMELEN
2824 # define MAXHOSTNAMELEN 256
2825 # endif /* _FFR_LINUX_MHNL && defined(__linux__) && MAXHOSTNAMELEN < 255 */
2827 # if !defined(SIGCHLD) && defined(SIGCLD)
2828 # define SIGCHLD SIGCLD
2829 # endif /* !defined(SIGCHLD) && defined(SIGCLD) */
2831 # ifndef STDIN_FILENO
2832 # define STDIN_FILENO 0
2833 # endif /* ! STDIN_FILENO */
2835 # ifndef STDOUT_FILENO
2836 # define STDOUT_FILENO 1
2837 # endif /* ! STDOUT_FILENO */
2839 # ifndef STDERR_FILENO
2840 # define STDERR_FILENO 2
2841 # endif /* ! STDERR_FILENO */
2844 # define LOCK_SH 0x01 /* shared lock */
2845 # define LOCK_EX 0x02 /* exclusive lock */
2846 # define LOCK_NB 0x04 /* non-blocking lock */
2847 # define LOCK_UN 0x08 /* unlock */
2848 # endif /* ! LOCK_SH */
2851 # define S_IXOTH (S_IEXEC >> 6)
2852 # endif /* ! S_IXOTH */
2855 # define S_IXGRP (S_IEXEC >> 3)
2856 # endif /* ! S_IXGRP */
2859 # define S_IXUSR (S_IEXEC)
2860 # endif /* ! S_IXUSR */
2863 # define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
2864 #endif /* ! O_ACCMODE */
2870 # endif /* ! SEEK_SET */
2873 # define SIG_ERR ((void (*)()) -1)
2874 # endif /* ! SIG_ERR */
2876 # ifndef WEXITSTATUS
2877 # define WEXITSTATUS(st) (((st) >> 8) & 0377)
2878 # endif /* ! WEXITSTATUS */
2880 # define WIFEXITED(st) (((st) & 0377) == 0)
2881 # endif /* ! WIFEXITED */
2883 # define WIFSTOPPED(st) (((st) & 0100) == 0)
2884 # endif /* ! WIFSTOPPED */
2886 # define WCOREDUMP(st) (((st) & 0200) != 0)
2887 # endif /* ! WCOREDUMP */
2889 # define WTERMSIG(st) (((st) & 0177))
2890 # endif /* ! WTERMSIG */
2892 # ifndef SIGFUNC_DEFINED
2893 typedef void (*sigfunc_t
) __P((int));
2894 # endif /* ! SIGFUNC_DEFINED */
2895 # ifndef SIGFUNC_RETURN
2896 # define SIGFUNC_RETURN
2897 # endif /* ! SIGFUNC_RETURN */
2898 # ifndef SIGFUNC_DECL
2899 # define SIGFUNC_DECL void
2900 # endif /* ! SIGFUNC_DECL */
2902 /* size of syslog buffer */
2903 # ifndef SYSLOG_BUFSIZE
2904 # define SYSLOG_BUFSIZE 1024
2905 # endif /* ! SYSLOG_BUFSIZE */
2909 # define FD_SETSIZE 256
2910 #endif /* ! FD_SETSIZE */
2913 ** Size of prescan buffer.
2914 ** Despite comments in the _sendmail_ book, this probably should
2915 ** not be changed; there are some hard-to-define dependencies.
2918 # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */
2920 /* fork routine -- set above using #ifdef _osname_ or in Makefile */
2922 # define FORK fork /* function to call to fork mailer */
2923 # endif /* ! FORK */
2925 /* setting h_errno */
2926 # ifndef SM_SET_H_ERRNO
2927 # define SM_SET_H_ERRNO(err) h_errno = (err)
2928 # endif /* SM_SET_H_ERRNO */
2930 # ifndef SM_CONF_GETOPT
2931 # define SM_CONF_GETOPT 1
2932 # endif /* ! SM_CONF_GETOPT */
2934 /* random routine -- set above using #ifdef _osname_ or in Makefile */
2936 # define get_random() random()
2937 # else /* HASRANDOM */
2938 # define get_random() ((long) rand())
2939 # ifndef RANDOMSHIFT
2940 # define RANDOMSHIFT 8
2941 # endif /* ! RANDOMSHIFT */
2942 # endif /* HASRANDOM */
2945 ** Default to using scanf in readcf.
2950 # endif /* ! SCANF */
2952 /* XXX 32 bit type */
2954 # define SM_INT32 int32_t
2955 # endif /* ! SM_INT32 */
2958 ** SVr4 and similar systems use different routines for setjmp/longjmp
2959 ** with signal support
2965 # endif /* jmp_buf */
2966 # define jmp_buf sigjmp_buf
2969 # endif /* setjmp */
2970 # define setjmp(env) sigsetjmp(env, 1)
2973 # endif /* longjmp */
2974 # define longjmp(env, val) siglongjmp(env, val)
2975 # endif /* USE_SIGLONGJMP */
2977 # if !defined(NGROUPS_MAX) && defined(NGROUPS)
2978 # define NGROUPS_MAX NGROUPS /* POSIX naming convention */
2979 # endif /* !defined(NGROUPS_MAX) && defined(NGROUPS) */
2982 ** Some snprintf() implementations are rumored not to NUL terminate.
2984 # if SNPRINTF_IS_BROKEN
2987 # endif /* snprintf */
2988 # define snprintf sm_snprintf
2991 # endif /* vsnprintf */
2992 # define vsnprintf sm_vsnprintf
2993 # endif /* SNPRINTF_IS_BROKEN */
2996 ** If we don't have a system syslog, simulate it.
3000 # define LOG_EMERG 0 /* system is unusable */
3001 # define LOG_ALERT 1 /* action must be taken immediately */
3002 # define LOG_CRIT 2 /* critical conditions */
3003 # define LOG_ERR 3 /* error conditions */
3004 # define LOG_WARNING 4 /* warning conditions */
3005 # define LOG_NOTICE 5 /* normal but significant condition */
3006 # define LOG_INFO 6 /* informational */
3007 # define LOG_DEBUG 7 /* debug-level messages */
3010 # ifndef SM_CONF_SYSLOG
3011 # define SM_CONF_SYSLOG 1 /* syslog.h has prototype for syslog() */
3012 # endif /* SM_CONF_SYSLOG */
3014 # if !SM_CONF_SYSLOG
3016 extern void syslog(int, const char *, ...);
3017 # else /* __STDC__ */
3018 extern void syslog();
3019 # endif /* __STDC__ */
3020 # endif /* !SM_CONF_SYSLOG */
3022 /* portable(?) definition for alignment */
3023 # ifndef SM_ALIGN_SIZE
3032 void (*al_f
) __P((void));
3035 # define SM_ALIGN_SIZE offsetof(struct sm_align, al_u)
3036 # endif /* ! SM_ALIGN_SIZE */
3037 # define SM_ALIGN_BITS (SM_ALIGN_SIZE - 1)
3039 #endif /* ! SM_CONF_H */