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