140266059SGregory Neil Shapiro /* 25dd76dd0SGregory Neil Shapiro * Copyright (c) 1998-2011 Proofpoint, Inc. and its suppliers. 340266059SGregory Neil Shapiro * All rights reserved. 440266059SGregory Neil Shapiro * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 540266059SGregory Neil Shapiro * Copyright (c) 1988, 1993 640266059SGregory Neil Shapiro * The Regents of the University of California. All rights reserved. 740266059SGregory Neil Shapiro * 840266059SGregory Neil Shapiro * By using this file, you agree to the terms and conditions set 940266059SGregory Neil Shapiro * forth in the LICENSE file which can be found at the top level of 1040266059SGregory Neil Shapiro * the sendmail distribution. 1140266059SGregory Neil Shapiro * 1240266059SGregory Neil Shapiro * 134313cc83SGregory Neil Shapiro * $Id: conf.h,v 1.147 2013-11-22 20:51:31 ca Exp $ 1440266059SGregory Neil Shapiro */ 1540266059SGregory Neil Shapiro 1640266059SGregory Neil Shapiro /* 1740266059SGregory Neil Shapiro ** CONF.H -- All user-configurable parameters for sendmail 1840266059SGregory Neil Shapiro ** 19d0cef73dSGregory Neil Shapiro ** Send updates to Sendmail.ORG so they will be 20d0cef73dSGregory Neil Shapiro ** included in the next release; see 21d0cef73dSGregory Neil Shapiro ** http://www.sendmail.org/email-addresses.html 22d0cef73dSGregory Neil Shapiro ** for current e-mail address. 2340266059SGregory Neil Shapiro */ 2440266059SGregory Neil Shapiro 2540266059SGregory Neil Shapiro #ifndef SM_CONF_H 2640266059SGregory Neil Shapiro # define SM_CONF_H 1 2740266059SGregory Neil Shapiro 2840266059SGregory Neil Shapiro 2940266059SGregory Neil Shapiro # include <sm/config.h> 3040266059SGregory Neil Shapiro # include <sm/varargs.h> 3140266059SGregory Neil Shapiro 3240266059SGregory Neil Shapiro /* 3340266059SGregory Neil Shapiro ** General "standard C" defines. 3440266059SGregory Neil Shapiro ** 3540266059SGregory Neil Shapiro ** These may be undone later, to cope with systems that claim to 3640266059SGregory Neil Shapiro ** be Standard C but aren't. Gcc is the biggest offender -- it 3740266059SGregory Neil Shapiro ** doesn't realize that the library is part of the language. 3840266059SGregory Neil Shapiro ** 3940266059SGregory Neil Shapiro ** Life would be much easier if we could get rid of this sort 4040266059SGregory Neil Shapiro ** of bozo problems. 4140266059SGregory Neil Shapiro */ 4240266059SGregory Neil Shapiro 4340266059SGregory Neil Shapiro # ifdef __STDC__ 4440266059SGregory Neil Shapiro # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 455b0945b5SGregory Neil Shapiro # endif 4640266059SGregory Neil Shapiro 4740266059SGregory Neil Shapiro /* 4840266059SGregory Neil Shapiro ** Assume you have standard calls; can be #undefed below if necessary. 4940266059SGregory Neil Shapiro */ 5040266059SGregory Neil Shapiro 5140266059SGregory Neil Shapiro # ifndef HASLSTAT 5240266059SGregory Neil Shapiro # define HASLSTAT 1 /* has lstat(2) call */ 535b0945b5SGregory Neil Shapiro # endif 5440266059SGregory Neil Shapiro 5540266059SGregory Neil Shapiro # ifndef HASNICE 5640266059SGregory Neil Shapiro # define HASNICE 1 /* has nice(2) call */ 575b0945b5SGregory Neil Shapiro # endif 5840266059SGregory Neil Shapiro 5940266059SGregory Neil Shapiro # ifndef HASRRESVPORT 6040266059SGregory Neil Shapiro # define HASRRESVPORT 1 /* has rrsevport(3) call */ 615b0945b5SGregory Neil Shapiro # endif 6240266059SGregory Neil Shapiro 6340266059SGregory Neil Shapiro /********************************************************************** 6440266059SGregory Neil Shapiro ** "Hard" compilation options. 6540266059SGregory Neil Shapiro ** #define these if they are available; comment them out otherwise. 6640266059SGregory Neil Shapiro ** These cannot be overridden from the Makefile, and should really not 6740266059SGregory Neil Shapiro ** be turned off unless absolutely necessary. 6840266059SGregory Neil Shapiro **********************************************************************/ 6940266059SGregory Neil Shapiro 7040266059SGregory Neil Shapiro #define LOG 1 /* enable logging -- don't turn off */ 7140266059SGregory Neil Shapiro 7240266059SGregory Neil Shapiro /********************************************************************** 7340266059SGregory Neil Shapiro ** Operating system configuration. 7440266059SGregory Neil Shapiro ** 7540266059SGregory Neil Shapiro ** Unless you are porting to a new OS, you shouldn't have to 7640266059SGregory Neil Shapiro ** change these. 7740266059SGregory Neil Shapiro **********************************************************************/ 7840266059SGregory Neil Shapiro 7940266059SGregory Neil Shapiro /* 8040266059SGregory Neil Shapiro ** HP-UX -- tested for 8.07, 9.00, and 9.01. 8140266059SGregory Neil Shapiro ** 8240266059SGregory Neil Shapiro ** If V4FS is defined, compile for HP-UX 10.0. 8340266059SGregory Neil Shapiro ** 11.x support from Richard Allen <ra@hp.is>. 8440266059SGregory Neil Shapiro */ 8540266059SGregory Neil Shapiro 8640266059SGregory Neil Shapiro # ifdef __hpux 8740266059SGregory Neil Shapiro /* common definitions for HP-UX 9.x and 10.x */ 8840266059SGregory Neil Shapiro # undef m_flags /* conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h on HP 300 */ 8940266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 9040266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 9140266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 9240266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 9340266059SGregory Neil Shapiro # define HASSETRESGID 1 /* use setresgid(2) to set saved gid */ 9440266059SGregory Neil Shapiro # define BOGUS_O_EXCL 1 /* exclusive open follows symlinks */ 9540266059SGregory Neil Shapiro # define seteuid(e) setresuid(-1, e, -1) 9640266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* can check IP source routing */ 9740266059SGregory Neil Shapiro # define LA_TYPE LA_HPUX 9840266059SGregory Neil Shapiro # define SPT_TYPE SPT_PSTAT 9940266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 10040266059SGregory Neil Shapiro # define GIDSET_T gid_t 10140266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 10240266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 10340266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 1045b0945b5SGregory Neil Shapiro # endif 10540266059SGregory Neil Shapiro # ifdef HPUX10 10640266059SGregory Neil Shapiro # define _PATH_SENDMAIL "/usr/sbin/sendmail" 107a7ec597cSGregory Neil Shapiro # ifndef SMRSH_CMDDIR 10840266059SGregory Neil Shapiro # define SMRSH_CMDDIR "/var/adm/sm.bin" 1095b0945b5SGregory Neil Shapiro # endif 1105b0945b5SGregory Neil Shapiro # endif 11140266059SGregory Neil Shapiro # ifdef HPUX11 112605302a5SGregory Neil Shapiro # define HASSETREUID 1 /* setreuid(2) works on HP-UX 11.x */ 11340266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) */ 11440266059SGregory Neil Shapiro # ifndef BROKEN_RES_SEARCH 11540266059SGregory Neil Shapiro # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 1165b0945b5SGregory Neil Shapiro # endif 117a7ec597cSGregory Neil Shapiro # ifndef SMRSH_CMDDIR 11840266059SGregory Neil Shapiro # define SMRSH_CMDDIR "/var/adm/sm.bin" 1195b0945b5SGregory Neil Shapiro # endif 12040266059SGregory Neil Shapiro # define _PATH_SENDMAIL "/usr/sbin/sendmail" 12140266059SGregory Neil Shapiro # else /* HPUX11 */ 12240266059SGregory Neil Shapiro # ifndef NOT_SENDMAIL 12340266059SGregory Neil Shapiro # define syslog hard_syslog 1245b0945b5SGregory Neil Shapiro # endif 12540266059SGregory Neil Shapiro # endif /* HPUX11 */ 12640266059SGregory Neil Shapiro # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ 12740266059SGregory Neil Shapiro 12840266059SGregory Neil Shapiro # ifdef V4FS 12940266059SGregory Neil Shapiro /* HP-UX 10.x */ 13040266059SGregory Neil Shapiro # define _PATH_UNIX "/stand/vmunix" 13140266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 13240266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 1335b0945b5SGregory Neil Shapiro # endif 13440266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 13540266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 1365b0945b5SGregory Neil Shapiro # endif 13740266059SGregory Neil Shapiro # ifndef IDENTPROTO 13840266059SGregory Neil Shapiro # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ 1395b0945b5SGregory Neil Shapiro # endif 14040266059SGregory Neil Shapiro # include <sys/mpctl.h> /* for mpctl() in get_num_procs_online() */ 14140266059SGregory Neil Shapiro # else /* V4FS */ 14240266059SGregory Neil Shapiro /* HP-UX 9.x */ 14340266059SGregory Neil Shapiro # define _PATH_UNIX "/hp-ux" 14440266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 14540266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 1465b0945b5SGregory Neil Shapiro # endif 14740266059SGregory Neil Shapiro # ifndef IDENTPROTO 14840266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 1495b0945b5SGregory Neil Shapiro # endif 15040266059SGregory Neil Shapiro # ifdef __STDC__ 15140266059SGregory Neil Shapiro extern void hard_syslog(int, char *, ...); 1525b0945b5SGregory Neil Shapiro # else 15340266059SGregory Neil Shapiro extern void hard_syslog(); 1545b0945b5SGregory Neil Shapiro # endif 15540266059SGregory Neil Shapiro # define FDSET_CAST (int *) /* cast for fd_set parameters to select */ 15640266059SGregory Neil Shapiro # endif /* V4FS */ 15740266059SGregory Neil Shapiro 15840266059SGregory Neil Shapiro # endif /* __hpux */ 15940266059SGregory Neil Shapiro 16040266059SGregory Neil Shapiro /* 16140266059SGregory Neil Shapiro ** IBM AIX 5.x 16240266059SGregory Neil Shapiro */ 16340266059SGregory Neil Shapiro 16440266059SGregory Neil Shapiro # ifdef _AIX5 165d0cef73dSGregory Neil Shapiro # include <sys/signal.h> 166d0cef73dSGregory Neil Shapiro # include <sys/wait.h> 16740266059SGregory Neil Shapiro # define _AIX4 40300 16813d88268SGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ 16913d88268SGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ 170a7ec597cSGregory Neil Shapiro # if _AIX5 >= 50200 171a7ec597cSGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 1725b0945b5SGregory Neil Shapiro # endif 17340266059SGregory Neil Shapiro # endif /* _AIX5 */ 17440266059SGregory Neil Shapiro 17540266059SGregory Neil Shapiro /* 17640266059SGregory Neil Shapiro ** IBM AIX 4.x 17740266059SGregory Neil Shapiro */ 17840266059SGregory Neil Shapiro 17940266059SGregory Neil Shapiro # ifdef _AIX4 18040266059SGregory Neil Shapiro # define _AIX3 1 /* pull in AIX3 stuff */ 18140266059SGregory Neil Shapiro # define BSD4_4_SOCKADDR /* has sa_len */ 18240266059SGregory Neil Shapiro # define USESETEUID 1 /* seteuid(2) works */ 18340266059SGregory Neil Shapiro # define TZ_TYPE TZ_NAME /* use tzname[] vector */ 18413d88268SGregory Neil Shapiro # ifndef SOCKOPT_LEN_T 18540266059SGregory Neil Shapiro # define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ 1865b0945b5SGregory Neil Shapiro # endif 18740266059SGregory Neil Shapiro # if _AIX4 >= 40200 18840266059SGregory Neil Shapiro # define HASSETREUID 1 /* setreuid(2) works as of AIX 4.2 */ 18913d88268SGregory Neil Shapiro # ifndef SOCKADDR_LEN_T 19040266059SGregory Neil Shapiro # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ 1915b0945b5SGregory Neil Shapiro # endif 19240266059SGregory Neil Shapiro # endif /* _AIX4 >= 40200 */ 19340266059SGregory Neil Shapiro # if defined(_ILS_MACROS) /* IBM versions aren't side-effect clean */ 19440266059SGregory Neil Shapiro # undef isascii 19540266059SGregory Neil Shapiro # define isascii(c) !(c & ~0177) 19640266059SGregory Neil Shapiro # undef isdigit 19740266059SGregory Neil Shapiro # define isdigit(__a) (_IS(__a,_ISDIGIT)) 19840266059SGregory Neil Shapiro # undef isspace 19940266059SGregory Neil Shapiro # define isspace(__a) (_IS(__a,_ISSPACE)) 20040266059SGregory Neil Shapiro # endif /* defined(_ILS_MACROS) */ 20140266059SGregory Neil Shapiro # endif /* _AIX4 */ 20240266059SGregory Neil Shapiro 20340266059SGregory Neil Shapiro 20440266059SGregory Neil Shapiro /* 20540266059SGregory Neil Shapiro ** IBM AIX 3.x -- actually tested for 3.2.3 20640266059SGregory Neil Shapiro */ 20740266059SGregory Neil Shapiro 20840266059SGregory Neil Shapiro # ifdef _AIX3 20940266059SGregory Neil Shapiro # include <paths.h> 21040266059SGregory Neil Shapiro # include <sys/machine.h> /* to get byte order */ 21140266059SGregory Neil Shapiro # include <sys/select.h> 21240266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) */ 21340266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 21440266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 21540266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 21640266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 21740266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 21840266059SGregory Neil Shapiro # define GIDSET_T gid_t 21940266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 22040266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 22113d88268SGregory Neil Shapiro # ifndef LA_TYPE 22240266059SGregory Neil Shapiro # define LA_TYPE LA_INT 2235b0945b5SGregory Neil Shapiro # endif 22440266059SGregory Neil Shapiro # define FSHIFT 16 22540266059SGregory Neil Shapiro # define LA_AVENRUN "avenrun" 22640266059SGregory Neil Shapiro # if !defined(_AIX4) || _AIX4 < 40300 22740266059SGregory Neil Shapiro # ifndef __BIT_TYPES_DEFINED__ 22840266059SGregory Neil Shapiro # define SM_INT32 int 2295b0945b5SGregory Neil Shapiro # endif 23040266059SGregory Neil Shapiro # endif /* !defined(_AIX4) || _AIX4 < 40300 */ 23140266059SGregory Neil Shapiro # if !defined(_AIX4) || _AIX4 < 40200 23240266059SGregory Neil Shapiro # define SM_CONF_SYSLOG 0 2335b0945b5SGregory Neil Shapiro # endif 23440266059SGregory Neil Shapiro # endif /* _AIX3 */ 23540266059SGregory Neil Shapiro 23640266059SGregory Neil Shapiro 23740266059SGregory Neil Shapiro /* 23840266059SGregory Neil Shapiro ** IBM AIX 2.2.1 -- actually tested for osupdate level 2706+1773 23940266059SGregory Neil Shapiro ** 24040266059SGregory Neil Shapiro ** From Mark Whetzel <markw@wg.waii.com>. 24140266059SGregory Neil Shapiro */ 24240266059SGregory Neil Shapiro 24340266059SGregory Neil Shapiro # ifdef AIX /* AIX/RT compiler pre-defines this */ 24440266059SGregory Neil Shapiro # include <paths.h> 24540266059SGregory Neil Shapiro # include <sys/time.h> /* AIX/RT resource.h does NOT include this */ 24640266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 24740266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 24840266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 24940266059SGregory Neil Shapiro # define HASFCHMOD 0 /* does not have fchmod(2) syscall */ 25040266059SGregory Neil Shapiro # define HASSETREUID 1 /* use setreuid(2) -lbsd system call */ 25140266059SGregory Neil Shapiro # define HASSETVBUF 1 /* use setvbuf(2) system call */ 25240266059SGregory Neil Shapiro # define HASSETRLIMIT 0 /* does not have setrlimit call */ 25340266059SGregory Neil Shapiro # define HASFLOCK 0 /* does not have flock call - use fcntl */ 25440266059SGregory Neil Shapiro # define HASULIMIT 1 /* use ulimit instead of setrlimit call */ 25540266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* Do we need theirs or ours */ 25640266059SGregory Neil Shapiro # define SYS5SETPGRP 1 /* don't have setpgid on AIX/RT */ 25740266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 25840266059SGregory Neil Shapiro # define BSD4_3 1 /* NOT bsd 4.4 or posix signals */ 25940266059SGregory Neil Shapiro # define GIDSET_T int 26040266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 26140266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 26240266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR /* use our ported loadavgd daemon */ 26340266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 26440266059SGregory Neil Shapiro # define ARBPTR_T int * 26540266059SGregory Neil Shapiro # define void int 26640266059SGregory Neil Shapiro typedef int pid_t; 26740266059SGregory Neil Shapiro /* RTisms for BSD compatibility, specified in the Makefile 26840266059SGregory Neil Shapiro define BSD 1 26940266059SGregory Neil Shapiro define BSD_INCLUDES 1 27040266059SGregory Neil Shapiro define BSD_REMAP_SIGNAL_TO_SIGVEC 27140266059SGregory Neil Shapiro RTisms needed above */ 27240266059SGregory Neil Shapiro /* make this sendmail in a completely different place */ 27340266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 27440266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/local/newmail/sendmail.cf" 2755b0945b5SGregory Neil Shapiro # endif 27640266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 27740266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/usr/local/newmail/sendmail.pid" 2785b0945b5SGregory Neil Shapiro # endif 27940266059SGregory Neil Shapiro # endif /* AIX */ 28040266059SGregory Neil Shapiro 28140266059SGregory Neil Shapiro # if defined(_AIX) 28240266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 28340266059SGregory Neil Shapiro # define LDA_USE_SETEUID 1 2845b0945b5SGregory Neil Shapiro # endif 28540266059SGregory Neil Shapiro 28640266059SGregory Neil Shapiro /* 28740266059SGregory Neil Shapiro ** Silicon Graphics IRIX 28840266059SGregory Neil Shapiro ** 28940266059SGregory Neil Shapiro ** Compiles on 4.0.1. 29040266059SGregory Neil Shapiro ** 29140266059SGregory Neil Shapiro ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). 29240266059SGregory Neil Shapiro ** Use IRIX5 instead of IRIX for IRIX 5.x. 29340266059SGregory Neil Shapiro ** 29440266059SGregory Neil Shapiro ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. 29540266059SGregory Neil Shapiro ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. 29640266059SGregory Neil Shapiro */ 29740266059SGregory Neil Shapiro 29840266059SGregory Neil Shapiro # ifdef IRIX 29940266059SGregory Neil Shapiro # define SYSTEM5 1 /* this is a System-V derived system */ 30040266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 30140266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 30240266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 30340266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 30440266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* can check IP source routing */ 30540266059SGregory Neil Shapiro # define setpgid BSDsetpgrp 30640266059SGregory Neil Shapiro # define GIDSET_T gid_t 30740266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 30840266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 30940266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 512 31013bd1963SGregory Neil Shapiro # if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) 31113bd1963SGregory Neil Shapiro /* _SC_NPROC_ONLN is 'mpadmin -u', total # of unrestricted processors */ 31213bd1963SGregory Neil Shapiro # define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN 3135b0945b5SGregory Neil Shapiro # endif 31440266059SGregory Neil Shapiro # ifdef IRIX6 31540266059SGregory Neil Shapiro # define STAT64 1 31640266059SGregory Neil Shapiro # define QUAD_T unsigned long long 31740266059SGregory Neil Shapiro # define LA_TYPE LA_IRIX6 /* figure out at run time */ 31840266059SGregory Neil Shapiro # define SAFENFSPATHCONF 0 /* pathconf(2) lies on NFS filesystems */ 31940266059SGregory Neil Shapiro # else /* IRIX6 */ 32040266059SGregory Neil Shapiro # define LA_TYPE LA_INT 32140266059SGregory Neil Shapiro 32240266059SGregory Neil Shapiro # ifdef IRIX64 32340266059SGregory Neil Shapiro # define STAT64 1 32440266059SGregory Neil Shapiro # define QUAD_T unsigned long long 32540266059SGregory Neil Shapiro # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ 32640266059SGregory Neil Shapiro # else /* IRIX64 */ 32740266059SGregory Neil Shapiro # define STAT64 0 32840266059SGregory Neil Shapiro # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 32940266059SGregory Neil Shapiro # endif /* IRIX64 */ 33040266059SGregory Neil Shapiro # endif /* IRIX6 */ 33140266059SGregory Neil Shapiro # if defined(IRIX64) || defined(IRIX5) || defined(IRIX6) 33240266059SGregory Neil Shapiro # include <sys/cdefs.h> 33340266059SGregory Neil Shapiro # include <paths.h> 33440266059SGregory Neil Shapiro # define ARGV_T char *const * 33540266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) */ 33640266059SGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) syscall */ 33740266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */ 33840266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 33940266059SGregory Neil Shapiro # else /* defined(IRIX64) || defined(IRIX5) || defined(IRIX6) */ 34040266059SGregory Neil Shapiro # define ARGV_T const char ** 34140266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 34240266059SGregory Neil Shapiro # endif /* defined(IRIX64) || defined(IRIX5) || defined(IRIX6) */ 34340266059SGregory Neil Shapiro # endif /* IRIX */ 34440266059SGregory Neil Shapiro 34540266059SGregory Neil Shapiro 34640266059SGregory Neil Shapiro /* 34740266059SGregory Neil Shapiro ** SunOS and Solaris 34840266059SGregory Neil Shapiro ** 34940266059SGregory Neil Shapiro ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and 35040266059SGregory Neil Shapiro ** Solaris 2.4 (a.k.a. SunOS 5.4). 35140266059SGregory Neil Shapiro */ 35240266059SGregory Neil Shapiro 35340266059SGregory Neil Shapiro # if defined(sun) && !defined(BSD) 35440266059SGregory Neil Shapiro 35540266059SGregory Neil Shapiro # include <sys/time.h> 35640266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 35740266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 35840266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 35940266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* can check IP source routing */ 36040266059SGregory Neil Shapiro # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ 36140266059SGregory Neil Shapiro # ifndef HASFCHOWN 36240266059SGregory Neil Shapiro # define HASFCHOWN 1 /* fchown(2) */ 3635b0945b5SGregory Neil Shapiro # endif 36440266059SGregory Neil Shapiro 36540266059SGregory Neil Shapiro # ifdef __svr4__ 36640266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 36740266059SGregory Neil Shapiro # define LDA_USE_SETEUID 1 36840266059SGregory Neil Shapiro # define _PATH_MAILDIR "/var/mail" 36940266059SGregory Neil Shapiro # endif /* __svr4__ */ 37040266059SGregory Neil Shapiro 37140266059SGregory Neil Shapiro # ifdef SOLARIS_2_3 37240266059SGregory Neil Shapiro # define SOLARIS 20300 /* for back compat only -- use -DSOLARIS=20300 */ 37340266059SGregory Neil Shapiro # endif /* SOLARIS_2_3 */ 37440266059SGregory Neil Shapiro 37540266059SGregory Neil Shapiro # if defined(NOT_SENDMAIL) && !defined(SOLARIS) && defined(sun) && (defined(__svr4__) || defined(__SVR4)) 37640266059SGregory Neil Shapiro # define SOLARIS 1 /* unknown Solaris version */ 3775b0945b5SGregory Neil Shapiro # endif 37840266059SGregory Neil Shapiro 37940266059SGregory Neil Shapiro # ifdef SOLARIS 38040266059SGregory Neil Shapiro /* Solaris 2.x (a.k.a. SunOS 5.x) */ 38140266059SGregory Neil Shapiro # ifndef __svr4__ 38240266059SGregory Neil Shapiro # define __svr4__ /* use all System V Release 4 defines below */ 3835b0945b5SGregory Neil Shapiro # endif 3846f9c8e5bSGregory Neil Shapiro # if SOLARIS >= 21100 3856f9c8e5bSGregory Neil Shapiro # include <paths.h> 3865b0945b5SGregory Neil Shapiro # endif 3876f9c8e5bSGregory Neil Shapiro # ifndef _PATH_VARRUN 3886f9c8e5bSGregory Neil Shapiro # define _PATH_VARRUN "/var/run/" 3895b0945b5SGregory Neil Shapiro # endif 39040266059SGregory Neil Shapiro # define GIDSET_T gid_t 39140266059SGregory Neil Shapiro # define USE_SA_SIGACTION 1 /* use sa_sigaction field */ 39240266059SGregory Neil Shapiro # define BROKEN_PTHREAD_SLEEP 1 /* sleep after pthread_create() fails */ 39340266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 39440266059SGregory Neil Shapiro # ifndef _PATH_UNIX 39540266059SGregory Neil Shapiro # define _PATH_UNIX "/dev/ksyms" 3965b0945b5SGregory Neil Shapiro # endif 39740266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 39840266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 3995b0945b5SGregory Neil Shapiro # endif 40040266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 40140266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 4025b0945b5SGregory Neil Shapiro # endif 40340266059SGregory Neil Shapiro # ifndef _PATH_HOSTS 40440266059SGregory Neil Shapiro # define _PATH_HOSTS "/etc/inet/hosts" 4055b0945b5SGregory Neil Shapiro # endif 40640266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 40740266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 4085b0945b5SGregory Neil Shapiro # endif 40940266059SGregory Neil Shapiro # ifndef TZ_TYPE 41040266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME 4115b0945b5SGregory Neil Shapiro # endif 41240266059SGregory Neil Shapiro # if SOLARIS >= 20300 || (SOLARIS < 10000 && SOLARIS >= 203) 41340266059SGregory Neil Shapiro # define USESETEUID 1 /* seteuid works as of 2.3 */ 41440266059SGregory Neil Shapiro # define LDA_CONTENTLENGTH 1 /* Needs the Content-Length header */ 4155b0945b5SGregory Neil Shapiro # endif 41640266059SGregory Neil Shapiro # if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) 41740266059SGregory Neil Shapiro # define HASSETREUID 1 /* setreuid works as of 2.5 */ 41840266059SGregory Neil Shapiro # define HASSETREGID 1 /* use setregid(2) to set saved gid */ 4194e4196cbSGregory Neil Shapiro # if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) 4204e4196cbSGregory Neil Shapiro # define HASSNPRINTF 1 /* has snprintf(3c) starting in 2.6 */ 4215b0945b5SGregory Neil Shapiro # endif 42240266059SGregory Neil Shapiro # if SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700) 42340266059SGregory Neil Shapiro # ifndef LA_TYPE 42440266059SGregory Neil Shapiro # define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */ 4255b0945b5SGregory Neil Shapiro # endif 42640266059SGregory Neil Shapiro # ifndef RANDOMSHIFT /* random() doesn't work well (sometimes) */ 42740266059SGregory Neil Shapiro # define RANDOMSHIFT 8 4285b0945b5SGregory Neil Shapiro # endif 42940266059SGregory Neil Shapiro # endif /* SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700) */ 43040266059SGregory Neil Shapiro # else /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */ 43140266059SGregory Neil Shapiro # ifndef HASRANDOM 43240266059SGregory Neil Shapiro # define HASRANDOM 0 /* doesn't have random(3) */ 4335b0945b5SGregory Neil Shapiro # endif 43440266059SGregory Neil Shapiro # endif /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */ 43540266059SGregory Neil Shapiro # if (SOLARIS > 10000 && SOLARIS < 20600) || SOLARIS < 206 43640266059SGregory Neil Shapiro # define SM_INT32 int /* 32bit integer */ 4375b0945b5SGregory Neil Shapiro # endif 43840266059SGregory Neil Shapiro # if SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) 43940266059SGregory Neil Shapiro # ifndef LA_TYPE 44040266059SGregory Neil Shapiro # include <sys/loadavg.h> 44140266059SGregory Neil Shapiro # if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) 44240266059SGregory Neil Shapiro # include <sys/pset.h> 44340266059SGregory Neil Shapiro # define LA_TYPE LA_PSET /* pset_getloadavg(3c) appears in 2.9 */ 44440266059SGregory Neil Shapiro # else /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */ 44540266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR /* getloadavg(3c) appears in 2.7 */ 44640266059SGregory Neil Shapiro # endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */ 44740266059SGregory Neil Shapiro # endif /* ! LA_TYPE */ 44840266059SGregory Neil Shapiro # define HASGETUSERSHELL 1 /* getusershell(3c) bug fixed in 2.7 */ 44940266059SGregory Neil Shapiro # endif /* SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) */ 45040266059SGregory Neil Shapiro # if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) 45140266059SGregory Neil Shapiro # undef _PATH_SENDMAILPID /* tmpfs /var/run added in 2.8 */ 4526f9c8e5bSGregory Neil Shapiro # define _PATH_SENDMAILPID _PATH_VARRUN "sendmail.pid" 453a7ec597cSGregory Neil Shapiro # ifndef SMRSH_CMDDIR 45440266059SGregory Neil Shapiro # define SMRSH_CMDDIR "/var/adm/sm.bin" 4555b0945b5SGregory Neil Shapiro # endif 45640266059SGregory Neil Shapiro # define SL_FUDGE 34 /* fudge offset for SyslogPrefixLen */ 457d0cef73dSGregory Neil Shapiro # define HASLDAPGETALIASBYNAME 1 /* added in S8 */ 45840266059SGregory Neil Shapiro # endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */ 45940266059SGregory Neil Shapiro # if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) 46040266059SGregory Neil Shapiro # define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */ 461e92d3f3fSGregory Neil Shapiro # define HASCLOSEFROM 1 /* closefrom(3c) added in S9 */ 462e92d3f3fSGregory Neil Shapiro # define HASFDWALK 1 /* fdwalk(3c) added in S9 */ 46340266059SGregory Neil Shapiro # endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */ 464323f6dcbSGregory Neil Shapiro # if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) 465323f6dcbSGregory Neil Shapiro # define HASUNSETENV 1 /* unsetenv() added in S10 */ 4665b0945b5SGregory Neil Shapiro # endif 467ffb83623SGregory Neil Shapiro # if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) 468ffb83623SGregory Neil Shapiro # define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */ 4699bd497b8SGregory Neil Shapiro # define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */ 4706f9c8e5bSGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t /* arg#3 to accept, getsockname */ 4716f9c8e5bSGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ 472ffb83623SGregory Neil Shapiro # endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */ 47340266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 47440266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ 4755b0945b5SGregory Neil Shapiro # endif 476*d39bd2c1SGregory Neil Shapiro # if SOLARIS < 21140 477*d39bd2c1SGregory Neil Shapiro # define SIGWAIT_TAKES_1_ARG 1 /* S11.4 moves to UNIX V7 semantic */ 4785b0945b5SGregory Neil Shapiro # endif 47940266059SGregory Neil Shapiro 48040266059SGregory Neil Shapiro # else /* SOLARIS */ 48140266059SGregory Neil Shapiro /* SunOS 4.0.3 or 4.1.x */ 48240266059SGregory Neil Shapiro # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 48340266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 48440266059SGregory Neil Shapiro # ifndef HASFLOCK 48540266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 4865b0945b5SGregory Neil Shapiro # endif 48740266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 48840266059SGregory Neil Shapiro # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */ 48940266059SGregory Neil Shapiro # include <memory.h> 49040266059SGregory Neil Shapiro # include <vfork.h> 49140266059SGregory Neil Shapiro # ifdef __GNUC__ 49240266059SGregory Neil Shapiro # define strtoul strtol /* gcc library bogosity */ 4935b0945b5SGregory Neil Shapiro # endif 49440266059SGregory Neil Shapiro # define memmove(d, s, l) (bcopy((s), (d), (l))) 49540266059SGregory Neil Shapiro # define atexit(f) on_exit((f), 0) /* ugly hack for SunOS */ 49640266059SGregory Neil Shapiro # define SM_INT32 int /* 32bit integer */ 49740266059SGregory Neil Shapiro # define SM_ALIGN_SIZE (sizeof(long)) 49840266059SGregory Neil Shapiro # define GIDSET_T int 49940266059SGregory Neil Shapiro # define SM_CONF_SYSLOG 0 50040266059SGregory Neil Shapiro 50140266059SGregory Neil Shapiro # ifdef SUNOS403 50240266059SGregory Neil Shapiro /* special tweaking for SunOS 4.0.3 */ 50340266059SGregory Neil Shapiro # include <malloc.h> 50440266059SGregory Neil Shapiro # define BSD4_3 1 /* 4.3 BSD-based */ 50540266059SGregory Neil Shapiro # define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */ 50640266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 50740266059SGregory Neil Shapiro # undef WIFEXITED 50840266059SGregory Neil Shapiro # undef WEXITSTATUS 50940266059SGregory Neil Shapiro # undef HASUNAME 51040266059SGregory Neil Shapiro # define setpgid setpgrp 51140266059SGregory Neil Shapiro # define MODE_T int 51240266059SGregory Neil Shapiro typedef int pid_t; 51340266059SGregory Neil Shapiro extern char *getenv(); 51440266059SGregory Neil Shapiro 51540266059SGregory Neil Shapiro # else /* SUNOS403 */ 51640266059SGregory Neil Shapiro /* 4.1.x specifics */ 517e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 51840266059SGregory Neil Shapiro # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 51940266059SGregory Neil Shapiro 52040266059SGregory Neil Shapiro # endif /* SUNOS403 */ 52140266059SGregory Neil Shapiro # endif /* SOLARIS */ 52240266059SGregory Neil Shapiro 52340266059SGregory Neil Shapiro # ifndef LA_TYPE 52440266059SGregory Neil Shapiro # define LA_TYPE LA_INT 5255b0945b5SGregory Neil Shapiro # endif 52640266059SGregory Neil Shapiro 52740266059SGregory Neil Shapiro # endif /* defined(sun) && !defined(BSD) */ 52840266059SGregory Neil Shapiro 52940266059SGregory Neil Shapiro /* 53040266059SGregory Neil Shapiro ** DG/UX 53140266059SGregory Neil Shapiro ** 53240266059SGregory Neil Shapiro ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the 53340266059SGregory Neil Shapiro ** older support. 53440266059SGregory Neil Shapiro ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. 53540266059SGregory Neil Shapiro */ 53640266059SGregory Neil Shapiro 53740266059SGregory Neil Shapiro # ifdef DGUX_5_4_2 53840266059SGregory Neil Shapiro # define DGUX 1 5395b0945b5SGregory Neil Shapiro # endif 54040266059SGregory Neil Shapiro 54140266059SGregory Neil Shapiro # ifdef DGUX 54240266059SGregory Neil Shapiro # define SYSTEM5 1 54340266059SGregory Neil Shapiro # define LA_TYPE LA_DGUX 54440266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 54540266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 546e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 54740266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 54840266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */ 54940266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ 55040266059SGregory Neil Shapiro # ifndef IDENTPROTO 55140266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 5525b0945b5SGregory Neil Shapiro # endif 55340266059SGregory Neil Shapiro # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 55440266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 55540266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 55640266059SGregory Neil Shapiro 55740266059SGregory Neil Shapiro /* these include files must be included early on DG/UX */ 55840266059SGregory Neil Shapiro # include <netinet/in.h> 55940266059SGregory Neil Shapiro # include <arpa/inet.h> 56040266059SGregory Neil Shapiro 56140266059SGregory Neil Shapiro /* compiler doesn't understand const? */ 56240266059SGregory Neil Shapiro # define const 56340266059SGregory Neil Shapiro 56440266059SGregory Neil Shapiro # ifdef DGUX_5_4_2 56540266059SGregory Neil Shapiro # define inet_addr dgux_inet_addr 56640266059SGregory Neil Shapiro extern long dgux_inet_addr(); 56740266059SGregory Neil Shapiro # endif /* DGUX_5_4_2 */ 56840266059SGregory Neil Shapiro # endif /* DGUX */ 56940266059SGregory Neil Shapiro 57040266059SGregory Neil Shapiro 57140266059SGregory Neil Shapiro /* 57240266059SGregory Neil Shapiro ** Digital Ultrix 4.2 - 4.5 57340266059SGregory Neil Shapiro ** 57440266059SGregory Neil Shapiro ** Apparently, fcntl locking is broken on 4.2A, in that locks are 57540266059SGregory Neil Shapiro ** not dropped when the process exits. This causes major problems, 57640266059SGregory Neil Shapiro ** so flock is the only alternative. 57740266059SGregory Neil Shapiro */ 57840266059SGregory Neil Shapiro 57940266059SGregory Neil Shapiro # ifdef ultrix 58040266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 58140266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 58240266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 58340266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 58440266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 58540266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) syscall */ 58640266059SGregory Neil Shapiro # ifndef HASFLOCK 58740266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 5885b0945b5SGregory Neil Shapiro # endif 58940266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 59040266059SGregory Neil Shapiro # ifndef BROKEN_RES_SEARCH 59140266059SGregory Neil Shapiro # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 5925b0945b5SGregory Neil Shapiro # endif 59340266059SGregory Neil Shapiro # if !defined(NEEDLOCAL_HOSTNAME_LENGTH) && NAMED_BIND && __RES >= 19931104 && __RES < 19950621 59440266059SGregory Neil Shapiro # define NEEDLOCAL_HOSTNAME_LENGTH 1 /* see sendmail/README */ 5955b0945b5SGregory Neil Shapiro # endif 59640266059SGregory Neil Shapiro # ifdef vax 59740266059SGregory Neil Shapiro # define LA_TYPE LA_FLOAT 59840266059SGregory Neil Shapiro # else /* vax */ 59940266059SGregory Neil Shapiro # define LA_TYPE LA_INT 60040266059SGregory Neil Shapiro # define LA_AVENRUN "avenrun" 60140266059SGregory Neil Shapiro # endif /* vax */ 60240266059SGregory Neil Shapiro # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 60340266059SGregory Neil Shapiro # ifndef IDENTPROTO 60440266059SGregory Neil Shapiro # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ 6055b0945b5SGregory Neil Shapiro # endif 60640266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 256 60740266059SGregory Neil Shapiro # define SM_CONF_SYSLOG 0 60840266059SGregory Neil Shapiro # endif /* ultrix */ 60940266059SGregory Neil Shapiro 61040266059SGregory Neil Shapiro 61140266059SGregory Neil Shapiro /* 61240266059SGregory Neil Shapiro ** OSF/1 for KSR. 61340266059SGregory Neil Shapiro ** 61440266059SGregory Neil Shapiro ** Contributed by Todd C. Miller <Todd.Miller@cs.colorado.edu> 61540266059SGregory Neil Shapiro */ 61640266059SGregory Neil Shapiro 61740266059SGregory Neil Shapiro # ifdef __ksr__ 61840266059SGregory Neil Shapiro # define __osf__ 1 /* get OSF/1 defines below */ 61940266059SGregory Neil Shapiro # ifndef TZ_TYPE 62040266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 6215b0945b5SGregory Neil Shapiro # endif 62240266059SGregory Neil Shapiro # endif /* __ksr__ */ 62340266059SGregory Neil Shapiro 62440266059SGregory Neil Shapiro 62540266059SGregory Neil Shapiro /* 62640266059SGregory Neil Shapiro ** OSF/1 for Intel Paragon. 62740266059SGregory Neil Shapiro ** 62840266059SGregory Neil Shapiro ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> 6295b0945b5SGregory Neil Shapiro ** of Intel Scalable Systems Division. 63040266059SGregory Neil Shapiro */ 63140266059SGregory Neil Shapiro 63240266059SGregory Neil Shapiro # ifdef __PARAGON__ 63340266059SGregory Neil Shapiro # define __osf__ 1 /* get OSF/1 defines below */ 63440266059SGregory Neil Shapiro # ifndef TZ_TYPE 63540266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 6365b0945b5SGregory Neil Shapiro # endif 63740266059SGregory Neil Shapiro # define GIDSET_T gid_t 63840266059SGregory Neil Shapiro # define MAXNAMLEN NAME_MAX 63940266059SGregory Neil Shapiro # endif /* __PARAGON__ */ 64040266059SGregory Neil Shapiro 64140266059SGregory Neil Shapiro 64240266059SGregory Neil Shapiro /* 64340266059SGregory Neil Shapiro ** Tru64 UNIX, formerly known as Digital UNIX, formerly known as DEC OSF/1 64440266059SGregory Neil Shapiro ** 64540266059SGregory Neil Shapiro ** Tested for 3.2 and 4.0. 64640266059SGregory Neil Shapiro */ 64740266059SGregory Neil Shapiro 64840266059SGregory Neil Shapiro # ifdef __osf__ 64940266059SGregory Neil Shapiro # define HASUNAME 1 /* has uname(2) call */ 65040266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 65140266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 65240266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 65340266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 65440266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) syscall */ 65540266059SGregory Neil Shapiro # define HASSETLOGIN 1 /* has setlogin(2) */ 65640266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* can check IP source routing */ 65740266059SGregory Neil Shapiro # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ 65840266059SGregory Neil Shapiro # define GIDSET_T gid_t 65940266059SGregory Neil Shapiro # define SM_INT32 int /* 32bit integer */ 66040266059SGregory Neil Shapiro # ifndef HASFLOCK 66194c01205SGregory Neil Shapiro # include <standards.h> 66294c01205SGregory Neil Shapiro # if _XOPEN_SOURCE+0 >= 400 66394c01205SGregory Neil Shapiro # define HASFLOCK 0 /* 5.0 and later has bad flock(2) call */ 6645b0945b5SGregory Neil Shapiro # else 66540266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 6665b0945b5SGregory Neil Shapiro # endif 66740266059SGregory Neil Shapiro # endif /* ! HASFLOCK */ 66840266059SGregory Neil Shapiro # define LA_TYPE LA_ALPHAOSF 66940266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statfs() impl */ 67040266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 67140266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/var/adm/sendmail/sendmail.cf" 6725b0945b5SGregory Neil Shapiro # endif 67340266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 67440266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 6755b0945b5SGregory Neil Shapiro # endif 676605302a5SGregory Neil Shapiro # if _FFR_DIGUNIX_SAFECHOWN 677605302a5SGregory Neil Shapiro /* 678605302a5SGregory Neil Shapiro ** Testing on a Digital UNIX 4.0a system showed this to be the correct 679605302a5SGregory Neil Shapiro ** setting but given the security consequences, more testing and 680605302a5SGregory Neil Shapiro ** verification is needed. Unfortunately, the man page offers no 681605302a5SGregory Neil Shapiro ** assistance. 682605302a5SGregory Neil Shapiro */ 683605302a5SGregory Neil Shapiro # define IS_SAFE_CHOWN >= 0 684605302a5SGregory Neil Shapiro # endif /* _FFR_DIGUNIX_SAFECHOWN */ 68540266059SGregory Neil Shapiro # endif /* __osf__ */ 68640266059SGregory Neil Shapiro 68740266059SGregory Neil Shapiro 68840266059SGregory Neil Shapiro /* 68940266059SGregory Neil Shapiro ** NeXTstep 69040266059SGregory Neil Shapiro */ 69140266059SGregory Neil Shapiro 69240266059SGregory Neil Shapiro # ifdef NeXT 69340266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 69440266059SGregory Neil Shapiro # define NEEDPUTENV 2 /* need putenv(3) call; no setenv(3) call */ 69540266059SGregory Neil Shapiro # ifndef HASFLOCK 69640266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 6975b0945b5SGregory Neil Shapiro # endif 69840266059SGregory Neil Shapiro # define UID_T int /* compiler gripes on uid_t */ 69940266059SGregory Neil Shapiro # define GID_T int /* ditto for gid_t */ 70040266059SGregory Neil Shapiro # define MODE_T int /* and mode_t */ 70140266059SGregory Neil Shapiro # define setpgid setpgrp 70240266059SGregory Neil Shapiro # ifndef NOT_SENDMAIL 70340266059SGregory Neil Shapiro # define sleep sleepX 7045b0945b5SGregory Neil Shapiro # endif 70540266059SGregory Neil Shapiro # ifndef LA_TYPE 70640266059SGregory Neil Shapiro # define LA_TYPE LA_MACH 7075b0945b5SGregory Neil Shapiro # endif 70840266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 70940266059SGregory Neil Shapiro # ifdef _POSIX_SOURCE 71040266059SGregory Neil Shapiro extern struct passwd *getpwent(); 71140266059SGregory Neil Shapiro # else /* _POSIX_SOURCE */ 71240266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 71340266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 71440266059SGregory Neil Shapiro typedef int pid_t; 71540266059SGregory Neil Shapiro # undef WEXITSTATUS 71640266059SGregory Neil Shapiro # undef WIFEXITED 71740266059SGregory Neil Shapiro # undef WIFSTOPPED 71840266059SGregory Neil Shapiro # undef WTERMSIG 71940266059SGregory Neil Shapiro # endif /* _POSIX_SOURCE */ 72040266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 72140266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/sendmail/sendmail.cf" 7225b0945b5SGregory Neil Shapiro # endif 72340266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 72440266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" 7255b0945b5SGregory Neil Shapiro # endif 72640266059SGregory Neil Shapiro # define SM_INT32 int /* 32bit integer */ 72740266059SGregory Neil Shapiro 72840266059SGregory Neil Shapiro # ifdef TCPWRAPPERS 72940266059SGregory Neil Shapiro # ifndef HASUNSETENV 73040266059SGregory Neil Shapiro # define HASUNSETENV 1 7315b0945b5SGregory Neil Shapiro # endif 73240266059SGregory Neil Shapiro # undef NEEDPUTENV 73340266059SGregory Neil Shapiro # endif /* TCPWRAPPERS */ 73440266059SGregory Neil Shapiro # ifndef __APPLE__ 73540266059SGregory Neil Shapiro # include <libc.h> 73640266059SGregory Neil Shapiro # ifndef S_IRUSR 73740266059SGregory Neil Shapiro # define S_IRUSR S_IREAD 7385b0945b5SGregory Neil Shapiro # endif 73940266059SGregory Neil Shapiro # ifndef S_IWUSR 74040266059SGregory Neil Shapiro # define S_IWUSR S_IWRITE 7415b0945b5SGregory Neil Shapiro # endif 74240266059SGregory Neil Shapiro # define _PATH_MAILDIR "/usr/spool/mail" 74340266059SGregory Neil Shapiro # endif /* ! __APPLE__ */ 74440266059SGregory Neil Shapiro # ifndef isascii 74540266059SGregory Neil Shapiro # define isascii(c) ((unsigned)(c) <= 0177) 7465b0945b5SGregory Neil Shapiro # endif 74740266059SGregory Neil Shapiro # endif /* NeXT */ 74840266059SGregory Neil Shapiro 74940266059SGregory Neil Shapiro /* 750e92d3f3fSGregory Neil Shapiro ** Apple Darwin 75113bd1963SGregory Neil Shapiro ** Contributed by Wilfredo Sanchez <wsanchez@mit.edu> 75240266059SGregory Neil Shapiro */ 75340266059SGregory Neil Shapiro 75440266059SGregory Neil Shapiro # if defined(DARWIN) 75513bd1963SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) */ 75613bd1963SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) */ 75713bd1963SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) */ 75813bd1963SGregory Neil Shapiro # define HASUNAME 1 /* has uname(2) */ 75913bd1963SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) */ 760e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 76113bd1963SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) */ 76213bd1963SGregory Neil Shapiro # define HASSETVBUF 1 /* has setvbuf (3) */ 76313bd1963SGregory Neil Shapiro # define HASSETREUID 0 /* setreuid(2) unusable */ 76413bd1963SGregory Neil Shapiro # define HASSETEUID 1 /* has seteuid(2) */ 76513bd1963SGregory Neil Shapiro # define USESETEUID 1 /* has seteuid(2) */ 76613bd1963SGregory Neil Shapiro # define HASSETEGID 1 /* has setegid(2) */ 76713bd1963SGregory Neil Shapiro # define HASSETREGID 1 /* has setregid(2) */ 76813bd1963SGregory Neil Shapiro # define HASSETRESGID 0 /* no setresgid(2) */ 76913bd1963SGregory Neil Shapiro # define HASLSTAT 1 /* has lstat(2) */ 77013bd1963SGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) */ 77113bd1963SGregory Neil Shapiro # define HASWAITPID 1 /* has waitpid(2) */ 77213bd1963SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) */ 77313bd1963SGregory Neil Shapiro # define HAS_ST_GEN 1 /* has st_gen field in struct stat */ 77413bd1963SGregory Neil Shapiro # define HASURANDOMDEV 1 /* has urandom(4) */ 77540266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 77613bd1963SGregory Neil Shapiro # define HASGETUSERSHELL 1 /* had getusershell(3) */ 7775b0945b5SGregory Neil Shapiro # if DARWIN >=180000 7785b0945b5SGregory Neil Shapiro # ifdef HASRRESVPORT 7795b0945b5SGregory Neil Shapiro # undef HASRRESVPORT 7805b0945b5SGregory Neil Shapiro # endif 7815b0945b5SGregory Neil Shapiro # define HASRRESVPORT 0 /* deprecated rresvport() */ 7825b0945b5SGregory Neil Shapiro # endif 78313bd1963SGregory Neil Shapiro # define GIDSET_T gid_t /* getgroups(2) takes gid_t */ 78440266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR /* use getloadavg(3) */ 78540266059SGregory Neil Shapiro # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 7864e4196cbSGregory Neil Shapiro # if DARWIN >= 70000 7874e4196cbSGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t 7884e4196cbSGregory Neil Shapiro # endif 7894e4196cbSGregory Neil Shapiro # if DARWIN >= 80000 7904e4196cbSGregory Neil Shapiro # define SPT_TYPE SPT_REUSEARGV 7914e4196cbSGregory Neil Shapiro # define SPT_PADCHAR '\0' 7924e4196cbSGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t 7934e4196cbSGregory Neil Shapiro # else 79413bd1963SGregory Neil Shapiro # define SPT_TYPE SPT_PSSTRINGS /* use magic PS_STRINGS pointer for setproctitle */ 7954e4196cbSGregory Neil Shapiro # endif 79640266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 79713bd1963SGregory Neil Shapiro # define BSD4_4_SOCKADDR /* struct sockaddr has sa_len */ 79813bd1963SGregory Neil Shapiro # define SAFENFSPATHCONF 0 /* unverified: pathconf(2) doesn't work on NFS */ 79913bd1963SGregory Neil Shapiro # define HAS_IN_H 1 80013bd1963SGregory Neil Shapiro # define NETLINK 1 /* supports AF_LINK */ 801605302a5SGregory Neil Shapiro # ifndef NOT_SENDMAIL 802605302a5SGregory Neil Shapiro # define sleep sleepX 803959366dcSGregory Neil Shapiro extern unsigned int sleepX __P((unsigned int seconds)); 804605302a5SGregory Neil Shapiro # endif /* ! NOT_SENDMAIL */ 80540266059SGregory Neil Shapiro # endif /* defined(DARWIN) */ 80640266059SGregory Neil Shapiro 80740266059SGregory Neil Shapiro 80840266059SGregory Neil Shapiro /* 80940266059SGregory Neil Shapiro ** 4.4 BSD 81040266059SGregory Neil Shapiro ** 81140266059SGregory Neil Shapiro ** See also BSD defines. 81240266059SGregory Neil Shapiro */ 81340266059SGregory Neil Shapiro 8144e4196cbSGregory Neil Shapiro # if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN) 81540266059SGregory Neil Shapiro # include <paths.h> 81640266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 81740266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 81840266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 81940266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) syscall */ 82040266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 82140266059SGregory Neil Shapiro # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ 82240266059SGregory Neil Shapiro # include <sys/cdefs.h> 82340266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 82440266059SGregory Neil Shapiro # define BSD4_4_SOCKADDR /* has sa_len */ 82540266059SGregory Neil Shapiro # define NEED_PRINTF_PERCENTQ 1 /* doesn't have %lld */ 82640266059SGregory Neil Shapiro # define NETLINK 1 /* supports AF_LINK */ 82740266059SGregory Neil Shapiro # ifndef LA_TYPE 82840266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR 8295b0945b5SGregory Neil Shapiro # endif 83040266059SGregory Neil Shapiro # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 83140266059SGregory Neil Shapiro # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ 8324e4196cbSGregory Neil Shapiro # endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)*/ 83340266059SGregory Neil Shapiro 83440266059SGregory Neil Shapiro 83540266059SGregory Neil Shapiro /* 83640266059SGregory Neil Shapiro ** BSD/OS (was BSD/386) (all versions) 83740266059SGregory Neil Shapiro ** From Tony Sanders, BSDI 83840266059SGregory Neil Shapiro */ 83940266059SGregory Neil Shapiro 84040266059SGregory Neil Shapiro # ifdef __bsdi__ 84140266059SGregory Neil Shapiro # include <paths.h> 84240266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has the unsetenv(3) call */ 84340266059SGregory Neil Shapiro # define HASSETREUID 0 /* BSD-OS has broken setreuid(2) emulation */ 844e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 84540266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 84640266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 84740266059SGregory Neil Shapiro # define HASSETLOGIN 1 /* has setlogin(2) */ 84840266059SGregory Neil Shapiro # define HASUNAME 1 /* has uname(2) syscall */ 84940266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 85040266059SGregory Neil Shapiro # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ 85140266059SGregory Neil Shapiro # include <sys/cdefs.h> 85240266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 85340266059SGregory Neil Shapiro # define BSD4_4_SOCKADDR /* has sa_len */ 85440266059SGregory Neil Shapiro # define NETLINK 1 /* supports AF_LINK */ 85540266059SGregory Neil Shapiro # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 85640266059SGregory Neil Shapiro # ifndef LA_TYPE 85740266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR 8585b0945b5SGregory Neil Shapiro # endif 85940266059SGregory Neil Shapiro # define GIDSET_T gid_t 86040266059SGregory Neil Shapiro # define QUAD_T quad_t 86140266059SGregory Neil Shapiro # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 86240266059SGregory Neil Shapiro /* version 1.1 or later */ 86340266059SGregory Neil Shapiro # undef SPT_TYPE 86440266059SGregory Neil Shapiro # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 86540266059SGregory Neil Shapiro # else /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 */ 86640266059SGregory Neil Shapiro /* version 1.0 or earlier */ 86740266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 86840266059SGregory Neil Shapiro # endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 */ 86940266059SGregory Neil Shapiro # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701 /* on 3.x */ 87040266059SGregory Neil Shapiro # define HASSETUSERCONTEXT 1 /* has setusercontext */ 8715b0945b5SGregory Neil Shapiro # endif 87240266059SGregory Neil Shapiro # if defined(_BSDI_VERSION) && _BSDI_VERSION <= 199701 /* 3.1 and earlier */ 87340266059SGregory Neil Shapiro # define MODE_T int /* va_arg() can't handle less than int */ 8745b0945b5SGregory Neil Shapiro # endif 87540266059SGregory Neil Shapiro # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199910 /* on 4.x */ 87640266059SGregory Neil Shapiro # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ 8775b0945b5SGregory Neil Shapiro # endif 87840266059SGregory Neil Shapiro # endif /* __bsdi__ */ 87940266059SGregory Neil Shapiro 88040266059SGregory Neil Shapiro 881d0cef73dSGregory Neil Shapiro # if defined(__QNX__) 882d0cef73dSGregory Neil Shapiro # if defined(__QNXNTO__) 883d0cef73dSGregory Neil Shapiro /* QNX 6 */ 884d0cef73dSGregory Neil Shapiro # include <unix.h> 885d0cef73dSGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 886d0cef73dSGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 887d0cef73dSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 888d0cef73dSGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 889d0cef73dSGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 890d0cef73dSGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) syscall */ 891d0cef73dSGregory Neil Shapiro # define HASUNAME 1 /* has uname(2) syscall */ 892d0cef73dSGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 893d0cef73dSGregory Neil Shapiro # define BSD4_4_SOCKADDR /* has sa_len */ 894d0cef73dSGregory Neil Shapiro # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 895d0cef73dSGregory Neil Shapiro # define NETLINK 1 /* supports AF_LINK */ 896d0cef73dSGregory Neil Shapiro # define GIDSET_T gid_t 897d0cef73dSGregory Neil Shapiro # define QUAD_T uint64_t 898d0cef73dSGregory Neil Shapiro # define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */ 899d0cef73dSGregory Neil Shapiro # define HASGETUSERSHELL 0 900d0cef73dSGregory Neil Shapiro 901d0cef73dSGregory Neil Shapiro /* 902d0cef73dSGregory Neil Shapiro ** We have a strrev() that doesn't allocate anything. 903d0cef73dSGregory Neil Shapiro ** Make sure the one here is used. 904d0cef73dSGregory Neil Shapiro */ 905d0cef73dSGregory Neil Shapiro 906d0cef73dSGregory Neil Shapiro # define strrev strrev_sendmail 907d0cef73dSGregory Neil Shapiro 908d0cef73dSGregory Neil Shapiro # else /* defined(__QNXNTO__) */ 909d0cef73dSGregory Neil Shapiro 91040266059SGregory Neil Shapiro /* 91140266059SGregory Neil Shapiro ** QNX 4.2x 91240266059SGregory Neil Shapiro ** Contributed by Glen McCready <glen@qnx.com>. 91340266059SGregory Neil Shapiro ** 914d0cef73dSGregory Neil Shapiro ** Should work with all versions of QNX 4. 91540266059SGregory Neil Shapiro */ 91640266059SGregory Neil Shapiro 91740266059SGregory Neil Shapiro # include <unix.h> 91840266059SGregory Neil Shapiro # include <sys/select.h> 91940266059SGregory Neil Shapiro # undef NGROUPS_MAX 920e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 92140266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 92240266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 92340266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 92440266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 92540266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 92640266059SGregory Neil Shapiro # define HASFLOCK 0 92740266059SGregory Neil Shapiro # undef HASINITGROUPS /* has initgroups(3) call */ 92840266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 92940266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* can check IP source routing */ 93040266059SGregory Neil Shapiro # define TZ_TYPE TZ_TMNAME /* use tmname variable */ 93140266059SGregory Neil Shapiro # define GIDSET_T gid_t 93240266059SGregory Neil Shapiro # define LA_TYPE LA_ZERO 93340266059SGregory Neil Shapiro # define SFS_TYPE SFS_NONE 93440266059SGregory Neil Shapiro # define SPT_TYPE SPT_REUSEARGV 93540266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 93640266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 93740266059SGregory Neil Shapiro # define _FILE_H_INCLUDED 938d0cef73dSGregory Neil Shapiro # endif /* defined(__QNXNTO__) */ 93940266059SGregory Neil Shapiro # endif /* defined(__QNX__) */ 94040266059SGregory Neil Shapiro 94140266059SGregory Neil Shapiro 94240266059SGregory Neil Shapiro /* 943b6bacd31SGregory Neil Shapiro ** DragonFly BSD/ FreeBSD / NetBSD / OpenBSD (all architectures, all versions) 94440266059SGregory Neil Shapiro ** 94540266059SGregory Neil Shapiro ** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x 94640266059SGregory Neil Shapiro ** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x 94740266059SGregory Neil Shapiro ** 94840266059SGregory Neil Shapiro ** See also BSD defines. 94940266059SGregory Neil Shapiro */ 95040266059SGregory Neil Shapiro 951b6bacd31SGregory Neil Shapiro # if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 95240266059SGregory Neil Shapiro # include <paths.h> 95340266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 954e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 95540266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 95640266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 957e92d3f3fSGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) syscall */ 95840266059SGregory Neil Shapiro # define HASUNAME 1 /* has uname(2) syscall */ 95940266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 96040266059SGregory Neil Shapiro # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ 96140266059SGregory Neil Shapiro # define NEED_PRINTF_PERCENTQ 1 /* doesn't have %lld */ 96240266059SGregory Neil Shapiro # include <sys/cdefs.h> 96340266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 96440266059SGregory Neil Shapiro # define BSD4_4_SOCKADDR /* has sa_len */ 96540266059SGregory Neil Shapiro # define NETLINK 1 /* supports AF_LINK */ 96640266059SGregory Neil Shapiro # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ 96740266059SGregory Neil Shapiro # define GIDSET_T gid_t 96840266059SGregory Neil Shapiro # define QUAD_T unsigned long long 9694e4196cbSGregory Neil Shapiro # define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */ 97040266059SGregory Neil Shapiro # ifndef LA_TYPE 97140266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR 9725b0945b5SGregory Neil Shapiro # endif 9734e4196cbSGregory Neil Shapiro # if defined(__NetBSD__) && defined(__NetBSD_Version__) && \ 9744e4196cbSGregory Neil Shapiro ((__NetBSD_Version__ >= 200040000 && __NetBSD_Version__ < 200090000) || \ 9754e4196cbSGregory Neil Shapiro (__NetBSD_Version__ >= 299000900)) 976e92d3f3fSGregory Neil Shapiro # undef SFS_TYPE 977e92d3f3fSGregory Neil Shapiro # define SFS_TYPE SFS_STATVFS 978e92d3f3fSGregory Neil Shapiro # else 97940266059SGregory Neil Shapiro # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ 980e92d3f3fSGregory Neil Shapiro # endif 98140266059SGregory Neil Shapiro # if defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1) 98240266059SGregory Neil Shapiro # undef SPT_TYPE 98340266059SGregory Neil Shapiro # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 9845b0945b5SGregory Neil Shapiro # endif 98540266059SGregory Neil Shapiro # if defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) 98640266059SGregory Neil Shapiro # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ 9875b0945b5SGregory Neil Shapiro # endif 988e92d3f3fSGregory Neil Shapiro # if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000 989e92d3f3fSGregory Neil Shapiro # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ 990e92d3f3fSGregory Neil Shapiro # endif 9914e4196cbSGregory Neil Shapiro # if defined(__NetBSD__) && defined(__NetBSD_Version__) && \ 9924e4196cbSGregory Neil Shapiro ((__NetBSD_Version__ >= 200060000 && __NetBSD_Version__ < 200090000) || \ 9934e4196cbSGregory Neil Shapiro (__NetBSD_Version__ >= 299000900)) 994e92d3f3fSGregory Neil Shapiro # define HASCLOSEFROM 1 /* closefrom(3) added in 2.0F */ 995e92d3f3fSGregory Neil Shapiro # endif 996e92d3f3fSGregory Neil Shapiro # if defined(__NetBSD__) 997e92d3f3fSGregory Neil Shapiro # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ 998e92d3f3fSGregory Neil Shapiro # include <sys/param.h> 999e92d3f3fSGregory Neil Shapiro # include <sys/sysctl.h> 10002fb4f839SGregory Neil Shapiro # define HAVE_IFC_BUF_VOID 1 /* void *ifc_buf instead of caddr_t */ 1001e92d3f3fSGregory Neil Shapiro # endif 1002b6bacd31SGregory Neil Shapiro # if defined(__DragonFly__) 1003b6bacd31SGregory Neil Shapiro # define HASSETLOGIN 1 /* has setlogin(2) */ 1004b6bacd31SGregory Neil Shapiro # define HASSRANDOMDEV 1 /* has srandomdev(3) */ 1005b6bacd31SGregory Neil Shapiro # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ 1006b6bacd31SGregory Neil Shapiro # undef SPT_TYPE 1007b6bacd31SGregory Neil Shapiro # include <libutil.h> 1008b6bacd31SGregory Neil Shapiro # define SPT_TYPE SPT_BUILTIN 1009b6bacd31SGregory Neil Shapiro # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ 1010b6bacd31SGregory Neil Shapiro # ifndef SMRSH_CMDDIR 1011b6bacd31SGregory Neil Shapiro # define SMRSH_CMDDIR "/usr/libexec/sm.bin" 10125b0945b5SGregory Neil Shapiro # endif 1013b6bacd31SGregory Neil Shapiro # ifndef SMRSH_PATH 1014b6bacd31SGregory Neil Shapiro # define SMRSH_PATH "/bin:/usr/bin" 10155b0945b5SGregory Neil Shapiro # endif 1016b6bacd31SGregory Neil Shapiro # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ 1017b6bacd31SGregory Neil Shapiro # include <sys/sysctl.h> 1018b6bacd31SGregory Neil Shapiro # endif /* defined(__DragonFly__) */ 101940266059SGregory Neil Shapiro # if defined(__FreeBSD__) 102040266059SGregory Neil Shapiro # define HASSETLOGIN 1 /* has setlogin(2) */ 102140266059SGregory Neil Shapiro # if __FreeBSD_version >= 227001 102240266059SGregory Neil Shapiro # define HASSRANDOMDEV 1 /* has srandomdev(3) */ 102340266059SGregory Neil Shapiro # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ 102440266059SGregory Neil Shapiro # endif /* __FreeBSD_version >= 227001 */ 102540266059SGregory Neil Shapiro # undef SPT_TYPE 102640266059SGregory Neil Shapiro # if __FreeBSD__ >= 2 102740266059SGregory Neil Shapiro # include <osreldate.h> 102840266059SGregory Neil Shapiro # if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */ 10295b0945b5SGregory Neil Shapiro # if __FreeBSD_version < 500012 /* Moved to libc in 2000 */ 103040266059SGregory Neil Shapiro # include <libutil.h> 10316a270e17SBryan Drewery # endif 103240266059SGregory Neil Shapiro # define SPT_TYPE SPT_BUILTIN 103340266059SGregory Neil Shapiro # endif /* __FreeBSD_version >= 199512 */ 103440266059SGregory Neil Shapiro # if __FreeBSD_version >= 222000 /* 2.2.2-release and later */ 103540266059SGregory Neil Shapiro # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ 10365b0945b5SGregory Neil Shapiro # endif 10376f9c8e5bSGregory Neil Shapiro # if __FreeBSD_version >= 300000 /* 3.0.0-release and later */ 10386f9c8e5bSGregory Neil Shapiro # define HAVE_NANOSLEEP 1 /* has nanosleep(2) */ 10395b0945b5SGregory Neil Shapiro # endif 104040266059SGregory Neil Shapiro # if __FreeBSD_version >= 330000 /* 3.3.0-release and later */ 1041a7ec597cSGregory Neil Shapiro # ifndef SMRSH_CMDDIR 104240266059SGregory Neil Shapiro # define SMRSH_CMDDIR "/usr/libexec/sm.bin" 10435b0945b5SGregory Neil Shapiro # endif 1044a7ec597cSGregory Neil Shapiro # ifndef SMRSH_PATH 104540266059SGregory Neil Shapiro # define SMRSH_PATH "/bin:/usr/bin" 10465b0945b5SGregory Neil Shapiro # endif 104740266059SGregory Neil Shapiro # endif /* __FreeBSD_version >= 330000 */ 10489bd497b8SGregory Neil Shapiro # if __FreeBSD_version >= 430000 /* 4.3.0-release and later */ 10499bd497b8SGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ 10509bd497b8SGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ 10519bd497b8SGregory Neil Shapiro # endif /* __FreeBSD_version >= 430000 */ 105240266059SGregory Neil Shapiro # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ 105340266059SGregory Neil Shapiro # include <sys/sysctl.h> 105440266059SGregory Neil Shapiro # endif /* __FreeBSD__ >= 2 */ 105540266059SGregory Neil Shapiro # ifndef SPT_TYPE 105640266059SGregory Neil Shapiro # define SPT_TYPE SPT_REUSEARGV 105740266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 10585b0945b5SGregory Neil Shapiro # endif 105940266059SGregory Neil Shapiro # endif /* defined(__FreeBSD__) */ 106040266059SGregory Neil Shapiro # if defined(__OpenBSD__) 106140266059SGregory Neil Shapiro # undef SPT_TYPE 106240266059SGregory Neil Shapiro # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ 106340266059SGregory Neil Shapiro # define HASSETLOGIN 1 /* has setlogin(2) */ 1064a7ec597cSGregory Neil Shapiro # if OpenBSD < 200305 1065a7ec597cSGregory Neil Shapiro # define HASSETREUID 0 /* setreuid(2) broken in OpenBSD < 3.3 */ 10665b0945b5SGregory Neil Shapiro # endif 106740266059SGregory Neil Shapiro # define HASSETEGID 1 /* use setegid(2) to set saved gid */ 106840266059SGregory Neil Shapiro # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ 106940266059SGregory Neil Shapiro # if OpenBSD >= 200006 107040266059SGregory Neil Shapiro # define HASSRANDOMDEV 1 /* has srandomdev(3) */ 10715b0945b5SGregory Neil Shapiro # endif 107240266059SGregory Neil Shapiro # if OpenBSD >= 200012 107340266059SGregory Neil Shapiro # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ 10745b0945b5SGregory Neil Shapiro # endif 1075e92d3f3fSGregory Neil Shapiro # if OpenBSD >= 200405 1076e92d3f3fSGregory Neil Shapiro # define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */ 10775b0945b5SGregory Neil Shapiro # endif 10784e4196cbSGregory Neil Shapiro # if OpenBSD >= 200505 10794e4196cbSGregory Neil Shapiro # undef NETISO /* iso.h removed in 3.7 */ 10805b0945b5SGregory Neil Shapiro # endif 10816f9c8e5bSGregory Neil Shapiro # if OpenBSD >= 200800 10826f9c8e5bSGregory Neil Shapiro # define HAVE_NANOSLEEP 1 /* has nanosleep(2) */ 10835b0945b5SGregory Neil Shapiro # endif 10845b0945b5SGregory Neil Shapiro # ifndef SOCKADDR_LEN_T 10855b0945b5SGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */ 10865b0945b5SGregory Neil Shapiro # endif 10875b0945b5SGregory Neil Shapiro # ifndef SOCKOPT_LEN_T 10885b0945b5SGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */ 10895b0945b5SGregory Neil Shapiro # endif 109040266059SGregory Neil Shapiro # endif /* defined(__OpenBSD__) */ 1091b6bacd31SGregory Neil Shapiro # endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */ 109240266059SGregory Neil Shapiro 109340266059SGregory Neil Shapiro 109440266059SGregory Neil Shapiro /* 109540266059SGregory Neil Shapiro ** Mach386 109640266059SGregory Neil Shapiro ** 109740266059SGregory Neil Shapiro ** For mt Xinu's Mach386 system. 109840266059SGregory Neil Shapiro */ 109940266059SGregory Neil Shapiro 110040266059SGregory Neil Shapiro # if defined(MACH) && defined(i386) && !defined(__GNU__) 110140266059SGregory Neil Shapiro # define MACH386 1 110240266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 110340266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 110440266059SGregory Neil Shapiro # ifndef HASFLOCK 110540266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 11065b0945b5SGregory Neil Shapiro # endif 110740266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 110840266059SGregory Neil Shapiro # define NEEDSTRTOL 1 /* need the strtol() function */ 110940266059SGregory Neil Shapiro # define setpgid setpgrp 111040266059SGregory Neil Shapiro # ifndef LA_TYPE 111140266059SGregory Neil Shapiro # define LA_TYPE LA_FLOAT 11125b0945b5SGregory Neil Shapiro # endif 111340266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 111440266059SGregory Neil Shapiro # undef HASSETVBUF /* don't actually have setvbuf(3) */ 111540266059SGregory Neil Shapiro # undef WEXITSTATUS 111640266059SGregory Neil Shapiro # undef WIFEXITED 111740266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 111840266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 11195b0945b5SGregory Neil Shapiro # endif 112040266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 112140266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail.pid" 11225b0945b5SGregory Neil Shapiro # endif 112340266059SGregory Neil Shapiro # endif /* defined(MACH) && defined(i386) && !defined(__GNU__) */ 112440266059SGregory Neil Shapiro 112540266059SGregory Neil Shapiro 112640266059SGregory Neil Shapiro 112740266059SGregory Neil Shapiro /* 112840266059SGregory Neil Shapiro ** GNU OS (hurd) 112940266059SGregory Neil Shapiro ** Largely BSD & posix compatible. 113040266059SGregory Neil Shapiro ** Port contributed by Miles Bader <miles@gnu.ai.mit.edu>. 113140266059SGregory Neil Shapiro ** Updated by Mark Kettenis <kettenis@wins.uva.nl>. 113240266059SGregory Neil Shapiro */ 113340266059SGregory Neil Shapiro 113440266059SGregory Neil Shapiro # if defined(__GNU__) && !defined(NeXT) 113540266059SGregory Neil Shapiro # include <paths.h> 113640266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) call */ 113740266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) call */ 113840266059SGregory Neil Shapiro # define HASUNAME 1 /* has uname(2) call */ 113940266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 114040266059SGregory Neil Shapiro # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ 114140266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 114240266059SGregory Neil Shapiro # define GIDSET_T gid_t 114340266059SGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t 114440266059SGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t 114540266059SGregory Neil Shapiro # if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2 114640266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR 114740266059SGregory Neil Shapiro # else /* (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2 */ 114840266059SGregory Neil Shapiro # define LA_TYPE LA_MACH 114940266059SGregory Neil Shapiro /* GNU uses mach[34], which renames some rpcs from mach2.x. */ 115040266059SGregory Neil Shapiro # define host_self mach_host_self 115140266059SGregory Neil Shapiro # endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2 */ 115240266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATFS 115340266059SGregory Neil Shapiro # define SPT_TYPE SPT_CHANGEARGV 115440266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED 1 /* don't declare sys_errlist */ 115540266059SGregory Neil Shapiro # define BSD4_4_SOCKADDR 1 /* has sa_len */ 115640266059SGregory Neil Shapiro # define SIOCGIFCONF_IS_BROKEN 1 /* SIOCGFCONF doesn't work */ 115740266059SGregory Neil Shapiro # define HAS_IN_H 1 /* GNU has netinet/in.h. */ 115840266059SGregory Neil Shapiro /* GNU has no MAXPATHLEN; ideally the code should be changed to not use it. */ 115940266059SGregory Neil Shapiro # define MAXPATHLEN 2048 116040266059SGregory Neil Shapiro # endif /* defined(__GNU__) && !defined(NeXT) */ 116140266059SGregory Neil Shapiro 116240266059SGregory Neil Shapiro /* 116340266059SGregory Neil Shapiro ** 4.3 BSD -- this is for very old systems 116440266059SGregory Neil Shapiro ** 116540266059SGregory Neil Shapiro ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. 116640266059SGregory Neil Shapiro ** 116740266059SGregory Neil Shapiro ** You'll also have to install a new resolver library. 116840266059SGregory Neil Shapiro ** I don't guarantee that support for this environment is complete. 116940266059SGregory Neil Shapiro */ 117040266059SGregory Neil Shapiro 117140266059SGregory Neil Shapiro # if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) 117240266059SGregory Neil Shapiro # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 117340266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 117440266059SGregory Neil Shapiro # define ARBPTR_T char * 117540266059SGregory Neil Shapiro # define setpgid setpgrp 117640266059SGregory Neil Shapiro # ifndef LA_TYPE 117740266059SGregory Neil Shapiro # define LA_TYPE LA_FLOAT 11785b0945b5SGregory Neil Shapiro # endif 117940266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 118040266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 11815b0945b5SGregory Neil Shapiro # endif 118240266059SGregory Neil Shapiro # ifndef IDENTPROTO 118340266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 11845b0945b5SGregory Neil Shapiro # endif 118540266059SGregory Neil Shapiro # undef WEXITSTATUS 118640266059SGregory Neil Shapiro # undef WIFEXITED 118740266059SGregory Neil Shapiro typedef short pid_t; 118840266059SGregory Neil Shapiro # endif /* defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) */ 118940266059SGregory Neil Shapiro 119040266059SGregory Neil Shapiro 119140266059SGregory Neil Shapiro /* 119240266059SGregory Neil Shapiro ** SCO Unix 119340266059SGregory Neil Shapiro ** 119440266059SGregory Neil Shapiro ** This includes three parts: 119540266059SGregory Neil Shapiro ** 119640266059SGregory Neil Shapiro ** The first is for SCO OpenServer 5. 119740266059SGregory Neil Shapiro ** (Contributed by Keith Reynolds <keithr@sco.COM>). 119840266059SGregory Neil Shapiro ** 119940266059SGregory Neil Shapiro ** SCO OpenServer 5 has a compiler version number macro, 120040266059SGregory Neil Shapiro ** which we can use to figure out what version we're on. 120140266059SGregory Neil Shapiro ** This may have to change in future releases. 120240266059SGregory Neil Shapiro ** 120340266059SGregory Neil Shapiro ** The second is for SCO UNIX 3.2v4.2/Open Desktop 3.0. 120440266059SGregory Neil Shapiro ** (Contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). 120540266059SGregory Neil Shapiro ** 120640266059SGregory Neil Shapiro ** The third is for SCO UNIX 3.2v4.0/Open Desktop 2.0 and earlier. 120740266059SGregory Neil Shapiro */ 120840266059SGregory Neil Shapiro 120940266059SGregory Neil Shapiro /* SCO OpenServer 5 */ 121040266059SGregory Neil Shapiro # if _SCO_DS >= 1 121140266059SGregory Neil Shapiro # include <paths.h> 121240266059SGregory Neil Shapiro # define SIOCGIFNUM_IS_BROKEN 1 /* SIOCGIFNUM returns bogus value */ 121340266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) call */ 121440266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) call */ 121540266059SGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 121640266059SGregory Neil Shapiro # define USESETEUID 1 /* has seteuid(2) call */ 121740266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 121840266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 121940266059SGregory Neil Shapiro # define RLIMIT_NEEDS_SYS_TIME_H 1 122040266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 122140266059SGregory Neil Shapiro # ifndef LA_TYPE 122240266059SGregory Neil Shapiro # define LA_TYPE LA_DEVSHORT 12235b0945b5SGregory Neil Shapiro # endif 122440266059SGregory Neil Shapiro # define _PATH_AVENRUN "/dev/table/avenrun" 122540266059SGregory Neil Shapiro # ifndef _SCO_unix_4_2 122640266059SGregory Neil Shapiro # define _SCO_unix_4_2 122740266059SGregory Neil Shapiro # else /* ! _SCO_unix_4_2 */ 122840266059SGregory Neil Shapiro # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ 122940266059SGregory Neil Shapiro # define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ 123040266059SGregory Neil Shapiro # endif /* ! _SCO_unix_4_2 */ 123140266059SGregory Neil Shapiro # endif /* _SCO_DS >= 1 */ 123240266059SGregory Neil Shapiro 123340266059SGregory Neil Shapiro /* SCO UNIX 3.2v4.2/Open Desktop 3.0 */ 123440266059SGregory Neil Shapiro # ifdef _SCO_unix_4_2 123540266059SGregory Neil Shapiro # define _SCO_unix_ 123640266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 123740266059SGregory Neil Shapiro # endif /* _SCO_unix_4_2 */ 123840266059SGregory Neil Shapiro 123940266059SGregory Neil Shapiro /* SCO UNIX 3.2v4.0 Open Desktop 2.0 and earlier */ 124040266059SGregory Neil Shapiro # ifdef _SCO_unix_ 124140266059SGregory Neil Shapiro # include <sys/stream.h> /* needed for IP_SRCROUTE */ 124240266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 124340266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 124440266059SGregory Neil Shapiro # define NOFTRUNCATE 0 /* has (simulated) ftruncate call */ 124540266059SGregory Neil Shapiro # ifndef USE_SIGLONGJMP 124640266059SGregory Neil Shapiro # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ 12475b0945b5SGregory Neil Shapiro # endif 124840266059SGregory Neil Shapiro # define MAXPATHLEN PATHSIZE 124940266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ 125040266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 125140266059SGregory Neil Shapiro # define SPT_TYPE SPT_SCO /* write kernel u. area */ 125240266059SGregory Neil Shapiro # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ 125340266059SGregory Neil Shapiro # define UID_T uid_t 125440266059SGregory Neil Shapiro # define GID_T gid_t 125540266059SGregory Neil Shapiro # define GIDSET_T gid_t 125640266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 125740266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 125840266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 12595b0945b5SGregory Neil Shapiro # endif 126040266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 126140266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail.pid" 12625b0945b5SGregory Neil Shapiro # endif 126340266059SGregory Neil Shapiro 126440266059SGregory Neil Shapiro /* stuff fixed in later releases */ 126540266059SGregory Neil Shapiro # ifndef _SCO_unix_4_2 126640266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 12675b0945b5SGregory Neil Shapiro # endif 126840266059SGregory Neil Shapiro 126940266059SGregory Neil Shapiro # ifndef _SCO_DS 127040266059SGregory Neil Shapiro # define ftruncate chsize /* use chsize(2) to emulate ftruncate */ 127140266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 127240266059SGregory Neil Shapiro # define NETUNIX 0 /* no unix domain socket support */ 127340266059SGregory Neil Shapiro # define LA_TYPE LA_SHORT 127440266059SGregory Neil Shapiro # endif /* ! _SCO_DS */ 127540266059SGregory Neil Shapiro 127640266059SGregory Neil Shapiro # endif /* _SCO_unix_ */ 127740266059SGregory Neil Shapiro 127840266059SGregory Neil Shapiro /* 127940266059SGregory Neil Shapiro ** ISC (SunSoft) Unix. 128040266059SGregory Neil Shapiro ** 128140266059SGregory Neil Shapiro ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> 128240266059SGregory Neil Shapiro */ 128340266059SGregory Neil Shapiro 128440266059SGregory Neil Shapiro # ifdef ISC_UNIX 128540266059SGregory Neil Shapiro # include <net/errno.h> 128640266059SGregory Neil Shapiro # include <sys/stream.h> /* needed for IP_SRCROUTE */ 128740266059SGregory Neil Shapiro # include <sys/bsdtypes.h> 128840266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 128940266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 129040266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 129140266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 129240266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ 129340266059SGregory Neil Shapiro # define NETUNIX 0 /* no unix domain socket support */ 129440266059SGregory Neil Shapiro # define MAXPATHLEN 1024 129540266059SGregory Neil Shapiro # define LA_TYPE LA_SHORT 129640266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 129740266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 129840266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 129940266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 130040266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 13015b0945b5SGregory Neil Shapiro # endif 130240266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 130340266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail.pid" 13045b0945b5SGregory Neil Shapiro # endif 130540266059SGregory Neil Shapiro # endif /* ISC_UNIX */ 130640266059SGregory Neil Shapiro 130740266059SGregory Neil Shapiro 130840266059SGregory Neil Shapiro /* 130940266059SGregory Neil Shapiro ** Altos System V (5.3.1) 131040266059SGregory Neil Shapiro ** Contributed by Tim Rice <tim@trr.metro.net>. 131140266059SGregory Neil Shapiro */ 131240266059SGregory Neil Shapiro 131340266059SGregory Neil Shapiro # ifdef ALTOS_SYSTEM_V 131440266059SGregory Neil Shapiro # include <sys/stream.h> 131540266059SGregory Neil Shapiro # include <limits.h> 131640266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 131740266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 131840266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 131940266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 132040266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* no fsync(2) in system library */ 132140266059SGregory Neil Shapiro # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ 132240266059SGregory Neil Shapiro # define NOFTRUNCATE 1 /* do not have ftruncate(2) */ 132340266059SGregory Neil Shapiro # define MAXPATHLEN PATH_MAX 132440266059SGregory Neil Shapiro # define LA_TYPE LA_SHORT 132540266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 132640266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 132740266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 132840266059SGregory Neil Shapiro # define NETUNIX 0 /* no unix domain socket support */ 132940266059SGregory Neil Shapiro # undef WIFEXITED 133040266059SGregory Neil Shapiro # undef WEXITSTATUS 133140266059SGregory Neil Shapiro # define strtoul strtol /* gcc library bogosity */ 133240266059SGregory Neil Shapiro 133340266059SGregory Neil Shapiro typedef unsigned short uid_t; 133440266059SGregory Neil Shapiro typedef unsigned short gid_t; 133540266059SGregory Neil Shapiro typedef short pid_t; 133640266059SGregory Neil Shapiro typedef unsigned long mode_t; 133740266059SGregory Neil Shapiro 133840266059SGregory Neil Shapiro /* some stuff that should have been in the include files */ 133940266059SGregory Neil Shapiro extern char *malloc(); 134040266059SGregory Neil Shapiro extern struct passwd *getpwent(); 134140266059SGregory Neil Shapiro extern struct passwd *getpwnam(); 134240266059SGregory Neil Shapiro extern struct passwd *getpwuid(); 134340266059SGregory Neil Shapiro extern char *getenv(); 134440266059SGregory Neil Shapiro extern struct group *getgrgid(); 134540266059SGregory Neil Shapiro extern struct group *getgrnam(); 134640266059SGregory Neil Shapiro 134740266059SGregory Neil Shapiro # endif /* ALTOS_SYSTEM_V */ 134840266059SGregory Neil Shapiro 134940266059SGregory Neil Shapiro 135040266059SGregory Neil Shapiro /* 135140266059SGregory Neil Shapiro ** ConvexOS 11.0 and later 135240266059SGregory Neil Shapiro ** 135340266059SGregory Neil Shapiro ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this 135440266059SGregory Neil Shapiro ** works on 9.1 as well. 135540266059SGregory Neil Shapiro ** 135640266059SGregory Neil Shapiro ** ConvexOS 11.5 and later, should work on 11.0 as defined. 135740266059SGregory Neil Shapiro ** For pre-ConvexOOS 11.0, define SM_CONF_GETOPT=0, undef IDENTPROTO 135840266059SGregory Neil Shapiro ** 135940266059SGregory Neil Shapiro ** Eric Schnoebelen (eric@cirr.com) For CONVEX Computer Corp. 136040266059SGregory Neil Shapiro ** (now the CONVEX Technologies Center of Hewlett Packard) 136140266059SGregory Neil Shapiro */ 136240266059SGregory Neil Shapiro 136340266059SGregory Neil Shapiro # ifdef _CONVEX_SOURCE 136440266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) */ 136540266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) */ 136640266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 136740266059SGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 136840266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) */ 136940266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) */ 137040266059SGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) */ 137140266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) */ 137240266059SGregory Neil Shapiro # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_error=0 */ 137340266059SGregory Neil Shapiro # define NEEDPUTENV 1 /* needs putenv (written in terms of setenv) */ 137440266059SGregory Neil Shapiro # define SM_CONF_GETOPT 1 /* need a replacement for getopt(3) */ 137540266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 137640266059SGregory Neil Shapiro # define LA_TYPE LA_FLOAT 137740266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 137840266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 137940266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 13805b0945b5SGregory Neil Shapiro # endif 138140266059SGregory Neil Shapiro # ifndef S_IREAD 138240266059SGregory Neil Shapiro # define S_IREAD _S_IREAD 138340266059SGregory Neil Shapiro # define S_IWRITE _S_IWRITE 138440266059SGregory Neil Shapiro # define S_IEXEC _S_IEXEC 138540266059SGregory Neil Shapiro # define S_IFMT _S_IFMT 138640266059SGregory Neil Shapiro # define S_IFCHR _S_IFCHR 138740266059SGregory Neil Shapiro # define S_IFBLK _S_IFBLK 138840266059SGregory Neil Shapiro # endif /* ! S_IREAD */ 138940266059SGregory Neil Shapiro # ifndef TZ_TYPE 139040266059SGregory Neil Shapiro # define TZ_TYPE TZ_TIMEZONE 13915b0945b5SGregory Neil Shapiro # endif 139240266059SGregory Neil Shapiro # ifndef IDENTPROTO 139340266059SGregory Neil Shapiro # define IDENTPROTO 1 13945b0945b5SGregory Neil Shapiro # endif 139540266059SGregory Neil Shapiro # ifndef SHARE_V1 139640266059SGregory Neil Shapiro # define SHARE_V1 1 /* version 1 of the fair share scheduler */ 13975b0945b5SGregory Neil Shapiro # endif 139840266059SGregory Neil Shapiro # if !defined(__GNUC__ ) 139940266059SGregory Neil Shapiro # define UID_T int /* GNUC gets it right, ConvexC botches */ 140040266059SGregory Neil Shapiro # define GID_T int /* GNUC gets it right, ConvexC botches */ 14015b0945b5SGregory Neil Shapiro # endif 140240266059SGregory Neil Shapiro # if SECUREWARE 140340266059SGregory Neil Shapiro # define FORK fork /* SecureWare wants the real fork! */ 14045b0945b5SGregory Neil Shapiro # else 140540266059SGregory Neil Shapiro # define FORK vfork /* the rest of the OS versions don't care */ 14065b0945b5SGregory Neil Shapiro # endif 140740266059SGregory Neil Shapiro # endif /* _CONVEX_SOURCE */ 140840266059SGregory Neil Shapiro 140940266059SGregory Neil Shapiro 141040266059SGregory Neil Shapiro /* 141140266059SGregory Neil Shapiro ** RISC/os 4.52 141240266059SGregory Neil Shapiro ** 141340266059SGregory Neil Shapiro ** Gives a ton of warning messages, but otherwise compiles. 141440266059SGregory Neil Shapiro */ 141540266059SGregory Neil Shapiro 141640266059SGregory Neil Shapiro # ifdef RISCOS 141740266059SGregory Neil Shapiro 141840266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 141940266059SGregory Neil Shapiro # ifndef HASFLOCK 142040266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 14215b0945b5SGregory Neil Shapiro # endif 142240266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 142340266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 142440266059SGregory Neil Shapiro # define NEEDPUTENV 1 /* need putenv(3) call */ 142540266059SGregory Neil Shapiro # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ 142640266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 142740266059SGregory Neil Shapiro # define LA_TYPE LA_INT 142840266059SGregory Neil Shapiro # define LA_AVENRUN "avenrun" 142940266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 143040266059SGregory Neil Shapiro # undef WIFEXITED 143140266059SGregory Neil Shapiro 143240266059SGregory Neil Shapiro # define setpgid setpgrp 143340266059SGregory Neil Shapiro 143440266059SGregory Neil Shapiro typedef int pid_t; 143540266059SGregory Neil Shapiro # define SIGFUNC_DEFINED 143640266059SGregory Neil Shapiro # define SIGFUNC_RETURN (0) 143740266059SGregory Neil Shapiro # define SIGFUNC_DECL int 143840266059SGregory Neil Shapiro typedef int (*sigfunc_t)(); 143940266059SGregory Neil Shapiro extern char *getenv(); 144040266059SGregory Neil Shapiro extern void *malloc(); 144140266059SGregory Neil Shapiro 144240266059SGregory Neil Shapiro /* added for RISC/os 4.01...which is dumber than 4.50 */ 144340266059SGregory Neil Shapiro # ifdef RISCOS_4_0 144440266059SGregory Neil Shapiro # ifndef ARBPTR_T 144540266059SGregory Neil Shapiro # define ARBPTR_T char * 14465b0945b5SGregory Neil Shapiro # endif 144740266059SGregory Neil Shapiro # undef HASFLOCK 144840266059SGregory Neil Shapiro # define HASFLOCK 0 144940266059SGregory Neil Shapiro # endif /* RISCOS_4_0 */ 145040266059SGregory Neil Shapiro 145140266059SGregory Neil Shapiro # include <sys/time.h> 145240266059SGregory Neil Shapiro 145340266059SGregory Neil Shapiro # endif /* RISCOS */ 145440266059SGregory Neil Shapiro 145540266059SGregory Neil Shapiro 145640266059SGregory Neil Shapiro /* 145740266059SGregory Neil Shapiro ** Linux 0.99pl10 and above... 145840266059SGregory Neil Shapiro ** 145940266059SGregory Neil Shapiro ** Thanks to, in reverse order of contact: 146040266059SGregory Neil Shapiro ** 146140266059SGregory Neil Shapiro ** John Kennedy <warlock@csuchico.edu> 146240266059SGregory Neil Shapiro ** Andrew Pam <avatar@aus.xanadu.com> 146340266059SGregory Neil Shapiro ** Florian La Roche <rzsfl@rz.uni-sb.de> 146440266059SGregory Neil Shapiro ** Karl London <karl@borg.demon.co.uk> 146540266059SGregory Neil Shapiro ** 146640266059SGregory Neil Shapiro ** NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style 146740266059SGregory Neil Shapiro ** file locking is no longer allowed. In particular, make sure 146840266059SGregory Neil Shapiro ** your DBM library and sendmail are both using either flock(2) 146940266059SGregory Neil Shapiro ** *or* fcntl(2) file locking, but not both. 147040266059SGregory Neil Shapiro */ 147140266059SGregory Neil Shapiro 147240266059SGregory Neil Shapiro # ifdef __linux__ 147340266059SGregory Neil Shapiro # include <linux/version.h> 147440266059SGregory Neil Shapiro # if !defined(KERNEL_VERSION) /* not defined in 2.0.x kernel series */ 147540266059SGregory Neil Shapiro # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) 14765b0945b5SGregory Neil Shapiro # endif 147740266059SGregory Neil Shapiro # define BSD 1 /* include BSD defines */ 147840266059SGregory Neil Shapiro # define HASSETREGID 1 /* use setregid(2) to set saved gid */ 147940266059SGregory Neil Shapiro # ifndef REQUIRES_DIR_FSYNC 148040266059SGregory Neil Shapiro # define REQUIRES_DIR_FSYNC 1 /* requires fsync() on directory */ 14815b0945b5SGregory Neil Shapiro # endif 148240266059SGregory Neil Shapiro # ifndef USESETEUID 148340266059SGregory Neil Shapiro # define USESETEUID 0 /* has it due to POSIX, but doesn't work */ 14845b0945b5SGregory Neil Shapiro # endif 14855ef517c0SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 148640266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 148740266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 148840266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ 148940266059SGregory Neil Shapiro # define GIDSET_T gid_t /* from <linux/types.h> */ 149040266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 149140266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ 14925b0945b5SGregory Neil Shapiro # endif 149340266059SGregory Neil Shapiro # ifndef IP_SRCROUTE 149440266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ 14955b0945b5SGregory Neil Shapiro # endif 149640266059SGregory Neil Shapiro # ifndef HAS_IN_H 149740266059SGregory Neil Shapiro # define HAS_IN_H 1 /* use netinet/in.h */ 14985b0945b5SGregory Neil Shapiro # endif 149940266059SGregory Neil Shapiro # ifndef USE_SIGLONGJMP 150040266059SGregory Neil Shapiro # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ 15015b0945b5SGregory Neil Shapiro # endif 150240266059SGregory Neil Shapiro # ifndef HASFLOCK 150340266059SGregory Neil Shapiro # if LINUX_VERSION_CODE < 66399 150440266059SGregory Neil Shapiro # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ 150540266059SGregory Neil Shapiro # else /* LINUX_VERSION_CODE < 66399 */ 1506e92d3f3fSGregory Neil Shapiro # if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) 150740266059SGregory Neil Shapiro # define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */ 15085b0945b5SGregory Neil Shapiro # else 1509e92d3f3fSGregory Neil Shapiro # define HASFLOCK 0 /* flock(2) is broken (again) after 2.4.0 */ 15105b0945b5SGregory Neil Shapiro # endif 151140266059SGregory Neil Shapiro # endif /* LINUX_VERSION_CODE < 66399 */ 151240266059SGregory Neil Shapiro # endif /* ! HASFLOCK */ 151340266059SGregory Neil Shapiro # ifndef LA_TYPE 151440266059SGregory Neil Shapiro # define LA_TYPE LA_PROCSTR 15155b0945b5SGregory Neil Shapiro # endif 151640266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ 151740266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 151840266059SGregory Neil Shapiro # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)) 151940266059SGregory Neil Shapiro # ifndef HASURANDOMDEV 152040266059SGregory Neil Shapiro # define HASURANDOMDEV 1 /* 2.0 (at least) has linux/drivers/char/random.c */ 15215b0945b5SGregory Neil Shapiro # endif 152240266059SGregory Neil Shapiro # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)) */ 1523a7ec597cSGregory Neil Shapiro # if defined(__GLIBC__) && defined(__GLIBC_MINOR__) 1524a7ec597cSGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 15255b0945b5SGregory Neil Shapiro # endif 152640266059SGregory Neil Shapiro # ifndef TZ_TYPE 152740266059SGregory Neil Shapiro # define TZ_TYPE TZ_NONE /* no standard for Linux */ 15285b0945b5SGregory Neil Shapiro # endif 1529739ac4d4SGregory Neil Shapiro # if (__GLIBC__ >= 2) 1530739ac4d4SGregory Neil Shapiro # include <paths.h> 15315b0945b5SGregory Neil Shapiro # endif 153240266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 153340266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 15345b0945b5SGregory Neil Shapiro # endif 153540266059SGregory Neil Shapiro # include <sys/sysmacros.h> 153640266059SGregory Neil Shapiro # undef atol /* wounded in <stdlib.h> */ 15375b0945b5SGregory Neil Shapiro 15385b0945b5SGregory Neil Shapiro # if defined(__GLIBC__) && defined(__GLIBC_MINOR__) 15395b0945b5SGregory Neil Shapiro # define GLIBC_VERSION ((__GLIBC__ << 9) + __GLIBC_MINOR__) 15405b0945b5SGregory Neil Shapiro # if (GLIBC_VERSION >= 0x201) 15415b0945b5SGregory Neil Shapiro # define SOCKADDR_LEN_T socklen_t 15425b0945b5SGregory Neil Shapiro # define SOCKOPT_LEN_T socklen_t 15435b0945b5SGregory Neil Shapiro # endif 15445b0945b5SGregory Neil Shapiro # endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */ 15455b0945b5SGregory Neil Shapiro 154640266059SGregory Neil Shapiro # if NETINET6 154740266059SGregory Neil Shapiro /* 154840266059SGregory Neil Shapiro ** Linux doesn't have a good way to tell userland what interfaces are 154940266059SGregory Neil Shapiro ** IPv6-capable. Therefore, the BIND resolver can not determine if there 155040266059SGregory Neil Shapiro ** are IPv6 interfaces to honor AI_ADDRCONFIG. Unfortunately, it assumes 155140266059SGregory Neil Shapiro ** that none are present. (Excuse the macro name ADDRCONFIG_IS_BROKEN.) 155240266059SGregory Neil Shapiro */ 155340266059SGregory Neil Shapiro # define ADDRCONFIG_IS_BROKEN 1 155440266059SGregory Neil Shapiro 155540266059SGregory Neil Shapiro /* 155640266059SGregory Neil Shapiro ** Indirectly included from glibc's <feature.h>. IPv6 support is native 155740266059SGregory Neil Shapiro ** in 2.1 and later, but the APIs appear before the functions. 155840266059SGregory Neil Shapiro */ 155940266059SGregory Neil Shapiro # if defined(__GLIBC__) && defined(__GLIBC_MINOR__) 156040266059SGregory Neil Shapiro # if (GLIBC_VERSION >= 0x201) 156140266059SGregory Neil Shapiro # undef IPPROTO_ICMPV6 /* linux #defines, glibc enums */ 15625b0945b5SGregory Neil Shapiro # else 156340266059SGregory Neil Shapiro # include <linux/in6.h> /* IPv6 support */ 15645b0945b5SGregory Neil Shapiro # endif 156540266059SGregory Neil Shapiro # if (GLIBC_VERSION >= 0x201 && !defined(NEEDSGETIPNODE)) 156640266059SGregory Neil Shapiro /* Have APIs in <netdb.h>, but no support in glibc */ 156740266059SGregory Neil Shapiro # define NEEDSGETIPNODE 1 15685b0945b5SGregory Neil Shapiro # endif 156940266059SGregory Neil Shapiro # undef GLIBC_VERSION 157040266059SGregory Neil Shapiro # endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */ 157140266059SGregory Neil Shapiro # endif /* NETINET6 */ 157240266059SGregory Neil Shapiro # ifndef HASFCHOWN 157340266059SGregory Neil Shapiro # define HASFCHOWN 1 /* fchown(2) */ 15745b0945b5SGregory Neil Shapiro # endif 157540266059SGregory Neil Shapiro # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) && !defined(HASFCHMOD) 157640266059SGregory Neil Shapiro # define HASFCHMOD 1 /* fchmod(2) */ 15775b0945b5SGregory Neil Shapiro # endif 1578*d39bd2c1SGregory Neil Shapiro # if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 19) && !defined(HAS_GETHOSTBYNAME2) 1579*d39bd2c1SGregory Neil Shapiro # define HAS_GETHOSTBYNAME2 1 1580*d39bd2c1SGregory Neil Shapiro # endif 158140266059SGregory Neil Shapiro # endif /* __linux__ */ 158240266059SGregory Neil Shapiro 158340266059SGregory Neil Shapiro /* 158440266059SGregory Neil Shapiro ** DELL SVR4 Issue 2.2, and others 158540266059SGregory Neil Shapiro ** From Kimmo Suominen <kim@grendel.lut.fi> 158640266059SGregory Neil Shapiro ** 158740266059SGregory Neil Shapiro ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ 158840266059SGregory Neil Shapiro ** defined, and the definitions conflict. 158940266059SGregory Neil Shapiro ** 159040266059SGregory Neil Shapiro ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid 159140266059SGregory Neil Shapiro ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A 159240266059SGregory Neil Shapiro ** (SVR4.0/386 version 3.0). 159340266059SGregory Neil Shapiro */ 159440266059SGregory Neil Shapiro 159540266059SGregory Neil Shapiro # ifdef DELL_SVR4 159640266059SGregory Neil Shapiro /* no changes necessary */ 159740266059SGregory Neil Shapiro /* see general __svr4__ defines below */ 159840266059SGregory Neil Shapiro # endif /* DELL_SVR4 */ 159940266059SGregory Neil Shapiro 160040266059SGregory Neil Shapiro 160140266059SGregory Neil Shapiro /* 160240266059SGregory Neil Shapiro ** Apple A/UX 3.0 160340266059SGregory Neil Shapiro */ 160440266059SGregory Neil Shapiro 160540266059SGregory Neil Shapiro # ifdef _AUX_SOURCE 160640266059SGregory Neil Shapiro # include <sys/sysmacros.h> 160740266059SGregory Neil Shapiro # define BSD /* has BSD routines */ 160840266059SGregory Neil Shapiro # define HASSETRLIMIT 0 /* ... but not setrlimit(2) */ 160940266059SGregory Neil Shapiro # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ 161040266059SGregory Neil Shapiro # define BOGUS_O_EXCL 1 /* exclusive open follows symlinks */ 161140266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 161240266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 161340266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 161440266059SGregory Neil Shapiro # define HASSETVBUF 1 /* has setvbuf(3) in libc */ 161540266059SGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 161640266059SGregory Neil Shapiro # define SIGFUNC_DEFINED /* sigfunc_t already defined */ 161740266059SGregory Neil Shapiro # define SIGFUNC_RETURN /* POSIX-mode */ 161840266059SGregory Neil Shapiro # define SIGFUNC_DECL void /* POSIX-mode */ 161940266059SGregory Neil Shapiro # define ERRLIST_PREDEFINED 1 162040266059SGregory Neil Shapiro # ifndef IDENTPROTO 162140266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 16225b0945b5SGregory Neil Shapiro # endif 162340266059SGregory Neil Shapiro # ifndef LA_TYPE 162440266059SGregory Neil Shapiro # define LA_TYPE LA_INT 162540266059SGregory Neil Shapiro # define FSHIFT 16 16265b0945b5SGregory Neil Shapiro # endif 162740266059SGregory Neil Shapiro # define LA_AVENRUN "avenrun" 162840266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 162940266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME 163040266059SGregory Neil Shapiro # ifndef _PATH_UNIX 163140266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" /* should be in <paths.h> */ 16325b0945b5SGregory Neil Shapiro # endif 163340266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 163440266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 16355b0945b5SGregory Neil Shapiro # endif 163640266059SGregory Neil Shapiro # undef WIFEXITED 163740266059SGregory Neil Shapiro # undef WEXITSTATUS 163840266059SGregory Neil Shapiro # endif /* _AUX_SOURCE */ 163940266059SGregory Neil Shapiro 164040266059SGregory Neil Shapiro 164140266059SGregory Neil Shapiro /* 164240266059SGregory Neil Shapiro ** Encore UMAX V 164340266059SGregory Neil Shapiro ** 164440266059SGregory Neil Shapiro ** Not extensively tested. 164540266059SGregory Neil Shapiro */ 164640266059SGregory Neil Shapiro 164740266059SGregory Neil Shapiro # ifdef UMAXV 164840266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 164940266059SGregory Neil Shapiro # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 165040266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 165140266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 165240266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 165340266059SGregory Neil Shapiro # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 165440266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 165540266059SGregory Neil Shapiro # define MAXPATHLEN PATH_MAX 165640266059SGregory Neil Shapiro extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); 165740266059SGregory Neil Shapiro extern struct group *getgrent(), *getgrnam(), *getgrgid(); 165840266059SGregory Neil Shapiro # undef WIFEXITED 165940266059SGregory Neil Shapiro # undef WEXITSTATUS 166040266059SGregory Neil Shapiro # endif /* UMAXV */ 166140266059SGregory Neil Shapiro 166240266059SGregory Neil Shapiro 166340266059SGregory Neil Shapiro /* 166440266059SGregory Neil Shapiro ** Stardent Titan 3000 running TitanOS 4.2. 166540266059SGregory Neil Shapiro ** 166640266059SGregory Neil Shapiro ** Must be compiled in "cc -43" mode. 166740266059SGregory Neil Shapiro ** 166840266059SGregory Neil Shapiro ** From Kate Hedstrom <kate@ahab.rutgers.edu>. 166940266059SGregory Neil Shapiro ** 167040266059SGregory Neil Shapiro ** Note the tweaking below after the BSD defines are set. 167140266059SGregory Neil Shapiro */ 167240266059SGregory Neil Shapiro 167340266059SGregory Neil Shapiro # ifdef titan 167440266059SGregory Neil Shapiro # define setpgid setpgrp 167540266059SGregory Neil Shapiro typedef int pid_t; 167640266059SGregory Neil Shapiro # undef WIFEXITED 167740266059SGregory Neil Shapiro # undef WEXITSTATUS 167840266059SGregory Neil Shapiro # endif /* titan */ 167940266059SGregory Neil Shapiro 168040266059SGregory Neil Shapiro 168140266059SGregory Neil Shapiro /* 168240266059SGregory Neil Shapiro ** Sequent DYNIX 3.2.0 168340266059SGregory Neil Shapiro ** 168440266059SGregory Neil Shapiro ** From Jim Davis <jdavis@cs.arizona.edu>. 168540266059SGregory Neil Shapiro */ 168640266059SGregory Neil Shapiro 168740266059SGregory Neil Shapiro # ifdef sequent 168840266059SGregory Neil Shapiro 168940266059SGregory Neil Shapiro # define BSD 1 169040266059SGregory Neil Shapiro # define HASUNSETENV 1 169140266059SGregory Neil Shapiro # define BSD4_3 1 /* to get signal() in conf.c */ 169240266059SGregory Neil Shapiro # define WAITUNION 1 169340266059SGregory Neil Shapiro # define LA_TYPE LA_FLOAT 169440266059SGregory Neil Shapiro # ifdef _POSIX_VERSION 169540266059SGregory Neil Shapiro # undef _POSIX_VERSION /* set in <unistd.h> */ 16965b0945b5SGregory Neil Shapiro # endif 169740266059SGregory Neil Shapiro # undef HASSETVBUF /* don't actually have setvbuf(3) */ 169840266059SGregory Neil Shapiro # define setpgid setpgrp 169940266059SGregory Neil Shapiro 170040266059SGregory Neil Shapiro /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ 170140266059SGregory Neil Shapiro # undef WIFEXITED 170240266059SGregory Neil Shapiro # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ 170340266059SGregory Neil Shapiro ((union wait*)&(s))->w_termsig == 0) 170440266059SGregory Neil Shapiro # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) 170540266059SGregory Neil Shapiro typedef int pid_t; 170640266059SGregory Neil Shapiro # define isgraph(c) (isprint(c) && (c != ' ')) 170740266059SGregory Neil Shapiro 170840266059SGregory Neil Shapiro # ifndef IDENTPROTO 170940266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 17105b0945b5SGregory Neil Shapiro # endif 171140266059SGregory Neil Shapiro 171240266059SGregory Neil Shapiro # ifndef _PATH_UNIX 171340266059SGregory Neil Shapiro # define _PATH_UNIX "/dynix" 17145b0945b5SGregory Neil Shapiro # endif 171540266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 171640266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 17175b0945b5SGregory Neil Shapiro # endif 171840266059SGregory Neil Shapiro # endif /* sequent */ 171940266059SGregory Neil Shapiro 172040266059SGregory Neil Shapiro 172140266059SGregory Neil Shapiro /* 172240266059SGregory Neil Shapiro ** Sequent DYNIX/ptx v2.0 (and higher) 172340266059SGregory Neil Shapiro ** 172440266059SGregory Neil Shapiro ** For DYNIX/ptx v1.x, undefine HASSETREUID. 172540266059SGregory Neil Shapiro ** 172640266059SGregory Neil Shapiro ** From Tim Wright <timw@sequent.com>. 172740266059SGregory Neil Shapiro ** Update from Jack Woolley <jwoolley@sctcorp.com>, 26 Dec 1995, 172840266059SGregory Neil Shapiro ** for DYNIX/ptx 4.0.2. 172940266059SGregory Neil Shapiro */ 173040266059SGregory Neil Shapiro 173140266059SGregory Neil Shapiro # ifdef _SEQUENT_ 173240266059SGregory Neil Shapiro # include <sys/stream.h> 173340266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 173440266059SGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 173540266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 173640266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 173740266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 173840266059SGregory Neil Shapiro # define GIDSET_T gid_t 173940266059SGregory Neil Shapiro # define LA_TYPE LA_INT 174040266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ 174140266059SGregory Neil Shapiro # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 174240266059SGregory Neil Shapiro # ifndef IDENTPROTO 174340266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 17445b0945b5SGregory Neil Shapiro # endif 174540266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 174640266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 17475b0945b5SGregory Neil Shapiro # endif 174840266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 174940266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail.pid" 17505b0945b5SGregory Neil Shapiro # endif 175140266059SGregory Neil Shapiro # endif /* _SEQUENT_ */ 175240266059SGregory Neil Shapiro 175340266059SGregory Neil Shapiro /* 1754e92d3f3fSGregory Neil Shapiro ** Cray UNICOS, UNICOS/mk, and UNICOS/mp 175540266059SGregory Neil Shapiro ** 1756e92d3f3fSGregory Neil Shapiro ** UNICOS: 17575b0945b5SGregory Neil Shapiro ** Ported by David L. Kensiski, Sterling Software <kensiski@nas.nasa.gov> 1758e92d3f3fSGregory Neil Shapiro ** Update Brian Ginsbach <ginsbach@cray.com> 1759e92d3f3fSGregory Neil Shapiro ** UNICOS/mk (Cray T3E): 1760e92d3f3fSGregory Neil Shapiro ** Contributed by Manu Mahonen <mailadm@csc.fi> 1761e92d3f3fSGregory Neil Shapiro ** of Center for Scientific Computing. 1762e92d3f3fSGregory Neil Shapiro ** Update Brian Ginsbach <ginsbach@cray.com> 1763e92d3f3fSGregory Neil Shapiro ** UNICOS/mp: 1764e92d3f3fSGregory Neil Shapiro ** From Aaron Davis <awd@cray.com> & Brian Ginsbach <ginsbach@cray.com> 176540266059SGregory Neil Shapiro */ 176640266059SGregory Neil Shapiro 1767e92d3f3fSGregory Neil Shapiro # if defined(_CRAY) || defined(UNICOS) || defined(_UNICOSMP) 176840266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 1769e92d3f3fSGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 1770e92d3f3fSGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) */ 1771e92d3f3fSGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(3) call */ 1772e92d3f3fSGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 1773e92d3f3fSGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 1774e92d3f3fSGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 1775e92d3f3fSGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */ 1776e92d3f3fSGregory Neil Shapiro # define HASSTRERROR 1 /* has strerror(3) */ 1777e92d3f3fSGregory Neil Shapiro # define GIDSET_T gid_t 177840266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 177940266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 1780e92d3f3fSGregory Neil Shapiro # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ 1781e92d3f3fSGregory Neil Shapiro # ifdef UNICOS 1782e92d3f3fSGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 1783e92d3f3fSGregory Neil Shapiro # define LA_TYPE LA_ZERO 1784e92d3f3fSGregory Neil Shapiro # define _PATH_MAILDIR "/usr/spool/mail" 1785e92d3f3fSGregory Neil Shapiro # define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst) 1786e92d3f3fSGregory Neil Shapiro # ifndef MAXPATHLEN 1787e92d3f3fSGregory Neil Shapiro # define MAXPATHLEN PATHSIZE 17885b0945b5SGregory Neil Shapiro # endif 1789e92d3f3fSGregory Neil Shapiro # ifndef _PATH_UNIX 1790e92d3f3fSGregory Neil Shapiro # ifdef UNICOSMK 1791e92d3f3fSGregory Neil Shapiro # define _PATH_UNIX "/unicosmk.ar" 1792e92d3f3fSGregory Neil Shapiro # else 1793e92d3f3fSGregory Neil Shapiro # define _PATH_UNIX "/unicos" 17945b0945b5SGregory Neil Shapiro # endif 1795e92d3f3fSGregory Neil Shapiro # endif /* ! _PATH_UNIX */ 1796e92d3f3fSGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 1797e92d3f3fSGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 17985b0945b5SGregory Neil Shapiro # endif 179940266059SGregory Neil Shapiro # endif /* UNICOS */ 1800e92d3f3fSGregory Neil Shapiro # ifdef _UNICOSMP 1801e92d3f3fSGregory Neil Shapiro # if defined(_SC_NPROC_ONLN) && !defined(_SC_NPROCESSORS_ONLN) 1802e92d3f3fSGregory Neil Shapiro /* _SC_NPROC_ONLN is 'mpadmin -u', total # of unrestricted processors */ 1803e92d3f3fSGregory Neil Shapiro # define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN 18045b0945b5SGregory Neil Shapiro # endif 1805e92d3f3fSGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 1806e92d3f3fSGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) syscall */ 1807e92d3f3fSGregory Neil Shapiro # define LA_TYPE LA_IRIX6 /* figure out at run time */ 1808e92d3f3fSGregory Neil Shapiro # include <sys/cdefs.h> 1809e92d3f3fSGregory Neil Shapiro # include <paths.h> 1810e92d3f3fSGregory Neil Shapiro # define ARGV_T char *const * 1811e92d3f3fSGregory Neil Shapiro # endif /* _UNICOSMP */ 1812e92d3f3fSGregory Neil Shapiro # endif /* _CRAY */ 181340266059SGregory Neil Shapiro 181440266059SGregory Neil Shapiro /* 181540266059SGregory Neil Shapiro ** Apollo DomainOS 181640266059SGregory Neil Shapiro ** 181740266059SGregory Neil Shapiro ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> 181840266059SGregory Neil Shapiro ** 181940266059SGregory Neil Shapiro ** 15 Jan 1994; updated 2 Aug 1995 182040266059SGregory Neil Shapiro ** 182140266059SGregory Neil Shapiro */ 182240266059SGregory Neil Shapiro 182340266059SGregory Neil Shapiro # ifdef apollo 182440266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 182540266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(2) call */ 182640266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */ 182740266059SGregory Neil Shapiro # define SPT_TYPE SPT_NONE /* don't use setproctitle */ 182840266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR /* use getloadavg.c */ 182940266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 183040266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 183140266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME 183240266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 183340266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 18345b0945b5SGregory Neil Shapiro # endif 183540266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 183640266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail.pid" 18375b0945b5SGregory Neil Shapiro # endif 183840266059SGregory Neil Shapiro # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ 183940266059SGregory Neil Shapiro # undef S_IFIFO 184040266059SGregory Neil Shapiro # define S_IFIFO 0010000 184140266059SGregory Neil Shapiro # ifndef IDENTPROTO 184240266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 18435b0945b5SGregory Neil Shapiro # endif 184440266059SGregory Neil Shapiro # define RLIMIT_NEEDS_SYS_TIME_H 1 184540266059SGregory Neil Shapiro # if defined(NGROUPS_MAX) && !NGROUPS_MAX 184640266059SGregory Neil Shapiro # undef NGROUPS_MAX 18475b0945b5SGregory Neil Shapiro # endif 184840266059SGregory Neil Shapiro # endif /* apollo */ 184940266059SGregory Neil Shapiro 185040266059SGregory Neil Shapiro /* 185140266059SGregory Neil Shapiro ** MPE-iX 185240266059SGregory Neil Shapiro ** 185340266059SGregory Neil Shapiro ** Requires MPE 6.0 or greater. See sendmail/README for more info. 185440266059SGregory Neil Shapiro ** 185540266059SGregory Neil Shapiro ** From Mark Bixby <mark_bixby@hp.com> or <mark@bixby.org>. 185640266059SGregory Neil Shapiro */ 185740266059SGregory Neil Shapiro 185840266059SGregory Neil Shapiro # ifdef MPE 185940266059SGregory Neil Shapiro 186040266059SGregory Neil Shapiro # include <sys/sysmacros.h> 186140266059SGregory Neil Shapiro # include <fcntl.h> 186240266059SGregory Neil Shapiro 186340266059SGregory Neil Shapiro /* Sendmail stuff */ 186440266059SGregory Neil Shapiro # define HASFCHOWN 0 /* lacks fchown() */ 186540266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* lacks getusershell() */ 186640266059SGregory Neil Shapiro # ifdef HASNICE 186740266059SGregory Neil Shapiro # undef HASNICE 18685b0945b5SGregory Neil Shapiro # endif 186940266059SGregory Neil Shapiro # define HASNICE 0 /* lacks nice() */ 187040266059SGregory Neil Shapiro # define HASRANDOM 0 /* lacks random() */ 187140266059SGregory Neil Shapiro # ifdef HASRRESVPORT 187240266059SGregory Neil Shapiro # undef HASRRESVPORT 18735b0945b5SGregory Neil Shapiro # endif 187440266059SGregory Neil Shapiro # define HASRRESVPORT 0 /* lacks rresvport() */ 187540266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* lacks IP source routing fields */ 187640266059SGregory Neil Shapiro # ifdef MATCHGECOS 187740266059SGregory Neil Shapiro # undef MATCHGECOS 18785b0945b5SGregory Neil Shapiro # endif 187940266059SGregory Neil Shapiro # define MATCHGECOS 0 /* lacks an initialized GECOS field */ 188040266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* use sendmail's fsync() */ 188140266059SGregory Neil Shapiro # define NEEDLINK 1 /* use sendmail's link() */ 188240266059SGregory Neil Shapiro # define NOFTRUNCATE 1 /* lacks ftruncate() */ 188340266059SGregory Neil Shapiro # define SFS_TYPE SFS_NONE /* can't determine disk space */ 188440266059SGregory Neil Shapiro # define SM_CONF_SYSLOG 0 /* use sendmail decl of syslog() */ 188540266059SGregory Neil Shapiro # define USE_DOUBLE_FORK 0 /* don't fork an intermediate zombie */ 188640266059SGregory Neil Shapiro # define USE_ENVIRON 1 /* use environ instead of envp */ 188740266059SGregory Neil Shapiro 188840266059SGregory Neil Shapiro /* Missing header stuff */ 188940266059SGregory Neil Shapiro # define AF_UNSPEC 0 189040266059SGregory Neil Shapiro # define AF_MAX AF_INET 189140266059SGregory Neil Shapiro # define IFF_LOOPBACK 0x8 189240266059SGregory Neil Shapiro # define IN_LOOPBACKNET 127 189340266059SGregory Neil Shapiro # define MAXNAMLEN NAME_MAX 189440266059SGregory Neil Shapiro # define S_IEXEC S_IXUSR 189540266059SGregory Neil Shapiro # define S_IREAD S_IRUSR 189640266059SGregory Neil Shapiro # define S_IWRITE S_IWUSR 189740266059SGregory Neil Shapiro 189840266059SGregory Neil Shapiro /* Present header stuff that needs to be missing */ 189940266059SGregory Neil Shapiro # undef NGROUPS_MAX 190040266059SGregory Neil Shapiro 190140266059SGregory Neil Shapiro /* Shadow functions */ 190240266059SGregory Neil Shapiro # define bind sendmail_mpe_bind 190340266059SGregory Neil Shapiro # define _exit sendmail_mpe__exit 190440266059SGregory Neil Shapiro # define exit sendmail_mpe_exit 190540266059SGregory Neil Shapiro # define fcntl sendmail_mpe_fcntl 190640266059SGregory Neil Shapiro # define getegid sendmail_mpe_getegid 190740266059SGregory Neil Shapiro # define geteuid sendmail_mpe_geteuid 190840266059SGregory Neil Shapiro # define getpwnam sendmail_mpe_getpwnam 190940266059SGregory Neil Shapiro # define getpwuid sendmail_mpe_getpwuid 191040266059SGregory Neil Shapiro # define setgid sendmail_mpe_setgid 191140266059SGregory Neil Shapiro # define setuid sendmail_mpe_setuid 191240266059SGregory Neil Shapiro extern int sendmail_mpe_fcntl __P((int, int, ...)); 191340266059SGregory Neil Shapiro extern struct passwd * sendmail_mpe_getpwnam __P((const char *)); 191440266059SGregory Neil Shapiro extern struct passwd * sendmail_mpe_getpwuid __P((uid_t)); 191540266059SGregory Neil Shapiro # endif /* MPE */ 191640266059SGregory Neil Shapiro 191740266059SGregory Neil Shapiro /* 191840266059SGregory Neil Shapiro ** System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatibility Libs ie. native) 191940266059SGregory Neil Shapiro ** 192040266059SGregory Neil Shapiro ** Contributed by Paul Gampe <paulg@apnic.net> 192140266059SGregory Neil Shapiro */ 192240266059SGregory Neil Shapiro 192340266059SGregory Neil Shapiro # ifdef __svr5__ 192440266059SGregory Neil Shapiro # include <sys/mkdev.h> 192540266059SGregory Neil Shapiro # define __svr4__ 192640266059SGregory Neil Shapiro # define SYS5SIGNALS 1 192740266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) call */ 1928e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 192940266059SGregory Neil Shapiro # define HASSETREUID 1 193040266059SGregory Neil Shapiro # define HASWAITPID 1 193140266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 193240266059SGregory Neil Shapiro # define GIDSET_T gid_t 193340266059SGregory Neil Shapiro # define SOCKADDR_LEN_T size_t 193440266059SGregory Neil Shapiro # define SOCKOPT_LEN_T size_t 1935da7d7b9cSGregory Neil Shapiro # define SIGWAIT_TAKES_1_ARG 1 193640266059SGregory Neil Shapiro # ifndef _PATH_UNIX 193740266059SGregory Neil Shapiro # define _PATH_UNIX "/stand/unix" 19385b0945b5SGregory Neil Shapiro # endif 193940266059SGregory Neil Shapiro # define SPT_PADCHAR '\0' /* pad process title with nulls */ 194040266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 194140266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 /* unsure */ 19425b0945b5SGregory Neil Shapiro # endif 194340266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 194440266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/sendmail.cf" 19455b0945b5SGregory Neil Shapiro # endif 194640266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 194740266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/sendmail.pid" 19485b0945b5SGregory Neil Shapiro # endif 194940266059SGregory Neil Shapiro # undef offsetof /* avoid stddefs.h, sys/sysmacros.h conflict */ 195040266059SGregory Neil Shapiro #if !defined(SM_SET_H_ERRNO) && defined(_REENTRANT) 195140266059SGregory Neil Shapiro # define SM_SET_H_ERRNO(err) set_h_errno((err)) 19525b0945b5SGregory Neil Shapiro #endif 195340266059SGregory Neil Shapiro # endif /* __svr5__ */ 195440266059SGregory Neil Shapiro 195540266059SGregory Neil Shapiro /* ###################################################################### */ 195640266059SGregory Neil Shapiro 195740266059SGregory Neil Shapiro /* 195840266059SGregory Neil Shapiro ** UnixWare 2.x 195940266059SGregory Neil Shapiro */ 196040266059SGregory Neil Shapiro 196140266059SGregory Neil Shapiro # ifdef UNIXWARE2 196240266059SGregory Neil Shapiro # define UNIXWARE 1 196340266059SGregory Neil Shapiro # undef offsetof /* avoid stddefs.h, sys/sysmacros.h conflict */ 196440266059SGregory Neil Shapiro # endif /* UNIXWARE2 */ 196540266059SGregory Neil Shapiro 196640266059SGregory Neil Shapiro 196740266059SGregory Neil Shapiro /* 196840266059SGregory Neil Shapiro ** UnixWare 1.1.2. 196940266059SGregory Neil Shapiro ** 197040266059SGregory Neil Shapiro ** Updated by Petr Lampa <lampa@fee.vutbr.cz>. 197140266059SGregory Neil Shapiro ** From Evan Champion <evanc@spatial.synapse.org>. 197240266059SGregory Neil Shapiro */ 197340266059SGregory Neil Shapiro 197440266059SGregory Neil Shapiro # ifdef UNIXWARE 197540266059SGregory Neil Shapiro # include <sys/mkdev.h> 197640266059SGregory Neil Shapiro # define SYSTEM5 1 197740266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 197840266059SGregory Neil Shapiro # define HASSETREUID 1 1979e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 198040266059SGregory Neil Shapiro # define HASINITGROUPS 1 198140266059SGregory Neil Shapiro # define GIDSET_T gid_t 198240266059SGregory Neil Shapiro # define SLEEP_T unsigned 198340266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATVFS 198440266059SGregory Neil Shapiro # define LA_TYPE LA_ZERO 198540266059SGregory Neil Shapiro # undef WIFEXITED 198640266059SGregory Neil Shapiro # undef WEXITSTATUS 198740266059SGregory Neil Shapiro # ifndef _PATH_UNIX 198840266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 19895b0945b5SGregory Neil Shapiro # endif 199040266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 199140266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" 19925b0945b5SGregory Neil Shapiro # endif 199340266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 199440266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 19955b0945b5SGregory Neil Shapiro # endif 199640266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 128 199740266059SGregory Neil Shapiro # endif /* UNIXWARE */ 199840266059SGregory Neil Shapiro 199940266059SGregory Neil Shapiro 200040266059SGregory Neil Shapiro /* 200140266059SGregory Neil Shapiro ** Intergraph CLIX 3.1 200240266059SGregory Neil Shapiro ** 200340266059SGregory Neil Shapiro ** From Paul Southworth <pauls@locust.cic.net> 200440266059SGregory Neil Shapiro */ 200540266059SGregory Neil Shapiro 200640266059SGregory Neil Shapiro # ifdef CLIX 200740266059SGregory Neil Shapiro # define SYSTEM5 1 /* looks like System V */ 200840266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 200940266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 20105b0945b5SGregory Neil Shapiro # endif 201140266059SGregory Neil Shapiro # define DEV_BSIZE 512 /* device block size not defined */ 201240266059SGregory Neil Shapiro # define GIDSET_T gid_t 201340266059SGregory Neil Shapiro # undef LOG /* syslog not available */ 201440266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* no fsync in system library */ 201540266059SGregory Neil Shapiro # define GETSHORT _getshort 201640266059SGregory Neil Shapiro # endif /* CLIX */ 201740266059SGregory Neil Shapiro 201840266059SGregory Neil Shapiro 201940266059SGregory Neil Shapiro /* 202040266059SGregory Neil Shapiro ** NCR MP-RAS 2.x (SysVr4) with Wollongong TCP/IP 202140266059SGregory Neil Shapiro ** 202240266059SGregory Neil Shapiro ** From Kevin Darcy <kevin@tech.mis.cfc.com>. 202340266059SGregory Neil Shapiro */ 202440266059SGregory Neil Shapiro 202540266059SGregory Neil Shapiro # ifdef NCR_MP_RAS2 202640266059SGregory Neil Shapiro # include <sys/sockio.h> 202740266059SGregory Neil Shapiro # define __svr4__ 202840266059SGregory Neil Shapiro # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ 202940266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 203040266059SGregory Neil Shapiro # define SPT_TYPE SPT_NONE 203140266059SGregory Neil Shapiro # endif /* NCR_MP_RAS2 */ 203240266059SGregory Neil Shapiro 203340266059SGregory Neil Shapiro 203440266059SGregory Neil Shapiro /* 203540266059SGregory Neil Shapiro ** NCR MP-RAS 3.x (SysVr4) with STREAMware TCP/IP 203640266059SGregory Neil Shapiro ** 203740266059SGregory Neil Shapiro ** From Tom Moore <Tom.Moore@DaytonOH.NCR.COM> 203840266059SGregory Neil Shapiro */ 203940266059SGregory Neil Shapiro 204040266059SGregory Neil Shapiro # ifdef NCR_MP_RAS3 204140266059SGregory Neil Shapiro # define __svr4__ 204240266059SGregory Neil Shapiro # define HASFCHOWN 1 /* has fchown(2) call */ 204340266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 204440266059SGregory Neil Shapiro # define SIOCGIFNUM_IS_BROKEN 1 /* SIOCGIFNUM has non-std interface */ 204540266059SGregory Neil Shapiro # define SO_REUSEADDR_IS_BROKEN 1 /* doesn't work if accept() fails */ 204640266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 204740266059SGregory Neil Shapiro # define SPT_TYPE SPT_NONE 204840266059SGregory Neil Shapiro # define _PATH_MAILDIR "/var/mail" 204940266059SGregory Neil Shapiro # ifndef _XOPEN_SOURCE 205040266059SGregory Neil Shapiro # define _XOPEN_SOURCE 205140266059SGregory Neil Shapiro # define _XOPEN_SOURCE_EXTENDED 1 205240266059SGregory Neil Shapiro # include <sys/resource.h> 205340266059SGregory Neil Shapiro # undef _XOPEN_SOURCE 205440266059SGregory Neil Shapiro # undef _XOPEN_SOURCE_EXTENDED 205540266059SGregory Neil Shapiro # endif /* ! _XOPEN_SOURCE */ 205640266059SGregory Neil Shapiro # endif /* NCR_MP_RAS3 */ 205740266059SGregory Neil Shapiro 205840266059SGregory Neil Shapiro 205940266059SGregory Neil Shapiro /* 206040266059SGregory Neil Shapiro ** Tandem NonStop-UX SVR4 206140266059SGregory Neil Shapiro ** 206240266059SGregory Neil Shapiro ** From Rick McCarty <mccarty@mpd.tandem.com>. 206340266059SGregory Neil Shapiro */ 206440266059SGregory Neil Shapiro 206540266059SGregory Neil Shapiro # ifdef NonStop_UX_BXX 206640266059SGregory Neil Shapiro # define __svr4__ 206740266059SGregory Neil Shapiro # endif /* NonStop_UX_BXX */ 206840266059SGregory Neil Shapiro 206940266059SGregory Neil Shapiro 207040266059SGregory Neil Shapiro /* 207140266059SGregory Neil Shapiro ** Hitachi 3050R/3050RX and 3500 Workstations running HI-UX/WE2. 207240266059SGregory Neil Shapiro ** 207340266059SGregory Neil Shapiro ** Tested for 1.04, 1.03 207440266059SGregory Neil Shapiro ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. 207540266059SGregory Neil Shapiro ** 207640266059SGregory Neil Shapiro ** Tested for 4.02, 6.10 and 7.10 207740266059SGregory Neil Shapiro ** From Motonori NAKAMURA <motonori@media.kyoto-u.ac.jp>. 207840266059SGregory Neil Shapiro */ 207940266059SGregory Neil Shapiro 208040266059SGregory Neil Shapiro # if !defined(__hpux) && (defined(_H3050R) || defined(_HIUX_SOURCE)) 208140266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 208240266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 208340266059SGregory Neil Shapiro # define HASFCHMOD 1 /* has fchmod(2) syscall */ 208440266059SGregory Neil Shapiro # define setreuid(r, e) setresuid(r, e, -1) 208540266059SGregory Neil Shapiro # define LA_TYPE LA_FLOAT 208640266059SGregory Neil Shapiro # define SPT_TYPE SPT_PSTAT 208740266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 208840266059SGregory Neil Shapiro # ifndef HASSETVBUF 208940266059SGregory Neil Shapiro # define HASSETVBUF /* HI-UX has no setlinebuf */ 20905b0945b5SGregory Neil Shapiro # endif 209140266059SGregory Neil Shapiro # ifndef GIDSET_T 209240266059SGregory Neil Shapiro # define GIDSET_T gid_t 20935b0945b5SGregory Neil Shapiro # endif 209440266059SGregory Neil Shapiro # ifndef _PATH_UNIX 209540266059SGregory Neil Shapiro # define _PATH_UNIX "/HI-UX" 20965b0945b5SGregory Neil Shapiro # endif 209740266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 209840266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 20995b0945b5SGregory Neil Shapiro # endif 210040266059SGregory Neil Shapiro # ifndef IDENTPROTO 210140266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 21025b0945b5SGregory Neil Shapiro # endif 210340266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 210440266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ 21055b0945b5SGregory Neil Shapiro # endif 210640266059SGregory Neil Shapiro # define FDSET_CAST (int *) /* cast for fd_set parameters to select */ 210740266059SGregory Neil Shapiro 210840266059SGregory Neil Shapiro /* 210940266059SGregory Neil Shapiro ** avoid m_flags conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h 211040266059SGregory Neil Shapiro ** on HIUX 3050 211140266059SGregory Neil Shapiro */ 211240266059SGregory Neil Shapiro # undef m_flags 211340266059SGregory Neil Shapiro 211440266059SGregory Neil Shapiro # define SM_CONF_SYSLOG 0 211540266059SGregory Neil Shapiro 211640266059SGregory Neil Shapiro # endif /* !defined(__hpux) && (defined(_H3050R) || defined(_HIUX_SOURCE)) */ 211740266059SGregory Neil Shapiro 211840266059SGregory Neil Shapiro 211940266059SGregory Neil Shapiro /* 212040266059SGregory Neil Shapiro ** Amdahl UTS System V 2.1.5 (SVr3-based) 212140266059SGregory Neil Shapiro ** 212240266059SGregory Neil Shapiro ** From: Janet Jackson <janet@dialix.oz.au>. 212340266059SGregory Neil Shapiro */ 212440266059SGregory Neil Shapiro 212540266059SGregory Neil Shapiro # ifdef _UTS 212640266059SGregory Neil Shapiro # include <sys/sysmacros.h> 212740266059SGregory Neil Shapiro # undef HASLSTAT /* has symlinks, but they cause problems */ 212840266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ 212940266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* System V signal semantics */ 213040266059SGregory Neil Shapiro # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 213140266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 213240266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) function */ 213340266059SGregory Neil Shapiro # define HASSETVBUF 1 /* has setvbuf(3) function */ 213440266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 213540266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ 21365b0945b5SGregory Neil Shapiro # endif 213740266059SGregory Neil Shapiro # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ 213840266059SGregory Neil Shapiro # define LA_TYPE LA_ZERO /* doesn't have load average */ 213940266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ 214040266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 214140266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 214240266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 214340266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 21445b0945b5SGregory Neil Shapiro # endif 214540266059SGregory Neil Shapiro # endif /* _UTS */ 214640266059SGregory Neil Shapiro 214740266059SGregory Neil Shapiro /* 214840266059SGregory Neil Shapiro ** Cray Computer Corporation's CSOS 214940266059SGregory Neil Shapiro ** 215040266059SGregory Neil Shapiro ** From Scott Bolte <scott@craycos.com>. 215140266059SGregory Neil Shapiro */ 215240266059SGregory Neil Shapiro 215340266059SGregory Neil Shapiro # ifdef _CRAYCOM 215440266059SGregory Neil Shapiro # define SYSTEM5 1 /* include all the System V defines */ 215540266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 215640266059SGregory Neil Shapiro # define NEEDFSYNC 1 /* no fsync in system library */ 215740266059SGregory Neil Shapiro # define MAXPATHLEN PATHSIZE 215840266059SGregory Neil Shapiro # define LA_TYPE LA_ZERO 215940266059SGregory Neil Shapiro # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ 216040266059SGregory Neil Shapiro # define SFS_BAVAIL f_bfree /* alternate field name */ 216140266059SGregory Neil Shapiro # define _POSIX_CHOWN_RESTRICTED -1 216240266059SGregory Neil Shapiro extern struct group *getgrent(), *getgrnam(), *getgrgid(); 216340266059SGregory Neil Shapiro # endif /* _CRAYCOM */ 216440266059SGregory Neil Shapiro 216540266059SGregory Neil Shapiro 216640266059SGregory Neil Shapiro /* 216740266059SGregory Neil Shapiro ** Sony NEWS-OS 4.2.1R and 6.0.3 216840266059SGregory Neil Shapiro ** 216940266059SGregory Neil Shapiro ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 217040266059SGregory Neil Shapiro */ 217140266059SGregory Neil Shapiro 217240266059SGregory Neil Shapiro # ifdef sony_news 217340266059SGregory Neil Shapiro # ifndef __svr4 217440266059SGregory Neil Shapiro /* NEWS-OS 4.2.1R */ 217540266059SGregory Neil Shapiro # ifndef BSD 217640266059SGregory Neil Shapiro # define BSD /* has BSD routines */ 21775b0945b5SGregory Neil Shapiro # endif 217840266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(2) call */ 217940266059SGregory Neil Shapiro # undef HASSETVBUF /* don't actually have setvbuf(3) */ 218040266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 218140266059SGregory Neil Shapiro # define LA_TYPE LA_INT 218240266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 218340266059SGregory Neil Shapiro # ifndef HASFLOCK 218440266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 21855b0945b5SGregory Neil Shapiro # endif 218640266059SGregory Neil Shapiro # define setpgid setpgrp 218740266059SGregory Neil Shapiro # undef WIFEXITED 218840266059SGregory Neil Shapiro # undef WEXITSTATUS 218940266059SGregory Neil Shapiro # define MODE_T int /* system include files have no mode_t */ 219040266059SGregory Neil Shapiro typedef int pid_t; 219140266059SGregory Neil Shapiro typedef int (*sigfunc_t)(); 219240266059SGregory Neil Shapiro # define SIGFUNC_DEFINED 219340266059SGregory Neil Shapiro # define SIGFUNC_RETURN (0) 219440266059SGregory Neil Shapiro # define SIGFUNC_DECL int 219540266059SGregory Neil Shapiro 219640266059SGregory Neil Shapiro # else /* ! __svr4 */ 219740266059SGregory Neil Shapiro /* NEWS-OS 6.0.3 with /bin/cc */ 219840266059SGregory Neil Shapiro # ifndef __svr4__ 219940266059SGregory Neil Shapiro # define __svr4__ /* use all System V Release 4 defines below */ 22005b0945b5SGregory Neil Shapiro # endif 2201e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 220240266059SGregory Neil Shapiro # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ 220340266059SGregory Neil Shapiro # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 220440266059SGregory Neil Shapiro # ifndef SPT_TYPE 220540266059SGregory Neil Shapiro # define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */ 22065b0945b5SGregory Neil Shapiro # endif 220740266059SGregory Neil Shapiro # define GIDSET_T gid_t 220840266059SGregory Neil Shapiro # undef WIFEXITED 220940266059SGregory Neil Shapiro # undef WEXITSTATUS 221040266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 221140266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 256 22125b0945b5SGregory Neil Shapiro # endif 221340266059SGregory Neil Shapiro # define _PATH_UNIX "/stand/unix" 221440266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 221540266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 22165b0945b5SGregory Neil Shapiro # endif 221740266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 221840266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 22195b0945b5SGregory Neil Shapiro # endif 222040266059SGregory Neil Shapiro 222140266059SGregory Neil Shapiro # endif /* ! __svr4 */ 222240266059SGregory Neil Shapiro # endif /* sony_news */ 222340266059SGregory Neil Shapiro 222440266059SGregory Neil Shapiro 222540266059SGregory Neil Shapiro /* 222640266059SGregory Neil Shapiro ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach 222740266059SGregory Neil Shapiro ** 222840266059SGregory Neil Shapiro ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 222940266059SGregory Neil Shapiro */ 223040266059SGregory Neil Shapiro 223140266059SGregory Neil Shapiro # ifdef luna 223240266059SGregory Neil Shapiro # ifndef IDENTPROTO 223340266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 22345b0945b5SGregory Neil Shapiro # endif 223540266059SGregory Neil Shapiro # define HASUNSETENV 1 /* has unsetenv(2) call */ 223640266059SGregory Neil Shapiro # define NEEDPUTENV 1 /* need putenv(3) call */ 223740266059SGregory Neil Shapiro # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */ 223840266059SGregory Neil Shapiro # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ 223940266059SGregory Neil Shapiro # define WAITUNION 1 /* use "union wait" as wait argument type */ 224040266059SGregory Neil Shapiro # ifdef uniosb 224140266059SGregory Neil Shapiro # include <sys/time.h> 224240266059SGregory Neil Shapiro # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ 224340266059SGregory Neil Shapiro # define LA_TYPE LA_INT 224440266059SGregory Neil Shapiro # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */ 224540266059SGregory Neil Shapiro # endif /* uniosb */ 224640266059SGregory Neil Shapiro # ifdef luna2 224740266059SGregory Neil Shapiro # define LA_TYPE LA_SUBR 224840266059SGregory Neil Shapiro # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */ 224940266059SGregory Neil Shapiro # endif /* luna2 */ 225040266059SGregory Neil Shapiro # ifdef luna88k 225140266059SGregory Neil Shapiro # define LA_TYPE LA_INT 22525b0945b5SGregory Neil Shapiro # endif 225340266059SGregory Neil Shapiro # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ 225440266059SGregory Neil Shapiro # define setpgid setpgrp 225540266059SGregory Neil Shapiro # undef WIFEXITED 225640266059SGregory Neil Shapiro # undef WEXITSTATUS 225740266059SGregory Neil Shapiro typedef int pid_t; 225840266059SGregory Neil Shapiro typedef int (*sigfunc_t)(); 225940266059SGregory Neil Shapiro # define SIGFUNC_DEFINED 226040266059SGregory Neil Shapiro # define SIGFUNC_RETURN (0) 226140266059SGregory Neil Shapiro # define SIGFUNC_DECL int 226240266059SGregory Neil Shapiro extern char *getenv(); 226340266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 226440266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" 226540266059SGregory Neil Shapiro # endif /* ! _PATH_VENDOR_CF */ 226640266059SGregory Neil Shapiro # endif /* luna */ 226740266059SGregory Neil Shapiro 226840266059SGregory Neil Shapiro 226940266059SGregory Neil Shapiro /* 227040266059SGregory Neil Shapiro ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc) 227140266059SGregory Neil Shapiro ** 227240266059SGregory Neil Shapiro ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. 227340266059SGregory Neil Shapiro */ 227440266059SGregory Neil Shapiro 227540266059SGregory Neil Shapiro # if defined(nec_ews_svr4) || defined(_nec_ews_svr4) 227640266059SGregory Neil Shapiro # ifndef __svr4__ 227740266059SGregory Neil Shapiro # define __svr4__ /* use all System V Release 4 defines below */ 22785b0945b5SGregory Neil Shapiro # endif 227940266059SGregory Neil Shapiro # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ 2280e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 228140266059SGregory Neil Shapiro # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ 228240266059SGregory Neil Shapiro # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 228340266059SGregory Neil Shapiro # define GIDSET_T gid_t 228440266059SGregory Neil Shapiro # undef WIFEXITED 228540266059SGregory Neil Shapiro # undef WEXITSTATUS 228640266059SGregory Neil Shapiro # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ 228740266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 228840266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" 22895b0945b5SGregory Neil Shapiro # endif 229040266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 229140266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 22925b0945b5SGregory Neil Shapiro # endif 229340266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 229440266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ 22955b0945b5SGregory Neil Shapiro # endif 229640266059SGregory Neil Shapiro # endif /* defined(nec_ews_svr4) || defined(_nec_ews_svr4) */ 229740266059SGregory Neil Shapiro 229840266059SGregory Neil Shapiro 229940266059SGregory Neil Shapiro /* 230040266059SGregory Neil Shapiro ** Fujitsu/ICL UXP/DS (For the DS/90 Series) 230140266059SGregory Neil Shapiro ** 230240266059SGregory Neil Shapiro ** From Diego R. Lopez <drlopez@cica.es>. 230340266059SGregory Neil Shapiro ** Additional changes from Fumio Moriya and Toshiaki Nomura of the 230440266059SGregory Neil Shapiro ** Fujitsu Fresoftware group <dsfrsoft@oai6.yk.fujitsu.co.jp>. 230540266059SGregory Neil Shapiro */ 230640266059SGregory Neil Shapiro 230740266059SGregory Neil Shapiro # ifdef __uxp__ 230840266059SGregory Neil Shapiro # include <arpa/nameser.h> 230940266059SGregory Neil Shapiro # include <sys/sysmacros.h> 231040266059SGregory Neil Shapiro # include <sys/mkdev.h> 231140266059SGregory Neil Shapiro # define __svr4__ 231240266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 231340266059SGregory Neil Shapiro # define HASFLOCK 0 231440266059SGregory Neil Shapiro # define _PATH_UNIX "/stand/unix" 231540266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 231640266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" 23175b0945b5SGregory Neil Shapiro # endif 231840266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 231940266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 23205b0945b5SGregory Neil Shapiro # endif 232140266059SGregory Neil Shapiro # endif /* __uxp__ */ 232240266059SGregory Neil Shapiro 232340266059SGregory Neil Shapiro /* 232440266059SGregory Neil Shapiro ** Pyramid DC/OSx 232540266059SGregory Neil Shapiro ** 232640266059SGregory Neil Shapiro ** From Earle Ake <akee@wpdiss1.wpafb.af.mil>. 232740266059SGregory Neil Shapiro */ 232840266059SGregory Neil Shapiro 232940266059SGregory Neil Shapiro # ifdef DCOSx 233040266059SGregory Neil Shapiro # define GIDSET_T gid_t 233140266059SGregory Neil Shapiro # ifndef IDENTPROTO 233240266059SGregory Neil Shapiro # define IDENTPROTO 0 /* TCP/IP implementation is broken */ 23335b0945b5SGregory Neil Shapiro # endif 233440266059SGregory Neil Shapiro # endif /* DCOSx */ 233540266059SGregory Neil Shapiro 233640266059SGregory Neil Shapiro /* 233740266059SGregory Neil Shapiro ** Concurrent Computer Corporation Maxion 233840266059SGregory Neil Shapiro ** 233940266059SGregory Neil Shapiro ** From Donald R. Laster Jr. <laster@access.digex.net>. 234040266059SGregory Neil Shapiro */ 234140266059SGregory Neil Shapiro 234240266059SGregory Neil Shapiro # ifdef __MAXION__ 234340266059SGregory Neil Shapiro 234440266059SGregory Neil Shapiro # include <sys/stream.h> 234540266059SGregory Neil Shapiro # define __svr4__ 1 /* SVR4.2MP */ 234640266059SGregory Neil Shapiro # define HASSETREUID 1 /* have setreuid(2) */ 234740266059SGregory Neil Shapiro # define HASLSTAT 1 /* have lstat(2) */ 234840266059SGregory Neil Shapiro # define HASSETRLIMIT 1 /* have setrlimit(2) */ 234940266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* have getdtablesize(2) */ 235040266059SGregory Neil Shapiro # define HASGETUSERSHELL 1 /* have getusershell(3) */ 235140266059SGregory Neil Shapiro # define NOFTRUNCATE 1 /* do not have ftruncate(2) */ 235240266059SGregory Neil Shapiro # define SLEEP_T unsigned 235340266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATVFS 235440266059SGregory Neil Shapiro # define SFS_BAVAIL f_bavail 235540266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 235640266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 256 /* Use 256 bytes */ 23575b0945b5SGregory Neil Shapiro # endif 235840266059SGregory Neil Shapiro 235940266059SGregory Neil Shapiro # undef WUNTRACED 236040266059SGregory Neil Shapiro # undef WIFEXITED 236140266059SGregory Neil Shapiro # undef WIFSIGNALED 236240266059SGregory Neil Shapiro # undef WIFSTOPPED 236340266059SGregory Neil Shapiro # undef WEXITSTATUS 236440266059SGregory Neil Shapiro # undef WTERMSIG 236540266059SGregory Neil Shapiro # undef WSTOPSIG 236640266059SGregory Neil Shapiro 236740266059SGregory Neil Shapiro # endif /* __MAXION__ */ 236840266059SGregory Neil Shapiro 236940266059SGregory Neil Shapiro /* 237040266059SGregory Neil Shapiro ** Harris Nighthawk PowerUX (nh6000 box) 237140266059SGregory Neil Shapiro ** 237240266059SGregory Neil Shapiro ** Contributed by Bob Miorelli, Pratt & Whitney <miorelli@pweh.com> 237340266059SGregory Neil Shapiro */ 237440266059SGregory Neil Shapiro 237540266059SGregory Neil Shapiro # ifdef _PowerUX 237640266059SGregory Neil Shapiro # ifndef __svr4__ 237740266059SGregory Neil Shapiro # define __svr4__ 23785b0945b5SGregory Neil Shapiro # endif 237940266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 238040266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" 23815b0945b5SGregory Neil Shapiro # endif 238240266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 238340266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" 23845b0945b5SGregory Neil Shapiro # endif 238540266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 238640266059SGregory Neil Shapiro # define LA_TYPE LA_ZERO 238740266059SGregory Neil Shapiro typedef struct msgb mblk_t; 238840266059SGregory Neil Shapiro # undef offsetof /* avoid stddefs.h and sys/sysmacros.h conflict */ 238940266059SGregory Neil Shapiro # endif /* _PowerUX */ 239040266059SGregory Neil Shapiro 239140266059SGregory Neil Shapiro /* 239240266059SGregory Neil Shapiro ** Siemens Nixdorf Informationssysteme AG SINIX 239340266059SGregory Neil Shapiro ** 239440266059SGregory Neil Shapiro ** Contributed by Gerald Rinske of Siemens Business Services VAS. 239540266059SGregory Neil Shapiro */ 239640266059SGregory Neil Shapiro # ifdef sinix 239740266059SGregory Neil Shapiro # define HASRANDOM 0 /* has random(3) */ 239840266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 239940266059SGregory Neil Shapiro # define SM_INT32 int /* 32bit integer */ 240040266059SGregory Neil Shapiro # endif /* sinix */ 240140266059SGregory Neil Shapiro 240240266059SGregory Neil Shapiro 240340266059SGregory Neil Shapiro /* 240440266059SGregory Neil Shapiro ** Motorola 922, MC88110, UNIX SYSTEM V/88 Release 4.0 Version 4.3 240540266059SGregory Neil Shapiro ** 240640266059SGregory Neil Shapiro ** Contributed by Sergey Rusanov <rsm@utfoms.udmnet.ru> 240740266059SGregory Neil Shapiro */ 240840266059SGregory Neil Shapiro 240940266059SGregory Neil Shapiro # ifdef MOTO 241040266059SGregory Neil Shapiro # define HASFCHMOD 1 241140266059SGregory Neil Shapiro # define HASSETRLIMIT 0 2412e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 241340266059SGregory Neil Shapiro # define HASSETREUID 1 241440266059SGregory Neil Shapiro # define HASULIMIT 1 241540266059SGregory Neil Shapiro # define HASWAITPID 1 241640266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 241740266059SGregory Neil Shapiro # define HASGETUSERSHELL 1 241840266059SGregory Neil Shapiro # define IP_SRCROUTE 0 241940266059SGregory Neil Shapiro # define IDENTPROTO 0 242040266059SGregory Neil Shapiro # define RES_DNSRCH_VARIABLE _res_dnsrch 242140266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 242240266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/etc/sendmail.cf" 242340266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/var/run/sendmail.pid" 242440266059SGregory Neil Shapiro # endif /* MOTO */ 242540266059SGregory Neil Shapiro 242613bd1963SGregory Neil Shapiro /* 242713bd1963SGregory Neil Shapiro ** Interix 242813bd1963SGregory Neil Shapiro ** Contributed by Nedelcho Stanev <nedelcho.stanev@atlanticsky.com> 242913bd1963SGregory Neil Shapiro ** 243013bd1963SGregory Neil Shapiro ** Used for Interix support. 243113bd1963SGregory Neil Shapiro */ 243213bd1963SGregory Neil Shapiro 243313bd1963SGregory Neil Shapiro # if defined(__INTERIX) 243413bd1963SGregory Neil Shapiro # define HASURANDOMDEV 1 243513bd1963SGregory Neil Shapiro # define HASGETUSERSHELL 0 243613bd1963SGregory Neil Shapiro # define HASSTRERROR 1 243713bd1963SGregory Neil Shapiro # define HASUNSETENV 1 243813bd1963SGregory Neil Shapiro # define HASFCHOWN 1 243913bd1963SGregory Neil Shapiro # undef HAVE_SYS_ERRLIST 244013bd1963SGregory Neil Shapiro # define sys_errlist __sys_errlist 244113bd1963SGregory Neil Shapiro # define sys_nerr __sys_nerr 2442e92d3f3fSGregory Neil Shapiro # include <sys/mkdev.h> 2443e92d3f3fSGregory Neil Shapiro # ifndef major 2444323f6dcbSGregory Neil Shapiro # define major(dev) ((int)(((dev) >> 8) & 0xff)) 24455b0945b5SGregory Neil Shapiro # endif 2446e92d3f3fSGregory Neil Shapiro # ifndef minor 2447323f6dcbSGregory Neil Shapiro # define minor(dev) ((int)((dev) & 0xff)) 24485b0945b5SGregory Neil Shapiro # endif 244913bd1963SGregory Neil Shapiro # endif /* defined(__INTERIX) */ 245013bd1963SGregory Neil Shapiro 245140266059SGregory Neil Shapiro 245240266059SGregory Neil Shapiro /********************************************************************** 245340266059SGregory Neil Shapiro ** End of Per-Operating System defines 245440266059SGregory Neil Shapiro **********************************************************************/ 245540266059SGregory Neil Shapiro /********************************************************************** 245640266059SGregory Neil Shapiro ** More general defines 245740266059SGregory Neil Shapiro **********************************************************************/ 245840266059SGregory Neil Shapiro 245940266059SGregory Neil Shapiro /* general BSD defines */ 246040266059SGregory Neil Shapiro # ifdef BSD 246140266059SGregory Neil Shapiro # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ 246240266059SGregory Neil Shapiro # ifndef HASSETREUID 246340266059SGregory Neil Shapiro # define HASSETREUID 1 /* has setreuid(2) call */ 24645b0945b5SGregory Neil Shapiro # endif 246540266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 246640266059SGregory Neil Shapiro # ifndef IP_SRCROUTE 246740266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* can check IP source routing */ 24685b0945b5SGregory Neil Shapiro # endif 246940266059SGregory Neil Shapiro # ifndef HASSETRLIMIT 247040266059SGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 24715b0945b5SGregory Neil Shapiro # endif 247240266059SGregory Neil Shapiro # ifndef HASFLOCK 247340266059SGregory Neil Shapiro # define HASFLOCK 1 /* has flock(2) call */ 24745b0945b5SGregory Neil Shapiro # endif 247540266059SGregory Neil Shapiro # ifndef TZ_TYPE 247640266059SGregory Neil Shapiro # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ 24775b0945b5SGregory Neil Shapiro # endif 247840266059SGregory Neil Shapiro # endif /* BSD */ 247940266059SGregory Neil Shapiro 248040266059SGregory Neil Shapiro /* general System V Release 4 defines */ 248140266059SGregory Neil Shapiro # ifdef __svr4__ 248240266059SGregory Neil Shapiro # define SYSTEM5 1 248340266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 248440266059SGregory Neil Shapiro # define HASINITGROUPS 1 /* has initgroups(3) call */ 248540266059SGregory Neil Shapiro # define BSD_COMP 1 /* get BSD ioctl calls */ 248640266059SGregory Neil Shapiro # ifndef HASSETRLIMIT 248740266059SGregory Neil Shapiro # define HASSETRLIMIT 1 /* has setrlimit(2) call */ 24885b0945b5SGregory Neil Shapiro # endif 248940266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 249040266059SGregory Neil Shapiro # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ 24915b0945b5SGregory Neil Shapiro # endif 249240266059SGregory Neil Shapiro # ifndef HASFCHMOD 249340266059SGregory Neil Shapiro # define HASFCHMOD 1 /* most (all?) SVr4s seem to have fchmod(2) */ 24945b0945b5SGregory Neil Shapiro # endif 249540266059SGregory Neil Shapiro 249640266059SGregory Neil Shapiro # ifndef _PATH_UNIX 249740266059SGregory Neil Shapiro # define _PATH_UNIX "/unix" 24985b0945b5SGregory Neil Shapiro # endif 249940266059SGregory Neil Shapiro # ifndef _PATH_VENDOR_CF 250040266059SGregory Neil Shapiro # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" 25015b0945b5SGregory Neil Shapiro # endif 250240266059SGregory Neil Shapiro # ifndef _PATH_SENDMAILPID 250340266059SGregory Neil Shapiro # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" 25045b0945b5SGregory Neil Shapiro # endif 250540266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 250640266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 128 25075b0945b5SGregory Neil Shapiro # endif 250840266059SGregory Neil Shapiro # ifndef SFS_TYPE 250940266059SGregory Neil Shapiro # define SFS_TYPE SFS_STATVFS 25105b0945b5SGregory Neil Shapiro # endif 251140266059SGregory Neil Shapiro 251240266059SGregory Neil Shapiro # ifndef USE_SIGLONGJMP 251340266059SGregory Neil Shapiro # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ 25145b0945b5SGregory Neil Shapiro # endif 251540266059SGregory Neil Shapiro # endif /* __svr4__ */ 251640266059SGregory Neil Shapiro 251740266059SGregory Neil Shapiro # ifdef __SVR4 251840266059SGregory Neil Shapiro # define LDA_USE_LOCKF 1 251940266059SGregory Neil Shapiro # define LDA_USE_SETEUID 1 252040266059SGregory Neil Shapiro # define _PATH_MAILDIR "/var/mail" 252140266059SGregory Neil Shapiro # endif /* __SVR4 */ 252240266059SGregory Neil Shapiro 252340266059SGregory Neil Shapiro /* general System V defines */ 252440266059SGregory Neil Shapiro # ifdef SYSTEM5 252540266059SGregory Neil Shapiro # include <sys/sysmacros.h> 252640266059SGregory Neil Shapiro # define HASUNAME 1 /* use System V uname(2) system call */ 252740266059SGregory Neil Shapiro # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ 252840266059SGregory Neil Shapiro # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ 252940266059SGregory Neil Shapiro # ifndef HASULIMIT 253040266059SGregory Neil Shapiro # define HASULIMIT 1 /* has the ulimit(2) syscall */ 25315b0945b5SGregory Neil Shapiro # endif 253240266059SGregory Neil Shapiro # ifndef LA_TYPE 253340266059SGregory Neil Shapiro # ifdef MIOC_READKSYM 253440266059SGregory Neil Shapiro # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ 25355b0945b5SGregory Neil Shapiro # else 253640266059SGregory Neil Shapiro # define LA_TYPE LA_INT /* assume integer load average */ 25375b0945b5SGregory Neil Shapiro # endif 253840266059SGregory Neil Shapiro # endif /* ! LA_TYPE */ 253940266059SGregory Neil Shapiro # ifndef SFS_TYPE 254040266059SGregory Neil Shapiro # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ 25415b0945b5SGregory Neil Shapiro # endif 254240266059SGregory Neil Shapiro # ifndef TZ_TYPE 254340266059SGregory Neil Shapiro # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ 25445b0945b5SGregory Neil Shapiro # endif 254540266059SGregory Neil Shapiro # endif /* SYSTEM5 */ 254640266059SGregory Neil Shapiro 254740266059SGregory Neil Shapiro /* general POSIX defines */ 254840266059SGregory Neil Shapiro # ifdef _POSIX_VERSION 2549e92d3f3fSGregory Neil Shapiro # define HASSETSID 1 /* has POSIX setsid(2) call */ 2550e92d3f3fSGregory Neil Shapiro # define HASWAITPID 1 /* has POSIX waitpid(2) call */ 255140266059SGregory Neil Shapiro # if _POSIX_VERSION >= 199500 && !defined(USESETEUID) 255240266059SGregory Neil Shapiro # define USESETEUID 1 /* has usable seteuid(2) call */ 255340266059SGregory Neil Shapiro # endif /* _POSIX_VERSION >= 199500 && !defined(USESETEUID) */ 255440266059SGregory Neil Shapiro # endif /* _POSIX_VERSION */ 255540266059SGregory Neil Shapiro /* 255640266059SGregory Neil Shapiro ** Tweaking for systems that (for example) claim to be BSD or POSIX 255740266059SGregory Neil Shapiro ** but don't have all the standard BSD or POSIX routines (boo hiss). 255840266059SGregory Neil Shapiro */ 255940266059SGregory Neil Shapiro 256040266059SGregory Neil Shapiro # ifdef titan 256140266059SGregory Neil Shapiro # undef HASINITGROUPS /* doesn't have initgroups(3) call */ 25625b0945b5SGregory Neil Shapiro # endif 256340266059SGregory Neil Shapiro 256440266059SGregory Neil Shapiro # ifdef _CRAYCOM 256540266059SGregory Neil Shapiro # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ 25665b0945b5SGregory Neil Shapiro # endif 256740266059SGregory Neil Shapiro 256840266059SGregory Neil Shapiro # ifdef MOTO 256940266059SGregory Neil Shapiro # undef USESETEUID 25705b0945b5SGregory Neil Shapiro # endif 257140266059SGregory Neil Shapiro 257240266059SGregory Neil Shapiro /* 257340266059SGregory Neil Shapiro ** Due to a "feature" in some operating systems such as Ultrix 4.3 and 257440266059SGregory Neil Shapiro ** HPUX 8.0, if you receive a "No route to host" message (ICMP message 257540266059SGregory Neil Shapiro ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host 257640266059SGregory Neil Shapiro ** are closed. Some firewalls return this error if you try to connect 257740266059SGregory Neil Shapiro ** to the IDENT port (113), so you can't receive email from these hosts 257840266059SGregory Neil Shapiro ** on these systems. The firewall really should use a more specific 257940266059SGregory Neil Shapiro ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _FILTER_PROHIB. If 258040266059SGregory Neil Shapiro ** not explicitly set to zero above, default it on. 258140266059SGregory Neil Shapiro */ 258240266059SGregory Neil Shapiro 258340266059SGregory Neil Shapiro # ifndef IDENTPROTO 258440266059SGregory Neil Shapiro # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ 25855b0945b5SGregory Neil Shapiro # endif 258640266059SGregory Neil Shapiro 258740266059SGregory Neil Shapiro # ifndef IP_SRCROUTE 258840266059SGregory Neil Shapiro # define IP_SRCROUTE 1 /* Detect IP source routing */ 25895b0945b5SGregory Neil Shapiro # endif 259040266059SGregory Neil Shapiro 259140266059SGregory Neil Shapiro # ifndef HASGETUSERSHELL 259240266059SGregory Neil Shapiro # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ 25935b0945b5SGregory Neil Shapiro # endif 259440266059SGregory Neil Shapiro 259540266059SGregory Neil Shapiro # ifndef NETUNIX 259640266059SGregory Neil Shapiro # define NETUNIX 1 /* include unix domain support */ 25975b0945b5SGregory Neil Shapiro # endif 259840266059SGregory Neil Shapiro 259940266059SGregory Neil Shapiro # ifndef HASRANDOM 260040266059SGregory Neil Shapiro # define HASRANDOM 1 /* has random(3) support */ 26015b0945b5SGregory Neil Shapiro # endif 260240266059SGregory Neil Shapiro 260340266059SGregory Neil Shapiro # ifndef HASFLOCK 260440266059SGregory Neil Shapiro # define HASFLOCK 0 /* assume no flock(2) support */ 26055b0945b5SGregory Neil Shapiro # endif 260640266059SGregory Neil Shapiro 260740266059SGregory Neil Shapiro # ifndef HASSETREUID 260840266059SGregory Neil Shapiro # define HASSETREUID 0 /* assume no setreuid(2) call */ 26095b0945b5SGregory Neil Shapiro # endif 261040266059SGregory Neil Shapiro 261140266059SGregory Neil Shapiro # ifndef HASFCHMOD 261240266059SGregory Neil Shapiro # define HASFCHMOD 0 /* assume no fchmod(2) syscall */ 26135b0945b5SGregory Neil Shapiro # endif 261440266059SGregory Neil Shapiro 261540266059SGregory Neil Shapiro # ifndef USESETEUID 261640266059SGregory Neil Shapiro # define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */ 26175b0945b5SGregory Neil Shapiro # endif 261840266059SGregory Neil Shapiro 261940266059SGregory Neil Shapiro # ifndef HASSETRLIMIT 262040266059SGregory Neil Shapiro # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ 26215b0945b5SGregory Neil Shapiro # endif 262240266059SGregory Neil Shapiro 262340266059SGregory Neil Shapiro # ifndef HASULIMIT 262440266059SGregory Neil Shapiro # define HASULIMIT 0 /* assume no ulimit(2) support */ 26255b0945b5SGregory Neil Shapiro # endif 262640266059SGregory Neil Shapiro 262740266059SGregory Neil Shapiro # ifndef SECUREWARE 262840266059SGregory Neil Shapiro # define SECUREWARE 0 /* assume no SecureWare C2 auditing hooks */ 26295b0945b5SGregory Neil Shapiro # endif 263040266059SGregory Neil Shapiro 263140266059SGregory Neil Shapiro # ifndef USE_DOUBLE_FORK 263240266059SGregory Neil Shapiro # define USE_DOUBLE_FORK 1 /* avoid intermediate zombies */ 26335b0945b5SGregory Neil Shapiro # endif 263440266059SGregory Neil Shapiro 263540266059SGregory Neil Shapiro # ifndef USE_ENVIRON 263640266059SGregory Neil Shapiro # define USE_ENVIRON 0 /* use main() envp instead of extern environ */ 26375b0945b5SGregory Neil Shapiro # endif 263840266059SGregory Neil Shapiro 263940266059SGregory Neil Shapiro # ifndef USE_SIGLONGJMP 264040266059SGregory Neil Shapiro # define USE_SIGLONGJMP 0 /* assume setjmp handles signals properly */ 26415b0945b5SGregory Neil Shapiro # endif 264240266059SGregory Neil Shapiro 264340266059SGregory Neil Shapiro # ifndef FDSET_CAST 264440266059SGregory Neil Shapiro # define FDSET_CAST /* (empty) cast for fd_set arg to select */ 26455b0945b5SGregory Neil Shapiro # endif 264640266059SGregory Neil Shapiro 264740266059SGregory Neil Shapiro /* 264840266059SGregory Neil Shapiro ** Pick a mailer setuid method for changing the current uid 264940266059SGregory Neil Shapiro */ 265040266059SGregory Neil Shapiro 265140266059SGregory Neil Shapiro # define USE_SETEUID 0 265240266059SGregory Neil Shapiro # define USE_SETREUID 1 265340266059SGregory Neil Shapiro # define USE_SETUID 2 265440266059SGregory Neil Shapiro 265540266059SGregory Neil Shapiro # if USESETEUID 265640266059SGregory Neil Shapiro # define MAILER_SETUID_METHOD USE_SETEUID 265740266059SGregory Neil Shapiro # else /* USESETEUID */ 265840266059SGregory Neil Shapiro # if HASSETREUID 265940266059SGregory Neil Shapiro # define MAILER_SETUID_METHOD USE_SETREUID 26605b0945b5SGregory Neil Shapiro # else 266140266059SGregory Neil Shapiro # define MAILER_SETUID_METHOD USE_SETUID 26625b0945b5SGregory Neil Shapiro # endif 266340266059SGregory Neil Shapiro # endif /* USESETEUID */ 266440266059SGregory Neil Shapiro 266540266059SGregory Neil Shapiro /* 266640266059SGregory Neil Shapiro ** If no type for argument two of getgroups call is defined, assume 266740266059SGregory Neil Shapiro ** it's an integer -- unfortunately, there seem to be several choices 266840266059SGregory Neil Shapiro ** here. 266940266059SGregory Neil Shapiro */ 267040266059SGregory Neil Shapiro 267140266059SGregory Neil Shapiro # ifndef GIDSET_T 267240266059SGregory Neil Shapiro # define GIDSET_T int 26735b0945b5SGregory Neil Shapiro # endif 267440266059SGregory Neil Shapiro 267540266059SGregory Neil Shapiro # ifndef UID_T 267640266059SGregory Neil Shapiro # define UID_T uid_t 26775b0945b5SGregory Neil Shapiro # endif 267840266059SGregory Neil Shapiro 267940266059SGregory Neil Shapiro # ifndef GID_T 268040266059SGregory Neil Shapiro # define GID_T gid_t 26815b0945b5SGregory Neil Shapiro # endif 268240266059SGregory Neil Shapiro 268340266059SGregory Neil Shapiro # ifndef MODE_T 268440266059SGregory Neil Shapiro # define MODE_T mode_t 26855b0945b5SGregory Neil Shapiro # endif 268640266059SGregory Neil Shapiro 268740266059SGregory Neil Shapiro # ifndef ARGV_T 268840266059SGregory Neil Shapiro # define ARGV_T char ** 26895b0945b5SGregory Neil Shapiro # endif 269040266059SGregory Neil Shapiro 269140266059SGregory Neil Shapiro # ifndef SOCKADDR_LEN_T 269240266059SGregory Neil Shapiro # define SOCKADDR_LEN_T int 26935b0945b5SGregory Neil Shapiro # endif 269440266059SGregory Neil Shapiro 269540266059SGregory Neil Shapiro # ifndef SOCKOPT_LEN_T 269640266059SGregory Neil Shapiro # define SOCKOPT_LEN_T int 26975b0945b5SGregory Neil Shapiro # endif 269840266059SGregory Neil Shapiro 269940266059SGregory Neil Shapiro # ifndef QUAD_T 270040266059SGregory Neil Shapiro # define QUAD_T unsigned long 27015b0945b5SGregory Neil Shapiro # endif 270240266059SGregory Neil Shapiro /********************************************************************** 270340266059SGregory Neil Shapiro ** Remaining definitions should never have to be changed. They are 270440266059SGregory Neil Shapiro ** primarily to provide back compatibility for older systems -- for 270540266059SGregory Neil Shapiro ** example, it includes some POSIX compatibility definitions 270640266059SGregory Neil Shapiro **********************************************************************/ 270740266059SGregory Neil Shapiro 270840266059SGregory Neil Shapiro /* System 5 compatibility */ 270940266059SGregory Neil Shapiro # ifndef S_ISREG 271040266059SGregory Neil Shapiro # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) 27115b0945b5SGregory Neil Shapiro # endif 271240266059SGregory Neil Shapiro # ifndef S_ISDIR 271340266059SGregory Neil Shapiro # define S_ISDIR(foo) ((foo & S_IFMT) == S_IFDIR) 27145b0945b5SGregory Neil Shapiro # endif 271540266059SGregory Neil Shapiro # if !defined(S_ISLNK) && defined(S_IFLNK) 271640266059SGregory Neil Shapiro # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) 27175b0945b5SGregory Neil Shapiro # endif 271840266059SGregory Neil Shapiro # if !defined(S_ISFIFO) 271940266059SGregory Neil Shapiro # if defined(S_IFIFO) 272040266059SGregory Neil Shapiro # define S_ISFIFO(foo) ((foo & S_IFMT) == S_IFIFO) 27215b0945b5SGregory Neil Shapiro # else 272240266059SGregory Neil Shapiro # define S_ISFIFO(foo) false 27235b0945b5SGregory Neil Shapiro # endif 272440266059SGregory Neil Shapiro # endif /* !defined(S_ISFIFO) */ 272540266059SGregory Neil Shapiro # ifndef S_IRUSR 272640266059SGregory Neil Shapiro # define S_IRUSR 0400 27275b0945b5SGregory Neil Shapiro # endif 272840266059SGregory Neil Shapiro # ifndef S_IWUSR 272940266059SGregory Neil Shapiro # define S_IWUSR 0200 27305b0945b5SGregory Neil Shapiro # endif 273140266059SGregory Neil Shapiro # ifndef S_IRGRP 273240266059SGregory Neil Shapiro # define S_IRGRP 0040 27335b0945b5SGregory Neil Shapiro # endif 273440266059SGregory Neil Shapiro # ifndef S_IWGRP 273540266059SGregory Neil Shapiro # define S_IWGRP 0020 27365b0945b5SGregory Neil Shapiro # endif 273740266059SGregory Neil Shapiro # ifndef S_IROTH 273840266059SGregory Neil Shapiro # define S_IROTH 0004 27395b0945b5SGregory Neil Shapiro # endif 274040266059SGregory Neil Shapiro # ifndef S_IWOTH 274140266059SGregory Neil Shapiro # define S_IWOTH 0002 27425b0945b5SGregory Neil Shapiro # endif 274340266059SGregory Neil Shapiro 274440266059SGregory Neil Shapiro /* close-on-exec flag */ 274540266059SGregory Neil Shapiro # ifndef FD_CLOEXEC 274640266059SGregory Neil Shapiro # define FD_CLOEXEC 1 27475b0945b5SGregory Neil Shapiro # endif 274840266059SGregory Neil Shapiro 274940266059SGregory Neil Shapiro /* 275040266059SGregory Neil Shapiro ** Older systems don't have this error code -- it should be in 275140266059SGregory Neil Shapiro ** /usr/include/sysexits.h. 275240266059SGregory Neil Shapiro */ 275340266059SGregory Neil Shapiro 275440266059SGregory Neil Shapiro # ifndef EX_CONFIG 275540266059SGregory Neil Shapiro # define EX_CONFIG 78 /* configuration error */ 27565b0945b5SGregory Neil Shapiro # endif 275740266059SGregory Neil Shapiro 275840266059SGregory Neil Shapiro /* pseudo-codes */ 275940266059SGregory Neil Shapiro # define EX_QUIT 22 /* drop out of server immediately */ 276040266059SGregory Neil Shapiro # define EX_RESTART 23 /* restart sendmail daemon */ 276140266059SGregory Neil Shapiro # define EX_SHUTDOWN 24 /* shutdown sendmail daemon */ 276240266059SGregory Neil Shapiro 276340266059SGregory Neil Shapiro #ifndef EX_NOTFOUND 276440266059SGregory Neil Shapiro # define EX_NOTFOUND EX_NOHOST 27655b0945b5SGregory Neil Shapiro #endif 276640266059SGregory Neil Shapiro 276740266059SGregory Neil Shapiro /* pseudo-code used for mci_setstat */ 2768e92d3f3fSGregory Neil Shapiro # define EX_NOTSTICKY (-5) /* don't save persistent status */ 276940266059SGregory Neil Shapiro 277040266059SGregory Neil Shapiro 277140266059SGregory Neil Shapiro /* 277240266059SGregory Neil Shapiro ** An "impossible" file mode to indicate that the file does not exist. 277340266059SGregory Neil Shapiro */ 277440266059SGregory Neil Shapiro 277540266059SGregory Neil Shapiro # define ST_MODE_NOFILE 0171147 /* unlikely to occur */ 277640266059SGregory Neil Shapiro 277740266059SGregory Neil Shapiro 277840266059SGregory Neil Shapiro /* type of arbitrary pointer */ 277940266059SGregory Neil Shapiro # ifndef ARBPTR_T 278040266059SGregory Neil Shapiro # define ARBPTR_T void * 27815b0945b5SGregory Neil Shapiro # endif 278240266059SGregory Neil Shapiro 278340266059SGregory Neil Shapiro # ifndef __P 278440266059SGregory Neil Shapiro # include "sm/cdefs.h" 27855b0945b5SGregory Neil Shapiro # endif 278640266059SGregory Neil Shapiro 278740266059SGregory Neil Shapiro # if HESIOD && !defined(NAMED_BIND) 278840266059SGregory Neil Shapiro # define NAMED_BIND 1 /* not one without the other */ 27895b0945b5SGregory Neil Shapiro # endif 279040266059SGregory Neil Shapiro 279140266059SGregory Neil Shapiro # if NAMED_BIND && !defined( __ksr__ ) && !defined( h_errno ) 279240266059SGregory Neil Shapiro extern int h_errno; 27935b0945b5SGregory Neil Shapiro # endif 279440266059SGregory Neil Shapiro 279540266059SGregory Neil Shapiro # if NEEDPUTENV 279640266059SGregory Neil Shapiro extern int putenv __P((char *)); 27975b0945b5SGregory Neil Shapiro # endif 279840266059SGregory Neil Shapiro 279940266059SGregory Neil Shapiro #if !HASUNSETENV 280040266059SGregory Neil Shapiro extern void unsetenv __P((char *)); 28015b0945b5SGregory Neil Shapiro #endif 280240266059SGregory Neil Shapiro 280340266059SGregory Neil Shapiro # ifdef LDAPMAP 280440266059SGregory Neil Shapiro # include <sys/time.h> 280540266059SGregory Neil Shapiro # include <lber.h> 280640266059SGregory Neil Shapiro # include <ldap.h> 280740266059SGregory Neil Shapiro 280840266059SGregory Neil Shapiro /* Some LDAP constants */ 280940266059SGregory Neil Shapiro # define LDAPMAP_FALSE 0 281040266059SGregory Neil Shapiro # define LDAPMAP_TRUE 1 281140266059SGregory Neil Shapiro 281240266059SGregory Neil Shapiro /* 281340266059SGregory Neil Shapiro ** ldap_init(3) is broken in Umich 3.x and OpenLDAP 1.0/1.1. 281440266059SGregory Neil Shapiro ** Use the lack of LDAP_OPT_SIZELIMIT to detect old API implementations 281540266059SGregory Neil Shapiro ** and assume (falsely) that all old API implementations are broken. 281640266059SGregory Neil Shapiro ** (OpenLDAP 1.2 and later have a working ldap_init(), add -DUSE_LDAP_INIT) 281740266059SGregory Neil Shapiro */ 281840266059SGregory Neil Shapiro 281940266059SGregory Neil Shapiro # if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_INIT) 282040266059SGregory Neil Shapiro # define USE_LDAP_INIT 1 28215b0945b5SGregory Neil Shapiro # endif 28225b0945b5SGregory Neil Shapiro 28235b0945b5SGregory Neil Shapiro # if !defined(LDAP_NETWORK_TIMEOUT) && defined(_FFR_LDAP_NETWORK_TIMEOUT) 28245b0945b5SGregory Neil Shapiro # define LDAP_NETWORK_TIMEOUT _FFR_LDAP_NETWORK_TIMEOUT 28255b0945b5SGregory Neil Shapiro # endif 28265b0945b5SGregory Neil Shapiro 28275b0945b5SGregory Neil Shapiro # if !defined(LDAP_NETWORK_TIMEOUT) && defined(LDAP_OPT_NETWORK_TIMEOUT) 28285b0945b5SGregory Neil Shapiro # define LDAP_NETWORK_TIMEOUT 1 28295b0945b5SGregory Neil Shapiro # endif 283040266059SGregory Neil Shapiro 283140266059SGregory Neil Shapiro /* 283240266059SGregory Neil Shapiro ** LDAP_OPT_SIZELIMIT is not defined under Umich 3.x nor OpenLDAP 1.x, 283340266059SGregory Neil Shapiro ** hence ldap_set_option() must not exist. 283440266059SGregory Neil Shapiro */ 283540266059SGregory Neil Shapiro 283640266059SGregory Neil Shapiro # if defined(LDAP_OPT_SIZELIMIT) && !defined(USE_LDAP_SET_OPTION) 283740266059SGregory Neil Shapiro # define USE_LDAP_SET_OPTION 1 28385b0945b5SGregory Neil Shapiro # endif 283940266059SGregory Neil Shapiro 284040266059SGregory Neil Shapiro # endif /* LDAPMAP */ 284140266059SGregory Neil Shapiro 284240266059SGregory Neil Shapiro # if HASUNAME 284340266059SGregory Neil Shapiro # include <sys/utsname.h> 284440266059SGregory Neil Shapiro # ifdef newstr 284540266059SGregory Neil Shapiro # undef newstr 28465b0945b5SGregory Neil Shapiro # endif 284740266059SGregory Neil Shapiro # else /* HASUNAME */ 284840266059SGregory Neil Shapiro # define NODE_LENGTH 32 284940266059SGregory Neil Shapiro struct utsname 285040266059SGregory Neil Shapiro { 285140266059SGregory Neil Shapiro char nodename[NODE_LENGTH + 1]; 285240266059SGregory Neil Shapiro }; 285340266059SGregory Neil Shapiro # endif /* HASUNAME */ 285440266059SGregory Neil Shapiro 285540266059SGregory Neil Shapiro # if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) 285640266059SGregory Neil Shapiro # define MAXHOSTNAMELEN 256 28575b0945b5SGregory Neil Shapiro # endif 285840266059SGregory Neil Shapiro 28599bd497b8SGregory Neil Shapiro 28605b0945b5SGregory Neil Shapiro # if defined(__linux__) && MAXHOSTNAMELEN < 255 28619bd497b8SGregory Neil Shapiro /* 28626f9c8e5bSGregory Neil Shapiro ** override Linux weirdness: a FQHN can be 255 chars long 28639bd497b8SGregory Neil Shapiro ** SUSv3 requires HOST_NAME_MAX ("Maximum length of a host 28649bd497b8SGregory Neil Shapiro ** name (not including the terminating null) as returned from the 28659bd497b8SGregory Neil Shapiro ** gethostname() function.") to be at least 255. c.f.: 28669bd497b8SGregory Neil Shapiro ** http://www.opengroup.org/onlinepubs/009695399 28679bd497b8SGregory Neil Shapiro ** but Linux defines that to 64 too. 28689bd497b8SGregory Neil Shapiro */ 28699bd497b8SGregory Neil Shapiro # undef MAXHOSTNAMELEN 28709bd497b8SGregory Neil Shapiro # define MAXHOSTNAMELEN 256 28715b0945b5SGregory Neil Shapiro # endif /* defined(__linux__) && MAXHOSTNAMELEN < 255 */ 28729bd497b8SGregory Neil Shapiro 287340266059SGregory Neil Shapiro # if !defined(SIGCHLD) && defined(SIGCLD) 287440266059SGregory Neil Shapiro # define SIGCHLD SIGCLD 28755b0945b5SGregory Neil Shapiro # endif 287640266059SGregory Neil Shapiro 287740266059SGregory Neil Shapiro # ifndef STDIN_FILENO 287840266059SGregory Neil Shapiro # define STDIN_FILENO 0 28795b0945b5SGregory Neil Shapiro # endif 288040266059SGregory Neil Shapiro 288140266059SGregory Neil Shapiro # ifndef STDOUT_FILENO 288240266059SGregory Neil Shapiro # define STDOUT_FILENO 1 28835b0945b5SGregory Neil Shapiro # endif 288440266059SGregory Neil Shapiro 288540266059SGregory Neil Shapiro # ifndef STDERR_FILENO 288640266059SGregory Neil Shapiro # define STDERR_FILENO 2 28875b0945b5SGregory Neil Shapiro # endif 288840266059SGregory Neil Shapiro 288940266059SGregory Neil Shapiro # ifndef LOCK_SH 289040266059SGregory Neil Shapiro # define LOCK_SH 0x01 /* shared lock */ 289140266059SGregory Neil Shapiro # define LOCK_EX 0x02 /* exclusive lock */ 289240266059SGregory Neil Shapiro # define LOCK_NB 0x04 /* non-blocking lock */ 289340266059SGregory Neil Shapiro # define LOCK_UN 0x08 /* unlock */ 289440266059SGregory Neil Shapiro # endif /* ! LOCK_SH */ 289540266059SGregory Neil Shapiro 289640266059SGregory Neil Shapiro # ifndef S_IXOTH 289740266059SGregory Neil Shapiro # define S_IXOTH (S_IEXEC >> 6) 28985b0945b5SGregory Neil Shapiro # endif 289940266059SGregory Neil Shapiro 290040266059SGregory Neil Shapiro # ifndef S_IXGRP 290140266059SGregory Neil Shapiro # define S_IXGRP (S_IEXEC >> 3) 29025b0945b5SGregory Neil Shapiro # endif 290340266059SGregory Neil Shapiro 290440266059SGregory Neil Shapiro # ifndef S_IXUSR 290540266059SGregory Neil Shapiro # define S_IXUSR (S_IEXEC) 29065b0945b5SGregory Neil Shapiro # endif 290740266059SGregory Neil Shapiro 290840266059SGregory Neil Shapiro #ifndef O_ACCMODE 290940266059SGregory Neil Shapiro # define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) 29105b0945b5SGregory Neil Shapiro #endif 291140266059SGregory Neil Shapiro 291240266059SGregory Neil Shapiro # ifndef SEEK_SET 291340266059SGregory Neil Shapiro # define SEEK_SET 0 291440266059SGregory Neil Shapiro # define SEEK_CUR 1 291540266059SGregory Neil Shapiro # define SEEK_END 2 291640266059SGregory Neil Shapiro # endif /* ! SEEK_SET */ 291740266059SGregory Neil Shapiro 291840266059SGregory Neil Shapiro # ifndef SIG_ERR 291940266059SGregory Neil Shapiro # define SIG_ERR ((void (*)()) -1) 29205b0945b5SGregory Neil Shapiro # endif 292140266059SGregory Neil Shapiro 292240266059SGregory Neil Shapiro # ifndef WEXITSTATUS 292340266059SGregory Neil Shapiro # define WEXITSTATUS(st) (((st) >> 8) & 0377) 29245b0945b5SGregory Neil Shapiro # endif 292540266059SGregory Neil Shapiro # ifndef WIFEXITED 292640266059SGregory Neil Shapiro # define WIFEXITED(st) (((st) & 0377) == 0) 29275b0945b5SGregory Neil Shapiro # endif 292840266059SGregory Neil Shapiro # ifndef WIFSTOPPED 292940266059SGregory Neil Shapiro # define WIFSTOPPED(st) (((st) & 0100) == 0) 29305b0945b5SGregory Neil Shapiro # endif 293140266059SGregory Neil Shapiro # ifndef WCOREDUMP 293240266059SGregory Neil Shapiro # define WCOREDUMP(st) (((st) & 0200) != 0) 29335b0945b5SGregory Neil Shapiro # endif 293440266059SGregory Neil Shapiro # ifndef WTERMSIG 293540266059SGregory Neil Shapiro # define WTERMSIG(st) (((st) & 0177)) 29365b0945b5SGregory Neil Shapiro # endif 293740266059SGregory Neil Shapiro 293840266059SGregory Neil Shapiro # ifndef SIGFUNC_DEFINED 293940266059SGregory Neil Shapiro typedef void (*sigfunc_t) __P((int)); 29405b0945b5SGregory Neil Shapiro # endif 294140266059SGregory Neil Shapiro # ifndef SIGFUNC_RETURN 294240266059SGregory Neil Shapiro # define SIGFUNC_RETURN 29435b0945b5SGregory Neil Shapiro # endif 294440266059SGregory Neil Shapiro # ifndef SIGFUNC_DECL 294540266059SGregory Neil Shapiro # define SIGFUNC_DECL void 29465b0945b5SGregory Neil Shapiro # endif 294740266059SGregory Neil Shapiro 294840266059SGregory Neil Shapiro /* size of syslog buffer */ 294940266059SGregory Neil Shapiro # ifndef SYSLOG_BUFSIZE 295040266059SGregory Neil Shapiro # define SYSLOG_BUFSIZE 1024 29515b0945b5SGregory Neil Shapiro # endif 295240266059SGregory Neil Shapiro 295313bd1963SGregory Neil Shapiro /* for FD_SET() */ 295413bd1963SGregory Neil Shapiro #ifndef FD_SETSIZE 295513bd1963SGregory Neil Shapiro # define FD_SETSIZE 256 29565b0945b5SGregory Neil Shapiro #endif 295713bd1963SGregory Neil Shapiro 2958da7d7b9cSGregory Neil Shapiro #ifndef SIGWAIT_TAKES_1_ARG 2959da7d7b9cSGregory Neil Shapiro # define SIGWAIT_TAKES_1_ARG 0 29605b0945b5SGregory Neil Shapiro #endif 2961da7d7b9cSGregory Neil Shapiro 296240266059SGregory Neil Shapiro /* 296340266059SGregory Neil Shapiro ** Size of prescan buffer. 296440266059SGregory Neil Shapiro ** Despite comments in the _sendmail_ book, this probably should 296540266059SGregory Neil Shapiro ** not be changed; there are some hard-to-define dependencies. 296640266059SGregory Neil Shapiro */ 296740266059SGregory Neil Shapiro 296840266059SGregory Neil Shapiro # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ 296940266059SGregory Neil Shapiro 297040266059SGregory Neil Shapiro /* fork routine -- set above using #ifdef _osname_ or in Makefile */ 297140266059SGregory Neil Shapiro # ifndef FORK 297240266059SGregory Neil Shapiro # define FORK fork /* function to call to fork mailer */ 29735b0945b5SGregory Neil Shapiro # endif 297440266059SGregory Neil Shapiro 297540266059SGregory Neil Shapiro /* setting h_errno */ 297640266059SGregory Neil Shapiro # ifndef SM_SET_H_ERRNO 297740266059SGregory Neil Shapiro # define SM_SET_H_ERRNO(err) h_errno = (err) 29785b0945b5SGregory Neil Shapiro # endif 297940266059SGregory Neil Shapiro 298040266059SGregory Neil Shapiro # ifndef SM_CONF_GETOPT 298140266059SGregory Neil Shapiro # define SM_CONF_GETOPT 1 29825b0945b5SGregory Neil Shapiro # endif 298340266059SGregory Neil Shapiro 298440266059SGregory Neil Shapiro /* random routine -- set above using #ifdef _osname_ or in Makefile */ 298540266059SGregory Neil Shapiro # if HASRANDOM 298640266059SGregory Neil Shapiro # define get_random() random() 298740266059SGregory Neil Shapiro # else /* HASRANDOM */ 298840266059SGregory Neil Shapiro # define get_random() ((long) rand()) 298940266059SGregory Neil Shapiro # ifndef RANDOMSHIFT 299040266059SGregory Neil Shapiro # define RANDOMSHIFT 8 29915b0945b5SGregory Neil Shapiro # endif 299240266059SGregory Neil Shapiro # endif /* HASRANDOM */ 299340266059SGregory Neil Shapiro 299440266059SGregory Neil Shapiro /* 299540266059SGregory Neil Shapiro ** Default to using scanf in readcf. 299640266059SGregory Neil Shapiro */ 299740266059SGregory Neil Shapiro 299840266059SGregory Neil Shapiro # ifndef SCANF 299940266059SGregory Neil Shapiro # define SCANF 1 30005b0945b5SGregory Neil Shapiro # endif 300140266059SGregory Neil Shapiro 300240266059SGregory Neil Shapiro /* XXX 32 bit type */ 300340266059SGregory Neil Shapiro # ifndef SM_INT32 300440266059SGregory Neil Shapiro # define SM_INT32 int32_t 30055b0945b5SGregory Neil Shapiro # endif 300640266059SGregory Neil Shapiro 30075dd76dd0SGregory Neil Shapiro /* XXX 16 bit type */ 30085dd76dd0SGregory Neil Shapiro # ifndef SM_UINT16 30095dd76dd0SGregory Neil Shapiro # define SM_UINT16 uint16_t 30105b0945b5SGregory Neil Shapiro # endif 30115dd76dd0SGregory Neil Shapiro 3012da7d7b9cSGregory Neil Shapiro /* additional valid chars in user/group names in passwd */ 3013da7d7b9cSGregory Neil Shapiro # ifndef SM_PWN_CHARS 3014da7d7b9cSGregory Neil Shapiro # define SM_PWN_CHARS "-_." 3015da7d7b9cSGregory Neil Shapiro # endif 3016da7d7b9cSGregory Neil Shapiro 3017da7d7b9cSGregory Neil Shapiro 301840266059SGregory Neil Shapiro /* 301940266059SGregory Neil Shapiro ** SVr4 and similar systems use different routines for setjmp/longjmp 302040266059SGregory Neil Shapiro ** with signal support 302140266059SGregory Neil Shapiro */ 302240266059SGregory Neil Shapiro 302340266059SGregory Neil Shapiro # if USE_SIGLONGJMP 302440266059SGregory Neil Shapiro # ifdef jmp_buf 302540266059SGregory Neil Shapiro # undef jmp_buf 30265b0945b5SGregory Neil Shapiro # endif 302740266059SGregory Neil Shapiro # define jmp_buf sigjmp_buf 302840266059SGregory Neil Shapiro # ifdef setjmp 302940266059SGregory Neil Shapiro # undef setjmp 30305b0945b5SGregory Neil Shapiro # endif 303140266059SGregory Neil Shapiro # define setjmp(env) sigsetjmp(env, 1) 303240266059SGregory Neil Shapiro # ifdef longjmp 303340266059SGregory Neil Shapiro # undef longjmp 30345b0945b5SGregory Neil Shapiro # endif 303540266059SGregory Neil Shapiro # define longjmp(env, val) siglongjmp(env, val) 303640266059SGregory Neil Shapiro # endif /* USE_SIGLONGJMP */ 303740266059SGregory Neil Shapiro 303840266059SGregory Neil Shapiro # if !defined(NGROUPS_MAX) && defined(NGROUPS) 303940266059SGregory Neil Shapiro # define NGROUPS_MAX NGROUPS /* POSIX naming convention */ 30405b0945b5SGregory Neil Shapiro # endif 304140266059SGregory Neil Shapiro 304240266059SGregory Neil Shapiro /* 304340266059SGregory Neil Shapiro ** Some snprintf() implementations are rumored not to NUL terminate. 304440266059SGregory Neil Shapiro */ 304540266059SGregory Neil Shapiro # if SNPRINTF_IS_BROKEN 304640266059SGregory Neil Shapiro # ifdef snprintf 304740266059SGregory Neil Shapiro # undef snprintf 30485b0945b5SGregory Neil Shapiro # endif 304940266059SGregory Neil Shapiro # define snprintf sm_snprintf 305040266059SGregory Neil Shapiro # ifdef vsnprintf 305140266059SGregory Neil Shapiro # undef vsnprintf 30525b0945b5SGregory Neil Shapiro # endif 305340266059SGregory Neil Shapiro # define vsnprintf sm_vsnprintf 305440266059SGregory Neil Shapiro # endif /* SNPRINTF_IS_BROKEN */ 305540266059SGregory Neil Shapiro 305640266059SGregory Neil Shapiro /* 305740266059SGregory Neil Shapiro ** If we don't have a system syslog, simulate it. 305840266059SGregory Neil Shapiro */ 305940266059SGregory Neil Shapiro 306040266059SGregory Neil Shapiro # if !LOG 306140266059SGregory Neil Shapiro # define LOG_EMERG 0 /* system is unusable */ 306240266059SGregory Neil Shapiro # define LOG_ALERT 1 /* action must be taken immediately */ 306340266059SGregory Neil Shapiro # define LOG_CRIT 2 /* critical conditions */ 306440266059SGregory Neil Shapiro # define LOG_ERR 3 /* error conditions */ 306540266059SGregory Neil Shapiro # define LOG_WARNING 4 /* warning conditions */ 306640266059SGregory Neil Shapiro # define LOG_NOTICE 5 /* normal but significant condition */ 306740266059SGregory Neil Shapiro # define LOG_INFO 6 /* informational */ 306840266059SGregory Neil Shapiro # define LOG_DEBUG 7 /* debug-level messages */ 306940266059SGregory Neil Shapiro # endif /* !LOG */ 307040266059SGregory Neil Shapiro 307140266059SGregory Neil Shapiro # ifndef SM_CONF_SYSLOG 307240266059SGregory Neil Shapiro # define SM_CONF_SYSLOG 1 /* syslog.h has prototype for syslog() */ 30735b0945b5SGregory Neil Shapiro # endif 307440266059SGregory Neil Shapiro 307540266059SGregory Neil Shapiro # if !SM_CONF_SYSLOG 307640266059SGregory Neil Shapiro # ifdef __STDC__ 307740266059SGregory Neil Shapiro extern void syslog(int, const char *, ...); 30785b0945b5SGregory Neil Shapiro # else 307940266059SGregory Neil Shapiro extern void syslog(); 30805b0945b5SGregory Neil Shapiro # endif 308140266059SGregory Neil Shapiro # endif /* !SM_CONF_SYSLOG */ 308240266059SGregory Neil Shapiro 308340266059SGregory Neil Shapiro /* portable(?) definition for alignment */ 308440266059SGregory Neil Shapiro # ifndef SM_ALIGN_SIZE 308540266059SGregory Neil Shapiro struct sm_align 308640266059SGregory Neil Shapiro { 308740266059SGregory Neil Shapiro char al_c; 308840266059SGregory Neil Shapiro union 308940266059SGregory Neil Shapiro { 309040266059SGregory Neil Shapiro long al_l; 309140266059SGregory Neil Shapiro void *al_p; 309240266059SGregory Neil Shapiro double al_d; 3093b6bacd31SGregory Neil Shapiro void (*al_f) __P((void)); 309440266059SGregory Neil Shapiro } al_u; 309540266059SGregory Neil Shapiro }; 309640266059SGregory Neil Shapiro # define SM_ALIGN_SIZE offsetof(struct sm_align, al_u) 309740266059SGregory Neil Shapiro # endif /* ! SM_ALIGN_SIZE */ 309840266059SGregory Neil Shapiro # define SM_ALIGN_BITS (SM_ALIGN_SIZE - 1) 309940266059SGregory Neil Shapiro 31005dd76dd0SGregory Neil Shapiro char *sm_inet6_ntop __P((const void *, char *, size_t)); 31015dd76dd0SGregory Neil Shapiro 310240266059SGregory Neil Shapiro #endif /* ! SM_CONF_H */ 3103