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