1#ifndef _SYS_DEFS_H_INCLUDED_ 2#define _SYS_DEFS_H_INCLUDED_ 3 4/*++ 5/* NAME 6/* sys_defs 3h 7/* SUMMARY 8/* portability header 9/* SYNOPSIS 10/* #include <sys_defs.h> 11/* DESCRIPTION 12/* .nf 13 14 /* 15 * Specific platforms. Major release numbers differ for a good reason. So be 16 * a good girl, plan for the future, and at least include the major release 17 * number in the system type (for example, SUNOS5 or FREEBSD2). The system 18 * type is determined by the makedefs shell script in the top-level 19 * directory. Adding support for a new system type means updating the 20 * makedefs script, and adding a section below for the new system. 21 */ 22 23 /* 24 * 4.4BSD and close derivatives. 25 */ 26#if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \ 27 || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \ 28 || defined(FREEBSD8) \ 29 || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \ 30 || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \ 31 || defined(OPENBSD5) \ 32 || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \ 33 || defined(NETBSD4) \ 34 || defined(EKKOBSD1) 35#define SUPPORTED 36#include <sys/types.h> 37#include <sys/param.h> 38#define UINT32_TYPE unsigned int 39#define UINT16_TYPE unsigned short 40#define USE_PATHS_H 41#define HAS_FLOCK_LOCK 42#define HAS_FCNTL_LOCK 43#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 44#define DEF_MAILBOX_LOCK "flock, dotlock" 45#define HAS_SUN_LEN 46#define HAS_FSYNC 47#define HAS_DB 48#define HAS_SA_LEN 49#define DEF_DB_TYPE "hash" 50#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000) 51#define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* sendmail 8.10 */ 52#endif 53#if (defined(OpenBSD) && OpenBSD >= 200006) 54#define ALIAS_DB_MAP "hash:/etc/mail/aliases" /* OpenBSD 2.7 */ 55#endif 56#ifndef ALIAS_DB_MAP 57#define ALIAS_DB_MAP "hash:/etc/aliases" 58#endif 59#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 60#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" 61#if (defined(__NetBSD_Version__) && __NetBSD_Version__ > 299000900) 62# define USE_STATVFS 63# define STATVFS_IN_SYS_STATVFS_H 64#else 65# define USE_STATFS 66# define STATFS_IN_SYS_MOUNT_H 67#endif 68#define HAS_POSIX_REGEXP 69#define HAS_ST_GEN /* struct stat contains inode 70 * generation number */ 71#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 72#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 73#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 74#define NATIVE_COMMAND_DIR "/usr/sbin" 75#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 76#endif 77 78#ifdef FREEBSD2 79#define getsid(p) getpgrp() 80#ifndef CMSG_SPACE 81#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) 82#endif 83#ifndef CMSG_LEN 84#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 85#endif 86#ifndef CMSG_ALIGN 87#define CMSG_ALIGN(n) ALIGN(n) 88#endif 89#endif /* FREEBSD2 */ 90 91#ifdef BSDI4 92/* #define HAS_IPV6 find out interface lookup method */ 93#endif 94 95/* __FreeBSD_version version is major+minor */ 96 97#if __FreeBSD_version >= 220000 98#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" /* introduced 2.1.5 */ 99#endif 100 101#if __FreeBSD_version >= 300000 102#define HAS_ISSETUGID 103#define HAS_FUTIMES 104#endif 105 106#if __FreeBSD_version >= 400000 107#define SOCKADDR_SIZE socklen_t 108#define SOCKOPT_SIZE socklen_t 109#endif 110 111#if __FreeBSD_version >= 420000 112#define HAS_DUPLEX_PIPE /* 4.1 breaks with kqueue(2) */ 113#endif 114 115#if (__FreeBSD_version >= 702104 && __FreeBSD_version <= 800000) \ 116 || __FreeBSD_version >= 800100 117#define HAS_CLOSEFROM 118#endif 119 120/* OpenBSD version is year+month */ 121 122#if OpenBSD >= 199805 /* XXX */ 123#define HAS_FUTIMES /* XXX maybe earlier */ 124#endif 125 126#if (defined(OpenBSD) && OpenBSD >= 199608) 127#define PREFERRED_RAND_SOURCE "dev:/dev/arandom" /* XXX earlier */ 128#endif 129 130#if OpenBSD >= 200000 /* XXX */ 131#define HAS_ISSETUGID 132#endif 133 134#if OpenBSD >= 200200 /* XXX */ 135#define SOCKADDR_SIZE socklen_t 136#define SOCKOPT_SIZE socklen_t 137#endif 138 139#if OpenBSD >= 200405 /* 3.5 */ 140#define HAS_CLOSEFROM 141#endif 142 143/* __NetBSD_Version__ is major+minor */ 144 145#if __NetBSD_Version__ >= 103000000 /* XXX maybe earlier */ 146#undef DEF_MAILBOX_LOCK 147#define DEF_MAILBOX_LOCK "flock, dotlock" 148#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" /* XXX maybe earlier */ 149#endif 150 151#if __NetBSD_Version__ >= 105000000 152#define HAS_ISSETUGID /* XXX maybe earlier */ 153#endif 154 155#if __NetBSD_Version__ >= 106000000 /* XXX maybe earlier */ 156#define SOCKADDR_SIZE socklen_t 157#define SOCKOPT_SIZE socklen_t 158#endif 159 160#if __NetBSD_Version__ >= 299000900 /* 2.99.9 */ 161#define HAS_CLOSEFROM 162#endif 163 164#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 102000000) 165#define HAS_FUTIMES 166#endif 167 168#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105000000) \ 169 || (defined(__FreeBSD__) && __FreeBSD__ >= 4) \ 170 || (defined(OpenBSD) && OpenBSD >= 200003) \ 171 || defined(USAGI_LIBINET6) 172#ifndef NO_IPV6 173# define HAS_IPV6 174# define HAVE_GETIFADDRS 175#endif 176 177#if (defined(__FreeBSD_version) && __FreeBSD_version >= 300000) \ 178 || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 103000000) \ 179 || (defined(OpenBSD) && OpenBSD >= 199700) /* OpenBSD 2.0?? */ 180# define USE_SYSV_POLL 181#endif 182 183#ifndef NO_KQUEUE 184# if (defined(__FreeBSD_version) && __FreeBSD_version >= 410000) \ 185 || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200000000) \ 186 || (defined(OpenBSD) && OpenBSD >= 200105) /* OpenBSD 2.9 */ 187# define EVENTS_STYLE EVENTS_STYLE_KQUEUE 188# endif 189#endif 190 191#ifndef NO_POSIX_GETPW_R 192# if (defined(__FreeBSD_version) && __FreeBSD_version >= 510000) \ 193 || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 300000000) \ 194 || (defined(OpenBSD) && OpenBSD >= 200811) /* OpenBSD 4.4 */ 195# define HAVE_POSIX_GETPW_R 196# endif 197#endif 198 199#endif 200 201 /* 202 * UNIX on MAC. 203 */ 204#if defined(RHAPSODY5) || defined(MACOSX) 205#define SUPPORTED 206#include <sys/types.h> 207#define UINT32_TYPE unsigned int 208#define UINT16_TYPE unsigned short 209#define USE_PATHS_H 210#define HAS_FLOCK_LOCK 211#define HAS_FCNTL_LOCK 212#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 213#define DEF_MAILBOX_LOCK "flock, dotlock" 214#define HAS_SUN_LEN 215#define HAS_FSYNC 216#define HAS_DB 217#define HAS_SA_LEN 218#define DEF_DB_TYPE "hash" 219#define ALIAS_DB_MAP "hash:/etc/aliases" 220#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 221#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" 222#define USE_STATFS 223#define STATFS_IN_SYS_MOUNT_H 224#define HAS_POSIX_REGEXP 225/* APPLE 226#define NORETURN void 227#define PRINTFLIKE(x,y) 228#define SCANFLIKE(x,y) 229*/ 230#ifndef NO_NETINFO 231# define HAS_NETINFO 232#endif 233#ifndef NO_IPV6 234# define HAS_IPV6 235# define HAVE_GETIFADDRS 236#endif 237#define HAS_FUTIMES /* XXX Guessing */ 238#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 239#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 240#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 241#define NATIVE_COMMAND_DIR "/usr/sbin" 242#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 243#define SOCKADDR_SIZE socklen_t 244#define SOCKOPT_SIZE socklen_t 245#ifndef NO_KQUEUE 246# define EVENTS_STYLE EVENTS_STYLE_KQUEUE 247# define USE_SYSV_POLL 248#endif 249#ifndef NO_POSIX_GETPW_R 250# define HAVE_POSIX_GETPW_R 251#endif 252 253#endif 254 255 /* 256 * Ultrix 4.x, a sort of 4.[1-2] BSD system with System V.2 compatibility 257 * and POSIX. 258 */ 259#ifdef ULTRIX4 260#define SUPPORTED 261#define UINT32_TYPE unsigned int 262#define UINT16_TYPE unsigned short 263/* Ultrix by default has only 64 descriptors per process */ 264#ifndef FD_SETSIZE 265#define FD_SETSIZE 96 266#endif 267#include <sys/types.h> 268#define _PATH_MAILDIR "/var/spool/mail" 269#define _PATH_BSHELL "/bin/sh" 270#define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb" 271#define _PATH_STDPATH "/bin:/usr/bin:/usr/etc:/usr/ucb" 272#define HAS_FLOCK_LOCK 273#define HAS_FCNTL_LOCK 274#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 275#define DEF_MAILBOX_LOCK "flock, dotlock" 276#define HAS_FSYNC 277/* might be set by makedef */ 278#ifdef HAS_DB 279#define DEF_DB_TYPE "hash" 280#define ALIAS_DB_MAP "hash:/etc/aliases" 281#else 282#define HAS_DBM 283#define DEF_DB_TYPE "dbm" 284#define ALIAS_DB_MAP "dbm:/etc/aliases" 285#endif 286extern int optind; 287extern char *optarg; 288extern int opterr; 289extern int h_errno; 290 291#define MISSING_STRFTIME_E 292#ifndef NO_NIS 293#define HAS_NIS 294#endif 295#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 296#define ROOT_PATH "/bin:/usr/bin:/etc:/usr/etc:/usr/ucb" 297#define USE_STATFS 298#define USE_STRUCT_FS_DATA 299#define STATFS_IN_SYS_MOUNT_H 300/* Ultrix misses just S_ISSOCK, the others are there */ 301#define S_ISSOCK(mode) (((mode) & (S_IFMT)) == (S_IFSOCK)) 302#define DUP2_DUPS_CLOSE_ON_EXEC 303#define MISSING_USLEEP 304#define NO_HERRNO 305#define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail" 306#define NATIVE_COMMAND_DIR "/usr/etc" 307#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 308#endif 309 310 /* 311 * OSF, then Digital UNIX, then Compaq. A BSD-flavored hybrid. 312 */ 313#ifdef OSF1 314#define SUPPORTED 315#include <sys/types.h> 316#define UINT32_TYPE unsigned int 317#define UINT16_TYPE unsigned short 318#define MISSING_SETENV 319#define USE_PATHS_H 320#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 321#define HAS_FLOCK_LOCK 322#define HAS_FCNTL_LOCK 323#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 324#define DEF_MAILBOX_LOCK "flock, dotlock" 325#define HAS_FSYNC 326#define HAVE_BASENAME 327#define HAS_DBM 328#define DEF_DB_TYPE "dbm" 329#define ALIAS_DB_MAP "dbm:/var/adm/sendmail/aliases" 330extern int optind; /* XXX use <getopt.h> */ 331extern char *optarg; /* XXX use <getopt.h> */ 332extern int opterr; /* XXX use <getopt.h> */ 333 334#ifndef NO_NIS 335#define HAS_NIS 336#endif 337#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 338#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 339#define USE_STATFS 340#define STATFS_IN_SYS_MOUNT_H 341#define HAS_POSIX_REGEXP 342#define BROKEN_WRITE_SELECT_ON_NON_BLOCKING_PIPE 343#define NO_MSGHDR_MSG_CONTROL 344#ifndef NO_IPV6 345# define HAS_IPV6 346#endif 347 348#endif 349 350 /* 351 * SunOS 4.x, a mostly 4.[2-3] BSD system with System V.2 compatibility and 352 * POSIX support. 353 */ 354#ifdef SUNOS4 355#define SUPPORTED 356#include <sys/types.h> 357#include <memory.h> 358#define UINT32_TYPE unsigned int 359#define UINT16_TYPE unsigned short 360#define UNSAFE_CTYPE 361#define fpos_t long 362#define MISSING_SETENV 363#define MISSING_STRERROR 364#define MISSING_STRTOUL 365#define _PATH_MAILDIR "/var/spool/mail" 366#define _PATH_BSHELL "/bin/sh" 367#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 368#define _PATH_STDPATH "/usr/bin:/usr/etc:/usr/ucb" 369#define HAS_FLOCK_LOCK 370#define HAS_FCNTL_LOCK 371#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 372#define DEF_MAILBOX_LOCK "flock, dotlock" 373#define HAS_FSYNC 374#define HAS_DBM 375#define DEF_DB_TYPE "dbm" 376#define ALIAS_DB_MAP "dbm:/etc/aliases" 377extern int optind; 378extern char *optarg; 379extern int opterr; 380 381#ifndef NO_NIS 382#define HAS_NIS 383#endif 384#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 385#define ROOT_PATH "/bin:/usr/bin:/etc:/usr/etc:/usr/ucb" 386#define USE_STATFS 387#define STATFS_IN_SYS_VFS_H 388#define memmove(d,s,l) bcopy(s,d,l) 389#define NO_HERRNO 390#define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail" 391#define NATIVE_MAILQ_PATH "/usr/ucb/mailq" 392#define NATIVE_NEWALIAS_PATH "/usr/ucb/newaliases" 393#define NATIVE_COMMAND_DIR "/usr/etc" 394#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 395#define STRCASECMP_IN_STRINGS_H 396#define OCTAL_TO_UNSIGNED(res, str) sscanf((str), "%o", &(res)) 397#define size_t unsigned 398#define ssize_t int 399#define getsid getpgrp 400#endif 401 402 /* 403 * SunOS 5.x, mostly System V Release 4. 404 */ 405#ifdef SUNOS5 406#define SUPPORTED 407#define _SVID_GETTOD /* Solaris 2.5, XSH4.2 versus SVID */ 408#include <sys/types.h> 409#define UINT32_TYPE unsigned int 410#define UINT16_TYPE unsigned short 411#define MISSING_SETENV 412#define _PATH_MAILDIR "/var/mail" 413#define _PATH_BSHELL "/bin/sh" 414#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 415#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 416#define HAS_FCNTL_LOCK 417#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 418#define DEF_MAILBOX_LOCK "fcntl, dotlock" 419#define HAS_FSYNC 420#define HAS_DBM 421#define DEF_DB_TYPE "dbm" 422#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" 423#ifndef NO_NIS 424#define HAS_NIS 425#define HAS_NISPLUS 426#endif 427#define USE_SYS_SOCKIO_H /* Solaris 2.5, changed sys/ioctl.h */ 428#define GETTIMEOFDAY(t) gettimeofday(t) 429#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 430#define FIONREAD_IN_SYS_FILIO_H 431#define USE_STATVFS 432#define STATVFS_IN_SYS_STATVFS_H 433#define INT_MAX_IN_LIMITS_H 434#define STREAM_CONNECTIONS /* avoid UNIX-domain sockets */ 435#define LOCAL_LISTEN stream_listen 436#define LOCAL_ACCEPT stream_accept 437#define LOCAL_CONNECT stream_connect 438#define LOCAL_TRIGGER stream_trigger 439#define LOCAL_SEND_FD stream_send_fd 440#define LOCAL_RECV_FD stream_recv_fd 441#define PASS_CONNECT stream_pass_connect 442#define PASS_LISTEN stream_pass_listen 443#define PASS_ACCEPT stream_pass_accept 444#define PASS_TRIGGER stream_pass_trigger 445#define HAS_VOLATILE_LOCKS 446#define BROKEN_READ_SELECT_ON_TCP_SOCKET 447#define CANT_WRITE_BEFORE_SENDING_FD 448#ifndef NO_POSIX_REGEXP 449# define HAS_POSIX_REGEXP 450#endif 451#ifndef NO_IPV6 452# define HAS_IPV6 453# define HAS_SIOCGLIF 454#endif 455#ifndef NO_CLOSEFROM 456# define HAS_CLOSEFROM 457#endif 458#ifndef NO_DEV_URANDOM 459# define PREFERRED_RAND_SOURCE "dev:/dev/urandom" 460#endif 461#ifndef NO_FUTIMESAT 462# define HAS_FUTIMESAT 463#endif 464#define USE_SYSV_POLL 465#ifndef NO_DEVPOLL 466# define EVENTS_STYLE EVENTS_STYLE_DEVPOLL 467#endif 468#ifndef NO_POSIX_GETPW_R 469# define HAVE_POSIX_GETPW_R 470# define GETPW_R_NEEDS_POSIX_PTHREAD_SEMANTICS 471#endif 472 473/* 474 * Allow build environment to override paths. 475 */ 476#define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail" 477#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 478#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 479#define NATIVE_COMMAND_DIR "/usr/sbin" 480#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 481#endif 482 483 /* 484 * UnixWare, System Release 4. 485 */ 486#ifdef UW7 /* UnixWare 7 */ 487#define SUPPORTED 488#include <sys/types.h> 489#define UINT32_TYPE unsigned int 490#define UINT16_TYPE unsigned short 491#define _PATH_MAILDIR "/var/mail" 492#define _PATH_BSHELL "/bin/sh" 493#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 494#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 495#define MISSING_SETENV 496#define HAS_FCNTL_LOCK 497#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 498#define DEF_MAILBOX_LOCK "fcntl, dotlock" 499#define HAS_FSYNC 500#define HAS_DBM 501#define DEF_DB_TYPE "dbm" 502#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" 503#ifndef NO_NIS 504#define HAS_NIS 505#endif 506#define USE_SYS_SOCKIO_H 507#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 508#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 509#define FIONREAD_IN_SYS_FILIO_H 510#define DBM_NO_TRAILING_NULL 511#define USE_STATVFS 512#define STATVFS_IN_SYS_STATVFS_H 513#define STRCASECMP_IN_STRINGS_H 514#define SET_H_ERRNO(err) (set_h_errno(err)) 515#endif 516 517#ifdef UW21 /* UnixWare 2.1.x */ 518#define SUPPORTED 519#include <sys/types.h> 520#define UINT32_TYPE unsigned int 521#define UINT16_TYPE unsigned short 522#define _PATH_MAILDIR "/var/mail" 523#define _PATH_BSHELL "/bin/sh" 524#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 525#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 526#define MISSING_SETENV 527#define HAS_FCNTL_LOCK 528#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 529#define DEF_MAILBOX_LOCK "fcntl, dotlock" 530#define HAS_FSYNC 531#define HAS_DBM 532#define DEF_DB_TYPE "dbm" 533#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" 534#ifndef NO_NIS 535#define HAS_NIS */ 536#endif 537#define USE_SYS_SOCKIO_H 538#define GETTIMEOFDAY(t) gettimeofday(t,NULL) 539#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 540#define FIONREAD_IN_SYS_FILIO_H 541#define DBM_NO_TRAILING_NULL 542#define USE_STATVFS 543#define STATVFS_IN_SYS_STATVFS_H 544#endif 545 546 /* 547 * AIX: a SYSV-flavored hybrid. NB: fcntl() and flock() access the same 548 * underlying locking primitives. 549 */ 550#if defined(AIX5) || defined(AIX6) 551#define SUPPORTED 552#include <sys/types.h> 553#define UINT32_TYPE unsigned int 554#define UINT16_TYPE unsigned short 555#define MISSING_SETENV 556#define USE_PATHS_H 557#ifndef _PATH_BSHELL 558#define _PATH_BSHELL "/bin/sh" 559#endif 560#ifndef _PATH_MAILDIR 561#define _PATH_MAILDIR "/var/spool/mail" /* paths.h lies */ 562#endif 563#ifndef _PATH_DEFPATH 564#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 565#endif 566#ifndef _PATH_STDPATH 567#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 568#endif 569#define HAS_FCNTL_LOCK 570#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 571#define DEF_MAILBOX_LOCK "fcntl, dotlock" 572#define USE_SYS_SELECT_H 573#define HAS_FSYNC 574#define HAS_DBM 575#define DEF_DB_TYPE "dbm" 576#define ALIAS_DB_MAP "dbm:/etc/aliases" 577#ifndef NO_NIS 578#define HAS_NIS 579#endif 580#define HAS_SA_LEN 581#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 582#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 583#define SOCKADDR_SIZE socklen_t 584#define SOCKOPT_SIZE socklen_t 585#define USE_STATVFS 586#define STATVFS_IN_SYS_STATVFS_H 587#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 588#define NATIVE_MAILQ_PATH "/usr/sbin/mailq" 589#define NATIVE_NEWALIAS_PATH "/usr/sbin/newaliases" 590#define NATIVE_COMMAND_DIR "/usr/sbin" 591#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 592 593 /* 594 * XXX Need CMSG_SPACE() and CMSG_LEN() but don't want to drag in everything 595 * that comes with _LINUX_SOURCE_COMPAT. 596 */ 597#include <sys/socket.h> 598#ifndef CMSG_SPACE 599#define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len)) 600#endif 601#ifndef CMSG_LEN 602#define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 603#endif 604#ifndef NO_IPV6 605# define HAS_IPV6 606#endif 607#define BROKEN_AI_PASSIVE_NULL_HOST 608#define BROKEN_AI_NULL_SERVICE 609#define USE_SYSV_POLL 610#define MYMALLOC_FUZZ 1 611#endif 612 613#ifdef AIX4 614#define SUPPORTED 615#include <sys/types.h> 616#define UINT32_TYPE unsigned int 617#define UINT16_TYPE unsigned short 618#define MISSING_SETENV 619#define _PATH_BSHELL "/bin/sh" 620#define _PATH_MAILDIR "/var/spool/mail" /* paths.h lies */ 621#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 622#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 623#define HAS_FCNTL_LOCK 624#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 625#define DEF_MAILBOX_LOCK "fcntl, dotlock" 626#define USE_SYS_SELECT_H 627#define HAS_FSYNC 628#define HAS_DBM 629#define DEF_DB_TYPE "dbm" 630#define ALIAS_DB_MAP "dbm:/etc/aliases" 631#ifndef NO_NIS 632#define HAS_NIS 633#endif 634#define HAS_SA_LEN 635#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 636#define RESOLVE_H_NEEDS_STDIO_H 637#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 638#define SOCKADDR_SIZE size_t 639#define SOCKOPT_SIZE size_t 640#define USE_STATVFS 641#define STATVFS_IN_SYS_STATVFS_H 642#define STRCASECMP_IN_STRINGS_H 643#if 0 644extern time_t time(time_t *); 645extern int seteuid(uid_t); 646extern int setegid(gid_t); 647extern int initgroups(const char *, int); 648 649#endif 650#define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail" 651#define NATIVE_MAILQ_PATH "/usr/sbin/mailq" 652#define NATIVE_NEWALIAS_PATH "/usr/sbin/newaliases" 653#define NATIVE_COMMAND_DIR "/usr/sbin" 654#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 655 656#define CANT_USE_SEND_RECV_MSG 657#endif 658 659#ifdef AIX3 660#define SUPPORTED 661#include <sys/types.h> 662#define UINT32_TYPE unsigned int 663#define UINT16_TYPE unsigned short 664#define MISSING_SETENV 665#define _PATH_BSHELL "/bin/sh" 666#define _PATH_MAILDIR "/var/spool/mail" /* paths.h lies */ 667#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 668#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 669#define HAS_FCNTL_LOCK 670#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 671#define DEF_MAILBOX_LOCK "fcntl, dotlock" 672#define USE_SYS_SELECT_H 673#define HAS_FSYNC 674#define HAS_DBM 675#define DEF_DB_TYPE "dbm" 676#define ALIAS_DB_MAP "dbm:/etc/aliases" 677#ifndef NO_NIS 678#define HAS_NIS 679#endif 680#define HAS_SA_LEN 681#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 682#define RESOLVE_H_NEEDS_STDIO_H 683#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 684#define SOCKADDR_SIZE size_t 685#define SOCKOPT_SIZE size_t 686#define USE_STATFS 687#define STATFS_IN_SYS_STATFS_H 688#define STRCASECMP_IN_STRINGS_H 689extern time_t time(time_t *); 690extern int seteuid(uid_t); 691extern int setegid(gid_t); 692extern int initgroups(const char *, int); 693 694#define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail" 695 696#define CANT_USE_SEND_RECV_MSG 697#endif 698 699 /* 700 * IRIX, a mix of System V Releases. 701 */ 702#if defined(IRIX5) || defined(IRIX6) 703#define SUPPORTED 704#include <sys/types.h> 705#define UINT32_TYPE unsigned int 706#define UINT16_TYPE unsigned short 707#define MISSING_SETENV 708#define _PATH_MAILDIR "/var/mail" 709#define _PATH_BSHELL "/bin/sh" 710#define _PATH_DEFPATH "/usr/bin:/usr/bsd" 711#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/bsd" 712#define HAS_FCNTL_LOCK 713#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 714#define DEF_MAILBOX_LOCK "fcntl, dotlock" 715#define HAS_FSYNC 716#define HAS_DBM 717#define DEF_DB_TYPE "dbm" 718#define ALIAS_DB_MAP "dbm:/etc/aliases" 719#ifndef NO_NIS 720#define HAS_NIS 721#endif 722#define USE_SYS_SOCKIO_H /* XXX check */ 723#define GETTIMEOFDAY(t) gettimeofday(t) 724#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/bsd" 725#define FIONREAD_IN_SYS_FILIO_H /* XXX check */ 726#define DBM_NO_TRAILING_NULL /* XXX check */ 727#define USE_STATVFS 728#define STATVFS_IN_SYS_STATVFS_H 729#define BROKEN_WRITE_SELECT_ON_NON_BLOCKING_PIPE 730#define CANT_USE_SEND_RECV_MSG 731#endif 732 733#if defined(IRIX5) 734#define MISSING_USLEEP 735#endif 736 737#if defined(IRIX6) 738#ifndef NO_IPV6 739# define HAS_IPV6 740#endif 741#define HAS_POSIX_REGEXP 742#define PIPES_CANT_FIONREAD 743#endif 744 745 /* 746 * LINUX. 747 */ 748#if defined(LINUX2) || defined(LINUX3) 749#define SUPPORTED 750#include <sys/types.h> 751#define UINT32_TYPE unsigned int 752#define UINT16_TYPE unsigned short 753#include <features.h> 754#define USE_PATHS_H 755#define HAS_FLOCK_LOCK 756#define HAS_FCNTL_LOCK 757#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 758#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ 759#define HAS_FSYNC 760#define HAS_DB 761#define DEF_DB_TYPE "hash" 762#define ALIAS_DB_MAP "hash:/etc/aliases" 763#ifndef NO_NIS 764#define HAS_NIS 765#endif 766#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 767#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" 768#define FIONREAD_IN_TERMIOS_H 769#define USE_STATFS 770#define STATFS_IN_SYS_VFS_H 771#define PREPEND_PLUS_TO_OPTSTRING 772#define HAS_POSIX_REGEXP 773#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 774#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 775#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 776#define NATIVE_COMMAND_DIR "/usr/sbin" 777#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 778#ifdef __GLIBC_PREREQ 779# define HAVE_GLIBC_API_VERSION_SUPPORT(maj, min) __GLIBC_PREREQ(maj, min) 780#else 781# define HAVE_GLIBC_API_VERSION_SUPPORT(maj, min) \ 782 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) 783#endif 784#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1) 785# define SOCKADDR_SIZE socklen_t 786# define SOCKOPT_SIZE socklen_t 787#endif 788#ifndef NO_IPV6 789# define HAS_IPV6 790# if HAVE_GLIBC_API_VERSION_SUPPORT(2, 4) 791/* Really 2.3.3 or later, but there's no __GLIBC_MICRO version macro. */ 792# define HAVE_GETIFADDRS 793# else 794# define HAS_PROCNET_IFINET6 795# define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" 796# endif 797#endif 798#include <linux/version.h> 799#if !defined(KERNEL_VERSION) 800# define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1) 801#endif 802#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \ 803 || (__GLIBC__ < 2) 804# define CANT_USE_SEND_RECV_MSG 805# define DEF_SMTP_CACHE_DEMAND 0 806#else 807# define CANT_WRITE_BEFORE_SENDING_FD 808#endif 809#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" /* introduced in 1.1 */ 810#ifndef NO_EPOLL 811# define EVENTS_STYLE EVENTS_STYLE_EPOLL /* introduced in 2.5 */ 812#endif 813#define USE_SYSV_POLL 814#ifndef NO_POSIX_GETPW_R 815# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) \ 816 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 1) \ 817 || (defined(_BSD_SOURCE) && _BSD_SOURCE >= 1) \ 818 || (defined(_SVID_SOURCE) && _SVID_SOURCE >= 1) \ 819 || (defined(_POSIX_SOURCE) && _POSIX_SOURCE >= 1) 820# define HAVE_POSIX_GETPW_R 821# endif 822#endif 823 824#endif 825 826#ifdef LINUX1 827#define SUPPORTED 828#include <sys/types.h> 829#define UINT32_TYPE unsigned int 830#define UINT16_TYPE unsigned short 831#define USE_PATHS_H 832#define HAS_FLOCK_LOCK 833#define HAS_FCNTL_LOCK 834#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 835#define DEF_MAILBOX_LOCK "dotlock" /* verified RedHat 3.03 */ 836#define HAS_FSYNC 837#define HAS_DB 838#define DEF_DB_TYPE "hash" 839#define ALIAS_DB_MAP "hash:/etc/aliases" 840#ifndef NO_NIS 841#define HAS_NIS 842#endif 843#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 844#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" 845#define FIONREAD_IN_TERMIOS_H /* maybe unnecessary */ 846#define USE_STATFS 847#define STATFS_IN_SYS_VFS_H 848#define PREPEND_PLUS_TO_OPTSTRING 849#define HAS_POSIX_REGEXP 850#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 851#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 852#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 853#define NATIVE_COMMAND_DIR "/usr/sbin" 854#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 855#define CANT_USE_SEND_RECV_MSG 856#define DEF_SMTP_CACHE_DEMAND 0 857#endif 858 859 /* 860 * GNU. 861 */ 862#ifdef GNU0 863#define SUPPORTED 864#include <sys/types.h> 865#include <features.h> 866#define USE_PATHS_H 867#define HAS_FCNTL_LOCK 868#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 869#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ 870#define HAS_FSYNC 871#define HAS_DB 872#define DEF_DB_TYPE "hash" 873#define ALIAS_DB_MAP "hash:/etc/aliases" 874#ifndef NO_NIS 875#define HAS_NIS 876#endif 877#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 878#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin" 879#define FIONREAD_IN_TERMIOS_H 880#define USE_STATFS 881#define STATFS_IN_SYS_VFS_H 882#define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT 883#define PREPEND_PLUS_TO_OPTSTRING 884#define HAS_POSIX_REGEXP 885#define HAS_DLOPEN 886#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 887#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 888#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 889#define NATIVE_COMMAND_DIR "/usr/sbin" 890#ifdef DEBIAN 891#define NATIVE_DAEMON_DIR "/usr/lib/postfix" 892#ifndef DEF_MANPAGE_DIR 893#define DEF_MANPAGE_DIR "/usr/share/man" 894#endif 895#ifndef DEF_SAMPLE_DIR 896#define DEF_SAMPLE_DIR "/usr/share/doc/postfix/examples" 897#endif 898#ifndef DEF_README_DIR 899#define DEF_README_DIR "/usr/share/doc/postfix" 900#endif 901#else 902#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 903#endif 904#define SOCKADDR_SIZE socklen_t 905#define SOCKOPT_SIZE socklen_t 906#ifdef __FreeBSD_kernel__ 907# define HAS_DUPLEX_PIPE 908# define HAS_ISSETUGID 909#endif 910#ifndef NO_IPV6 911# define HAS_IPV6 912# ifdef __FreeBSD_kernel__ 913# define HAVE_GETIFADDRS 914# else 915# define HAS_PROCNET_IFINET6 916# define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" 917# endif 918#endif 919#define CANT_USE_SEND_RECV_MSG 920#define DEF_SMTP_CACHE_DEMAND 0 921#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" 922#endif 923 924 /* 925 * HPUX11 was copied from HPUX10, but can perhaps be trimmed down a bit. 926 */ 927#ifdef HPUX11 928#define SUPPORTED 929#define USE_SIG_RETURN 930#include <sys/types.h> 931#define UINT32_TYPE unsigned int 932#define UINT16_TYPE unsigned short 933#define HAS_DBM 934#define HAS_FCNTL_LOCK 935#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 936#define DEF_MAILBOX_LOCK "fcntl, dotlock" 937#define HAS_FSYNC 938#define DEF_DB_TYPE "dbm" 939#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" 940#define ROOT_PATH "/usr/bin:/sbin:/usr/sbin" 941#define MISSING_SETENV 942#ifndef NO_NIS 943#define HAS_NIS 944#endif 945#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 946#define _PATH_BSHELL "/bin/sh" 947#define _PATH_MAILDIR "/var/mail" 948#define _PATH_DEFPATH "/usr/bin" 949#define _PATH_STDPATH "/usr/bin:/sbin:/usr/sbin" 950#define MISSING_SETEUID 951#define HAVE_SETRESUID 952#define MISSING_SETEGID 953#define HAVE_SETRESGID 954extern int h_errno; /* <netdb.h> imports too much stuff */ 955 956#define USE_STATFS 957#define STATFS_IN_SYS_VFS_H 958#define HAS_POSIX_REGEXP 959#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 960#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 961#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 962#define NATIVE_COMMAND_DIR "/usr/sbin" 963#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 964#endif 965 966#ifdef HPUX10 967#define SUPPORTED 968#define USE_SIG_RETURN 969#include <sys/types.h> 970#define UINT32_TYPE unsigned int 971#define UINT16_TYPE unsigned short 972#define HAS_DBM 973#define HAS_FCNTL_LOCK 974#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 975#define DEF_MAILBOX_LOCK "fcntl, dotlock" 976#define HAS_FSYNC 977#define DEF_DB_TYPE "dbm" 978#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" 979#define ROOT_PATH "/usr/bin:/sbin:/usr/sbin" 980#define MISSING_SETENV 981#ifndef NO_NIS 982#define HAS_NIS 983#endif 984#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 985#define _PATH_BSHELL "/bin/sh" 986#define _PATH_MAILDIR "/var/mail" 987#define _PATH_DEFPATH "/usr/bin" 988#define _PATH_STDPATH "/usr/bin:/sbin:/usr/sbin" 989#define MISSING_SETEUID 990#define HAVE_SETRESUID 991#define MISSING_SETEGID 992#define HAVE_SETRESGID 993extern int h_errno; /* <netdb.h> imports too much stuff */ 994 995#define USE_STATFS 996#define STATFS_IN_SYS_VFS_H 997#define HAS_POSIX_REGEXP 998#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail" 999#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 1000#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 1001#define NATIVE_COMMAND_DIR "/usr/sbin" 1002#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 1003#endif 1004 1005#ifdef HPUX9 1006#define SUPPORTED 1007#define USE_SIG_RETURN 1008#include <sys/types.h> 1009#define UINT32_TYPE unsigned int 1010#define UINT16_TYPE unsigned short 1011#define HAS_DBM 1012#define HAS_FCNTL_LOCK 1013#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 1014#define DEF_MAILBOX_LOCK "fcntl, dotlock" 1015#define HAS_FSYNC 1016#ifndef NO_NIS 1017#define HAS_NIS 1018#endif 1019#define MISSING_SETENV 1020#define MISSING_RLIMIT_FSIZE 1021#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 1022#define DEF_DB_TYPE "dbm" 1023#define ALIAS_DB_MAP "dbm:/usr/lib/aliases" 1024#define ROOT_PATH "/bin:/usr/bin:/etc" 1025#define _PATH_BSHELL "/bin/sh" 1026#define _PATH_MAILDIR "/usr/mail" 1027#define _PATH_DEFPATH "/bin:/usr/bin" 1028#define _PATH_STDPATH "/bin:/usr/bin:/etc" 1029#define MISSING_SETEUID 1030#define HAVE_SETRESUID 1031#define MISSING_SETEGID 1032#define HAVE_SETRESGID 1033extern int h_errno; 1034 1035#define USE_ULIMIT /* no setrlimit() */ 1036#define USE_STATFS 1037#define STATFS_IN_SYS_VFS_H 1038#define HAS_POSIX_REGEXP 1039#define NATIVE_SENDMAIL_PATH "/usr/bin/sendmail" 1040#define NATIVE_MAILQ_PATH "/usr/bin/mailq" 1041#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases" 1042#define NATIVE_DAEMON_DIR "/usr/libexec/postfix" 1043#endif 1044 1045 /* 1046 * NEXTSTEP3, without -lposix, because its naming service is broken. 1047 */ 1048#ifdef NEXTSTEP3 1049#define SUPPORTED 1050#include <sys/types.h> 1051#define UINT32_TYPE unsigned int 1052#define UINT16_TYPE unsigned short 1053#define HAS_DBM 1054#define HAS_FLOCK_LOCK 1055#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 1056#define DEF_MAILBOX_LOCK "flock, dotlock" 1057#define USE_STATFS 1058#define HAVE_SYS_DIR_H 1059#define STATFS_IN_SYS_VFS_H 1060#define HAS_FSYNC 1061#ifndef NO_NIS 1062#define HAS_NIS 1063#endif 1064#define HAS_NETINFO 1065#define MISSING_SETENV_PUTENV 1066#define MISSING_MKFIFO 1067#define MISSING_SIGSET_T 1068#define MISSING_SIGACTION 1069#define MISSING_STD_FILENOS 1070#define MISSING_SETSID 1071#define MISSING_WAITPID 1072#define MISSING_UTIMBUF 1073#define HAS_WAIT4 1074#define WAIT_STATUS_T union wait 1075#define NORMAL_EXIT_STATUS(x) (WIFEXITED(x) && !WEXITSTATUS (x)) 1076#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 1077#define _PATH_MAILDIR "/usr/spool/mail" 1078#define _PATH_BSHELL "/bin/sh" 1079#define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb" 1080#define _PATH_STDPATH "/bin:/usr/bin:/usr/ucb" 1081#define ROOT_PATH "/bin:/usr/bin:/usr/etc:/usr/ucb" 1082#define DEF_DB_TYPE "dbm" 1083#define ALIAS_DB_MAP "netinfo:/aliases" 1084#include <libc.h> 1085#define MISSING_POSIX_S_IS 1086#define MISSING_POSIX_S_MODES 1087/* It's amazing what is all missing... */ 1088#define isascii(c) ((unsigned)(c)<=0177) 1089extern int opterr; 1090typedef unsigned short mode_t; 1091 1092#define MISSING_PID_T 1093#define MISSING_STRFTIME_E 1094#define FD_CLOEXEC 1 1095#define O_NONBLOCK O_NDELAY 1096#define WEXITSTATUS(x) ((x).w_retcode) 1097#define WTERMSIG(x) ((x).w_termsig) 1098#endif 1099 1100 /* 1101 * OPENSTEP does not have posix (some fix...) 1102 */ 1103#ifdef OPENSTEP4 1104#define SUPPORTED 1105#include <sys/types.h> 1106#define UINT32_TYPE unsigned int 1107#define UINT16_TYPE unsigned short 1108#define HAS_DBM 1109#define HAS_FLOCK_LOCK 1110#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK 1111#define DEF_MAILBOX_LOCK "flock, dotlock" 1112#define USE_STATFS 1113#define HAVE_SYS_DIR_H 1114#define STATFS_IN_SYS_VFS_H 1115#define HAS_FSYNC 1116#ifndef NO_NIS 1117#define HAS_NIS 1118#endif 1119#define HAS_NETINFO 1120#define MISSING_SETENV_PUTENV 1121#define MISSING_MKFIFO 1122#define MISSING_SIGSET_T 1123#define MISSING_SIGACTION 1124#define MISSING_STD_FILENOS 1125#define MISSING_SETSID 1126#define MISSING_WAITPID 1127#define MISSING_UTIMBUF 1128#define HAS_WAIT4 1129#define WAIT_STATUS_T union wait 1130#define NORMAL_EXIT_STATUS(x) (WIFEXITED(x) && !WEXITSTATUS (x)) 1131#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 1132#define _PATH_MAILDIR "/usr/spool/mail" 1133#define _PATH_BSHELL "/bin/sh" 1134#define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb" 1135#define _PATH_STDPATH "/bin:/usr/bin:/usr/ucb" 1136#define ROOT_PATH "/bin:/usr/bin:/usr/etc:/usr/ucb" 1137#define DEF_DB_TYPE "dbm" 1138#define ALIAS_DB_MAP "netinfo:/aliases" 1139#include <libc.h> 1140#define MISSING_POSIX_S_IS 1141#define MISSING_POSIX_S_MODES 1142/* It's amazing what is all missing... */ 1143#define isascii(c) ((unsigned)(c)<=0177) 1144extern int opterr; 1145typedef unsigned short mode_t; 1146 1147#define MISSING_PID_T 1148#define MISSING_STRFTIME_E 1149#define FD_CLOEXEC 1 1150#define O_NONBLOCK O_NDELAY 1151#define WEXITSTATUS(x) ((x).w_retcode) 1152#define WTERMSIG(x) ((x).w_termsig) 1153#define NORETURN /* the native compiler */ 1154#define PRINTFLIKE(x,y) 1155#define SCANFLIKE(x,y) 1156#endif 1157 1158#ifdef ReliantUnix543 1159#define SUPPORTED 1160#include <sys/types.h> 1161#define UINT32_TYPE unsigned int 1162#define UINT16_TYPE unsigned short 1163#define MISSING_SETENV 1164#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 1165#define _PATH_BSHELL "/bin/sh" 1166#define _PATH_MAILDIR "/var/spool/mail" 1167#define HAS_FCNTL_LOCK 1168#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 1169#define DEF_MAILBOX_LOCK "fcntl, dotlock" 1170#define HAS_FSYNC 1171#define FIONREAD_IN_SYS_FILIO_H 1172#define USE_SYS_SOCKIO_H 1173#define HAS_DBM 1174#define DEF_DB_TYPE "dbm" 1175#define ALIAS_DB_MAP "dbm:/var/adm/sendmail/aliases" 1176extern int optind; /* XXX use <getopt.h> */ 1177extern char *optarg; /* XXX use <getopt.h> */ 1178extern int opterr; /* XXX use <getopt.h> */ 1179 1180#ifndef NO_NIS 1181#define HAS_NIS 1182#endif 1183#define GETTIMEOFDAY(t) gettimeofday(t) 1184#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 1185#define USE_STATVFS 1186#define STATVFS_IN_SYS_STATVFS_H 1187#define MISSING_USLEEP 1188#endif 1189 1190#ifdef DCOSX1 /* Siemens Pyramid */ 1191#define SUPPORTED 1192#include <sys/types.h> 1193#define UINT32_TYPE unsigned int 1194#define UINT16_TYPE unsigned short 1195#define _PATH_MAILDIR "/var/mail" 1196#define _PATH_BSHELL "/bin/sh" 1197#define _PATH_DEFPATH "/usr/bin:/usr/ucb" 1198#define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb" 1199#define MISSING_SETENV 1200#define HAS_FCNTL_LOCK 1201#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 1202#define DEF_MAILBOX_LOCK "fcntl, dotlock" 1203#define HAS_FSYNC 1204#define DEF_DB_TYPE "hash" 1205#define ALIAS_DB_MAP "hash:/etc/aliases" 1206/* Uncomment the following line if you have NIS package installed */ 1207/* #define HAS_NIS */ 1208#define USE_SYS_SOCKIO_H 1209#define GETTIMEOFDAY(t) gettimeofday(t,NULL) 1210#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb" 1211#define FIONREAD_IN_SYS_FILIO_H 1212#define DBM_NO_TRAILING_NULL 1213#define USE_STATVFS 1214#define STATVFS_IN_SYS_STATVFS_H 1215#ifndef S_ISSOCK 1216#define S_ISSOCK(mode) ((mode&0xF000) == 0xC000) 1217#endif 1218#endif 1219 1220#ifdef SCO5 1221#define SUPPORTED 1222#include <sys/types.h> 1223#include <sys/socket.h> 1224extern int h_errno; 1225 1226#define UINT32_TYPE unsigned int 1227#define UINT16_TYPE unsigned short 1228#define _PATH_MAILDIR "/usr/spool/mail" 1229#define _PATH_BSHELL "/bin/sh" 1230#define _PATH_DEFPATH "/bin:/usr/bin" 1231#define USE_PATHS_H 1232#define HAS_FCNTL_LOCK 1233#define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL 1234#define DEF_MAILBOX_LOCK "fcntl, dotlock" 1235#define HAS_FSYNC 1236#define HAS_DBM 1237#define DEF_DB_TYPE "dbm" 1238#define ALIAS_DB_MAP "dbm:/etc/mail/aliases" 1239#define DBM_NO_TRAILING_NULL 1240#ifndef NO_NIS 1241#define HAS_NIS 1242#endif 1243#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0) 1244#define ROOT_PATH "/bin:/etc:/usr/bin:/tcb/bin" 1245#define USE_STATVFS 1246#define STATVFS_IN_SYS_STATVFS_H 1247#define MISSING_SETENV 1248#define STRCASECMP_IN_STRINGS_H 1249/* SCO5 misses just S_ISSOCK, the others are there 1250 * Use C_ISSOCK definition from cpio.h. 1251 */ 1252#include <cpio.h> 1253#define S_ISSOCK(mode) (((mode) & (S_IFMT)) == (C_ISSOCK)) 1254#define CANT_USE_SEND_RECV_MSG 1255#define DEF_SMTP_CACHE_DEMAND 0 1256#endif 1257 1258 /* 1259 * We're not going to try to guess like configure does. 1260 */ 1261#ifndef SUPPORTED 1262#error "unsupported platform" 1263#endif 1264 1265 /* 1266 * Allow command line flags to override native settings 1267 */ 1268#ifndef DEF_COMMAND_DIR 1269#ifdef NATIVE_COMMAND_DIR 1270#define DEF_COMMAND_DIR NATIVE_COMMAND_DIR 1271#endif 1272#endif 1273 1274#ifndef DEF_DAEMON_DIR 1275#ifdef NATIVE_DAEMON_DIR 1276#define DEF_DAEMON_DIR NATIVE_DAEMON_DIR 1277#endif 1278#endif 1279 1280#ifndef DEF_SENDMAIL_PATH 1281#ifdef NATIVE_SENDMAIL_PATH 1282#define DEF_SENDMAIL_PATH NATIVE_SENDMAIL_PATH 1283#endif 1284#endif 1285 1286#ifndef DEF_MAILQ_PATH 1287#ifdef NATIVE_MAILQ_PATH 1288#define DEF_MAILQ_PATH NATIVE_MAILQ_PATH 1289#endif 1290#endif 1291 1292#ifndef DEF_NEWALIAS_PATH 1293#ifdef NATIVE_NEWALIAS_PATH 1294#define DEF_NEWALIAS_PATH NATIVE_NEWALIAS_PATH 1295#endif 1296#endif 1297 1298#define CAST_CHAR_PTR_TO_INT(cptr) ((int) (long) (cptr)) 1299#define CAST_INT_TO_CHAR_PTR(ival) ((char *) (long) (ival)) 1300 1301#ifdef DUP2_DUPS_CLOSE_ON_EXEC 1302/* dup2_pass_on_exec() can be found in util/sys_compat.c */ 1303extern int dup2_pass_on_exec(int oldd, int newd); 1304 1305#define DUP2 dup2_pass_on_exec 1306#else 1307#define DUP2 dup2 1308#endif 1309 1310#ifdef PREPEND_PLUS_TO_OPTSTRING 1311#define GETOPT(argc, argv, str) getopt((argc), (argv), "+" str) 1312#else 1313#define GETOPT(argc, argv, str) getopt((argc), (argv), (str)) 1314#endif 1315#define OPTIND (optind > 0 ? optind : 1) 1316 1317 /* 1318 * Check for required but missing definitions. 1319 */ 1320#if !defined(HAS_FCNTL_LOCK) && !defined(HAS_FLOCK_LOCK) 1321#error "define HAS_FCNTL_LOCK and/or HAS_FLOCK_LOCK" 1322#endif 1323 1324#if !defined(DEF_MAILBOX_LOCK) 1325#error "define DEF_MAILBOX_LOCK" 1326#endif 1327 1328#if !defined(INTERNAL_LOCK) 1329#error "define INTERNAL_LOCK" 1330#endif 1331 1332#if defined(USE_STATFS) && defined(USE_STATVFS) 1333#error "define USE_STATFS or USE_STATVFS, not both" 1334#endif 1335 1336#if !defined(USE_STATFS) && !defined(USE_STATVFS) 1337#error "define USE_STATFS or USE_STATVFS" 1338#endif 1339 1340 /* 1341 * Defaults for systems that pre-date IPv6 support. 1342 */ 1343#ifndef HAS_IPV6 1344#define EMULATE_IPV4_ADDRINFO 1345#define MISSING_INET_PTON 1346#define MISSING_INET_NTOP 1347extern const char *inet_ntop(int, const void *, char *, size_t); 1348extern int inet_pton(int, const char *, void *); 1349 1350#endif 1351 1352 /* 1353 * Workaround: after a watchdog alarm signal, wake up from select/poll/etc. 1354 * by writing to a pipe. Solaris needs this, and HP-UX apparently, too. The 1355 * run-time cost is negligible so we just turn it on for all systems. As a 1356 * side benefit, making this code system-independent will simplify the 1357 * detection of bit-rot problems. 1358 */ 1359#ifndef NO_WATCHDOG_PIPE 1360#define USE_WATCHDOG_PIPE 1361#endif 1362 1363 /* 1364 * Defaults for systems without kqueue, /dev/poll or epoll support. 1365 * master/multi-server.c and *qmgr/qmgr_transport.c depend on this. 1366 */ 1367#if !defined(EVENTS_STYLE) 1368#define EVENTS_STYLE EVENTS_STYLE_SELECT 1369#endif 1370 1371#define EVENTS_STYLE_SELECT 1 /* Traditional BSD select */ 1372#define EVENTS_STYLE_KQUEUE 2 /* FreeBSD kqueue */ 1373#define EVENTS_STYLE_DEVPOLL 3 /* Solaris /dev/poll */ 1374#define EVENTS_STYLE_EPOLL 4 /* Linux epoll */ 1375 1376#if !defined(USE_SYSV_POLL) && (EVENTS_STYLE != EVENTS_STYLE_SELECT) 1377#error "need USE_SYSV_POLL with EVENTS_STYLE != EVENTS_STYLE_SELECT" 1378#endif 1379 1380 /* 1381 * The Postfix 2.9 post-install workaround assumes that the inet_protocols 1382 * default value is "ipv4" when Postfix is compiled without IPv6 support. 1383 */ 1384#ifndef DEF_INET_PROTOCOLS 1385#ifdef HAS_IPV6 1386#define DEF_INET_PROTOCOLS INET_PROTO_NAME_ALL 1387#else 1388#define DEF_INET_PROTOCOLS INET_PROTO_NAME_IPV4 1389#endif 1390#endif 1391 1392 /* 1393 * Defaults for systems that pre-date POSIX socklen_t. 1394 */ 1395#ifndef SOCKADDR_SIZE 1396#define SOCKADDR_SIZE int 1397#endif 1398 1399#ifndef SOCKOPT_SIZE 1400#define SOCKOPT_SIZE int 1401#endif 1402 1403 /* 1404 * Defaults for normal systems. 1405 */ 1406#ifndef LOCAL_LISTEN 1407#define LOCAL_LISTEN unix_listen 1408#define LOCAL_ACCEPT unix_accept 1409#define LOCAL_CONNECT unix_connect 1410#define LOCAL_TRIGGER unix_trigger 1411#define LOCAL_SEND_FD unix_send_fd 1412#define LOCAL_RECV_FD unix_recv_fd 1413#endif 1414 1415#ifndef PASS_LISTEN 1416#define PASS_CONNECT unix_pass_connect 1417#define PASS_LISTEN unix_pass_listen 1418#define PASS_ACCEPT unix_pass_accept 1419#define PASS_TRIGGER unix_pass_trigger 1420#endif 1421 1422#if !defined (HAVE_SYS_NDIR_H) && !defined (HAVE_SYS_DIR_H) \ 1423 && !defined (HAVE_NDIR_H) 1424#define HAVE_DIRENT_H 1425#endif 1426 1427#ifndef WAIT_STATUS_T 1428typedef int WAIT_STATUS_T; 1429 1430#define NORMAL_EXIT_STATUS(status) ((status) == 0) 1431#endif 1432 1433#ifdef NO_POSIX_GETPW_R 1434#undef HAVE_POSIX_GETPW_R 1435#endif 1436 1437#ifdef NO_DB 1438#undef HAS_DB 1439#endif 1440 1441#ifndef OCTAL_TO_UNSIGNED 1442#define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8)) 1443#endif 1444 1445 /* 1446 * Avoid useless type mis-matches when using sizeof in an integer context. 1447 */ 1448#define INT_SIZEOF(foo) ((int) sizeof(foo)) 1449 1450 /* 1451 * Turn on the compatibility stuff. 1452 */ 1453#ifdef MISSING_UTIMBUF 1454struct utimbuf { 1455 time_t actime; 1456 time_t modtime; 1457}; 1458 1459#endif 1460 1461#ifdef MISSING_STRERROR 1462extern const char *strerror(int); 1463 1464#endif 1465 1466#if defined (MISSING_SETENV) || defined (MISSING_SETENV_PUTENV) 1467extern int setenv(const char *, const char *, int); 1468 1469#endif 1470 1471#ifdef MISSING_SETEUID 1472extern int seteuid(uid_t euid); 1473 1474#endif 1475 1476#ifdef MISSING_SETEGID 1477extern int setegid(gid_t egid); 1478 1479#endif 1480 1481#ifdef MISSING_MKFIFO 1482extern int mkfifo(char *, int); 1483 1484#endif 1485 1486#ifdef MISSING_WAITPID 1487extern int waitpid(int, WAIT_STATUS_T *status, int options); 1488 1489#endif 1490 1491#ifdef MISSING_SETSID 1492extern int setsid(void); 1493 1494#endif 1495 1496#ifndef HAS_CLOSEFROM 1497extern int closefrom(int); 1498 1499#endif 1500 1501#ifdef MISSING_STD_FILENOS 1502#define STDIN_FILENO 0 1503#define STDOUT_FILENO 1 1504#define STDERR_FILENO 2 1505#endif 1506 1507#ifdef MISSING_PID_T 1508typedef int pid_t; 1509 1510#endif 1511 1512#ifdef MISSING_POSIX_S_IS 1513#define S_ISBLK(mode) (((mode) & (_S_IFMT)) == (_S_IFBLK)) 1514#define S_ISCHR(mode) (((mode) & (_S_IFMT)) == (_S_IFCHR)) 1515#define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) 1516#define S_ISSOCK(mode) (((mode) & (_S_IFMT)) == (_S_IFSOCK)) 1517#define S_ISFIFO(mode) (((mode) & (_S_IFMT)) == (_S_IFIFO)) 1518#define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG)) 1519#define S_ISLNK(mode) (((mode) & (_S_IFMT)) == (_S_IFLNK)) 1520#endif 1521 1522#ifdef MISSING_POSIX_S_MODES 1523#define S_IRUSR _S_IRUSR 1524#define S_IRGRP 0000040 1525#define S_IROTH 0000004 1526#define S_IWUSR _S_IWUSR 1527#define S_IWGRP 0000020 1528#define S_IWOTH 0000002 1529#define S_IXUSR _S_IXUSR 1530#define S_IXGRP 0000010 1531#define S_IXOTH 0000001 1532#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) 1533#endif 1534 1535 /* 1536 * Memory alignment of memory allocator results. By default we align for 1537 * doubles. 1538 */ 1539#ifndef ALIGN_TYPE 1540# if defined(__hpux) && defined(__ia64) 1541# define ALIGN_TYPE __float80 1542# elif defined(__ia64__) 1543# define ALIGN_TYPE long double 1544# else 1545# define ALIGN_TYPE double 1546# endif 1547#endif 1548 1549 /* 1550 * Need to specify what functions never return, so that the compiler can 1551 * warn for missing initializations and other trouble. However, OPENSTEP4 1552 * gcc 2.7.x cannot handle this so we define this only if NORETURN isn't 1553 * already defined above. 1554 * 1555 * Data point: gcc 2.7.2 has __attribute__ (Wietse Venema) but gcc 2.6.3 does 1556 * not (Clive Jones). So we'll set the threshold at 2.7. 1557 */ 1558#ifndef NORETURN 1559#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3 1560#define NORETURN void __attribute__((__noreturn__)) 1561#endif 1562#endif 1563 1564#ifndef NORETURN 1565#define NORETURN void 1566#endif 1567 1568 /* 1569 * Turn on format string argument checking. This is more accurate than 1570 * printfck, but it misses #ifdef-ed code. XXX I am just guessing at what 1571 * gcc versions support this. In order to turn this off for some platforms, 1572 * specify #define PRINTFLIKE and #define SCANFLIKE in the system-dependent 1573 * sections above. 1574 */ 1575#ifndef PRINTFLIKE 1576#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3 1577#define PRINTFLIKE(x,y) __attribute__ ((format (printf, (x), (y)))) 1578#else 1579#define PRINTFLIKE(x,y) 1580#endif 1581#endif 1582 1583#ifndef SCANFLIKE 1584#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3 1585#define SCANFLIKE(x,y) __attribute__ ((format (scanf, (x), (y)))) 1586#else 1587#define SCANFLIKE(x,y) 1588#endif 1589#endif 1590 1591 /* 1592 * Some gcc implementations don't grok these attributes with pointer to 1593 * function. Again, wild guess of what is supported. To override, specify 1594 * #define PRINTPTRFLIKE in the system-dependent sections above. 1595 */ 1596#ifndef PRINTFPTRLIKE 1597#if (__GNUC__ >= 3) /* XXX Rough estimate */ 1598#define PRINTFPTRLIKE(x,y) PRINTFLIKE(x,y) 1599#else 1600#define PRINTFPTRLIKE(x,y) 1601#endif 1602#endif 1603 1604 /* 1605 * Compiler optimization hint. This makes sense only for code in a 1606 * performance-critical loop. 1607 */ 1608#ifndef EXPECTED 1609#if defined(__GNUC__) && (__GNUC__ > 2) 1610#define EXPECTED(x) __builtin_expect(!!(x), 1) 1611#define UNEXPECTED(x) __builtin_expect(!!(x), 0) 1612#else 1613#define EXPECTED(x) (x) 1614#define UNEXPECTED(x) (x) 1615#endif 1616#endif 1617 1618 /* 1619 * ISO C says that the "volatile" qualifier protects against optimizations 1620 * that cause longjmp() to clobber local variables. 1621 */ 1622#ifndef NOCLOBBER 1623#define NOCLOBBER volatile 1624#endif 1625 1626 /* 1627 * Bit banging!! There is no official constant that defines the INT_MAX 1628 * equivalent of the off_t type. Wietse came up with the following macro 1629 * that works as long as off_t is some two's complement number. 1630 * 1631 * Note, however, that C99 permits signed integer representations other than 1632 * two's complement. 1633 */ 1634#include <limits.h> 1635#define __MAXINT__(T) ((T) (((((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)) ^ ((T) -1)))) 1636#ifndef OFF_T_MAX 1637#define OFF_T_MAX __MAXINT__(off_t) 1638#endif 1639 1640 /* 1641 * Setting globals like h_errno can be problematic when Postfix is linked 1642 * with multi-threaded libraries. 1643 */ 1644#ifndef SET_H_ERRNO 1645#define SET_H_ERRNO(err) (h_errno = (err)) 1646#endif 1647 1648 /* 1649 * Don't mix socket message send/receive calls with socket stream read/write 1650 * calls. The fact that you can get away with it only on some stacks implies 1651 * that there is no long-term guarantee. 1652 */ 1653#ifndef CAN_WRITE_BEFORE_SENDING_FD 1654#define CANT_WRITE_BEFORE_SENDING_FD 1655#endif 1656 1657 /* 1658 * FreeBSD sendmsg(2) says that after sending a file descriptor, the sender 1659 * must not immediately close the descriptor, otherwise it may close the 1660 * descriptor before it is actually sent. 1661 */ 1662#ifndef DONT_WAIT_AFTER_SENDING_FD 1663#define MUST_READ_AFTER_SENDING_FD 1664#endif 1665 1666 /* 1667 * Hope for the best. 1668 */ 1669#ifndef UINT32_TYPE 1670#define UINT32_TYPE uint32_t 1671#define UINT16_TYPE uint16_t 1672#endif 1673#define UINT32_SIZE 4 1674#define UINT16_SIZE 2 1675 1676 /* 1677 * Safety. On some systems, ctype.h misbehaves with non-ASCII or negative 1678 * characters. More importantly, Postfix uses the ISXXX() macros to ensure 1679 * protocol compliance, so we have to rule out non-ASCII characters. 1680 * 1681 * XXX The (unsigned char) casts in isalnum() etc arguments are unnecessary 1682 * because the ISASCII() guard already ensures that the values are 1683 * non-negative; the casts are done anyway to shut up chatty compilers. 1684 */ 1685#define ISASCII(c) isascii(_UCHAR_(c)) 1686#define _UCHAR_(c) ((unsigned char)(c)) 1687#define ISALNUM(c) (ISASCII(c) && isalnum((unsigned char)(c))) 1688#define ISALPHA(c) (ISASCII(c) && isalpha((unsigned char)(c))) 1689#define ISCNTRL(c) (ISASCII(c) && iscntrl((unsigned char)(c))) 1690#define ISDIGIT(c) (ISASCII(c) && isdigit((unsigned char)(c))) 1691#define ISGRAPH(c) (ISASCII(c) && isgraph((unsigned char)(c))) 1692#define ISLOWER(c) (ISASCII(c) && islower((unsigned char)(c))) 1693#define ISPRINT(c) (ISASCII(c) && isprint((unsigned char)(c))) 1694#define ISPUNCT(c) (ISASCII(c) && ispunct((unsigned char)(c))) 1695#define ISSPACE(c) (ISASCII(c) && isspace((unsigned char)(c))) 1696#define ISUPPER(c) (ISASCII(c) && isupper((unsigned char)(c))) 1697#define TOLOWER(c) (ISUPPER(c) ? tolower((unsigned char)(c)) : (c)) 1698#define TOUPPER(c) (ISLOWER(c) ? toupper((unsigned char)(c)) : (c)) 1699 1700 /* 1701 * Scaffolding. I don't want to lose messages while the program is under 1702 * development. 1703 */ 1704extern int REMOVE(const char *); 1705 1706/* LICENSE 1707/* .ad 1708/* .fi 1709/* The Secure Mailer license must be distributed with this software. 1710/* AUTHOR(S) 1711/* Wietse Venema 1712/* IBM T.J. Watson Research 1713/* P.O. Box 704 1714/* Yorktown Heights, NY 10598, USA 1715/*--*/ 1716 1717#endif 1718