3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
8 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
9 #define _NGX_POSIX_CONFIG_H_INCLUDED_
14 #define _XOPEN_SOURCE_EXTENDED 1
15 #define _HPUX_ALT_XOPEN_SOCKET_API
25 #define timezonevar /* timezone is variable */
26 #define NGX_BROKEN_SCM_RIGHTS 1
30 #include <sys/types.h>
32 #if (NGX_HAVE_UNISTD_H)
35 #if (NGX_HAVE_INTTYPES_H)
39 #include <stddef.h> /* offsetof() */
50 #if (NGX_HAVE_SYS_PARAM_H)
51 #include <sys/param.h> /* statfs() */
53 #if (NGX_HAVE_SYS_MOUNT_H)
54 #include <sys/mount.h> /* statfs() */
56 #if (NGX_HAVE_SYS_STATVFS_H)
57 #include <sys/statvfs.h> /* statvfs() */
60 #if (NGX_HAVE_SYS_FILIO_H)
61 #include <sys/filio.h> /* FIONBIO */
63 #include <sys/ioctl.h> /* FIONBIO */
71 #include <sys/resource.h>
74 #include <sys/socket.h>
75 #include <netinet/in.h>
76 #include <netinet/tcp.h> /* TCP_NODELAY */
77 #include <arpa/inet.h>
81 #if (NGX_HAVE_LIMITS_H)
82 #include <limits.h> /* IOV_MAX */
86 #include <malloc.h> /* memalign() */
89 #if (NGX_HAVE_CRYPT_H)
99 #include <ngx_auto_config.h>
102 #if (NGX_HAVE_POSIX_SEM)
103 #include <semaphore.h>
112 #if (NGX_HAVE_KQUEUE)
113 #include <sys/event.h>
117 #if (NGX_HAVE_DEVPOLL)
118 #include <sys/ioctl.h>
119 #include <sys/devpoll.h>
123 #if (NGX_HAVE_FILE_AIO)
125 typedef struct aiocb ngx_aiocb_t
;
129 #define NGX_LISTEN_BACKLOG 511
131 #define ngx_debug_init()
134 #if (__FreeBSD__) && (__FreeBSD_version < 400017)
136 #include <sys/param.h> /* ALIGN() */
139 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
143 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
146 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
149 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
154 extern char **environ
;
157 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */