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