1 #ifndef _SYS_DEFS_H_INCLUDED_
2 #define _SYS_DEFS_H_INCLUDED_
25 #include <sys/types.h>
30 #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
31 || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
32 || defined(FREEBSD8) || defined(FREEBSD9) || defined(FREEBSD10) \
33 || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
34 || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
35 || defined(OPENBSD5) || defined(OPENBSD6) \
36 || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
37 || defined(NETBSD4) || defined(NETBSD5) || defined(NETBSD6) \
39 || defined(EKKOBSD1) || defined(DRAGONFLY)
41 #include <sys/param.h>
42 #define UINT32_TYPE unsigned int
43 #define UINT16_TYPE unsigned short
45 #define HAS_FLOCK_LOCK
46 #define HAS_FCNTL_LOCK
47 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
48 #define DEF_MAILBOX_LOCK "flock, dotlock"
53 #define NATIVE_DB_TYPE "hash"
54 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000)
55 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
57 #if (defined(OpenBSD) && OpenBSD >= 200006)
58 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
61 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
63 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
64 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
65 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ > 299000900)
67 #define STATVFS_IN_SYS_STATVFS_H
70 #define STATFS_IN_SYS_MOUNT_H
72 #define HAS_POSIX_REGEXP
75 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
76 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
77 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
78 #define NATIVE_COMMAND_DIR "/usr/sbin"
79 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
84 #define getsid(p) getpgrp()
86 #define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
89 #define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
92 #define CMSG_ALIGN(n) ALIGN(n)
102 #if __FreeBSD_version >= 220000
103 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
106 #if __FreeBSD_version >= 300000
107 #define HAS_ISSETUGID
111 #if __FreeBSD_version >= 400000
112 #define SOCKADDR_SIZE socklen_t
113 #define SOCKOPT_SIZE socklen_t
116 #if __FreeBSD_version >= 420000
117 #define HAS_DUPLEX_PIPE
120 #if (__FreeBSD_version >= 702104 && __FreeBSD_version <= 800000) \
121 || __FreeBSD_version >= 800100
122 #define HAS_CLOSEFROM
127 #if OpenBSD >= 199805
131 #if (defined(OpenBSD) && OpenBSD >= 199608)
132 #define PREFERRED_RAND_SOURCE "dev:/dev/arandom"
135 #if OpenBSD >= 200000
136 #define HAS_ISSETUGID
139 #if OpenBSD >= 200200
140 #define SOCKADDR_SIZE socklen_t
141 #define SOCKOPT_SIZE socklen_t
144 #if OpenBSD >= 200405
145 #define HAS_CLOSEFROM
150 #if __NetBSD_Version__ >= 103000000
151 #undef DEF_MAILBOX_LOCK
152 #define DEF_MAILBOX_LOCK "flock, dotlock"
153 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
156 #if __NetBSD_Version__ >= 105000000
157 #define HAS_ISSETUGID
160 #if __NetBSD_Version__ >= 106000000
161 #define SOCKADDR_SIZE socklen_t
162 #define SOCKOPT_SIZE socklen_t
165 #if __NetBSD_Version__ >= 299000900
166 #define HAS_CLOSEFROM
169 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 102000000)
173 #if defined(__DragonFly__)
174 #define HAS_DEV_URANDOM
175 #define HAS_ISSETUGID
177 #define SOCKADDR_SIZE socklen_t
178 #define SOCKOPT_SIZE socklen_t
179 #define HAS_DUPLEX_PIPE
182 #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105000000) \
183 || (defined(__FreeBSD__) && __FreeBSD__ >= 4) \
184 || (defined(OpenBSD) && OpenBSD >= 200003) \
185 || defined(__DragonFly__) \
186 || defined(USAGI_LIBINET6)
189 #define HAVE_GETIFADDRS
192 #if (defined(__FreeBSD_version) && __FreeBSD_version >= 300000) \
193 || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 103000000) \
194 || (defined(OpenBSD) && OpenBSD >= 199700) \
195 || defined(__DragonFly__)
196 #define USE_SYSV_POLL
200 #if (defined(__FreeBSD_version) && __FreeBSD_version >= 410000) \
201 || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200000000) \
202 || (defined(OpenBSD) && OpenBSD >= 200105) \
203 || defined(__DragonFly__)
204 #define EVENTS_STYLE EVENTS_STYLE_KQUEUE
208 #ifndef NO_POSIX_GETPW_R
209 #if (defined(__FreeBSD_version) && __FreeBSD_version >= 510000) \
210 || (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 300000000) \
211 || (defined(OpenBSD) && OpenBSD >= 200811)
212 #define HAVE_POSIX_GETPW_R
221 #if defined(RHAPSODY5) || defined(MACOSX)
223 #define UINT32_TYPE unsigned int
224 #define UINT16_TYPE unsigned short
226 #define HAS_FLOCK_LOCK
227 #define HAS_FCNTL_LOCK
228 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
229 #define DEF_MAILBOX_LOCK "flock, dotlock"
234 #define NATIVE_DB_TYPE "hash"
235 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
236 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
237 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
239 #define STATFS_IN_SYS_MOUNT_H
240 #define HAS_POSIX_REGEXP
246 #define HAVE_GETIFADDRS
249 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
250 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
251 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
252 #define NATIVE_COMMAND_DIR "/usr/sbin"
253 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
254 #define SOCKADDR_SIZE socklen_t
255 #define SOCKOPT_SIZE socklen_t
257 #define EVENTS_STYLE EVENTS_STYLE_KQUEUE
258 #define USE_SYSV_POLL_THEN_SELECT
260 #define USE_MAX_FILES_PER_PROC
261 #ifndef NO_POSIX_GETPW_R
262 #define HAVE_POSIX_GETPW_R
265 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
274 #define UINT32_TYPE unsigned int
275 #define UINT16_TYPE unsigned short
278 #define FD_SETSIZE 96
280 #define _PATH_MAILDIR "/var/spool/mail"
281 #define _PATH_BSHELL "/bin/sh"
282 #define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb"
283 #define _PATH_STDPATH "/bin:/usr/bin:/usr/etc:/usr/ucb"
284 #define HAS_FLOCK_LOCK
285 #define HAS_FCNTL_LOCK
286 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
287 #define DEF_MAILBOX_LOCK "flock, dotlock"
291 #define NATIVE_DB_TYPE "hash"
292 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
295 #define NATIVE_DB_TYPE "dbm"
296 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
303 #define MISSING_STRFTIME_E
307 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
308 #define ROOT_PATH "/bin:/usr/bin:/etc:/usr/etc:/usr/ucb"
310 #define USE_STRUCT_FS_DATA
311 #define STATFS_IN_SYS_MOUNT_H
313 #define S_ISSOCK(mode) (((mode) & (S_IFMT)) == (S_IFSOCK))
314 #define DUP2_DUPS_CLOSE_ON_EXEC
315 #define MISSING_USLEEP
317 #define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail"
318 #define NATIVE_COMMAND_DIR "/usr/etc"
319 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
327 #define UINT32_TYPE unsigned int
328 #define UINT16_TYPE unsigned short
329 #define MISSING_SETENV
331 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
332 #define HAS_FLOCK_LOCK
333 #define HAS_FCNTL_LOCK
334 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
335 #define DEF_MAILBOX_LOCK "flock, dotlock"
337 #define HAVE_BASENAME
339 #define NATIVE_DB_TYPE "dbm"
340 #define ALIAS_DB_MAP DEF_DB_TYPE ":/var/adm/sendmail/aliases"
348 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
349 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
351 #define STATFS_IN_SYS_MOUNT_H
352 #define HAS_POSIX_REGEXP
353 #define BROKEN_WRITE_SELECT_ON_NON_BLOCKING_PIPE
354 #define NO_MSGHDR_MSG_CONTROL
368 #define UINT32_TYPE unsigned int
369 #define UINT16_TYPE unsigned short
372 #define MISSING_SETENV
373 #define MISSING_STRERROR
374 #define MISSING_STRTOUL
375 #define _PATH_MAILDIR "/var/spool/mail"
376 #define _PATH_BSHELL "/bin/sh"
377 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
378 #define _PATH_STDPATH "/usr/bin:/usr/etc:/usr/ucb"
379 #define HAS_FLOCK_LOCK
380 #define HAS_FCNTL_LOCK
381 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
382 #define DEF_MAILBOX_LOCK "flock, dotlock"
385 #define NATIVE_DB_TYPE "dbm"
386 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
394 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
395 #define ROOT_PATH "/bin:/usr/bin:/etc:/usr/etc:/usr/ucb"
397 #define STATFS_IN_SYS_VFS_H
398 #define memmove(d,s,l) bcopy(s,d,l)
400 #define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail"
401 #define NATIVE_MAILQ_PATH "/usr/ucb/mailq"
402 #define NATIVE_NEWALIAS_PATH "/usr/ucb/newaliases"
403 #define NATIVE_COMMAND_DIR "/usr/etc"
404 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
405 #define STRCASECMP_IN_STRINGS_H
406 #define OCTAL_TO_UNSIGNED(res, str) sscanf((str), "%o", &(res))
407 #define size_t unsigned
409 #define getsid getpgrp
418 #define UINT32_TYPE unsigned int
419 #define UINT16_TYPE unsigned short
420 #define _PATH_MAILDIR "/var/mail"
421 #define _PATH_BSHELL "/bin/sh"
422 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
423 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
424 #define HAS_FCNTL_LOCK
425 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
426 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
429 #define NATIVE_DB_TYPE "dbm"
430 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
437 #define USE_SYS_SOCKIO_H
438 #define GETTIMEOFDAY(t) gettimeofday(t)
439 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
440 #define FIONREAD_IN_SYS_FILIO_H
442 #define STATVFS_IN_SYS_STATVFS_H
443 #define INT_MAX_IN_LIMITS_H
444 #ifdef STREAM_CONNECTIONS
445 #define LOCAL_LISTEN stream_listen
446 #define LOCAL_ACCEPT stream_accept
447 #define LOCAL_CONNECT stream_connect
448 #define LOCAL_TRIGGER stream_trigger
449 #define LOCAL_SEND_FD stream_send_fd
450 #define LOCAL_RECV_FD stream_recv_fd
452 #define HAS_VOLATILE_LOCKS
453 #define BROKEN_READ_SELECT_ON_TCP_SOCKET
454 #define CANT_WRITE_BEFORE_SENDING_FD
455 #ifndef NO_POSIX_REGEXP
456 #define HAS_POSIX_REGEXP
463 #define HAS_CLOSEFROM
465 #ifndef NO_DEV_URANDOM
466 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
469 #define HAS_FUTIMESAT
471 #define USE_SYSV_POLL
473 #define EVENTS_STYLE EVENTS_STYLE_DEVPOLL
475 #ifndef NO_POSIX_GETPW_R
476 #define HAVE_POSIX_GETPW_R
477 #define GETPW_R_NEEDS_POSIX_PTHREAD_SEMANTICS
483 #define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail"
484 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
485 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
486 #define NATIVE_COMMAND_DIR "/usr/sbin"
487 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
497 #define UINT32_TYPE unsigned int
498 #define UINT16_TYPE unsigned short
499 #define _PATH_MAILDIR "/var/mail"
500 #define _PATH_BSHELL "/bin/sh"
501 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
502 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
503 #define MISSING_SETENV
504 #define HAS_FCNTL_LOCK
505 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
506 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
509 #define NATIVE_DB_TYPE "dbm"
510 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
514 #define USE_SYS_SOCKIO_H
515 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
516 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
517 #define FIONREAD_IN_SYS_FILIO_H
518 #define DBM_NO_TRAILING_NULL
520 #define STATVFS_IN_SYS_STATVFS_H
521 #define STRCASECMP_IN_STRINGS_H
522 #define SET_H_ERRNO(err) (set_h_errno(err))
527 #define UINT32_TYPE unsigned int
528 #define UINT16_TYPE unsigned short
529 #define _PATH_MAILDIR "/var/mail"
530 #define _PATH_BSHELL "/bin/sh"
531 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
532 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
533 #define MISSING_SETENV
534 #define HAS_FCNTL_LOCK
535 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
536 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
539 #define NATIVE_DB_TYPE "dbm"
540 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
544 #define USE_SYS_SOCKIO_H
545 #define GETTIMEOFDAY(t) gettimeofday(t,NULL)
546 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
547 #define FIONREAD_IN_SYS_FILIO_H
548 #define DBM_NO_TRAILING_NULL
550 #define STATVFS_IN_SYS_STATVFS_H
557 #if defined(AIX5) || defined(AIX6)
559 #define UINT32_TYPE unsigned int
560 #define UINT16_TYPE unsigned short
561 #define MISSING_SETENV
564 #define _PATH_BSHELL "/bin/sh"
566 #ifndef _PATH_MAILDIR
567 #define _PATH_MAILDIR "/var/spool/mail"
569 #ifndef _PATH_DEFPATH
570 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
572 #ifndef _PATH_STDPATH
573 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
575 #define HAS_FCNTL_LOCK
576 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
577 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
578 #define USE_SYS_SELECT_H
581 #define NATIVE_DB_TYPE "dbm"
582 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
587 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
588 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
589 #define SOCKADDR_SIZE socklen_t
590 #define SOCKOPT_SIZE socklen_t
592 #define STATVFS_IN_SYS_STATVFS_H
593 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
594 #define NATIVE_MAILQ_PATH "/usr/sbin/mailq"
595 #define NATIVE_NEWALIAS_PATH "/usr/sbin/newaliases"
596 #define NATIVE_COMMAND_DIR "/usr/sbin"
597 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
603 #include <sys/socket.h>
605 #define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
608 #define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
613 #define BROKEN_AI_PASSIVE_NULL_HOST
614 #define BROKEN_AI_NULL_SERVICE
615 #define USE_SYSV_POLL
616 #define MYMALLOC_FUZZ 1
621 #define UINT32_TYPE unsigned int
622 #define UINT16_TYPE unsigned short
623 #define MISSING_SETENV
624 #define _PATH_BSHELL "/bin/sh"
625 #define _PATH_MAILDIR "/var/spool/mail"
626 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
627 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
628 #define HAS_FCNTL_LOCK
629 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
630 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
631 #define USE_SYS_SELECT_H
634 #define NATIVE_DB_TYPE "dbm"
635 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
640 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
641 #define RESOLVE_H_NEEDS_STDIO_H
642 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
643 #define SOCKADDR_SIZE size_t
644 #define SOCKOPT_SIZE size_t
646 #define STATVFS_IN_SYS_STATVFS_H
647 #define STRCASECMP_IN_STRINGS_H
649 extern time_t time(time_t *);
650 extern int seteuid(uid_t);
651 extern int setegid(gid_t);
652 extern int initgroups(
const char *,
int);
655 #define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail"
656 #define NATIVE_MAILQ_PATH "/usr/sbin/mailq"
657 #define NATIVE_NEWALIAS_PATH "/usr/sbin/newaliases"
658 #define NATIVE_COMMAND_DIR "/usr/sbin"
659 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
661 #define CANT_USE_SEND_RECV_MSG
666 #define UINT32_TYPE unsigned int
667 #define UINT16_TYPE unsigned short
668 #define MISSING_SETENV
669 #define _PATH_BSHELL "/bin/sh"
670 #define _PATH_MAILDIR "/var/spool/mail"
671 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
672 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
673 #define HAS_FCNTL_LOCK
674 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
675 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
676 #define USE_SYS_SELECT_H
679 #define NATIVE_DB_TYPE "dbm"
680 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
685 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
686 #define RESOLVE_H_NEEDS_STDIO_H
687 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
688 #define SOCKADDR_SIZE size_t
689 #define SOCKOPT_SIZE size_t
691 #define STATFS_IN_SYS_STATFS_H
692 #define STRCASECMP_IN_STRINGS_H
693 extern time_t time(time_t *);
694 extern int seteuid(uid_t);
695 extern int setegid(gid_t);
696 extern int initgroups(
const char *,
int);
698 #define NATIVE_SENDMAIL_PATH "/usr/lib/sendmail"
700 #define CANT_USE_SEND_RECV_MSG
706 #if defined(IRIX5) || defined(IRIX6)
708 #define UINT32_TYPE unsigned int
709 #define UINT16_TYPE unsigned short
710 #define MISSING_SETENV
711 #define _PATH_MAILDIR "/var/mail"
712 #define _PATH_BSHELL "/bin/sh"
713 #define _PATH_DEFPATH "/usr/bin:/usr/bsd"
714 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/bsd"
715 #define HAS_FCNTL_LOCK
716 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
717 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
720 #define NATIVE_DB_TYPE "dbm"
721 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
725 #define USE_SYS_SOCKIO_H
726 #define GETTIMEOFDAY(t) gettimeofday(t)
727 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/bsd"
728 #define FIONREAD_IN_SYS_FILIO_H
729 #define DBM_NO_TRAILING_NULL
731 #define STATVFS_IN_SYS_STATVFS_H
732 #define BROKEN_WRITE_SELECT_ON_NON_BLOCKING_PIPE
733 #define CANT_USE_SEND_RECV_MSG
737 #define MISSING_USLEEP
744 #define HAS_POSIX_REGEXP
745 #define PIPES_CANT_FIONREAD
751 #if defined(LINUX2) || defined(LINUX3) || defined(LINUX4)
753 #define UINT32_TYPE unsigned int
754 #define UINT16_TYPE unsigned short
755 #include <features.h>
757 #define HAS_FLOCK_LOCK
758 #define HAS_FCNTL_LOCK
759 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
760 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
763 #define NATIVE_DB_TYPE "hash"
764 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
768 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
769 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
770 #define FIONREAD_IN_TERMIOS_H
772 #define STATFS_IN_SYS_VFS_H
773 #define PREPEND_PLUS_TO_OPTSTRING
774 #define HAS_POSIX_REGEXP
776 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
777 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
778 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
779 #define NATIVE_COMMAND_DIR "/usr/sbin"
780 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
781 #ifdef __GLIBC_PREREQ
782 #define HAVE_GLIBC_API_VERSION_SUPPORT(maj, min) __GLIBC_PREREQ(maj, min)
784 #define HAVE_GLIBC_API_VERSION_SUPPORT(maj, min) \
785 (defined(__GLIBC__) && \
786 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)))
788 #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1)
789 #define SOCKADDR_SIZE socklen_t
790 #define SOCKOPT_SIZE socklen_t
796 #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 4)
798 #define HAVE_GETIFADDRS
800 #define HAS_PROCNET_IFINET6
801 #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
804 #include <linux/version.h>
805 #if !defined(KERNEL_VERSION)
806 #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1)
808 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \
809 || (defined(__GLIBC__) && __GLIBC__ < 2)
810 #define CANT_USE_SEND_RECV_MSG
811 #define DEF_SMTP_CACHE_DEMAND 0
813 #define CANT_WRITE_BEFORE_SENDING_FD
815 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
817 #define EVENTS_STYLE EVENTS_STYLE_EPOLL
819 #define USE_SYSV_POLL
820 #ifndef NO_POSIX_GETPW_R
821 #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) \
822 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 1) \
823 || (defined(_BSD_SOURCE) && _BSD_SOURCE >= 1) \
824 || (defined(_SVID_SOURCE) && _SVID_SOURCE >= 1) \
825 || (defined(_POSIX_SOURCE) && _POSIX_SOURCE >= 1)
826 #define HAVE_POSIX_GETPW_R
834 #define UINT32_TYPE unsigned int
835 #define UINT16_TYPE unsigned short
837 #define HAS_FLOCK_LOCK
838 #define HAS_FCNTL_LOCK
839 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
840 #define DEF_MAILBOX_LOCK "dotlock"
843 #define NATIVE_DB_TYPE "hash"
844 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
848 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
849 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
850 #define FIONREAD_IN_TERMIOS_H
852 #define STATFS_IN_SYS_VFS_H
853 #define PREPEND_PLUS_TO_OPTSTRING
854 #define HAS_POSIX_REGEXP
855 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
856 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
857 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
858 #define NATIVE_COMMAND_DIR "/usr/sbin"
859 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
860 #define CANT_USE_SEND_RECV_MSG
861 #define DEF_SMTP_CACHE_DEMAND 0
869 #include <features.h>
871 #define HAS_FCNTL_LOCK
872 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
873 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
876 #define NATIVE_DB_TYPE "hash"
877 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
881 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
882 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
883 #define FIONREAD_IN_TERMIOS_H
885 #define STATFS_IN_SYS_VFS_H
886 #define UNIX_DOMAIN_CONNECT_BLOCKS_FOR_ACCEPT
887 #define PREPEND_PLUS_TO_OPTSTRING
888 #define HAS_POSIX_REGEXP
890 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
891 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
892 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
893 #define NATIVE_COMMAND_DIR "/usr/sbin"
895 #define NATIVE_DAEMON_DIR "/usr/lib/postfix"
896 #ifndef DEF_MANPAGE_DIR
897 #define DEF_MANPAGE_DIR "/usr/share/man"
899 #ifndef DEF_SAMPLE_DIR
900 #define DEF_SAMPLE_DIR "/usr/share/doc/postfix/examples"
902 #ifndef DEF_README_DIR
903 #define DEF_README_DIR "/usr/share/doc/postfix"
906 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
908 #define SOCKADDR_SIZE socklen_t
909 #define SOCKOPT_SIZE socklen_t
910 #ifdef __FreeBSD_kernel__
911 #define HAS_DUPLEX_PIPE
912 #define HAS_ISSETUGID
916 #ifdef __FreeBSD_kernel__
917 #define HAVE_GETIFADDRS
919 #define HAS_PROCNET_IFINET6
920 #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
923 #define CANT_USE_SEND_RECV_MSG
924 #define DEF_SMTP_CACHE_DEMAND 0
925 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
933 #define USE_SIG_RETURN
934 #define UINT32_TYPE unsigned int
935 #define UINT16_TYPE unsigned short
937 #define HAS_FCNTL_LOCK
938 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
939 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
941 #define NATIVE_DB_TYPE "dbm"
942 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
943 #define ROOT_PATH "/usr/bin:/sbin:/usr/sbin"
944 #define MISSING_SETENV
948 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
949 #define _PATH_BSHELL "/bin/sh"
950 #define _PATH_MAILDIR "/var/mail"
951 #define _PATH_DEFPATH "/usr/bin"
952 #define _PATH_STDPATH "/usr/bin:/sbin:/usr/sbin"
953 #define MISSING_SETEUID
954 #define HAVE_SETRESUID
955 #define MISSING_SETEGID
956 #define HAVE_SETRESGID
960 #define STATFS_IN_SYS_VFS_H
961 #define HAS_POSIX_REGEXP
963 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
964 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
965 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
966 #define NATIVE_COMMAND_DIR "/usr/sbin"
967 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
972 #define USE_SIG_RETURN
973 #define UINT32_TYPE unsigned int
974 #define UINT16_TYPE unsigned short
976 #define HAS_FCNTL_LOCK
977 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
978 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
980 #define NATIVE_DB_TYPE "dbm"
981 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
982 #define ROOT_PATH "/usr/bin:/sbin:/usr/sbin"
983 #define MISSING_SETENV
987 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
988 #define _PATH_BSHELL "/bin/sh"
989 #define _PATH_MAILDIR "/var/mail"
990 #define _PATH_DEFPATH "/usr/bin"
991 #define _PATH_STDPATH "/usr/bin:/sbin:/usr/sbin"
992 #define MISSING_SETEUID
993 #define HAVE_SETRESUID
994 #define MISSING_SETEGID
995 #define HAVE_SETRESGID
999 #define STATFS_IN_SYS_VFS_H
1000 #define HAS_POSIX_REGEXP
1001 #define HAS_SHL_LOAD
1002 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
1003 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
1004 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
1005 #define NATIVE_COMMAND_DIR "/usr/sbin"
1006 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
1011 #define USE_SIG_RETURN
1012 #define UINT32_TYPE unsigned int
1013 #define UINT16_TYPE unsigned short
1015 #define HAS_FCNTL_LOCK
1016 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
1017 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
1022 #define MISSING_SETENV
1023 #define MISSING_RLIMIT_FSIZE
1024 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
1025 #define NATIVE_DB_TYPE "dbm"
1026 #define ALIAS_DB_MAP DEF_DB_TYPE ":/usr/lib/aliases"
1027 #define ROOT_PATH "/bin:/usr/bin:/etc"
1028 #define _PATH_BSHELL "/bin/sh"
1029 #define _PATH_MAILDIR "/usr/mail"
1030 #define _PATH_DEFPATH "/bin:/usr/bin"
1031 #define _PATH_STDPATH "/bin:/usr/bin:/etc"
1032 #define MISSING_SETEUID
1033 #define HAVE_SETRESUID
1034 #define MISSING_SETEGID
1035 #define HAVE_SETRESGID
1040 #define STATFS_IN_SYS_VFS_H
1041 #define HAS_POSIX_REGEXP
1042 #define HAS_SHL_LOAD
1043 #define NATIVE_SENDMAIL_PATH "/usr/bin/sendmail"
1044 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
1045 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
1046 #define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
1054 #define UINT32_TYPE unsigned int
1055 #define UINT16_TYPE unsigned short
1057 #define HAS_FLOCK_LOCK
1058 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
1059 #define DEF_MAILBOX_LOCK "flock, dotlock"
1061 #define HAVE_SYS_DIR_H
1062 #define STATFS_IN_SYS_VFS_H
1068 #define MISSING_SETENV_PUTENV
1069 #define MISSING_MKFIFO
1070 #define MISSING_SIGSET_T
1071 #define MISSING_SIGACTION
1072 #define MISSING_STD_FILENOS
1073 #define MISSING_SETSID
1074 #define MISSING_WAITPID
1075 #define MISSING_UTIMBUF
1077 #define WAIT_STATUS_T union wait
1078 #define NORMAL_EXIT_STATUS(x) (WIFEXITED(x) && !WEXITSTATUS (x))
1079 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
1080 #define _PATH_MAILDIR "/usr/spool/mail"
1081 #define _PATH_BSHELL "/bin/sh"
1082 #define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb"
1083 #define _PATH_STDPATH "/bin:/usr/bin:/usr/ucb"
1084 #define ROOT_PATH "/bin:/usr/bin:/usr/etc:/usr/ucb"
1085 #define NATIVE_DB_TYPE "dbm"
1086 #define ALIAS_DB_MAP "netinfo:/aliases"
1088 #define MISSING_POSIX_S_IS
1089 #define MISSING_POSIX_S_MODES
1091 #define isascii(c) ((unsigned)(c)<=0177)
1093 typedef unsigned short mode_t;
1095 #define MISSING_PID_T
1096 #define MISSING_STRFTIME_E
1097 #define FD_CLOEXEC 1
1098 #define O_NONBLOCK O_NDELAY
1099 #define WEXITSTATUS(x) ((x).w_retcode)
1100 #define WTERMSIG(x) ((x).w_termsig)
1108 #define UINT32_TYPE unsigned int
1109 #define UINT16_TYPE unsigned short
1111 #define HAS_FLOCK_LOCK
1112 #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
1113 #define DEF_MAILBOX_LOCK "flock, dotlock"
1115 #define HAVE_SYS_DIR_H
1116 #define STATFS_IN_SYS_VFS_H
1122 #define MISSING_SETENV_PUTENV
1123 #define MISSING_MKFIFO
1124 #define MISSING_SIGSET_T
1125 #define MISSING_SIGACTION
1126 #define MISSING_STD_FILENOS
1127 #define MISSING_SETSID
1128 #define MISSING_WAITPID
1129 #define MISSING_UTIMBUF
1131 #define WAIT_STATUS_T union wait
1132 #define NORMAL_EXIT_STATUS(x) (WIFEXITED(x) && !WEXITSTATUS (x))
1133 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
1134 #define _PATH_MAILDIR "/usr/spool/mail"
1135 #define _PATH_BSHELL "/bin/sh"
1136 #define _PATH_DEFPATH "/bin:/usr/bin:/usr/ucb"
1137 #define _PATH_STDPATH "/bin:/usr/bin:/usr/ucb"
1138 #define ROOT_PATH "/bin:/usr/bin:/usr/etc:/usr/ucb"
1139 #define NATIVE_DB_TYPE "dbm"
1140 #define ALIAS_DB_MAP "netinfo:/aliases"
1142 #define MISSING_POSIX_S_IS
1143 #define MISSING_POSIX_S_MODES
1145 #define isascii(c) ((unsigned)(c)<=0177)
1147 typedef unsigned short mode_t;
1149 #define MISSING_PID_T
1150 #define MISSING_STRFTIME_E
1151 #define FD_CLOEXEC 1
1152 #define O_NONBLOCK O_NDELAY
1153 #define WEXITSTATUS(x) ((x).w_retcode)
1154 #define WTERMSIG(x) ((x).w_termsig)
1157 #ifdef ReliantUnix543
1159 #define UINT32_TYPE unsigned int
1160 #define UINT16_TYPE unsigned short
1161 #define MISSING_SETENV
1162 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
1163 #define _PATH_BSHELL "/bin/sh"
1164 #define _PATH_MAILDIR "/var/spool/mail"
1165 #define HAS_FCNTL_LOCK
1166 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
1167 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
1169 #define FIONREAD_IN_SYS_FILIO_H
1170 #define USE_SYS_SOCKIO_H
1172 #define NATIVE_DB_TYPE "dbm"
1173 #define ALIAS_DB_MAP DEF_DB_TYPE ":/var/adm/sendmail/aliases"
1175 extern char *optarg;
1181 #define GETTIMEOFDAY(t) gettimeofday(t)
1182 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
1184 #define STATVFS_IN_SYS_STATVFS_H
1185 #define MISSING_USLEEP
1190 #define UINT32_TYPE unsigned int
1191 #define UINT16_TYPE unsigned short
1192 #define _PATH_MAILDIR "/var/mail"
1193 #define _PATH_BSHELL "/bin/sh"
1194 #define _PATH_DEFPATH "/usr/bin:/usr/ucb"
1195 #define _PATH_STDPATH "/usr/bin:/usr/sbin:/usr/ucb"
1196 #define MISSING_SETENV
1197 #define HAS_FCNTL_LOCK
1198 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
1199 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
1201 #define NATIVE_DB_TYPE "hash"
1202 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/aliases"
1205 #define USE_SYS_SOCKIO_H
1206 #define GETTIMEOFDAY(t) gettimeofday(t,NULL)
1207 #define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb"
1208 #define FIONREAD_IN_SYS_FILIO_H
1209 #define DBM_NO_TRAILING_NULL
1211 #define STATVFS_IN_SYS_STATVFS_H
1213 #define S_ISSOCK(mode) ((mode&0xF000) == 0xC000)
1219 #include <sys/socket.h>
1222 #define UINT32_TYPE unsigned int
1223 #define UINT16_TYPE unsigned short
1224 #define _PATH_MAILDIR "/usr/spool/mail"
1225 #define _PATH_BSHELL "/bin/sh"
1226 #define _PATH_DEFPATH "/bin:/usr/bin"
1228 #define HAS_FCNTL_LOCK
1229 #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL
1230 #define DEF_MAILBOX_LOCK "fcntl, dotlock"
1233 #define NATIVE_DB_TYPE "dbm"
1234 #define ALIAS_DB_MAP DEF_DB_TYPE ":/etc/mail/aliases"
1235 #define DBM_NO_TRAILING_NULL
1239 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
1240 #define ROOT_PATH "/bin:/etc:/usr/bin:/tcb/bin"
1242 #define STATVFS_IN_SYS_STATVFS_H
1243 #define MISSING_SETENV
1244 #define STRCASECMP_IN_STRINGS_H
1249 #define S_ISSOCK(mode) (((mode) & (S_IFMT)) == (C_ISSOCK))
1250 #define CANT_USE_SEND_RECV_MSG
1251 #define DEF_SMTP_CACHE_DEMAND 0
1258 #error "unsupported platform"
1264 #ifndef DEF_COMMAND_DIR
1265 #ifdef NATIVE_COMMAND_DIR
1266 #define DEF_COMMAND_DIR NATIVE_COMMAND_DIR
1270 #ifndef DEF_DAEMON_DIR
1271 #ifdef NATIVE_DAEMON_DIR
1272 #define DEF_DAEMON_DIR NATIVE_DAEMON_DIR
1276 #ifndef DEF_SENDMAIL_PATH
1277 #ifdef NATIVE_SENDMAIL_PATH
1278 #define DEF_SENDMAIL_PATH NATIVE_SENDMAIL_PATH
1282 #ifndef DEF_MAILQ_PATH
1283 #ifdef NATIVE_MAILQ_PATH
1284 #define DEF_MAILQ_PATH NATIVE_MAILQ_PATH
1288 #ifndef DEF_NEWALIAS_PATH
1289 #ifdef NATIVE_NEWALIAS_PATH
1290 #define DEF_NEWALIAS_PATH NATIVE_NEWALIAS_PATH
1295 #define DEF_DB_TYPE NATIVE_DB_TYPE
1298 #define CAST_ANY_PTR_TO_INT(cptr) ((int) (long) (cptr))
1299 #define CAST_INT_TO_VOID_PTR(ival) ((void *) (long) (ival))
1301 #ifdef DUP2_DUPS_CLOSE_ON_EXEC
1303 extern int dup2_pass_on_exec(
int oldd,
int newd);
1305 #define DUP2 dup2_pass_on_exec
1310 #ifdef PREPEND_PLUS_TO_OPTSTRING
1311 #define GETOPT(argc, argv, str) getopt((argc), (argv), "+" str)
1313 #define GETOPT(argc, argv, str) getopt((argc), (argv), (str))
1315 #define OPTIND (optind > 0 ? optind : 1)
1320 #if !defined(HAS_FCNTL_LOCK) && !defined(HAS_FLOCK_LOCK)
1321 #error "define HAS_FCNTL_LOCK and/or HAS_FLOCK_LOCK"
1324 #if !defined(DEF_MAILBOX_LOCK)
1325 #error "define DEF_MAILBOX_LOCK"
1328 #if !defined(INTERNAL_LOCK)
1329 #error "define INTERNAL_LOCK"
1332 #if defined(USE_STATFS) && defined(USE_STATVFS)
1333 #error "define USE_STATFS or USE_STATVFS, not both"
1336 #if !defined(USE_STATFS) && !defined(USE_STATVFS)
1337 #error "define USE_STATFS or USE_STATVFS"
1344 #include <sys/socket.h>
1345 #define EMULATE_IPV4_ADDRINFO
1346 #define MISSING_INET_PTON
1347 #define MISSING_INET_NTOP
1349 extern int inet_pton(
int,
const char *,
void *);
1360 #ifndef NO_WATCHDOG_PIPE
1361 #define USE_WATCHDOG_PIPE
1368 #if !defined(PREFERRED_RAND_SOURCE) && defined(HAS_DEV_URANDOM)
1369 #define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
1376 #if !defined(EVENTS_STYLE)
1377 #define EVENTS_STYLE EVENTS_STYLE_SELECT
1380 #define EVENTS_STYLE_SELECT 1
1381 #define EVENTS_STYLE_KQUEUE 2
1382 #define EVENTS_STYLE_DEVPOLL 3
1383 #define EVENTS_STYLE_EPOLL 4
1391 #if !defined(USE_SYSV_POLL) && !defined(USE_SYSV_POLL_THEN_SELECT)
1392 #define USE_BSD_SELECT
1399 #ifndef DEF_INET_PROTOCOLS
1401 #define DEF_INET_PROTOCOLS INET_PROTO_NAME_ALL
1403 #define DEF_INET_PROTOCOLS INET_PROTO_NAME_IPV4
1410 #ifndef SOCKADDR_SIZE
1411 #define SOCKADDR_SIZE int
1414 #ifndef SOCKOPT_SIZE
1415 #define SOCKOPT_SIZE int
1421 #ifndef LOCAL_LISTEN
1422 #define LOCAL_LISTEN unix_listen
1423 #define LOCAL_ACCEPT unix_accept
1424 #define LOCAL_CONNECT unix_connect
1425 #define LOCAL_TRIGGER unix_trigger
1426 #define LOCAL_SEND_FD unix_send_fd
1427 #define LOCAL_RECV_FD unix_recv_fd
1430 #if !defined (HAVE_SYS_NDIR_H) && !defined (HAVE_SYS_DIR_H) \
1431 && !defined (HAVE_NDIR_H)
1432 #define HAVE_DIRENT_H
1435 #ifndef WAIT_STATUS_T
1438 #define NORMAL_EXIT_STATUS(status) ((status) == 0)
1441 #ifdef NO_POSIX_GETPW_R
1442 #undef HAVE_POSIX_GETPW_R
1449 #ifndef OCTAL_TO_UNSIGNED
1450 #define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8))
1456 #define INT_SIZEOF(foo) ((int) sizeof(foo))
1461 #ifdef MISSING_UTIMBUF
1469 #ifdef MISSING_STRERROR
1470 extern const char *strerror(
int);
1474 #if defined (MISSING_SETENV) || defined (MISSING_SETENV_PUTENV)
1475 extern int setenv(
const char *,
const char *,
int);
1479 #ifdef MISSING_SETEUID
1480 extern int seteuid(uid_t euid);
1484 #ifdef MISSING_SETEGID
1485 extern int setegid(gid_t egid);
1489 #ifdef MISSING_MKFIFO
1490 extern int mkfifo(
char *,
int);
1494 #ifdef MISSING_WAITPID
1495 extern int waitpid(
int,
WAIT_STATUS_T *status,
int options);
1499 #ifdef MISSING_SETSID
1500 extern int setsid(
void);
1504 #ifndef HAS_CLOSEFROM
1509 #ifdef MISSING_STD_FILENOS
1510 #define STDIN_FILENO 0
1511 #define STDOUT_FILENO 1
1512 #define STDERR_FILENO 2
1515 #ifdef MISSING_PID_T
1520 #ifdef MISSING_POSIX_S_IS
1521 #define S_ISBLK(mode) (((mode) & (_S_IFMT)) == (_S_IFBLK))
1522 #define S_ISCHR(mode) (((mode) & (_S_IFMT)) == (_S_IFCHR))
1523 #define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
1524 #define S_ISSOCK(mode) (((mode) & (_S_IFMT)) == (_S_IFSOCK))
1525 #define S_ISFIFO(mode) (((mode) & (_S_IFMT)) == (_S_IFIFO))
1526 #define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
1527 #define S_ISLNK(mode) (((mode) & (_S_IFMT)) == (_S_IFLNK))
1530 #ifdef MISSING_POSIX_S_MODES
1531 #define S_IRUSR _S_IRUSR
1532 #define S_IRGRP 0000040
1533 #define S_IROTH 0000004
1534 #define S_IWUSR _S_IWUSR
1535 #define S_IWGRP 0000020
1536 #define S_IWOTH 0000002
1537 #define S_IXUSR _S_IXUSR
1538 #define S_IXGRP 0000010
1539 #define S_IXOTH 0000001
1540 #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
1548 #if defined(__hpux) && defined(__ia64)
1549 #define ALIGN_TYPE __float80
1550 #elif defined(__ia64__)
1551 #define ALIGN_TYPE long double
1553 #define ALIGN_TYPE double
1564 #ifndef __has_attribute
1565 #define __has_attribute(x) 0
1578 #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3
1579 #define NORETURN void __attribute__((__noreturn__))
1580 #elif defined(__clang__) && __has_attribute(__noreturn__)
1581 #define NORETURN void __attribute__((__noreturn__))
1583 #define NORETURN void
1595 #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3
1596 #define PRINTFLIKE(x,y) __attribute__ ((format (printf, (x), (y))))
1597 #elif defined(__clang__) && __has_attribute(__format__)
1598 #define PRINTFLIKE(x,y) __attribute__ ((__format__ (__printf__, (x), (y))))
1600 #define PRINTFLIKE(x,y)
1605 #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3
1606 #define SCANFLIKE(x,y) __attribute__ ((format (scanf, (x), (y))))
1607 #elif defined(__clang__) && __has_attribute(__format__)
1608 #define SCANFLIKE(x,y) __attribute__ ((__format__ (__scanf__, (x), (y))))
1610 #define SCANFLIKE(x,y)
1619 #ifndef PRINTFPTRLIKE
1621 #define PRINTFPTRLIKE(x,y) PRINTFLIKE(x,y)
1622 #elif defined(__clang__) && __has_attribute(__format__)
1623 #define PRINTFPTRLIKE(x,y) __attribute__ ((__format__ (__printf__, (x), (y))))
1625 #define PRINTFPTRLIKE(x,y)
1634 #if defined(__GNUC__) && (__GNUC__ > 2)
1635 #define EXPECTED(x) __builtin_expect(!!(x), 1)
1636 #define UNEXPECTED(x) __builtin_expect(!!(x), 0)
1638 #define EXPECTED(x) (x)
1639 #define UNEXPECTED(x) (x)
1657 #if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ > 3)
1658 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
1659 #elif defined(__clang__) && __has_attribute(warn_unused_result)
1660 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
1662 #define WARN_UNUSED_RESULT
1670 #define NOCLOBBER volatile
1681 #define __MAXINT__(T) ((T) ~(((T) 1) << ((sizeof(T) * CHAR_BIT) - 1)))
1683 #define OFF_T_MAX __MAXINT__(off_t)
1687 #define SSIZE_T_MAX __MAXINT__(ssize_t)
1695 #define SET_H_ERRNO(err) (h_errno = (err))
1703 #ifndef CAN_WRITE_BEFORE_SENDING_FD
1704 #define CANT_WRITE_BEFORE_SENDING_FD
1712 #ifndef DONT_WAIT_AFTER_SENDING_FD
1713 #define MUST_READ_AFTER_SENDING_FD
1720 #define UINT32_TYPE uint32_t
1721 #define UINT16_TYPE uint16_t
1723 #define UINT32_SIZE 4
1724 #define UINT16_SIZE 2
1729 #ifndef HAVE_CONST_CHAR_STAR
1743 #define ISASCII(c) isascii(_UCHAR_(c))
1744 #define _UCHAR_(c) ((unsigned char)(c))
1745 #define ISALNUM(c) (ISASCII(c) && isalnum((unsigned char)(c)))
1746 #define ISALPHA(c) (ISASCII(c) && isalpha((unsigned char)(c)))
1747 #define ISCNTRL(c) (ISASCII(c) && iscntrl((unsigned char)(c)))
1748 #define ISDIGIT(c) (ISASCII(c) && isdigit((unsigned char)(c)))
1749 #define ISGRAPH(c) (ISASCII(c) && isgraph((unsigned char)(c)))
1750 #define ISLOWER(c) (ISASCII(c) && islower((unsigned char)(c)))
1751 #define ISPRINT(c) (ISASCII(c) && isprint((unsigned char)(c)))
1752 #define ISPUNCT(c) (ISASCII(c) && ispunct((unsigned char)(c)))
1753 #define ISSPACE(c) (ISASCII(c) && isspace((unsigned char)(c)))
1754 #define ISUPPER(c) (ISASCII(c) && isupper((unsigned char)(c)))
1755 #define TOLOWER(c) (ISUPPER(c) ? tolower((unsigned char)(c)) : (c))
1756 #define TOUPPER(c) (ISLOWER(c) ? toupper((unsigned char)(c)) : (c))
1761 #define CHARS_COMMA_SP ", \t\r\n"
1762 #define CHARS_SPACE " \t\r\n"
1763 #define CHARS_BRACE "{}"
1769 extern int REMOVE(
const char *);
int inet_pton(int, const char *, void *)
const char * inet_ntop(int, const void *, char *, SOCKADDR_SIZE)
const char * CONST_CHAR_STAR