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