1 | /* |
---|
2 | * Copyright (c) 1998 Sendmail, Inc. All rights reserved. |
---|
3 | * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. |
---|
4 | * Copyright (c) 1988, 1993 |
---|
5 | * The Regents of the University of California. All rights reserved. |
---|
6 | * |
---|
7 | * By using this file, you agree to the terms and conditions set |
---|
8 | * forth in the LICENSE file which can be found at the top level of |
---|
9 | * the sendmail distribution. |
---|
10 | * |
---|
11 | * |
---|
12 | * @(#)conf.h 8.385 (Berkeley) 1/28/1999 |
---|
13 | */ |
---|
14 | |
---|
15 | /* |
---|
16 | ** CONF.H -- All user-configurable parameters for sendmail |
---|
17 | ** |
---|
18 | ** Send updates to sendmail@Sendmail.ORG so they will be |
---|
19 | ** included in the next release. |
---|
20 | */ |
---|
21 | |
---|
22 | #ifdef __GNUC__ |
---|
23 | struct rusage; /* forward declaration to get gcc to shut up in wait.h */ |
---|
24 | #endif |
---|
25 | |
---|
26 | # include <sys/param.h> |
---|
27 | # include <sys/types.h> |
---|
28 | # include <sys/stat.h> |
---|
29 | #ifndef __QNX__ |
---|
30 | /* in QNX this grabs bogus LOCK_* manifests */ |
---|
31 | # include <sys/file.h> |
---|
32 | #endif |
---|
33 | # include <sys/wait.h> |
---|
34 | # include <limits.h> |
---|
35 | # include <fcntl.h> |
---|
36 | # include <signal.h> |
---|
37 | # include <netdb.h> |
---|
38 | # include <pwd.h> |
---|
39 | |
---|
40 | /********************************************************************** |
---|
41 | ** Table sizes, etc.... |
---|
42 | ** There shouldn't be much need to change these.... |
---|
43 | **********************************************************************/ |
---|
44 | |
---|
45 | # define MAXLINE 2048 /* max line length */ |
---|
46 | # define MAXNAME 256 /* max length of a name */ |
---|
47 | # define MAXPV 40 /* max # of parms to mailers */ |
---|
48 | # define MAXATOM 200 /* max atoms per address */ |
---|
49 | # define MAXMAILERS 25 /* maximum mailers known to system */ |
---|
50 | # define MAXRWSETS 200 /* max # of sets of rewriting rules */ |
---|
51 | # define MAXPRIORITIES 25 /* max values for Precedence: field */ |
---|
52 | # define MAXMXHOSTS 100 /* max # of MX records for one host */ |
---|
53 | # define SMTPLINELIM 990 /* maximum SMTP line length */ |
---|
54 | # define MAXKEY 128 /* maximum size of a database key */ |
---|
55 | # define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ |
---|
56 | # define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ |
---|
57 | # define MAXALIASDB 12 /* max # of alias databases */ |
---|
58 | # define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ |
---|
59 | # define MAXTOCLASS 8 /* max # of message timeout classes */ |
---|
60 | # define MAXMIMEARGS 20 /* max args in Content-Type: */ |
---|
61 | # define MAXMIMENESTING 20 /* max MIME multipart nesting */ |
---|
62 | # define QUEUESEGSIZE 1000 /* increment for queue size */ |
---|
63 | # define MAXQFNAME 20 /* max qf file name length */ |
---|
64 | # define MACBUFSIZE 4096 /* max expanded macro buffer size */ |
---|
65 | # define TOBUFSIZE 512 /* max buffer to hold address list */ |
---|
66 | # define MAXSHORTSTR 203 /* max short string length */ |
---|
67 | # if _FFR_MAX_MIME_HEADER_LENGTH |
---|
68 | # define MAXMACNAMELEN 25 /* max macro name length */ |
---|
69 | # else |
---|
70 | # define MAXMACNAMELEN 20 /* max macro name length */ |
---|
71 | # endif |
---|
72 | # ifndef MAXHDRSLEN |
---|
73 | # define MAXHDRSLEN (32 * 1024) /* max size of message headers */ |
---|
74 | # endif |
---|
75 | |
---|
76 | /********************************************************************** |
---|
77 | ** Compilation options. |
---|
78 | ** #define these to 1 if they are available; |
---|
79 | ** #define them to 0 otherwise. |
---|
80 | ** All can be overridden from Makefile. |
---|
81 | **********************************************************************/ |
---|
82 | |
---|
83 | # ifndef NETINET |
---|
84 | # define NETINET 1 /* include internet support */ |
---|
85 | # endif |
---|
86 | |
---|
87 | # ifndef NETISO |
---|
88 | # define NETISO 0 /* do not include ISO socket support */ |
---|
89 | # endif |
---|
90 | |
---|
91 | # ifndef NAMED_BIND |
---|
92 | # define NAMED_BIND 1 /* use Berkeley Internet Domain Server */ |
---|
93 | # endif |
---|
94 | |
---|
95 | # ifndef XDEBUG |
---|
96 | # define XDEBUG 1 /* enable extended debugging */ |
---|
97 | # endif |
---|
98 | |
---|
99 | # ifndef MATCHGECOS |
---|
100 | # define MATCHGECOS 1 /* match user names from gecos field */ |
---|
101 | # endif |
---|
102 | |
---|
103 | # ifndef DSN |
---|
104 | # define DSN 1 /* include delivery status notification code */ |
---|
105 | # endif |
---|
106 | |
---|
107 | # if !defined(USERDB) && (defined(NEWDB) || defined(HESIOD)) |
---|
108 | # define USERDB 1 /* look in user database */ |
---|
109 | # endif |
---|
110 | |
---|
111 | # ifndef MIME8TO7 |
---|
112 | # define MIME8TO7 1 /* 8->7 bit MIME conversions */ |
---|
113 | # endif |
---|
114 | |
---|
115 | # ifndef MIME7TO8 |
---|
116 | # define MIME7TO8 1 /* 7->8 bit MIME conversions */ |
---|
117 | # endif |
---|
118 | |
---|
119 | /********************************************************************** |
---|
120 | ** "Hard" compilation options. |
---|
121 | ** #define these if they are available; comment them out otherwise. |
---|
122 | ** These cannot be overridden from the Makefile, and should really not |
---|
123 | ** be turned off unless absolutely necessary. |
---|
124 | **********************************************************************/ |
---|
125 | |
---|
126 | # define LOG 1 /* enable logging -- don't turn off */ |
---|
127 | |
---|
128 | /********************************************************************** |
---|
129 | ** End of site-specific configuration. |
---|
130 | **********************************************************************/ |
---|
131 | /* |
---|
132 | ** General "standard C" defines. |
---|
133 | ** |
---|
134 | ** These may be undone later, to cope with systems that claim to |
---|
135 | ** be Standard C but aren't. Gcc is the biggest offender -- it |
---|
136 | ** doesn't realize that the library is part of the language. |
---|
137 | ** |
---|
138 | ** Life would be much easier if we could get rid of this sort |
---|
139 | ** of bozo problems. |
---|
140 | */ |
---|
141 | |
---|
142 | #ifdef __STDC__ |
---|
143 | # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ |
---|
144 | #endif |
---|
145 | |
---|
146 | /* |
---|
147 | ** Assume you have standard calls; can be #undefed below if necessary. |
---|
148 | */ |
---|
149 | |
---|
150 | # define HASLSTAT 1 /* has lstat(2) call */ |
---|
151 | /********************************************************************** |
---|
152 | ** Operating system configuration. |
---|
153 | ** |
---|
154 | ** Unless you are porting to a new OS, you shouldn't have to |
---|
155 | ** change these. |
---|
156 | **********************************************************************/ |
---|
157 | |
---|
158 | /* |
---|
159 | ** HP-UX -- tested for 8.07, 9.00, and 9.01. |
---|
160 | ** |
---|
161 | ** If V4FS is defined, compile for HP-UX 10.0. |
---|
162 | ** 11.x support from Richard Allen <ra@hp.is>. |
---|
163 | */ |
---|
164 | |
---|
165 | #ifdef __hpux |
---|
166 | /* common definitions for HP-UX 9.x and 10.x */ |
---|
167 | # undef m_flags /* conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h on HP 300 */ |
---|
168 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
169 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
170 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
171 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
172 | # define BOGUS_O_EXCL 1 /* exclusive open follows symlinks */ |
---|
173 | # define seteuid(e) setresuid(-1, e, -1) |
---|
174 | # define IP_SRCROUTE 1 /* can check IP source routing */ |
---|
175 | # define LA_TYPE LA_HPUX |
---|
176 | # define SPT_TYPE SPT_PSTAT |
---|
177 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
178 | # define GIDSET_T gid_t |
---|
179 | # ifndef HASGETUSERSHELL |
---|
180 | # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ |
---|
181 | # endif |
---|
182 | # ifndef HPUX11 |
---|
183 | # define syslog hard_syslog |
---|
184 | # endif |
---|
185 | # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ |
---|
186 | |
---|
187 | # ifdef V4FS |
---|
188 | /* HP-UX 10.x */ |
---|
189 | # define _PATH_UNIX "/stand/vmunix" |
---|
190 | # ifndef _PATH_VENDOR_CF |
---|
191 | # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" |
---|
192 | # endif |
---|
193 | # ifndef _PATH_SENDMAILPID |
---|
194 | # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" |
---|
195 | # endif |
---|
196 | # ifndef IDENTPROTO |
---|
197 | # define IDENTPROTO 1 /* TCP/IP implementation fixed in 10.0 */ |
---|
198 | # endif |
---|
199 | |
---|
200 | # else |
---|
201 | /* HP-UX 9.x */ |
---|
202 | # define _PATH_UNIX "/hp-ux" |
---|
203 | # ifndef _PATH_VENDOR_CF |
---|
204 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
205 | # endif |
---|
206 | # ifndef IDENTPROTO |
---|
207 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
208 | # endif |
---|
209 | # ifdef __STDC__ |
---|
210 | extern void hard_syslog(int, char *, ...); |
---|
211 | # else |
---|
212 | extern void hard_syslog(); |
---|
213 | # endif |
---|
214 | # define FDSET_CAST (int *) /* cast for fd_set parameters to select */ |
---|
215 | # endif |
---|
216 | |
---|
217 | #endif |
---|
218 | |
---|
219 | |
---|
220 | /* |
---|
221 | ** IBM AIX 4.x |
---|
222 | */ |
---|
223 | |
---|
224 | #ifdef _AIX4 |
---|
225 | # define _AIX3 1 /* pull in AIX3 stuff */ |
---|
226 | # define USESETEUID 1 /* seteuid(2) works */ |
---|
227 | # define TZ_TYPE TZ_NAME /* use tzname[] vector */ |
---|
228 | # define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ |
---|
229 | # if _AIX4 >= 40200 |
---|
230 | # define HASSETREUID 1 /* setreuid(2) works as of AIX 4.2 */ |
---|
231 | # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ |
---|
232 | # endif |
---|
233 | # if defined(_ILS_MACROS) /* IBM versions aren't side-effect clean */ |
---|
234 | # undef isascii |
---|
235 | # define isascii(c) !(c & ~0177) |
---|
236 | # undef isdigit |
---|
237 | # define isdigit(__a) (_IS(__a,_ISDIGIT)) |
---|
238 | # undef isspace |
---|
239 | # define isspace(__a) (_IS(__a,_ISSPACE)) |
---|
240 | # endif |
---|
241 | #endif |
---|
242 | |
---|
243 | |
---|
244 | /* |
---|
245 | ** IBM AIX 3.x -- actually tested for 3.2.3 |
---|
246 | */ |
---|
247 | |
---|
248 | #ifdef _AIX3 |
---|
249 | # include <paths.h> |
---|
250 | # include <sys/machine.h> /* to get byte order */ |
---|
251 | # include <sys/select.h> |
---|
252 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
253 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
254 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
255 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
256 | # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ |
---|
257 | # define GIDSET_T gid_t |
---|
258 | # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ |
---|
259 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
260 | # define LA_TYPE LA_INT |
---|
261 | # define FSHIFT 16 |
---|
262 | # define LA_AVENRUN "avenrun" |
---|
263 | #endif |
---|
264 | |
---|
265 | |
---|
266 | /* |
---|
267 | ** IBM AIX 2.2.1 -- actually tested for osupdate level 2706+1773 |
---|
268 | ** |
---|
269 | ** From Mark Whetzel <markw@wg.waii.com>. |
---|
270 | */ |
---|
271 | |
---|
272 | #ifdef AIX /* AIX/RT compiler pre-defines this */ |
---|
273 | # include <paths.h> |
---|
274 | # include <sys/time.h> /* AIX/RT resource.h does NOT include this */ |
---|
275 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
276 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
277 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
278 | # define HASFCHMOD 0 /* does not have fchmod(2) syscall */ |
---|
279 | # define HASSETREUID 1 /* use setreuid(2) -lbsd system call */ |
---|
280 | # define HASSETVBUF 1 /* use setvbuf(2) system call */ |
---|
281 | # define HASSETRLIMIT 0 /* does not have setrlimit call */ |
---|
282 | # define HASFLOCK 0 /* does not have flock call - use fcntl */ |
---|
283 | # define HASULIMIT 1 /* use ulimit instead of setrlimit call */ |
---|
284 | # define NEEDGETOPT 1 /* Do we need theirs or ours */ |
---|
285 | # define SYS5SETPGRP 1 /* don't have setpgid on AIX/RT */ |
---|
286 | # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ |
---|
287 | # define BSD4_3 1 /* NOT bsd 4.4 or posix signals */ |
---|
288 | # define GIDSET_T int |
---|
289 | # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ |
---|
290 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
291 | # define LA_TYPE LA_SUBR /* use our ported loadavgd daemon */ |
---|
292 | # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ |
---|
293 | # define ARBPTR_T int * |
---|
294 | # define void int |
---|
295 | typedef int pid_t; |
---|
296 | /* RTisms for BSD compatibility, specified in the Makefile |
---|
297 | define BSD 1 |
---|
298 | define BSD_INCLUDES 1 |
---|
299 | define BSD_REMAP_SIGNAL_TO_SIGVEC |
---|
300 | RTisms needed above */ |
---|
301 | /* make this sendmail in a completely different place */ |
---|
302 | # ifndef _PATH_VENDOR_CF |
---|
303 | # define _PATH_VENDOR_CF "/usr/local/newmail/sendmail.cf" |
---|
304 | # endif |
---|
305 | # ifndef _PATH_SENDMAILPID |
---|
306 | # define _PATH_SENDMAILPID "/usr/local/newmail/sendmail.pid" |
---|
307 | # endif |
---|
308 | #endif |
---|
309 | |
---|
310 | |
---|
311 | /* |
---|
312 | ** Silicon Graphics IRIX |
---|
313 | ** |
---|
314 | ** Compiles on 4.0.1. |
---|
315 | ** |
---|
316 | ** Use IRIX64 instead of IRIX for 64-bit IRIX (6.0). |
---|
317 | ** Use IRIX5 instead of IRIX for IRIX 5.x. |
---|
318 | ** |
---|
319 | ** This version tries to be adaptive using _MIPS_SIM: |
---|
320 | ** _MIPS_SIM == _ABIO32 (= 1) Abi: -32 on IRIX 6.2 |
---|
321 | ** _MIPS_SIM == _ABIN32 (= 2) Abi: -n32 on IRIX 6.2 |
---|
322 | ** _MIPS_SIM == _ABI64 (= 3) Abi: -64 on IRIX 6.2 |
---|
323 | ** |
---|
324 | ** _MIPS_SIM is 1 also on IRIX 5.3 |
---|
325 | ** |
---|
326 | ** IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>. |
---|
327 | ** IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. |
---|
328 | ** Adaptive changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>. |
---|
329 | */ |
---|
330 | |
---|
331 | #if defined(__sgi) |
---|
332 | # ifndef IRIX |
---|
333 | # define IRIX |
---|
334 | # endif |
---|
335 | # if _MIPS_SIM > 0 && !defined(IRIX5) |
---|
336 | # define IRIX5 /* IRIX5 or IRIX6 */ |
---|
337 | # endif |
---|
338 | # if _MIPS_SIM > 1 && !defined(IRIX6) && !defined(IRIX64) |
---|
339 | # define IRIX6 /* IRIX6 */ |
---|
340 | # endif |
---|
341 | |
---|
342 | #endif |
---|
343 | |
---|
344 | #ifdef IRIX |
---|
345 | # define SYSTEM5 1 /* this is a System-V derived system */ |
---|
346 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
347 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
348 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
349 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
350 | # define IP_SRCROUTE 1 /* can check IP source routing */ |
---|
351 | # define setpgid BSDsetpgrp |
---|
352 | # define GIDSET_T gid_t |
---|
353 | # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ |
---|
354 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
355 | # define SYSLOG_BUFSIZE 512 |
---|
356 | # ifdef IRIX6 |
---|
357 | # define STAT64 1 |
---|
358 | # define QUAD_T unsigned long long |
---|
359 | # define LA_TYPE LA_IRIX6 /* figure out at run time */ |
---|
360 | # define SAFENFSPATHCONF 0 /* pathconf(2) lies on NFS filesystems */ |
---|
361 | # else |
---|
362 | # define LA_TYPE LA_INT |
---|
363 | |
---|
364 | # ifdef IRIX64 |
---|
365 | # define STAT64 1 |
---|
366 | # define QUAD_T unsigned long long |
---|
367 | # define NAMELISTMASK 0x7fffffffffffffff /* mask for nlist() values */ |
---|
368 | # else |
---|
369 | # define STAT64 0 |
---|
370 | # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ |
---|
371 | # endif |
---|
372 | # endif |
---|
373 | # if defined(IRIX64) || defined(IRIX5) || defined(IRIX6) |
---|
374 | # include <sys/cdefs.h> |
---|
375 | # include <paths.h> |
---|
376 | # define ARGV_T char *const * |
---|
377 | # define HASSETRLIMIT 1 /* has setrlimit(2) syscall */ |
---|
378 | # define HASGETDTABLESIZE 1 /* has getdtablesize(2) syscall */ |
---|
379 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
380 | # else |
---|
381 | # define ARGV_T const char ** |
---|
382 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
383 | # endif |
---|
384 | #endif |
---|
385 | |
---|
386 | |
---|
387 | /* |
---|
388 | ** SunOS and Solaris |
---|
389 | ** |
---|
390 | ** Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and |
---|
391 | ** Solaris 2.4 (a.k.a. SunOS 5.4). |
---|
392 | */ |
---|
393 | |
---|
394 | #if defined(sun) && !defined(BSD) |
---|
395 | |
---|
396 | # include <sys/time.h> |
---|
397 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
398 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
399 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
400 | # define IP_SRCROUTE 1 /* can check IP source routing */ |
---|
401 | # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ |
---|
402 | |
---|
403 | # ifdef SOLARIS_2_3 |
---|
404 | # define SOLARIS 20300 /* for back compat only -- use -DSOLARIS=20300 */ |
---|
405 | # endif |
---|
406 | |
---|
407 | # if defined(NOT_SENDMAIL) && !defined(SOLARIS) && defined(sun) && (defined(__svr4__) || defined(__SVR4)) |
---|
408 | # define SOLARIS 1 /* unknown Solaris version */ |
---|
409 | # endif |
---|
410 | |
---|
411 | # ifdef SOLARIS |
---|
412 | /* Solaris 2.x (a.k.a. SunOS 5.x) */ |
---|
413 | # ifndef __svr4__ |
---|
414 | # define __svr4__ /* use all System V Releae 4 defines below */ |
---|
415 | # endif |
---|
416 | # define GIDSET_T gid_t |
---|
417 | # define USE_SA_SIGACTION 1 /* use sa_sigaction field */ |
---|
418 | # ifndef _PATH_UNIX |
---|
419 | # define _PATH_UNIX "/dev/ksyms" |
---|
420 | # endif |
---|
421 | # ifndef _PATH_VENDOR_CF |
---|
422 | # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" |
---|
423 | # endif |
---|
424 | # ifndef _PATH_SENDMAILPID |
---|
425 | # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" |
---|
426 | # endif |
---|
427 | # ifndef _PATH_HOSTS |
---|
428 | # define _PATH_HOSTS "/etc/inet/hosts" |
---|
429 | # endif |
---|
430 | # ifndef SYSLOG_BUFSIZE |
---|
431 | # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ |
---|
432 | # endif |
---|
433 | # ifndef TZ_TYPE |
---|
434 | # define TZ_TYPE TZ_TZNAME |
---|
435 | # endif |
---|
436 | # if SOLARIS >= 20300 || (SOLARIS < 10000 && SOLARIS >= 203) |
---|
437 | # define USESETEUID 1 /* seteuid works as of 2.3 */ |
---|
438 | # endif |
---|
439 | # if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) |
---|
440 | # define HASSETREUID 1 /* setreuid works as of 2.5 */ |
---|
441 | # if SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700) |
---|
442 | # ifndef LA_TYPE |
---|
443 | # define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */ |
---|
444 | # endif |
---|
445 | # endif |
---|
446 | # endif |
---|
447 | # if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) |
---|
448 | # define HASSNPRINTF 1 /* has snprintf starting in 2.6 */ |
---|
449 | # endif |
---|
450 | # if SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) |
---|
451 | # ifndef LA_TYPE |
---|
452 | # define LA_TYPE LA_SUBR /* getloadavg(3c) appears in 2.7 */ |
---|
453 | # endif |
---|
454 | # define HASGETUSERSHELL 1 /* getusershell(3c) bug fixed in 2.7 */ |
---|
455 | # endif |
---|
456 | # ifndef HASGETUSERSHELL |
---|
457 | # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ |
---|
458 | # endif |
---|
459 | |
---|
460 | # else |
---|
461 | /* SunOS 4.0.3 or 4.1.x */ |
---|
462 | # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ |
---|
463 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
464 | # ifndef HASFLOCK |
---|
465 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
466 | # endif |
---|
467 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
468 | # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */ |
---|
469 | # include <memory.h> |
---|
470 | # include <vfork.h> |
---|
471 | # ifdef __GNUC__ |
---|
472 | # define strtoul strtol /* gcc library bogosity */ |
---|
473 | # endif |
---|
474 | |
---|
475 | # ifdef SUNOS403 |
---|
476 | /* special tweaking for SunOS 4.0.3 */ |
---|
477 | # include <malloc.h> |
---|
478 | # define BSD4_3 1 /* 4.3 BSD-based */ |
---|
479 | # define NEEDSTRSTR 1 /* need emulation of strstr(3) routine */ |
---|
480 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
481 | # undef WIFEXITED |
---|
482 | # undef WEXITSTATUS |
---|
483 | # undef HASUNAME |
---|
484 | # define setpgid setpgrp |
---|
485 | # define MODE_T int |
---|
486 | typedef int pid_t; |
---|
487 | extern char *getenv(); |
---|
488 | |
---|
489 | # else |
---|
490 | /* 4.1.x specifics */ |
---|
491 | # define HASSETSID 1 /* has Posix setsid(2) call */ |
---|
492 | # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ |
---|
493 | |
---|
494 | # endif |
---|
495 | # endif |
---|
496 | |
---|
497 | # ifndef LA_TYPE |
---|
498 | # define LA_TYPE LA_INT |
---|
499 | # endif |
---|
500 | |
---|
501 | #endif /* sun && !BSD */ |
---|
502 | |
---|
503 | /* |
---|
504 | ** DG/UX |
---|
505 | ** |
---|
506 | ** Tested on 5.4.2 and 5.4.3. Use DGUX_5_4_2 to get the |
---|
507 | ** older support. |
---|
508 | ** 5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>. |
---|
509 | */ |
---|
510 | |
---|
511 | #ifdef DGUX_5_4_2 |
---|
512 | # define DGUX 1 |
---|
513 | #endif |
---|
514 | |
---|
515 | #ifdef DGUX |
---|
516 | # define SYSTEM5 1 |
---|
517 | # define LA_TYPE LA_DGUX |
---|
518 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
519 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
520 | # define HASSETSID 1 /* has Posix setsid(2) call */ |
---|
521 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
522 | # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */ |
---|
523 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) */ |
---|
524 | # define HASSNPRINTF 1 /* has snprintf(3) */ |
---|
525 | # ifndef IDENTPROTO |
---|
526 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
527 | # endif |
---|
528 | # define SPT_TYPE SPT_NONE /* don't use setproctitle */ |
---|
529 | # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ |
---|
530 | |
---|
531 | /* these include files must be included early on DG/UX */ |
---|
532 | # include <netinet/in.h> |
---|
533 | # include <arpa/inet.h> |
---|
534 | |
---|
535 | /* compiler doesn't understand const? */ |
---|
536 | # define const |
---|
537 | |
---|
538 | # ifdef DGUX_5_4_2 |
---|
539 | # define inet_addr dgux_inet_addr |
---|
540 | extern long dgux_inet_addr(); |
---|
541 | # endif |
---|
542 | #endif |
---|
543 | |
---|
544 | |
---|
545 | /* |
---|
546 | ** Digital Ultrix 4.2A or 4.3 |
---|
547 | ** |
---|
548 | ** Apparently, fcntl locking is broken on 4.2A, in that locks are |
---|
549 | ** not dropped when the process exits. This causes major problems, |
---|
550 | ** so flock is the only alternative. |
---|
551 | */ |
---|
552 | |
---|
553 | #ifdef ultrix |
---|
554 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
555 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
556 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
557 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
558 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
559 | # ifndef HASFLOCK |
---|
560 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
561 | # endif |
---|
562 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
563 | # ifndef BROKEN_RES_SEARCH |
---|
564 | # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ |
---|
565 | # endif |
---|
566 | # ifdef vax |
---|
567 | # define LA_TYPE LA_FLOAT |
---|
568 | # else |
---|
569 | # define LA_TYPE LA_INT |
---|
570 | # define LA_AVENRUN "avenrun" |
---|
571 | # endif |
---|
572 | # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ |
---|
573 | # ifndef IDENTPROTO |
---|
574 | # define IDENTPROTO 0 /* pre-4.4 TCP/IP implementation is broken */ |
---|
575 | # endif |
---|
576 | # define SYSLOG_BUFSIZE 256 |
---|
577 | #endif |
---|
578 | |
---|
579 | |
---|
580 | /* |
---|
581 | ** OSF/1 for KSR. |
---|
582 | ** |
---|
583 | ** Contributed by Todd C. Miller <Todd.Miller@cs.colorado.edu> |
---|
584 | */ |
---|
585 | |
---|
586 | #ifdef __ksr__ |
---|
587 | # define __osf__ 1 /* get OSF/1 defines below */ |
---|
588 | # ifndef TZ_TYPE |
---|
589 | # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ |
---|
590 | # endif |
---|
591 | #endif |
---|
592 | |
---|
593 | |
---|
594 | /* |
---|
595 | ** OSF/1 for Intel Paragon. |
---|
596 | ** |
---|
597 | ** Contributed by Jeff A. Earickson <jeff@ssd.intel.com> |
---|
598 | ** of Intel Scalable Systems Divison. |
---|
599 | */ |
---|
600 | |
---|
601 | #ifdef __PARAGON__ |
---|
602 | # define __osf__ 1 /* get OSF/1 defines below */ |
---|
603 | # ifndef TZ_TYPE |
---|
604 | # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ |
---|
605 | # endif |
---|
606 | # define GIDSET_T gid_t |
---|
607 | # define MAXNAMLEN NAME_MAX |
---|
608 | #endif |
---|
609 | |
---|
610 | |
---|
611 | /* |
---|
612 | ** OSF/1 (tested on Alpha) -- now known as Digital UNIX. |
---|
613 | ** |
---|
614 | ** Tested for 3.2 and 4.0. |
---|
615 | */ |
---|
616 | |
---|
617 | #ifdef __osf__ |
---|
618 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
619 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
620 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
621 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
622 | # define IP_SRCROUTE 1 /* can check IP source routing */ |
---|
623 | # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ |
---|
624 | # ifndef HASFLOCK |
---|
625 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
626 | # endif |
---|
627 | # define LA_TYPE LA_ALPHAOSF |
---|
628 | # define SFS_TYPE SFS_STATVFS /* use <sys/statvfs.h> statfs() impl */ |
---|
629 | # ifndef _PATH_VENDOR_CF |
---|
630 | # define _PATH_VENDOR_CF "/var/adm/sendmail/sendmail.cf" |
---|
631 | # endif |
---|
632 | # ifndef _PATH_SENDMAILPID |
---|
633 | # define _PATH_SENDMAILPID "/var/run/sendmail.pid" |
---|
634 | # endif |
---|
635 | # define bcopy(s, d, l) (memmove((d), (s), (l))) |
---|
636 | # define bzero(d, l) (memset((d), '\0', (l))) |
---|
637 | # define bcmp(s, d, l) (memcmp((s), (d), (l))) |
---|
638 | #endif |
---|
639 | |
---|
640 | |
---|
641 | /* |
---|
642 | ** NeXTstep |
---|
643 | */ |
---|
644 | |
---|
645 | #ifdef NeXT |
---|
646 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
647 | # define NEEDPUTENV 2 /* need putenv(3) call; no setenv(3) call */ |
---|
648 | # ifndef HASFLOCK |
---|
649 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
650 | # endif |
---|
651 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
652 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
653 | # define UID_T int /* compiler gripes on uid_t */ |
---|
654 | # define GID_T int /* ditto for gid_t */ |
---|
655 | # define MODE_T int /* and mode_t */ |
---|
656 | # define setpgid setpgrp |
---|
657 | # ifndef NOT_SENDMAIL |
---|
658 | # define sleep sleepX |
---|
659 | # endif |
---|
660 | # ifndef LA_TYPE |
---|
661 | # define LA_TYPE LA_MACH |
---|
662 | # endif |
---|
663 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
664 | # ifndef _POSIX_SOURCE |
---|
665 | typedef int pid_t; |
---|
666 | # undef WEXITSTATUS |
---|
667 | # undef WIFEXITED |
---|
668 | # endif |
---|
669 | # ifndef _PATH_VENDOR_CF |
---|
670 | # define _PATH_VENDOR_CF "/etc/sendmail/sendmail.cf" |
---|
671 | # endif |
---|
672 | # ifndef _PATH_SENDMAILPID |
---|
673 | # define _PATH_SENDMAILPID "/etc/sendmail/sendmail.pid" |
---|
674 | # endif |
---|
675 | |
---|
676 | # ifdef TCPWRAPPERS |
---|
677 | # ifndef HASUNSETENV |
---|
678 | # define HASUNSETENV 1 |
---|
679 | # endif |
---|
680 | # undef NEEDPUTENV |
---|
681 | # endif |
---|
682 | |
---|
683 | #endif |
---|
684 | |
---|
685 | /* |
---|
686 | ** Apple Rhapsody |
---|
687 | ** Contributed by Wilfredo Sanchez <wsanchez@apple.com> |
---|
688 | */ |
---|
689 | |
---|
690 | #ifdef __APPLE__ |
---|
691 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
692 | # define HASFLOCK 1 /* has flock(2) syscall */ |
---|
693 | # define HASUNAME 1 /* has uname(2) syscall */ |
---|
694 | # define HASUNSETENV 1 |
---|
695 | # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ |
---|
696 | # define HASINITGROUPS 1 |
---|
697 | # define HASSETVBUF 1 |
---|
698 | # define HASSETREUID 1 |
---|
699 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
700 | # define HASLSTAT 1 |
---|
701 | # define HASSETRLIMIT 1 |
---|
702 | # define HASWAITPID 1 |
---|
703 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
704 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
705 | # define USESTRERROR 1 /* has strerror(3) */ |
---|
706 | # define HASGETDTABLESIZE 1 |
---|
707 | # define HASGETUSERSHELL 1 |
---|
708 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
709 | # define BSD4_4_SOCKADDR /* has sa_len */ |
---|
710 | # define NETLINK 1 /* supports AF_LINK */ |
---|
711 | # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ |
---|
712 | # define GIDSET_T gid_t |
---|
713 | # define LA_TYPE LA_SUBR /* use getloadavg(3) */ |
---|
714 | # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ |
---|
715 | # define SPT_TYPE SPT_PSSTRINGS |
---|
716 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
717 | # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ |
---|
718 | #endif |
---|
719 | |
---|
720 | |
---|
721 | /* |
---|
722 | ** 4.4 BSD |
---|
723 | ** |
---|
724 | ** See also BSD defines. |
---|
725 | */ |
---|
726 | |
---|
727 | #if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) |
---|
728 | # include <paths.h> |
---|
729 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
730 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
731 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
732 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
733 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
734 | # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ |
---|
735 | # include <sys/cdefs.h> |
---|
736 | # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ |
---|
737 | # define BSD4_4_SOCKADDR /* has sa_len */ |
---|
738 | # define NEED_PRINTF_PERCENTQ 1 /* doesn't have %lld */ |
---|
739 | # define NETLINK 1 /* supports AF_LINK */ |
---|
740 | # ifndef LA_TYPE |
---|
741 | # define LA_TYPE LA_SUBR |
---|
742 | # endif |
---|
743 | # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ |
---|
744 | # define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */ |
---|
745 | #endif |
---|
746 | |
---|
747 | |
---|
748 | /* |
---|
749 | ** BSD/OS (was BSD/386) (all versions) |
---|
750 | ** From Tony Sanders, BSDI |
---|
751 | */ |
---|
752 | |
---|
753 | #ifdef __bsdi__ |
---|
754 | # include <paths.h> |
---|
755 | # define HASUNSETENV 1 /* has the unsetenv(3) call */ |
---|
756 | # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ |
---|
757 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
758 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
759 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
760 | # define HASUNAME 1 /* has uname(2) syscall */ |
---|
761 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
762 | # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ |
---|
763 | # include <sys/cdefs.h> |
---|
764 | # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ |
---|
765 | # define BSD4_4_SOCKADDR /* has sa_len */ |
---|
766 | # define NETLINK 1 /* supports AF_LINK */ |
---|
767 | # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ |
---|
768 | # ifndef LA_TYPE |
---|
769 | # define LA_TYPE LA_SUBR |
---|
770 | # endif |
---|
771 | # define GIDSET_T gid_t |
---|
772 | # define QUAD_T quad_t |
---|
773 | # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 |
---|
774 | /* version 1.1 or later */ |
---|
775 | # undef SPT_TYPE |
---|
776 | # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ |
---|
777 | # else |
---|
778 | /* version 1.0 or earlier */ |
---|
779 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
780 | # endif |
---|
781 | # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701 /* on 3.x */ |
---|
782 | # define HASSETUSERCONTEXT 1 /* has setusercontext */ |
---|
783 | # endif |
---|
784 | #endif |
---|
785 | |
---|
786 | |
---|
787 | /* |
---|
788 | ** QNX 4.2x |
---|
789 | ** Contributed by Glen McCready <glen@qnx.com>. |
---|
790 | ** |
---|
791 | ** Should work with all versions of QNX. |
---|
792 | */ |
---|
793 | |
---|
794 | #if defined(__QNX__) |
---|
795 | # include <unix.h> |
---|
796 | # include <sys/select.h> |
---|
797 | # undef NGROUPS_MAX |
---|
798 | # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ |
---|
799 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
800 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
801 | # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ |
---|
802 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
803 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
804 | # define HASFLOCK 0 |
---|
805 | # undef HASINITGROUPS /* has initgroups(3) call */ |
---|
806 | # define NEEDGETOPT 1 /* use sendmail's getopt */ |
---|
807 | # define IP_SRCROUTE 1 /* can check IP source routing */ |
---|
808 | # define TZ_TYPE TZ_TMNAME /* use tmname variable */ |
---|
809 | # define GIDSET_T gid_t |
---|
810 | # define LA_TYPE LA_ZERO |
---|
811 | # define SFS_TYPE SFS_NONE |
---|
812 | # define SPT_TYPE SPT_REUSEARGV |
---|
813 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
814 | # define HASGETUSERSHELL 0 |
---|
815 | # define E_PSEUDOBASE 512 |
---|
816 | # define bcopy(s, d, l) (memmove((d), (s), (l))) |
---|
817 | # define bzero(d, l) (memset((d), '\0', (l))) |
---|
818 | # define bcmp(s, d, l) (memcmp((s), (d), (l))) |
---|
819 | # define _FILE_H_INCLUDED |
---|
820 | #endif |
---|
821 | |
---|
822 | |
---|
823 | /* |
---|
824 | ** FreeBSD / NetBSD / OpenBSD (all architectures, all versions) |
---|
825 | ** |
---|
826 | ** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x |
---|
827 | ** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x |
---|
828 | ** |
---|
829 | ** See also BSD defines. |
---|
830 | */ |
---|
831 | |
---|
832 | #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) |
---|
833 | # include <paths.h> |
---|
834 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
835 | # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ |
---|
836 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
837 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
838 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
839 | # define HASUNAME 1 /* has uname(2) syscall */ |
---|
840 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
841 | # define HAS_ST_GEN 1 /* has st_gen field in stat struct */ |
---|
842 | # define NEED_PRINTF_PERCENTQ 1 /* doesn't have %lld */ |
---|
843 | # include <sys/cdefs.h> |
---|
844 | # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ |
---|
845 | # define BSD4_4_SOCKADDR /* has sa_len */ |
---|
846 | # define NETLINK 1 /* supports AF_LINK */ |
---|
847 | # define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */ |
---|
848 | # define GIDSET_T gid_t |
---|
849 | # define QUAD_T unsigned long long |
---|
850 | # ifndef LA_TYPE |
---|
851 | # define LA_TYPE LA_SUBR |
---|
852 | # endif |
---|
853 | # define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */ |
---|
854 | # if defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1) |
---|
855 | # undef SPT_TYPE |
---|
856 | # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ |
---|
857 | # endif |
---|
858 | # if defined(__FreeBSD__) |
---|
859 | # undef SPT_TYPE |
---|
860 | # if __FreeBSD__ >= 2 |
---|
861 | # include <osreldate.h> |
---|
862 | # if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */ |
---|
863 | # include <libutil.h> |
---|
864 | # define SPT_TYPE SPT_BUILTIN |
---|
865 | # endif |
---|
866 | # if __FreeBSD_version >= 222000 /* 2.2.2-release and later */ |
---|
867 | # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ |
---|
868 | # endif |
---|
869 | # endif |
---|
870 | # ifndef SPT_TYPE |
---|
871 | # define SPT_TYPE SPT_REUSEARGV |
---|
872 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
873 | # endif |
---|
874 | # endif |
---|
875 | # if defined(__OpenBSD__) |
---|
876 | # undef SPT_TYPE |
---|
877 | # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ |
---|
878 | # endif |
---|
879 | #endif |
---|
880 | |
---|
881 | |
---|
882 | |
---|
883 | /* |
---|
884 | ** Mach386 |
---|
885 | ** |
---|
886 | ** For mt Xinu's Mach386 system. |
---|
887 | */ |
---|
888 | |
---|
889 | #if defined(MACH) && defined(i386) && !defined(__GNU__) |
---|
890 | # define MACH386 1 |
---|
891 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
892 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
893 | # ifndef HASFLOCK |
---|
894 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
895 | # endif |
---|
896 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
897 | # define NEEDSTRTOL 1 /* need the strtol() function */ |
---|
898 | # define setpgid setpgrp |
---|
899 | # ifndef LA_TYPE |
---|
900 | # define LA_TYPE LA_FLOAT |
---|
901 | # endif |
---|
902 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
903 | # undef HASSETVBUF /* don't actually have setvbuf(3) */ |
---|
904 | # undef WEXITSTATUS |
---|
905 | # undef WIFEXITED |
---|
906 | # ifndef _PATH_VENDOR_CF |
---|
907 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
908 | # endif |
---|
909 | # ifndef _PATH_SENDMAILPID |
---|
910 | # define _PATH_SENDMAILPID "/etc/sendmail.pid" |
---|
911 | # endif |
---|
912 | #endif |
---|
913 | |
---|
914 | |
---|
915 | |
---|
916 | /* |
---|
917 | ** GNU OS (hurd) |
---|
918 | ** Largely BSD & posix compatible. |
---|
919 | ** Port contributed by Miles Bader <miles@gnu.ai.mit.edu>. |
---|
920 | */ |
---|
921 | |
---|
922 | #ifdef __GNU_HURD__ |
---|
923 | # define SIOCGIFCONF_IS_BROKEN 1 |
---|
924 | # define IP_SRCROUTE 0 |
---|
925 | # define HASFCHMOD 1 |
---|
926 | # define HASFLOCK 1 |
---|
927 | # define HASUNAME 1 |
---|
928 | # define HASUNSETENV 1 |
---|
929 | # define HASSETSID 1 |
---|
930 | # define HASINITGROUPS 1 |
---|
931 | # define HASSETVBUF 1 |
---|
932 | # define HASSETREUID 1 |
---|
933 | # define USESETEUID 1 |
---|
934 | # define HASLSTAT 1 |
---|
935 | # define HASSETRLIMIT 1 |
---|
936 | # define HASWAITPID 1 |
---|
937 | # define HASGETDTABLESIZE 1 |
---|
938 | # define HASSTRERROR 1 |
---|
939 | /* # define NEEDGETOPT 1 */ |
---|
940 | # define HASGETUSERSHELL 1 |
---|
941 | # define ERRLIST_PREDEFINED 1 |
---|
942 | # define BSD4_4_SOCKADDR 1 |
---|
943 | # define GIDSET_T gid_t |
---|
944 | # define LA_TYPE LA_MACH |
---|
945 | |
---|
946 | /* GNU uses mach[34], which renames some rpcs from mach2.x. */ |
---|
947 | # define host_self mach_host_self |
---|
948 | # define SFS_TYPE SFS_STATFS |
---|
949 | # define SPT_TYPE SPT_CHANGEARGV |
---|
950 | |
---|
951 | /* GNU has no MAXPATHLEN; ideally the code should be changed to not use it. */ |
---|
952 | # define MAXPATHLEN 2048 |
---|
953 | |
---|
954 | /* Define device num frobbing macros. */ |
---|
955 | # define major(x) ((x)>>8) |
---|
956 | # define minor(x) ((x)&0xFF) |
---|
957 | #endif /* GNU */ |
---|
958 | |
---|
959 | /* |
---|
960 | ** 4.3 BSD -- this is for very old systems |
---|
961 | ** |
---|
962 | ** Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1. |
---|
963 | ** |
---|
964 | ** You'll also have to install a new resolver library. |
---|
965 | ** I don't guarantee that support for this environment is complete. |
---|
966 | */ |
---|
967 | |
---|
968 | #if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) |
---|
969 | # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ |
---|
970 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
971 | # define ARBPTR_T char * |
---|
972 | # define setpgid setpgrp |
---|
973 | # ifndef LA_TYPE |
---|
974 | # define LA_TYPE LA_FLOAT |
---|
975 | # endif |
---|
976 | # ifndef _PATH_VENDOR_CF |
---|
977 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
978 | # endif |
---|
979 | # ifndef IDENTPROTO |
---|
980 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
981 | # endif |
---|
982 | # undef WEXITSTATUS |
---|
983 | # undef WIFEXITED |
---|
984 | typedef short pid_t; |
---|
985 | extern int errno; |
---|
986 | #endif |
---|
987 | |
---|
988 | |
---|
989 | /* |
---|
990 | ** SCO Unix |
---|
991 | ** |
---|
992 | ** This includes three parts: |
---|
993 | ** |
---|
994 | ** The first is for SCO OpenServer 5. |
---|
995 | ** (Contributed by Keith Reynolds <keithr@sco.COM>). |
---|
996 | ** |
---|
997 | ** SCO OpenServer 5 has a compiler version number macro, |
---|
998 | ** which we can use to figure out what version we're on. |
---|
999 | ** This may have to change in future releases. |
---|
1000 | ** |
---|
1001 | ** The second is for SCO UNIX 3.2v4.2/Open Desktop 3.0. |
---|
1002 | ** (Contributed by Philippe Brand <phb@colombo.telesys-innov.fr>). |
---|
1003 | ** |
---|
1004 | ** The third is for SCO UNIX 3.2v4.0/Open Desktop 2.0 and earlier. |
---|
1005 | */ |
---|
1006 | |
---|
1007 | /* SCO OpenServer 5 */ |
---|
1008 | #if _SCO_DS >= 1 |
---|
1009 | # include <paths.h> |
---|
1010 | # define SIOCGIFNUM_IS_BROKEN 1 /* SIOCGIFNUM returns bogus value */ |
---|
1011 | # define HASSNPRINTF 1 /* has snprintf(3) call */ |
---|
1012 | # define HASFCHMOD 1 /* has fchmod(2) call */ |
---|
1013 | # define HASSETRLIMIT 1 /* has setrlimit(2) call */ |
---|
1014 | # define USESETEUID 1 /* has seteuid(2) call */ |
---|
1015 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
1016 | # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ |
---|
1017 | # define RLIMIT_NEEDS_SYS_TIME_H 1 |
---|
1018 | # ifndef LA_TYPE |
---|
1019 | # define LA_TYPE LA_DEVSHORT |
---|
1020 | # endif |
---|
1021 | # define _PATH_AVENRUN "/dev/table/avenrun" |
---|
1022 | # ifndef _SCO_unix_4_2 |
---|
1023 | # define _SCO_unix_4_2 |
---|
1024 | # else |
---|
1025 | # define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */ |
---|
1026 | # define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */ |
---|
1027 | # endif |
---|
1028 | #endif |
---|
1029 | |
---|
1030 | /* SCO UNIX 3.2v4.2/Open Desktop 3.0 */ |
---|
1031 | #ifdef _SCO_unix_4_2 |
---|
1032 | # define _SCO_unix_ |
---|
1033 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
1034 | #endif |
---|
1035 | |
---|
1036 | /* SCO UNIX 3.2v4.0 Open Desktop 2.0 and earlier */ |
---|
1037 | #ifdef _SCO_unix_ |
---|
1038 | # include <sys/stream.h> /* needed for IP_SRCROUTE */ |
---|
1039 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1040 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1041 | # define NOFTRUNCATE 0 /* has (simulated) ftruncate call */ |
---|
1042 | # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ |
---|
1043 | # define MAXPATHLEN PATHSIZE |
---|
1044 | # define SFS_TYPE SFS_4ARGS /* use <sys/statfs.h> 4-arg impl */ |
---|
1045 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1046 | # define SPT_TYPE SPT_SCO /* write kernel u. area */ |
---|
1047 | # define TZ_TYPE TZ_TM_NAME /* use tm->tm_name */ |
---|
1048 | # define UID_T uid_t |
---|
1049 | # define GID_T gid_t |
---|
1050 | # define GIDSET_T gid_t |
---|
1051 | # define _PATH_UNIX "/unix" |
---|
1052 | # ifndef _PATH_VENDOR_CF |
---|
1053 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1054 | # endif |
---|
1055 | # ifndef _PATH_SENDMAILPID |
---|
1056 | # define _PATH_SENDMAILPID "/etc/sendmail.pid" |
---|
1057 | # endif |
---|
1058 | |
---|
1059 | /* stuff fixed in later releases */ |
---|
1060 | # ifndef _SCO_unix_4_2 |
---|
1061 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1062 | # endif |
---|
1063 | |
---|
1064 | # ifndef _SCO_DS |
---|
1065 | # define ftruncate chsize /* use chsize(2) to emulate ftruncate */ |
---|
1066 | # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ |
---|
1067 | # define NETUNIX 0 /* no unix domain socket support */ |
---|
1068 | # define LA_TYPE LA_SHORT |
---|
1069 | # endif |
---|
1070 | |
---|
1071 | #endif |
---|
1072 | |
---|
1073 | |
---|
1074 | /* |
---|
1075 | ** ISC (SunSoft) Unix. |
---|
1076 | ** |
---|
1077 | ** Contributed by J.J. Bailey <jjb@jagware.bcc.com> |
---|
1078 | */ |
---|
1079 | |
---|
1080 | #ifdef ISC_UNIX |
---|
1081 | # include <net/errno.h> |
---|
1082 | # include <sys/stream.h> /* needed for IP_SRCROUTE */ |
---|
1083 | # include <sys/bsdtypes.h> |
---|
1084 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1085 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1086 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1087 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
1088 | # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ |
---|
1089 | # define NETUNIX 0 /* no unix domain socket support */ |
---|
1090 | # define MAXPATHLEN 1024 |
---|
1091 | # define LA_TYPE LA_SHORT |
---|
1092 | # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ |
---|
1093 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1094 | # define _PATH_UNIX "/unix" |
---|
1095 | # ifndef _PATH_VENDOR_CF |
---|
1096 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1097 | # endif |
---|
1098 | # ifndef _PATH_SENDMAILPID |
---|
1099 | # define _PATH_SENDMAILPID "/etc/sendmail.pid" |
---|
1100 | # endif |
---|
1101 | |
---|
1102 | #endif |
---|
1103 | |
---|
1104 | |
---|
1105 | /* |
---|
1106 | ** Altos System V (5.3.1) |
---|
1107 | ** Contributed by Tim Rice <tim@trr.metro.net>. |
---|
1108 | */ |
---|
1109 | |
---|
1110 | #ifdef ALTOS_SYSTEM_V |
---|
1111 | # include <sys/stream.h> |
---|
1112 | # include <limits.h> |
---|
1113 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1114 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1115 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1116 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
1117 | # define NEEDFSYNC 1 /* no fsync(2) in system library */ |
---|
1118 | # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ |
---|
1119 | # define NOFTRUNCATE 1 /* do not have ftruncate(2) */ |
---|
1120 | # define MAXPATHLEN PATH_MAX |
---|
1121 | # define LA_TYPE LA_SHORT |
---|
1122 | # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ |
---|
1123 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1124 | # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ |
---|
1125 | # define NETUNIX 0 /* no unix domain socket support */ |
---|
1126 | # undef WIFEXITED |
---|
1127 | # undef WEXITSTATUS |
---|
1128 | # define strtoul strtol /* gcc library bogosity */ |
---|
1129 | |
---|
1130 | typedef unsigned short uid_t; |
---|
1131 | typedef unsigned short gid_t; |
---|
1132 | typedef short pid_t; |
---|
1133 | typedef unsigned long mode_t; |
---|
1134 | |
---|
1135 | /* some stuff that should have been in the include files */ |
---|
1136 | # include <grp.h> |
---|
1137 | extern char *malloc(); |
---|
1138 | extern struct passwd *getpwent(); |
---|
1139 | extern struct passwd *getpwnam(); |
---|
1140 | extern struct passwd *getpwuid(); |
---|
1141 | extern char *getenv(); |
---|
1142 | extern struct group *getgrgid(); |
---|
1143 | extern struct group *getgrnam(); |
---|
1144 | |
---|
1145 | #endif |
---|
1146 | |
---|
1147 | |
---|
1148 | /* |
---|
1149 | ** ConvexOS 11.0 and later |
---|
1150 | ** |
---|
1151 | ** "Todd C. Miller" <millert@mroe.cs.colorado.edu> claims this |
---|
1152 | ** works on 9.1 as well. |
---|
1153 | ** |
---|
1154 | ** ConvexOS 11.5 and later, should work on 11.0 as defined. |
---|
1155 | ** For pre-ConvexOOS 11.0, define NEEDGETOPT, undef IDENTPROTO |
---|
1156 | ** |
---|
1157 | ** Eric Schnoebelen (eric@cirr.com) For CONVEX Computer Corp. |
---|
1158 | ** (now the CONVEX Technologies Center of Hewlett Packard) |
---|
1159 | */ |
---|
1160 | |
---|
1161 | #ifdef _CONVEX_SOURCE |
---|
1162 | # define HASGETDTABLESIZE 1 /* has getdtablesize(2) */ |
---|
1163 | # define HASINITGROUPS 1 /* has initgroups(3) */ |
---|
1164 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
1165 | # define HASSETSID 1 /* has POSIX setsid(2) call */ |
---|
1166 | # define HASUNSETENV 1 /* has unsetenv(3) */ |
---|
1167 | # define HASFLOCK 1 /* has flock(2) */ |
---|
1168 | # define HASSETRLIMIT 1 /* has setrlimit(2) */ |
---|
1169 | # define HASSETREUID 1 /* has setreuid(2) */ |
---|
1170 | # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_error=0 */ |
---|
1171 | # define NEEDPUTENV 1 /* needs putenv (written in terms of setenv) */ |
---|
1172 | # define NEEDGETOPT 0 /* need replacement for getopt(3) */ |
---|
1173 | # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ |
---|
1174 | # define LA_TYPE LA_FLOAT |
---|
1175 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
1176 | # ifndef _PATH_VENDOR_CF |
---|
1177 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1178 | # endif |
---|
1179 | # ifndef S_IREAD |
---|
1180 | # define S_IREAD _S_IREAD |
---|
1181 | # define S_IWRITE _S_IWRITE |
---|
1182 | # define S_IEXEC _S_IEXEC |
---|
1183 | # define S_IFMT _S_IFMT |
---|
1184 | # define S_IFCHR _S_IFCHR |
---|
1185 | # define S_IFBLK _S_IFBLK |
---|
1186 | # endif |
---|
1187 | # ifndef TZ_TYPE |
---|
1188 | # define TZ_TYPE TZ_TIMEZONE |
---|
1189 | # endif |
---|
1190 | # ifndef IDENTPROTO |
---|
1191 | # define IDENTPROTO 1 |
---|
1192 | # endif |
---|
1193 | # ifndef SHARE_V1 |
---|
1194 | # define SHARE_V1 1 /* version 1 of the fair share scheduler */ |
---|
1195 | # endif |
---|
1196 | # if !defined(__GNUC__ ) |
---|
1197 | # define UID_T int /* GNUC gets it right, ConvexC botches */ |
---|
1198 | # define GID_T int /* GNUC gets it right, ConvexC botches */ |
---|
1199 | # endif |
---|
1200 | # if SECUREWARE |
---|
1201 | # define FORK fork /* SecureWare wants the real fork! */ |
---|
1202 | # else |
---|
1203 | # define FORK vfork /* the rest of the OS versions don't care */ |
---|
1204 | # endif |
---|
1205 | #endif |
---|
1206 | |
---|
1207 | |
---|
1208 | /* |
---|
1209 | ** RISC/os 4.52 |
---|
1210 | ** |
---|
1211 | ** Gives a ton of warning messages, but otherwise compiles. |
---|
1212 | */ |
---|
1213 | |
---|
1214 | #ifdef RISCOS |
---|
1215 | |
---|
1216 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
1217 | # ifndef HASFLOCK |
---|
1218 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
1219 | # endif |
---|
1220 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
1221 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
1222 | # define NEEDPUTENV 1 /* need putenv(3) call */ |
---|
1223 | # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ |
---|
1224 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
1225 | # define LA_TYPE LA_INT |
---|
1226 | # define LA_AVENRUN "avenrun" |
---|
1227 | # define _PATH_UNIX "/unix" |
---|
1228 | # undef WIFEXITED |
---|
1229 | |
---|
1230 | # define setpgid setpgrp |
---|
1231 | |
---|
1232 | extern int errno; |
---|
1233 | typedef int pid_t; |
---|
1234 | # define SIGFUNC_DEFINED |
---|
1235 | # define SIGFUNC_RETURN (0) |
---|
1236 | # define SIGFUNC_DECL int |
---|
1237 | typedef int (*sigfunc_t)(); |
---|
1238 | extern char *getenv(); |
---|
1239 | extern void *malloc(); |
---|
1240 | |
---|
1241 | /* added for RISC/os 4.01...which is dumber than 4.50 */ |
---|
1242 | # ifdef RISCOS_4_0 |
---|
1243 | # ifndef ARBPTR_T |
---|
1244 | # define ARBPTR_T char * |
---|
1245 | # endif |
---|
1246 | # undef HASFLOCK |
---|
1247 | # define HASFLOCK 0 |
---|
1248 | # endif /* RISCOS_4_0 */ |
---|
1249 | |
---|
1250 | # include <sys/time.h> |
---|
1251 | |
---|
1252 | #endif |
---|
1253 | |
---|
1254 | |
---|
1255 | /* |
---|
1256 | ** Linux 0.99pl10 and above... |
---|
1257 | ** |
---|
1258 | ** Thanks to, in reverse order of contact: |
---|
1259 | ** |
---|
1260 | ** John Kennedy <warlock@csuchico.edu> |
---|
1261 | ** Andrew Pam <avatar@aus.xanadu.com> |
---|
1262 | ** Florian La Roche <rzsfl@rz.uni-sb.de> |
---|
1263 | ** Karl London <karl@borg.demon.co.uk> |
---|
1264 | ** |
---|
1265 | ** Last compiled against: [07/21/98 @ 11:47:34 AM (Tuesday)] |
---|
1266 | ** sendmail 8.9.1 bind-8.1.2 db-2.4.14 |
---|
1267 | ** gcc-2.8.1 glibc-2.0.94 linux-2.1.109 |
---|
1268 | ** |
---|
1269 | ** NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style |
---|
1270 | ** file locking is no longer allowed. In particular, make sure |
---|
1271 | ** your DBM library and sendmail are both using either flock(2) |
---|
1272 | ** *or* fcntl(2) file locking, but not both. |
---|
1273 | */ |
---|
1274 | |
---|
1275 | #ifdef __linux__ |
---|
1276 | # define BSD 1 /* include BSD defines */ |
---|
1277 | # define USESETEUID 0 /* Have it due to POSIX, but doesn't work */ |
---|
1278 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
1279 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
1280 | # define HASUNSETENV 1 /* has unsetenv(3) call */ |
---|
1281 | # ifndef HASSNPRINTF |
---|
1282 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
1283 | # endif |
---|
1284 | # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ |
---|
1285 | # define GIDSET_T gid_t /* from <linux/types.h> */ |
---|
1286 | # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ |
---|
1287 | # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ |
---|
1288 | # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ |
---|
1289 | # ifndef HASFLOCK |
---|
1290 | # include <linux/version.h> |
---|
1291 | # if LINUX_VERSION_CODE < 66399 |
---|
1292 | # define HASFLOCK 0 /* flock(2) is broken after 0.99.13 */ |
---|
1293 | # else |
---|
1294 | # define HASFLOCK 1 /* flock(2) fixed after 1.3.95 */ |
---|
1295 | # endif |
---|
1296 | # endif |
---|
1297 | # ifndef LA_TYPE |
---|
1298 | # define LA_TYPE LA_PROCSTR |
---|
1299 | # endif |
---|
1300 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() impl */ |
---|
1301 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
1302 | # ifndef TZ_TYPE |
---|
1303 | # define TZ_TYPE TZ_NONE /* no standard for Linux */ |
---|
1304 | # endif |
---|
1305 | # ifndef _PATH_SENDMAILPID |
---|
1306 | # define _PATH_SENDMAILPID "/var/run/sendmail.pid" |
---|
1307 | # endif |
---|
1308 | # include <sys/sysmacros.h> |
---|
1309 | # undef atol /* wounded in <stdlib.h> */ |
---|
1310 | #endif |
---|
1311 | |
---|
1312 | |
---|
1313 | /* |
---|
1314 | ** DELL SVR4 Issue 2.2, and others |
---|
1315 | ** From Kimmo Suominen <kim@grendel.lut.fi> |
---|
1316 | ** |
---|
1317 | ** It's on #ifdef DELL_SVR4 because Solaris also gets __svr4__ |
---|
1318 | ** defined, and the definitions conflict. |
---|
1319 | ** |
---|
1320 | ** Peter Wemm <peter@perth.DIALix.oz.au> claims that the setreuid |
---|
1321 | ** trick works on DELL 2.2 (SVR4.0/386 version 4.0) and ESIX 4.0.3A |
---|
1322 | ** (SVR4.0/386 version 3.0). |
---|
1323 | */ |
---|
1324 | |
---|
1325 | #ifdef DELL_SVR4 |
---|
1326 | /* no changes necessary */ |
---|
1327 | /* see general __svr4__ defines below */ |
---|
1328 | #endif |
---|
1329 | |
---|
1330 | |
---|
1331 | /* |
---|
1332 | ** Apple A/UX 3.0 |
---|
1333 | */ |
---|
1334 | |
---|
1335 | #ifdef _AUX_SOURCE |
---|
1336 | # include <sys/sysmacros.h> |
---|
1337 | # define BSD /* has BSD routines */ |
---|
1338 | # define HASSETRLIMIT 0 /* ... but not setrlimit(2) */ |
---|
1339 | # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ |
---|
1340 | # define BOGUS_O_EXCL 1 /* exclusive open follows symlinks */ |
---|
1341 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
1342 | # define HASFCHMOD 1 /* has fchmod(2) syscall */ |
---|
1343 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
1344 | # define HASSETVBUF 1 /* has setvbuf(3) in libc */ |
---|
1345 | # define HASSTRERROR 1 /* has strerror(3) */ |
---|
1346 | # define SIGFUNC_DEFINED /* sigfunc_t already defined */ |
---|
1347 | # define SIGFUNC_RETURN /* POSIX-mode */ |
---|
1348 | # define SIGFUNC_DECL void /* POSIX-mode */ |
---|
1349 | # define ERRLIST_PREDEFINED 1 |
---|
1350 | # ifndef IDENTPROTO |
---|
1351 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1352 | # endif |
---|
1353 | # ifndef LA_TYPE |
---|
1354 | # define LA_TYPE LA_INT |
---|
1355 | # define FSHIFT 16 |
---|
1356 | # endif |
---|
1357 | # define LA_AVENRUN "avenrun" |
---|
1358 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
1359 | # define TZ_TYPE TZ_TZNAME |
---|
1360 | # ifndef _PATH_UNIX |
---|
1361 | # define _PATH_UNIX "/unix" /* should be in <paths.h> */ |
---|
1362 | # endif |
---|
1363 | # ifndef _PATH_VENDOR_CF |
---|
1364 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1365 | # endif |
---|
1366 | # undef WIFEXITED |
---|
1367 | # undef WEXITSTATUS |
---|
1368 | #endif |
---|
1369 | |
---|
1370 | |
---|
1371 | /* |
---|
1372 | ** Encore UMAX V |
---|
1373 | ** |
---|
1374 | ** Not extensively tested. |
---|
1375 | */ |
---|
1376 | |
---|
1377 | #ifdef UMAXV |
---|
1378 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
1379 | # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ |
---|
1380 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
1381 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1382 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1383 | # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ |
---|
1384 | # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ |
---|
1385 | # define MAXPATHLEN PATH_MAX |
---|
1386 | extern struct passwd *getpwent(), *getpwnam(), *getpwuid(); |
---|
1387 | extern struct group *getgrent(), *getgrnam(), *getgrgid(); |
---|
1388 | # undef WIFEXITED |
---|
1389 | # undef WEXITSTATUS |
---|
1390 | #endif |
---|
1391 | |
---|
1392 | |
---|
1393 | /* |
---|
1394 | ** Stardent Titan 3000 running TitanOS 4.2. |
---|
1395 | ** |
---|
1396 | ** Must be compiled in "cc -43" mode. |
---|
1397 | ** |
---|
1398 | ** From Kate Hedstrom <kate@ahab.rutgers.edu>. |
---|
1399 | ** |
---|
1400 | ** Note the tweaking below after the BSD defines are set. |
---|
1401 | */ |
---|
1402 | |
---|
1403 | #ifdef titan |
---|
1404 | # define setpgid setpgrp |
---|
1405 | typedef int pid_t; |
---|
1406 | # undef WIFEXITED |
---|
1407 | # undef WEXITSTATUS |
---|
1408 | #endif |
---|
1409 | |
---|
1410 | |
---|
1411 | /* |
---|
1412 | ** Sequent DYNIX 3.2.0 |
---|
1413 | ** |
---|
1414 | ** From Jim Davis <jdavis@cs.arizona.edu>. |
---|
1415 | */ |
---|
1416 | |
---|
1417 | #ifdef sequent |
---|
1418 | |
---|
1419 | # define BSD 1 |
---|
1420 | # define HASUNSETENV 1 |
---|
1421 | # define BSD4_3 1 /* to get signal() in conf.c */ |
---|
1422 | # define WAITUNION 1 |
---|
1423 | # define LA_TYPE LA_FLOAT |
---|
1424 | # ifdef _POSIX_VERSION |
---|
1425 | # undef _POSIX_VERSION /* set in <unistd.h> */ |
---|
1426 | # endif |
---|
1427 | # undef HASSETVBUF /* don't actually have setvbuf(3) */ |
---|
1428 | # define setpgid setpgrp |
---|
1429 | |
---|
1430 | /* Have to redefine WIFEXITED to take an int, to work with waitfor() */ |
---|
1431 | # undef WIFEXITED |
---|
1432 | # define WIFEXITED(s) (((union wait*)&(s))->w_stopval != WSTOPPED && \ |
---|
1433 | ((union wait*)&(s))->w_termsig == 0) |
---|
1434 | # define WEXITSTATUS(s) (((union wait*)&(s))->w_retcode) |
---|
1435 | typedef int pid_t; |
---|
1436 | # define isgraph(c) (isprint(c) && (c != ' ')) |
---|
1437 | |
---|
1438 | # ifndef IDENTPROTO |
---|
1439 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1440 | # endif |
---|
1441 | |
---|
1442 | # ifndef _PATH_UNIX |
---|
1443 | # define _PATH_UNIX "/dynix" |
---|
1444 | # endif |
---|
1445 | # ifndef _PATH_VENDOR_CF |
---|
1446 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1447 | # endif |
---|
1448 | #endif |
---|
1449 | |
---|
1450 | |
---|
1451 | /* |
---|
1452 | ** Sequent DYNIX/ptx v2.0 (and higher) |
---|
1453 | ** |
---|
1454 | ** For DYNIX/ptx v1.x, undefine HASSETREUID. |
---|
1455 | ** |
---|
1456 | ** From Tim Wright <timw@sequent.com>. |
---|
1457 | ** Update from Jack Woolley <jwoolley@sctcorp.com>, 26 Dec 1995, |
---|
1458 | ** for DYNIX/ptx 4.0.2. |
---|
1459 | */ |
---|
1460 | |
---|
1461 | #ifdef _SEQUENT_ |
---|
1462 | # include <sys/stream.h> |
---|
1463 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1464 | # define HASSETSID 1 /* has POSIX setsid(2) call */ |
---|
1465 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
1466 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
1467 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1468 | # define GIDSET_T gid_t |
---|
1469 | # define LA_TYPE LA_INT |
---|
1470 | # define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */ |
---|
1471 | # define SPT_TYPE SPT_NONE /* don't use setproctitle */ |
---|
1472 | # ifndef IDENTPROTO |
---|
1473 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1474 | # endif |
---|
1475 | # ifndef _PATH_VENDOR_CF |
---|
1476 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1477 | # endif |
---|
1478 | # ifndef _PATH_SENDMAILPID |
---|
1479 | # define _PATH_SENDMAILPID "/etc/sendmail.pid" |
---|
1480 | # endif |
---|
1481 | #endif |
---|
1482 | |
---|
1483 | |
---|
1484 | /* |
---|
1485 | ** Cray Unicos |
---|
1486 | ** |
---|
1487 | ** Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov> |
---|
1488 | */ |
---|
1489 | |
---|
1490 | #ifdef UNICOS |
---|
1491 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1492 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1493 | # define MAXPATHLEN PATHSIZE |
---|
1494 | # define LA_TYPE LA_ZERO |
---|
1495 | # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ |
---|
1496 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1497 | #endif |
---|
1498 | |
---|
1499 | |
---|
1500 | /* |
---|
1501 | ** Apollo DomainOS |
---|
1502 | ** |
---|
1503 | ** From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com> |
---|
1504 | ** |
---|
1505 | ** 15 Jan 1994; updated 2 Aug 1995 |
---|
1506 | ** |
---|
1507 | */ |
---|
1508 | |
---|
1509 | #ifdef apollo |
---|
1510 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
1511 | # define HASINITGROUPS 1 /* has initgroups(2) call */ |
---|
1512 | # define IP_SRCROUTE 0 /* does not have <netinet/ip_var.h> */ |
---|
1513 | # define SPT_TYPE SPT_NONE /* don't use setproctitle */ |
---|
1514 | # define LA_TYPE LA_SUBR /* use getloadavg.c */ |
---|
1515 | # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ |
---|
1516 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1517 | # define TZ_TYPE TZ_TZNAME |
---|
1518 | # ifndef _PATH_VENDOR_CF |
---|
1519 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1520 | # endif |
---|
1521 | # ifndef _PATH_SENDMAILPID |
---|
1522 | # define _PATH_SENDMAILPID "/etc/sendmail.pid" |
---|
1523 | # endif |
---|
1524 | # undef S_IFSOCK /* S_IFSOCK and S_IFIFO are the same */ |
---|
1525 | # undef S_IFIFO |
---|
1526 | # define S_IFIFO 0010000 |
---|
1527 | # ifndef IDENTPROTO |
---|
1528 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1529 | # endif |
---|
1530 | # define RLIMIT_NEEDS_SYS_TIME_H 1 |
---|
1531 | # if defined(NGROUPS_MAX) && !NGROUPS_MAX |
---|
1532 | # undef NGROUPS_MAX |
---|
1533 | # endif |
---|
1534 | #endif |
---|
1535 | |
---|
1536 | /* |
---|
1537 | ** System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatiblity Libs ie. native) |
---|
1538 | ** |
---|
1539 | ** Contributed by Paul Gampe <paulg@apnic.net> |
---|
1540 | */ |
---|
1541 | |
---|
1542 | #ifdef __svr5__ |
---|
1543 | # include <sys/mkdev.h> |
---|
1544 | # define __svr4__ |
---|
1545 | # define SYS5SIGNALS 1 |
---|
1546 | # define HASSETSID 1 |
---|
1547 | # define HASSETREUID 1 |
---|
1548 | # define HASWAITPID 1 |
---|
1549 | # define HASGETDTABLESIZE 1 |
---|
1550 | # define GIDSET_T gid_t |
---|
1551 | # define SOCKADDR_LEN_T size_t |
---|
1552 | # define SOCKOPT_LEN_T size_t |
---|
1553 | # ifndef _PATH_UNIX |
---|
1554 | # define _PATH_UNIX "/stand/unix" |
---|
1555 | # endif |
---|
1556 | # define SPT_PADCHAR '\0' /* pad process title with nulls */ |
---|
1557 | # define SYSLOG_BUFSIZE 1024 /* unsure */ |
---|
1558 | # ifndef _PATH_VENDOR_CF |
---|
1559 | # define _PATH_VENDOR_CF "/etc/sendmail.cf" |
---|
1560 | # endif |
---|
1561 | # ifndef _PATH_SENDMAILPID |
---|
1562 | # define _PATH_SENDMAILPID "/etc/sendmail.pid" |
---|
1563 | # endif |
---|
1564 | #endif |
---|
1565 | |
---|
1566 | /* ###################################################################### */ |
---|
1567 | |
---|
1568 | /* |
---|
1569 | ** UnixWare 2.x |
---|
1570 | */ |
---|
1571 | |
---|
1572 | #ifdef UNIXWARE2 |
---|
1573 | # define UNIXWARE 1 |
---|
1574 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
1575 | # undef offsetof /* avoid stddefs.h, sys/sysmacros.h conflict */ |
---|
1576 | #endif |
---|
1577 | |
---|
1578 | |
---|
1579 | /* |
---|
1580 | ** UnixWare 1.1.2. |
---|
1581 | ** |
---|
1582 | ** Updated by Petr Lampa <lampa@fee.vutbr.cz>. |
---|
1583 | ** From Evan Champion <evanc@spatial.synapse.org>. |
---|
1584 | */ |
---|
1585 | |
---|
1586 | #ifdef UNIXWARE |
---|
1587 | # include <sys/mkdev.h> |
---|
1588 | # define SYSTEM5 1 |
---|
1589 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1590 | # define HASSETREUID 1 |
---|
1591 | # define HASSETSID 1 |
---|
1592 | # define HASINITGROUPS 1 |
---|
1593 | # define GIDSET_T gid_t |
---|
1594 | # define SLEEP_T unsigned |
---|
1595 | # define SFS_TYPE SFS_STATVFS |
---|
1596 | # define LA_TYPE LA_ZERO |
---|
1597 | # undef WIFEXITED |
---|
1598 | # undef WEXITSTATUS |
---|
1599 | # ifndef _PATH_UNIX |
---|
1600 | # define _PATH_UNIX "/unix" |
---|
1601 | # endif |
---|
1602 | # ifndef _PATH_VENDOR_CF |
---|
1603 | # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" |
---|
1604 | # endif |
---|
1605 | # ifndef _PATH_SENDMAILPID |
---|
1606 | # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" |
---|
1607 | # endif |
---|
1608 | # define SYSLOG_BUFSIZE 128 |
---|
1609 | #endif |
---|
1610 | |
---|
1611 | |
---|
1612 | /* |
---|
1613 | ** Intergraph CLIX 3.1 |
---|
1614 | ** |
---|
1615 | ** From Paul Southworth <pauls@locust.cic.net> |
---|
1616 | */ |
---|
1617 | |
---|
1618 | #ifdef CLIX |
---|
1619 | # define SYSTEM5 1 /* looks like System V */ |
---|
1620 | # ifndef HASGETUSERSHELL |
---|
1621 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
1622 | # endif |
---|
1623 | # define DEV_BSIZE 512 /* device block size not defined */ |
---|
1624 | # define GIDSET_T gid_t |
---|
1625 | # undef LOG /* syslog not available */ |
---|
1626 | # define NEEDFSYNC 1 /* no fsync in system library */ |
---|
1627 | # define GETSHORT _getshort |
---|
1628 | #endif |
---|
1629 | |
---|
1630 | |
---|
1631 | /* |
---|
1632 | ** NCR MP-RAS 2.x (SysVr4) with Wollongong TCP/IP |
---|
1633 | ** |
---|
1634 | ** From Kevin Darcy <kevin@tech.mis.cfc.com>. |
---|
1635 | */ |
---|
1636 | |
---|
1637 | #ifdef NCR_MP_RAS2 |
---|
1638 | # include <sys/sockio.h> |
---|
1639 | # define __svr4__ |
---|
1640 | # define IP_SRCROUTE 0 /* Something is broken with getsockopt() */ |
---|
1641 | # define SYSLOG_BUFSIZE 1024 |
---|
1642 | # define SPT_TYPE SPT_NONE |
---|
1643 | #endif |
---|
1644 | |
---|
1645 | |
---|
1646 | /* |
---|
1647 | ** NCR MP-RAS 3.x (SysVr4) with STREAMware TCP/IP |
---|
1648 | ** |
---|
1649 | ** From Tom Moore <Tom.Moore@DaytonOH.NCR.COM> |
---|
1650 | */ |
---|
1651 | |
---|
1652 | #ifdef NCR_MP_RAS3 |
---|
1653 | # define __svr4__ |
---|
1654 | # define SIOCGIFNUM_IS_BROKEN 1 /* SIOCGIFNUM has non-std interface */ |
---|
1655 | # define SYSLOG_BUFSIZE 1024 |
---|
1656 | # define SPT_TYPE SPT_NONE |
---|
1657 | #endif |
---|
1658 | |
---|
1659 | |
---|
1660 | /* |
---|
1661 | ** Tandem NonStop-UX SVR4 |
---|
1662 | ** |
---|
1663 | ** From Rick McCarty <mccarty@mpd.tandem.com>. |
---|
1664 | */ |
---|
1665 | |
---|
1666 | #ifdef NonStop_UX_BXX |
---|
1667 | # define __svr4__ |
---|
1668 | #endif |
---|
1669 | |
---|
1670 | |
---|
1671 | /* |
---|
1672 | ** Hitachi 3050R & 3050RX Workstations running HI-UX/WE2. |
---|
1673 | ** |
---|
1674 | ** Tested for 1.04 and 1.03 |
---|
1675 | ** From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>. |
---|
1676 | */ |
---|
1677 | |
---|
1678 | #ifdef __H3050R |
---|
1679 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1680 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
1681 | # define setreuid(r, e) setresuid(r, e, -1) |
---|
1682 | # define LA_TYPE LA_FLOAT |
---|
1683 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
1684 | # define HASSETVBUF /* HI-UX has no setlinebuf */ |
---|
1685 | # ifndef GIDSET_T |
---|
1686 | # define GIDSET_T gid_t |
---|
1687 | # endif |
---|
1688 | # ifndef _PATH_UNIX |
---|
1689 | # define _PATH_UNIX "/HI-UX" |
---|
1690 | # endif |
---|
1691 | # ifndef _PATH_VENDOR_CF |
---|
1692 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1693 | # endif |
---|
1694 | # ifndef IDENTPROTO |
---|
1695 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1696 | # endif |
---|
1697 | # ifndef HASGETUSERSHELL |
---|
1698 | # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ |
---|
1699 | # endif |
---|
1700 | |
---|
1701 | /* |
---|
1702 | ** avoid m_flags conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h |
---|
1703 | ** on HIUX 3050 |
---|
1704 | */ |
---|
1705 | # undef m_flags |
---|
1706 | |
---|
1707 | # ifdef __STDC__ |
---|
1708 | extern int syslog(int, char *, ...); |
---|
1709 | #else |
---|
1710 | extern int syslog(); |
---|
1711 | # endif |
---|
1712 | |
---|
1713 | #endif |
---|
1714 | |
---|
1715 | |
---|
1716 | /* |
---|
1717 | ** Amdahl UTS System V 2.1.5 (SVr3-based) |
---|
1718 | ** |
---|
1719 | ** From: Janet Jackson <janet@dialix.oz.au>. |
---|
1720 | */ |
---|
1721 | |
---|
1722 | #ifdef _UTS |
---|
1723 | # include <sys/sysmacros.h> |
---|
1724 | # undef HASLSTAT /* has symlinks, but they cause problems */ |
---|
1725 | # define NEEDFSYNC 1 /* system fsync(2) fails on non-EFS filesys */ |
---|
1726 | # define SYS5SIGNALS 1 /* System V signal semantics */ |
---|
1727 | # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ |
---|
1728 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
1729 | # define HASINITGROUPS 1 /* has initgroups(3) function */ |
---|
1730 | # define HASSETVBUF 1 /* has setvbuf(3) function */ |
---|
1731 | # ifndef HASGETUSERSHELL |
---|
1732 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) function */ |
---|
1733 | # endif |
---|
1734 | # define GIDSET_T gid_t /* type of 2nd arg to getgroups(2) isn't int */ |
---|
1735 | # define LA_TYPE LA_ZERO /* doesn't have load average */ |
---|
1736 | # define SFS_TYPE SFS_4ARGS /* use 4-arg statfs() */ |
---|
1737 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1738 | # define _PATH_UNIX "/unix" |
---|
1739 | # ifndef _PATH_VENDOR_CF |
---|
1740 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1741 | # endif |
---|
1742 | #endif |
---|
1743 | |
---|
1744 | /* |
---|
1745 | ** Cray Computer Corporation's CSOS |
---|
1746 | ** |
---|
1747 | ** From Scott Bolte <scott@craycos.com>. |
---|
1748 | */ |
---|
1749 | |
---|
1750 | #ifdef _CRAYCOM |
---|
1751 | # define SYSTEM5 1 /* include all the System V defines */ |
---|
1752 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1753 | # define NEEDFSYNC 1 /* no fsync in system library */ |
---|
1754 | # define MAXPATHLEN PATHSIZE |
---|
1755 | # define LA_TYPE LA_ZERO |
---|
1756 | # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ |
---|
1757 | # define SFS_BAVAIL f_bfree /* alternate field name */ |
---|
1758 | # define _POSIX_CHOWN_RESTRICTED -1 |
---|
1759 | extern struct group *getgrent(), *getgrnam(), *getgrgid(); |
---|
1760 | #endif |
---|
1761 | |
---|
1762 | |
---|
1763 | /* |
---|
1764 | ** Sony NEWS-OS 4.2.1R and 6.0.3 |
---|
1765 | ** |
---|
1766 | ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. |
---|
1767 | */ |
---|
1768 | |
---|
1769 | #ifdef sony_news |
---|
1770 | # ifndef __svr4 |
---|
1771 | /* NEWS-OS 4.2.1R */ |
---|
1772 | # ifndef BSD |
---|
1773 | # define BSD /* has BSD routines */ |
---|
1774 | # endif |
---|
1775 | # define HASUNSETENV 1 /* has unsetenv(2) call */ |
---|
1776 | # undef HASSETVBUF /* don't actually have setvbuf(3) */ |
---|
1777 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
1778 | # define LA_TYPE LA_INT |
---|
1779 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
1780 | # ifndef HASFLOCK |
---|
1781 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
1782 | # endif |
---|
1783 | # define setpgid setpgrp |
---|
1784 | # undef WIFEXITED |
---|
1785 | # undef WEXITSTATUS |
---|
1786 | # define MODE_T int /* system include files have no mode_t */ |
---|
1787 | typedef int pid_t; |
---|
1788 | typedef int (*sigfunc_t)(); |
---|
1789 | # define SIGFUNC_DEFINED |
---|
1790 | # define SIGFUNC_RETURN (0) |
---|
1791 | # define SIGFUNC_DECL int |
---|
1792 | |
---|
1793 | # else |
---|
1794 | /* NEWS-OS 6.0.3 with /bin/cc */ |
---|
1795 | # ifndef __svr4__ |
---|
1796 | # define __svr4__ /* use all System V Releae 4 defines below */ |
---|
1797 | # endif |
---|
1798 | # define HASSETSID 1 /* has Posix setsid(2) call */ |
---|
1799 | # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ |
---|
1800 | # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ |
---|
1801 | # ifndef SPT_TYPE |
---|
1802 | # define SPT_TYPE SPT_SYSMIPS /* use sysmips() (OS 6.0.2 or later) */ |
---|
1803 | # endif |
---|
1804 | # define GIDSET_T gid_t |
---|
1805 | # undef WIFEXITED |
---|
1806 | # undef WEXITSTATUS |
---|
1807 | # ifndef SYSLOG_BUFSIZE |
---|
1808 | # define SYSLOG_BUFSIZE 1024 |
---|
1809 | # endif |
---|
1810 | # define _PATH_UNIX "/stand/unix" |
---|
1811 | # ifndef _PATH_VENDOR_CF |
---|
1812 | # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" |
---|
1813 | # endif |
---|
1814 | # ifndef _PATH_SENDMAILPID |
---|
1815 | # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" |
---|
1816 | # endif |
---|
1817 | |
---|
1818 | # endif |
---|
1819 | #endif |
---|
1820 | |
---|
1821 | |
---|
1822 | /* |
---|
1823 | ** Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach |
---|
1824 | ** |
---|
1825 | ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. |
---|
1826 | */ |
---|
1827 | |
---|
1828 | #ifdef luna |
---|
1829 | # ifndef IDENTPROTO |
---|
1830 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1831 | # endif |
---|
1832 | # define HASUNSETENV 1 /* has unsetenv(2) call */ |
---|
1833 | # define NEEDPUTENV 1 /* need putenv(3) call */ |
---|
1834 | # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ |
---|
1835 | # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ |
---|
1836 | # define WAITUNION 1 /* use "union wait" as wait argument type */ |
---|
1837 | # ifdef uniosb |
---|
1838 | # include <sys/time.h> |
---|
1839 | # define NEEDVPRINTF 1 /* need a replacement for vprintf(3) */ |
---|
1840 | # define LA_TYPE LA_INT |
---|
1841 | # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */ |
---|
1842 | # endif |
---|
1843 | # ifdef luna2 |
---|
1844 | # define LA_TYPE LA_SUBR |
---|
1845 | # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone */ |
---|
1846 | # endif |
---|
1847 | # ifdef luna88k |
---|
1848 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
1849 | # define LA_TYPE LA_INT |
---|
1850 | # endif |
---|
1851 | # define SFS_TYPE SFS_VFS /* use <sys/vfs.h> statfs() implementation */ |
---|
1852 | # define setpgid setpgrp |
---|
1853 | # undef WIFEXITED |
---|
1854 | # undef WEXITSTATUS |
---|
1855 | typedef int pid_t; |
---|
1856 | typedef int (*sigfunc_t)(); |
---|
1857 | # define SIGFUNC_DEFINED |
---|
1858 | # define SIGFUNC_RETURN (0) |
---|
1859 | # define SIGFUNC_DECL int |
---|
1860 | extern char *getenv(); |
---|
1861 | extern int errno; |
---|
1862 | # ifndef _PATH_VENDOR_CF |
---|
1863 | # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" |
---|
1864 | # endif |
---|
1865 | #endif |
---|
1866 | |
---|
1867 | |
---|
1868 | /* |
---|
1869 | ** NEC EWS-UX/V 4.2 (with /usr/ucb/cc) |
---|
1870 | ** |
---|
1871 | ** From Motonori NAKAMURA <motonori@cs.ritsumei.ac.jp>. |
---|
1872 | */ |
---|
1873 | |
---|
1874 | #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) |
---|
1875 | # ifndef __svr4__ |
---|
1876 | # define __svr4__ /* use all System V Releae 4 defines below */ |
---|
1877 | # endif |
---|
1878 | # define SYS5SIGNALS 1 /* SysV signal semantics -- reset on each sig */ |
---|
1879 | # define HASSETSID 1 /* has Posix setsid(2) call */ |
---|
1880 | # define LA_TYPE LA_READKSYM /* use MIOC_READSYM ioctl */ |
---|
1881 | # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ |
---|
1882 | # define GIDSET_T gid_t |
---|
1883 | # undef WIFEXITED |
---|
1884 | # undef WEXITSTATUS |
---|
1885 | # define NAMELISTMASK 0x7fffffff /* mask for nlist() values */ |
---|
1886 | # ifndef SYSLOG_BUFSIZE |
---|
1887 | # define SYSLOG_BUFSIZE 1024 /* allow full size syslog buffer */ |
---|
1888 | # endif |
---|
1889 | #endif |
---|
1890 | |
---|
1891 | |
---|
1892 | /* |
---|
1893 | ** Fujitsu/ICL UXP/DS (For the DS/90 Series) |
---|
1894 | ** |
---|
1895 | ** From Diego R. Lopez <drlopez@cica.es>. |
---|
1896 | ** Additional changes from Fumio Moriya and Toshiaki Nomura of the |
---|
1897 | ** Fujitsu Fresoftware gruop <dsfrsoft@oai6.yk.fujitsu.co.jp>. |
---|
1898 | */ |
---|
1899 | |
---|
1900 | #ifdef __uxp__ |
---|
1901 | # include <arpa/nameser.h> |
---|
1902 | # include <sys/sysmacros.h> |
---|
1903 | # include <sys/mkdev.h> |
---|
1904 | # define __svr4__ |
---|
1905 | # define HASGETUSERSHELL 0 |
---|
1906 | # define HASFLOCK 0 |
---|
1907 | # if UXPDS == 10 |
---|
1908 | # define HASSNPRINTF 0 /* no snprintf(3) or vsnprintf(3) */ |
---|
1909 | # else |
---|
1910 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
1911 | # endif |
---|
1912 | # define _PATH_UNIX "/stand/unix" |
---|
1913 | # ifndef _PATH_VENDOR_CF |
---|
1914 | # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" |
---|
1915 | # endif |
---|
1916 | # ifndef _PATH_SENDMAILPID |
---|
1917 | # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" |
---|
1918 | # endif |
---|
1919 | #endif |
---|
1920 | |
---|
1921 | /* |
---|
1922 | ** Pyramid DC/OSx |
---|
1923 | ** |
---|
1924 | ** From Earle Ake <akee@wpdiss1.wpafb.af.mil>. |
---|
1925 | */ |
---|
1926 | |
---|
1927 | #ifdef DCOSx |
---|
1928 | # define GIDSET_T gid_t |
---|
1929 | # ifndef IDENTPROTO |
---|
1930 | # define IDENTPROTO 0 /* TCP/IP implementation is broken */ |
---|
1931 | # endif |
---|
1932 | #endif |
---|
1933 | |
---|
1934 | /* |
---|
1935 | ** Concurrent Computer Corporation Maxion |
---|
1936 | ** |
---|
1937 | ** From Donald R. Laster Jr. <laster@access.digex.net>. |
---|
1938 | */ |
---|
1939 | |
---|
1940 | #ifdef __MAXION__ |
---|
1941 | |
---|
1942 | # include <sys/stream.h> |
---|
1943 | # define __svr4__ 1 /* SVR4.2MP */ |
---|
1944 | # define HASSETREUID 1 /* have setreuid(2) */ |
---|
1945 | # define HASLSTAT 1 /* have lstat(2) */ |
---|
1946 | # define HASSETRLIMIT 1 /* have setrlimit(2) */ |
---|
1947 | # define HASGETDTABLESIZE 1 /* have getdtablesize(2) */ |
---|
1948 | # define HASSNPRINTF 1 /* have snprintf(3) */ |
---|
1949 | # define HASGETUSERSHELL 1 /* have getusershell(3) */ |
---|
1950 | # define NOFTRUNCATE 1 /* do not have ftruncate(2) */ |
---|
1951 | # define SLEEP_T unsigned |
---|
1952 | # define SFS_TYPE SFS_STATVFS |
---|
1953 | # define SFS_BAVAIL f_bavail |
---|
1954 | # ifndef SYSLOG_BUFSIZE |
---|
1955 | # define SYSLOG_BUFSIZE 256 /* Use 256 bytes */ |
---|
1956 | # endif |
---|
1957 | |
---|
1958 | # undef WUNTRACED |
---|
1959 | # undef WIFEXITED |
---|
1960 | # undef WIFSIGNALED |
---|
1961 | # undef WIFSTOPPED |
---|
1962 | # undef WEXITSTATUS |
---|
1963 | # undef WTERMSIG |
---|
1964 | # undef WSTOPSIG |
---|
1965 | |
---|
1966 | #endif |
---|
1967 | |
---|
1968 | /* |
---|
1969 | ** Harris Nighthawk PowerUX (nh6000 box) |
---|
1970 | ** |
---|
1971 | ** Contributed by Bob Miorelli, Pratt & Whitney <miorelli@pweh.com> |
---|
1972 | */ |
---|
1973 | |
---|
1974 | #ifdef _PowerUX |
---|
1975 | # ifndef __svr4__ |
---|
1976 | # define __svr4__ |
---|
1977 | # endif |
---|
1978 | # ifndef _PATH_VENDOR_CF |
---|
1979 | # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" |
---|
1980 | # endif |
---|
1981 | # ifndef _PATH_SENDMAILPID |
---|
1982 | # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" |
---|
1983 | # endif |
---|
1984 | # define SYSLOG_BUFSIZE 1024 |
---|
1985 | # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ |
---|
1986 | # define LA_TYPE LA_ZERO |
---|
1987 | typedef struct msgb mblk_t; |
---|
1988 | # undef offsetof /* avoid stddefs.h and sys/sysmacros.h conflict */ |
---|
1989 | #endif |
---|
1990 | |
---|
1991 | /* |
---|
1992 | ** Siemens Nixdorf Informationssysteme AG SINIX |
---|
1993 | ** |
---|
1994 | ** Contributed by Gerald Rinske <Gerald.Rinske@mch.sni.de> |
---|
1995 | ** of Siemens Business Services VAS. |
---|
1996 | */ |
---|
1997 | #ifdef sinix |
---|
1998 | # define SYSLOG_BUFSIZE 1024 |
---|
1999 | #endif |
---|
2000 | |
---|
2001 | /* |
---|
2002 | ** CRAY T3E |
---|
2003 | ** |
---|
2004 | ** Contributed by Manu Mahonen <mailadm@csc.fi> |
---|
2005 | ** of Center for Scientific Computing. |
---|
2006 | */ |
---|
2007 | #ifdef _CRAY |
---|
2008 | # define GET_IPOPT_DST(dst) *(struct in_addr *)&(dst) |
---|
2009 | #endif |
---|
2010 | |
---|
2011 | /********************************************************************** |
---|
2012 | ** End of Per-Operating System defines |
---|
2013 | **********************************************************************/ |
---|
2014 | /********************************************************************** |
---|
2015 | ** More general defines |
---|
2016 | **********************************************************************/ |
---|
2017 | |
---|
2018 | /* general BSD defines */ |
---|
2019 | #ifdef BSD |
---|
2020 | # define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */ |
---|
2021 | # define HASSETREUID 1 /* has setreuid(2) call */ |
---|
2022 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
2023 | # ifndef IP_SRCROUTE |
---|
2024 | # define IP_SRCROUTE 1 /* can check IP source routing */ |
---|
2025 | # endif |
---|
2026 | # ifndef HASSETRLIMIT |
---|
2027 | # define HASSETRLIMIT 1 /* has setrlimit(2) call */ |
---|
2028 | # endif |
---|
2029 | # ifndef HASFLOCK |
---|
2030 | # define HASFLOCK 1 /* has flock(2) call */ |
---|
2031 | # endif |
---|
2032 | # ifndef TZ_TYPE |
---|
2033 | # define TZ_TYPE TZ_TM_ZONE /* use tm->tm_zone variable */ |
---|
2034 | # endif |
---|
2035 | #endif |
---|
2036 | |
---|
2037 | /* general System V Release 4 defines */ |
---|
2038 | #ifdef __svr4__ |
---|
2039 | # define SYSTEM5 1 |
---|
2040 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
2041 | # define HASINITGROUPS 1 /* has initgroups(3) call */ |
---|
2042 | # define BSD_COMP 1 /* get BSD ioctl calls */ |
---|
2043 | # ifndef HASSETRLIMIT |
---|
2044 | # define HASSETRLIMIT 1 /* has setrlimit(2) call */ |
---|
2045 | # endif |
---|
2046 | # ifndef HASGETUSERSHELL |
---|
2047 | # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ |
---|
2048 | # endif |
---|
2049 | # ifndef HASFCHMOD |
---|
2050 | # define HASFCHMOD 1 /* most (all?) SVr4s seem to have fchmod(2) */ |
---|
2051 | # endif |
---|
2052 | |
---|
2053 | # ifndef _PATH_UNIX |
---|
2054 | # define _PATH_UNIX "/unix" |
---|
2055 | # endif |
---|
2056 | # ifndef _PATH_VENDOR_CF |
---|
2057 | # define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf" |
---|
2058 | # endif |
---|
2059 | # ifndef _PATH_SENDMAILPID |
---|
2060 | # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" |
---|
2061 | # endif |
---|
2062 | # ifndef SYSLOG_BUFSIZE |
---|
2063 | # define SYSLOG_BUFSIZE 128 |
---|
2064 | # endif |
---|
2065 | # ifndef SFS_TYPE |
---|
2066 | # define SFS_TYPE SFS_STATVFS |
---|
2067 | # endif |
---|
2068 | |
---|
2069 | # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ |
---|
2070 | #endif |
---|
2071 | |
---|
2072 | /* general System V defines */ |
---|
2073 | #ifdef SYSTEM5 |
---|
2074 | # include <sys/sysmacros.h> |
---|
2075 | # define HASUNAME 1 /* use System V uname(2) system call */ |
---|
2076 | # define SYS5SETPGRP 1 /* use System V setpgrp(2) syscall */ |
---|
2077 | # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ |
---|
2078 | # ifndef HASULIMIT |
---|
2079 | # define HASULIMIT 1 /* has the ulimit(2) syscall */ |
---|
2080 | # endif |
---|
2081 | # ifndef LA_TYPE |
---|
2082 | # ifdef MIOC_READKSYM |
---|
2083 | # define LA_TYPE LA_READKSYM /* use MIOC_READKSYM ioctl */ |
---|
2084 | # else |
---|
2085 | # define LA_TYPE LA_INT /* assume integer load average */ |
---|
2086 | # endif |
---|
2087 | # endif |
---|
2088 | # ifndef SFS_TYPE |
---|
2089 | # define SFS_TYPE SFS_USTAT /* use System V ustat(2) syscall */ |
---|
2090 | # endif |
---|
2091 | # ifndef TZ_TYPE |
---|
2092 | # define TZ_TYPE TZ_TZNAME /* use tzname[] vector */ |
---|
2093 | # endif |
---|
2094 | # define bcopy(s, d, l) (memmove((d), (s), (l))) |
---|
2095 | # define bzero(d, l) (memset((d), '\0', (l))) |
---|
2096 | # define bcmp(s, d, l) (memcmp((s), (d), (l))) |
---|
2097 | #endif |
---|
2098 | |
---|
2099 | /* general POSIX defines */ |
---|
2100 | #ifdef _POSIX_VERSION |
---|
2101 | # define HASSETSID 1 /* has Posix setsid(2) call */ |
---|
2102 | # define HASWAITPID 1 /* has Posix waitpid(2) call */ |
---|
2103 | # if _POSIX_VERSION >= 199500 && !defined(USESETEUID) |
---|
2104 | # define USESETEUID 1 /* has useable seteuid(2) call */ |
---|
2105 | # endif |
---|
2106 | # ifndef bcopy |
---|
2107 | # define bcopy(s, d, l) (memmove((d), (s), (l))) |
---|
2108 | # define bzero(d, l) (memset((d), '\0', (l))) |
---|
2109 | # define bcmp(s, d, l) (memcmp((s), (d), (l))) |
---|
2110 | # endif |
---|
2111 | #endif |
---|
2112 | /* |
---|
2113 | ** Tweaking for systems that (for example) claim to be BSD or POSIX |
---|
2114 | ** but don't have all the standard BSD or POSIX routines (boo hiss). |
---|
2115 | */ |
---|
2116 | |
---|
2117 | #ifdef titan |
---|
2118 | # undef HASINITGROUPS /* doesn't have initgroups(3) call */ |
---|
2119 | #endif |
---|
2120 | |
---|
2121 | #ifdef _CRAYCOM |
---|
2122 | # undef HASSETSID /* despite POSIX claim, doesn't have setsid */ |
---|
2123 | #endif |
---|
2124 | |
---|
2125 | #ifdef ISC_UNIX |
---|
2126 | # undef bcopy /* despite SystemV claim, uses BSD bcopy */ |
---|
2127 | #endif |
---|
2128 | |
---|
2129 | #ifdef ALTOS_SYSTEM_V |
---|
2130 | # undef bcopy /* despite SystemV claim, uses BSD bcopy */ |
---|
2131 | # undef bzero /* despite SystemV claim, uses BSD bzero */ |
---|
2132 | # undef bcmp /* despite SystemV claim, uses BSD bcmp */ |
---|
2133 | #endif |
---|
2134 | |
---|
2135 | #if defined(sun) && !defined(BSD) && !defined(SOLARIS) && !defined(__svr4__) && !defined(__SVR4) |
---|
2136 | # undef bcopy /* SunOS 4 doesn't have memmove() */ |
---|
2137 | #endif |
---|
2138 | |
---|
2139 | |
---|
2140 | /* |
---|
2141 | ** Due to a "feature" in some operating systems such as Ultrix 4.3 and |
---|
2142 | ** HPUX 8.0, if you receive a "No route to host" message (ICMP message |
---|
2143 | ** ICMP_UNREACH_HOST) on _any_ connection, all connections to that host |
---|
2144 | ** are closed. Some firewalls return this error if you try to connect |
---|
2145 | ** to the IDENT port (113), so you can't receive email from these hosts |
---|
2146 | ** on these systems. The firewall really should use a more specific |
---|
2147 | ** message such as ICMP_UNREACH_PROTOCOL or _PORT or _FILTER_PROHIB. If |
---|
2148 | ** not explicitly set to zero above, default it on. |
---|
2149 | */ |
---|
2150 | |
---|
2151 | #ifndef IDENTPROTO |
---|
2152 | # define IDENTPROTO 1 /* use IDENT proto (RFC 1413) */ |
---|
2153 | #endif |
---|
2154 | |
---|
2155 | #ifndef IP_SRCROUTE |
---|
2156 | # define IP_SRCROUTE 1 /* Detect IP source routing */ |
---|
2157 | #endif |
---|
2158 | |
---|
2159 | #ifndef HASGETUSERSHELL |
---|
2160 | # define HASGETUSERSHELL 1 /* libc has getusershell(3) call */ |
---|
2161 | #endif |
---|
2162 | |
---|
2163 | #ifndef NETUNIX |
---|
2164 | # define NETUNIX 1 /* include unix domain support */ |
---|
2165 | #endif |
---|
2166 | |
---|
2167 | #ifndef HASFLOCK |
---|
2168 | # define HASFLOCK 0 /* assume no flock(2) support */ |
---|
2169 | #endif |
---|
2170 | |
---|
2171 | #ifndef HASSETREUID |
---|
2172 | # define HASSETREUID 0 /* assume no setreuid(2) call */ |
---|
2173 | #endif |
---|
2174 | |
---|
2175 | #ifndef HASFCHMOD |
---|
2176 | # define HASFCHMOD 0 /* assume no fchmod(2) syscall */ |
---|
2177 | #endif |
---|
2178 | |
---|
2179 | #ifndef USESETEUID |
---|
2180 | # define USESETEUID 0 /* assume no seteuid(2) call or no saved ids */ |
---|
2181 | #endif |
---|
2182 | |
---|
2183 | #ifndef HASSETRLIMIT |
---|
2184 | # define HASSETRLIMIT 0 /* assume no setrlimit(2) support */ |
---|
2185 | #endif |
---|
2186 | |
---|
2187 | #ifndef HASULIMIT |
---|
2188 | # define HASULIMIT 0 /* assume no ulimit(2) support */ |
---|
2189 | #endif |
---|
2190 | |
---|
2191 | #ifndef SECUREWARE |
---|
2192 | # define SECUREWARE 0 /* assume no SecureWare C2 auditing hooks */ |
---|
2193 | #endif |
---|
2194 | |
---|
2195 | #ifndef USE_SIGLONGJMP |
---|
2196 | # define USE_SIGLONGJMP 0 /* assume setjmp handles signals properly */ |
---|
2197 | #endif |
---|
2198 | |
---|
2199 | #ifndef FDSET_CAST |
---|
2200 | # define FDSET_CAST /* (empty) cast for fd_set arg to select */ |
---|
2201 | #endif |
---|
2202 | |
---|
2203 | /* |
---|
2204 | ** If no type for argument two of getgroups call is defined, assume |
---|
2205 | ** it's an integer -- unfortunately, there seem to be several choices |
---|
2206 | ** here. |
---|
2207 | */ |
---|
2208 | |
---|
2209 | #ifndef GIDSET_T |
---|
2210 | # define GIDSET_T int |
---|
2211 | #endif |
---|
2212 | |
---|
2213 | #ifndef UID_T |
---|
2214 | # define UID_T uid_t |
---|
2215 | #endif |
---|
2216 | |
---|
2217 | #ifndef GID_T |
---|
2218 | # define GID_T gid_t |
---|
2219 | #endif |
---|
2220 | |
---|
2221 | #ifndef SIZE_T |
---|
2222 | # define SIZE_T size_t |
---|
2223 | #endif |
---|
2224 | |
---|
2225 | #ifndef MODE_T |
---|
2226 | # define MODE_T mode_t |
---|
2227 | #endif |
---|
2228 | |
---|
2229 | #ifndef ARGV_T |
---|
2230 | # define ARGV_T char ** |
---|
2231 | #endif |
---|
2232 | |
---|
2233 | #ifndef SOCKADDR_LEN_T |
---|
2234 | # define SOCKADDR_LEN_T int |
---|
2235 | #endif |
---|
2236 | |
---|
2237 | #ifndef SOCKOPT_LEN_T |
---|
2238 | # define SOCKOPT_LEN_T int |
---|
2239 | #endif |
---|
2240 | |
---|
2241 | #ifndef QUAD_T |
---|
2242 | # define QUAD_T unsigned long |
---|
2243 | #endif |
---|
2244 | /********************************************************************** |
---|
2245 | ** Remaining definitions should never have to be changed. They are |
---|
2246 | ** primarily to provide back compatibility for older systems -- for |
---|
2247 | ** example, it includes some POSIX compatibility definitions |
---|
2248 | **********************************************************************/ |
---|
2249 | |
---|
2250 | /* System 5 compatibility */ |
---|
2251 | #ifndef S_ISREG |
---|
2252 | # define S_ISREG(foo) ((foo & S_IFMT) == S_IFREG) |
---|
2253 | #endif |
---|
2254 | #ifndef S_ISDIR |
---|
2255 | # define S_ISDIR(foo) ((foo & S_IFMT) == S_IFDIR) |
---|
2256 | #endif |
---|
2257 | #if !defined(S_ISLNK) && defined(S_IFLNK) |
---|
2258 | # define S_ISLNK(foo) ((foo & S_IFMT) == S_IFLNK) |
---|
2259 | #endif |
---|
2260 | #ifndef S_IRUSR |
---|
2261 | # define S_IRUSR 0400 |
---|
2262 | #endif |
---|
2263 | #ifndef S_IWUSR |
---|
2264 | # define S_IWUSR 0200 |
---|
2265 | #endif |
---|
2266 | #ifndef S_IRGRP |
---|
2267 | # define S_IRGRP 0040 |
---|
2268 | #endif |
---|
2269 | #ifndef S_IWGRP |
---|
2270 | # define S_IWGRP 0020 |
---|
2271 | #endif |
---|
2272 | #ifndef S_IROTH |
---|
2273 | # define S_IROTH 0004 |
---|
2274 | #endif |
---|
2275 | #ifndef S_IWOTH |
---|
2276 | # define S_IWOTH 0002 |
---|
2277 | #endif |
---|
2278 | |
---|
2279 | /* |
---|
2280 | ** Older systems don't have this error code -- it should be in |
---|
2281 | ** /usr/include/sysexits.h. |
---|
2282 | */ |
---|
2283 | |
---|
2284 | # ifndef EX_CONFIG |
---|
2285 | # define EX_CONFIG 78 /* configuration error */ |
---|
2286 | # endif |
---|
2287 | |
---|
2288 | /* pseudo-code used in server SMTP */ |
---|
2289 | # define EX_QUIT 22 /* drop out of server immediately */ |
---|
2290 | |
---|
2291 | /* pseudo-code used for mci_setstat */ |
---|
2292 | # define EX_NOTSTICKY -5 /* don't save persistent status */ |
---|
2293 | |
---|
2294 | |
---|
2295 | /* |
---|
2296 | ** An "impossible" file mode to indicate that the file does not exist. |
---|
2297 | */ |
---|
2298 | |
---|
2299 | #define ST_MODE_NOFILE 0171147 /* unlikely to occur */ |
---|
2300 | |
---|
2301 | |
---|
2302 | /* |
---|
2303 | ** These are used in a few cases where we need some special |
---|
2304 | ** error codes, but where the system doesn't provide something |
---|
2305 | ** reasonable. They are printed in errstring. |
---|
2306 | */ |
---|
2307 | |
---|
2308 | #ifndef E_PSEUDOBASE |
---|
2309 | # define E_PSEUDOBASE 256 |
---|
2310 | #endif |
---|
2311 | |
---|
2312 | #define E_SM_OPENTIMEOUT (E_PSEUDOBASE + 0) /* Timeout on file open */ |
---|
2313 | #define E_SM_NOSLINK (E_PSEUDOBASE + 1) /* Symbolic links not allowed */ |
---|
2314 | #define E_SM_NOHLINK (E_PSEUDOBASE + 2) /* Hard links not allowed */ |
---|
2315 | #define E_SM_REGONLY (E_PSEUDOBASE + 3) /* Regular files only */ |
---|
2316 | #define E_SM_ISEXEC (E_PSEUDOBASE + 4) /* Executable files not allowed */ |
---|
2317 | #define E_SM_WWDIR (E_PSEUDOBASE + 5) /* World writable directory */ |
---|
2318 | #define E_SM_GWDIR (E_PSEUDOBASE + 6) /* Group writable directory */ |
---|
2319 | #define E_SM_FILECHANGE (E_PSEUDOBASE + 7) /* File changed after open */ |
---|
2320 | #define E_SM_WWFILE (E_PSEUDOBASE + 8) /* World writable file */ |
---|
2321 | #define E_SM_GWFILE (E_PSEUDOBASE + 9) /* Group writable file */ |
---|
2322 | #define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ |
---|
2323 | |
---|
2324 | /* type of arbitrary pointer */ |
---|
2325 | #ifndef ARBPTR_T |
---|
2326 | # define ARBPTR_T void * |
---|
2327 | #endif |
---|
2328 | |
---|
2329 | #ifndef __P |
---|
2330 | # include "cdefs.h" |
---|
2331 | #endif |
---|
2332 | |
---|
2333 | #if HESIOD && !defined(NAMED_BIND) |
---|
2334 | # define NAMED_BIND 1 /* not one without the other */ |
---|
2335 | #endif |
---|
2336 | |
---|
2337 | #if NAMED_BIND && !defined(__ksr__) && !defined(h_errno) |
---|
2338 | extern int h_errno; |
---|
2339 | #endif |
---|
2340 | |
---|
2341 | /* |
---|
2342 | ** Do some required dependencies |
---|
2343 | */ |
---|
2344 | |
---|
2345 | #if NETINET || NETISO |
---|
2346 | # ifndef SMTP |
---|
2347 | # define SMTP 1 /* enable user and server SMTP */ |
---|
2348 | # endif |
---|
2349 | # ifndef QUEUE |
---|
2350 | # define QUEUE 1 /* enable queueing */ |
---|
2351 | # endif |
---|
2352 | # ifndef DAEMON |
---|
2353 | # define DAEMON 1 /* include the daemon (requires IPC & SMTP) */ |
---|
2354 | # endif |
---|
2355 | #endif |
---|
2356 | |
---|
2357 | |
---|
2358 | /* |
---|
2359 | ** Arrange to use either varargs or stdargs |
---|
2360 | */ |
---|
2361 | |
---|
2362 | # ifdef __STDC__ |
---|
2363 | |
---|
2364 | # include <stdarg.h> |
---|
2365 | |
---|
2366 | # define VA_LOCAL_DECL va_list ap; |
---|
2367 | # define VA_START(f) va_start(ap, f) |
---|
2368 | # define VA_END va_end(ap) |
---|
2369 | |
---|
2370 | # else |
---|
2371 | |
---|
2372 | # include <varargs.h> |
---|
2373 | |
---|
2374 | # define VA_LOCAL_DECL va_list ap; |
---|
2375 | # define VA_START(f) va_start(ap) |
---|
2376 | # define VA_END va_end(ap) |
---|
2377 | |
---|
2378 | # endif |
---|
2379 | |
---|
2380 | #ifdef HASUNAME |
---|
2381 | # include <sys/utsname.h> |
---|
2382 | # ifdef newstr |
---|
2383 | # undef newstr |
---|
2384 | # endif |
---|
2385 | #else /* ! HASUNAME */ |
---|
2386 | # define NODE_LENGTH 32 |
---|
2387 | struct utsname |
---|
2388 | { |
---|
2389 | char nodename[NODE_LENGTH+1]; |
---|
2390 | }; |
---|
2391 | #endif /* HASUNAME */ |
---|
2392 | |
---|
2393 | #if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) |
---|
2394 | # define MAXHOSTNAMELEN 256 |
---|
2395 | #endif |
---|
2396 | |
---|
2397 | #if !defined(SIGCHLD) && defined(SIGCLD) |
---|
2398 | # define SIGCHLD SIGCLD |
---|
2399 | #endif |
---|
2400 | |
---|
2401 | #ifndef STDIN_FILENO |
---|
2402 | # define STDIN_FILENO 0 |
---|
2403 | #endif |
---|
2404 | |
---|
2405 | #ifndef STDOUT_FILENO |
---|
2406 | # define STDOUT_FILENO 1 |
---|
2407 | #endif |
---|
2408 | |
---|
2409 | #ifndef STDERR_FILENO |
---|
2410 | # define STDERR_FILENO 2 |
---|
2411 | #endif |
---|
2412 | |
---|
2413 | #ifndef LOCK_SH |
---|
2414 | # define LOCK_SH 0x01 /* shared lock */ |
---|
2415 | # define LOCK_EX 0x02 /* exclusive lock */ |
---|
2416 | # define LOCK_NB 0x04 /* non-blocking lock */ |
---|
2417 | # define LOCK_UN 0x08 /* unlock */ |
---|
2418 | #endif |
---|
2419 | |
---|
2420 | #ifndef S_IXOTH |
---|
2421 | # define S_IXOTH (S_IEXEC >> 6) |
---|
2422 | #endif |
---|
2423 | |
---|
2424 | #ifndef S_IXGRP |
---|
2425 | # define S_IXGRP (S_IEXEC >> 3) |
---|
2426 | #endif |
---|
2427 | |
---|
2428 | #ifndef S_IXUSR |
---|
2429 | # define S_IXUSR (S_IEXEC) |
---|
2430 | #endif |
---|
2431 | |
---|
2432 | #ifndef SEEK_SET |
---|
2433 | # define SEEK_SET 0 |
---|
2434 | # define SEEK_CUR 1 |
---|
2435 | # define SEEK_END 2 |
---|
2436 | #endif |
---|
2437 | |
---|
2438 | #ifndef SIG_ERR |
---|
2439 | # define SIG_ERR ((void (*)()) -1) |
---|
2440 | #endif |
---|
2441 | |
---|
2442 | #ifndef WEXITSTATUS |
---|
2443 | # define WEXITSTATUS(st) (((st) >> 8) & 0377) |
---|
2444 | #endif |
---|
2445 | #ifndef WIFEXITED |
---|
2446 | # define WIFEXITED(st) (((st) & 0377) == 0) |
---|
2447 | #endif |
---|
2448 | |
---|
2449 | #ifndef SIGFUNC_DEFINED |
---|
2450 | typedef void (*sigfunc_t) __P((int)); |
---|
2451 | #endif |
---|
2452 | #ifndef SIGFUNC_RETURN |
---|
2453 | # define SIGFUNC_RETURN |
---|
2454 | #endif |
---|
2455 | #ifndef SIGFUNC_DECL |
---|
2456 | # define SIGFUNC_DECL void |
---|
2457 | #endif |
---|
2458 | |
---|
2459 | /* size of syslog buffer */ |
---|
2460 | #ifndef SYSLOG_BUFSIZE |
---|
2461 | # define SYSLOG_BUFSIZE 1024 |
---|
2462 | #endif |
---|
2463 | |
---|
2464 | /* |
---|
2465 | ** Size of prescan buffer. |
---|
2466 | ** Despite comments in the _sendmail_ book, this probably should |
---|
2467 | ** not be changed; there are some hard-to-define dependencies. |
---|
2468 | */ |
---|
2469 | |
---|
2470 | # define PSBUFSIZE (MAXNAME + MAXATOM) /* size of prescan buffer */ |
---|
2471 | |
---|
2472 | /* fork routine -- set above using #ifdef _osname_ or in Makefile */ |
---|
2473 | # ifndef FORK |
---|
2474 | # define FORK fork /* function to call to fork mailer */ |
---|
2475 | # endif |
---|
2476 | |
---|
2477 | /* |
---|
2478 | ** Default to using scanf in readcf. |
---|
2479 | */ |
---|
2480 | |
---|
2481 | #ifndef SCANF |
---|
2482 | # define SCANF 1 |
---|
2483 | #endif |
---|
2484 | |
---|
2485 | /* |
---|
2486 | ** SVr4 and similar systems use different routines for setjmp/longjmp |
---|
2487 | ** with signal support |
---|
2488 | */ |
---|
2489 | |
---|
2490 | #if USE_SIGLONGJMP |
---|
2491 | # ifdef jmp_buf |
---|
2492 | # undef jmp_buf |
---|
2493 | # endif |
---|
2494 | # define jmp_buf sigjmp_buf |
---|
2495 | # ifdef setjmp |
---|
2496 | # undef setjmp |
---|
2497 | # endif |
---|
2498 | # define setjmp(env) sigsetjmp(env, 1) |
---|
2499 | # ifdef longjmp |
---|
2500 | # undef longjmp |
---|
2501 | # endif |
---|
2502 | # define longjmp(env, val) siglongjmp(env, val) |
---|
2503 | #endif |
---|
2504 | |
---|
2505 | #if !defined(NGROUPS_MAX) && defined(NGROUPS) |
---|
2506 | # define NGROUPS_MAX NGROUPS /* POSIX naming convention */ |
---|
2507 | #endif |
---|
2508 | |
---|
2509 | /* |
---|
2510 | ** If we don't have a system syslog, simulate it. |
---|
2511 | */ |
---|
2512 | |
---|
2513 | #if !LOG |
---|
2514 | # define LOG_EMERG 0 /* system is unusable */ |
---|
2515 | # define LOG_ALERT 1 /* action must be taken immediately */ |
---|
2516 | # define LOG_CRIT 2 /* critical conditions */ |
---|
2517 | # define LOG_ERR 3 /* error conditions */ |
---|
2518 | # define LOG_WARNING 4 /* warning conditions */ |
---|
2519 | # define LOG_NOTICE 5 /* normal but significant condition */ |
---|
2520 | # define LOG_INFO 6 /* informational */ |
---|
2521 | # define LOG_DEBUG 7 /* debug-level messages */ |
---|
2522 | #endif |
---|