0
|
1
|
|
2 /*
|
|
3 * Copyright (C) Igor Sysoev
|
660
|
4 * Copyright (C) Nginx, Inc.
|
0
|
5 */
|
|
6
|
|
7
|
|
8 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
|
|
9 #define _NGX_POSIX_CONFIG_H_INCLUDED_
|
|
10
|
|
11
|
64
|
12 #if (NGX_HPUX)
|
4
|
13 #define _XOPEN_SOURCE
|
|
14 #define _XOPEN_SOURCE_EXTENDED 1
|
678
|
15 #define _HPUX_ALT_XOPEN_SOCKET_API
|
4
|
16 #endif
|
|
17
|
|
18
|
64
|
19 #if (NGX_TRU64)
|
16
|
20 #define _REENTRANT
|
|
21 #endif
|
|
22
|
|
23
|
342
|
24 #ifdef __CYGWIN__
|
|
25 #define timezonevar /* timezone is variable */
|
|
26 #define NGX_BROKEN_SCM_RIGHTS 1
|
|
27 #endif
|
|
28
|
|
29
|
0
|
30 #include <sys/types.h>
|
|
31 #include <sys/time.h>
|
4
|
32 #if (NGX_HAVE_UNISTD_H)
|
0
|
33 #include <unistd.h>
|
4
|
34 #endif
|
|
35 #if (NGX_HAVE_INTTYPES_H)
|
|
36 #include <inttypes.h>
|
|
37 #endif
|
0
|
38 #include <stdarg.h>
|
|
39 #include <stddef.h> /* offsetof() */
|
|
40 #include <stdio.h>
|
|
41 #include <stdlib.h>
|
|
42 #include <errno.h>
|
|
43 #include <string.h>
|
|
44 #include <signal.h>
|
|
45 #include <pwd.h>
|
|
46 #include <grp.h>
|
|
47 #include <dirent.h>
|
238
|
48 #include <glob.h>
|
668
|
49 #include <time.h>
|
472
|
50 #if (NGX_HAVE_SYS_PARAM_H)
|
|
51 #include <sys/param.h> /* statfs() */
|
|
52 #endif
|
468
|
53 #if (NGX_HAVE_SYS_MOUNT_H)
|
|
54 #include <sys/mount.h> /* statfs() */
|
|
55 #endif
|
|
56 #if (NGX_HAVE_SYS_STATVFS_H)
|
|
57 #include <sys/statvfs.h> /* statvfs() */
|
|
58 #endif
|
0
|
59
|
4
|
60 #if (NGX_HAVE_SYS_FILIO_H)
|
|
61 #include <sys/filio.h> /* FIONBIO */
|
|
62 #endif
|
|
63 #include <sys/ioctl.h> /* FIONBIO */
|
|
64
|
0
|
65 #include <sys/uio.h>
|
|
66 #include <sys/stat.h>
|
|
67 #include <fcntl.h>
|
|
68
|
|
69 #include <sys/wait.h>
|
|
70 #include <sys/mman.h>
|
|
71 #include <sys/resource.h>
|
|
72 #include <sched.h>
|
|
73
|
|
74 #include <sys/socket.h>
|
|
75 #include <netinet/in.h>
|
4
|
76 #include <netinet/tcp.h> /* TCP_NODELAY */
|
0
|
77 #include <arpa/inet.h>
|
|
78 #include <netdb.h>
|
28
|
79 #include <sys/un.h>
|
0
|
80
|
4
|
81 #if (NGX_HAVE_LIMITS_H)
|
|
82 #include <limits.h> /* IOV_MAX */
|
|
83 #endif
|
|
84
|
372
|
85 #ifdef __CYGWIN__
|
342
|
86 #include <malloc.h> /* memalign() */
|
|
87 #endif
|
|
88
|
|
89 #if (NGX_HAVE_CRYPT_H)
|
|
90 #include <crypt.h>
|
|
91 #endif
|
|
92
|
|
93
|
4
|
94 #ifndef IOV_MAX
|
|
95 #define IOV_MAX 16
|
|
96 #endif
|
|
97
|
|
98
|
0
|
99 #include <ngx_auto_config.h>
|
|
100
|
|
101
|
624
|
102 #if (NGX_HAVE_POSIX_SEM)
|
|
103 #include <semaphore.h>
|
|
104 #endif
|
|
105
|
|
106
|
18
|
107 #if (NGX_HAVE_POLL)
|
0
|
108 #include <poll.h>
|
|
109 #endif
|
|
110
|
|
111
|
18
|
112 #if (NGX_HAVE_KQUEUE)
|
4
|
113 #include <sys/event.h>
|
|
114 #endif
|
|
115
|
|
116
|
18
|
117 #if (NGX_HAVE_DEVPOLL)
|
4
|
118 #include <sys/ioctl.h>
|
|
119 #include <sys/devpoll.h>
|
|
120 #endif
|
|
121
|
|
122
|
518
|
123 #if (NGX_HAVE_FILE_AIO)
|
|
124 #include <aio.h>
|
|
125 typedef struct aiocb ngx_aiocb_t;
|
|
126 #endif
|
|
127
|
|
128
|
326
|
129 #define NGX_LISTEN_BACKLOG 511
|
|
130
|
646
|
131 #define ngx_debug_init()
|
|
132
|
326
|
133
|
4
|
134 #if (__FreeBSD__) && (__FreeBSD_version < 400017)
|
|
135
|
|
136 #include <sys/param.h> /* ALIGN() */
|
|
137
|
376
|
138 /*
|
366
|
139 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
|
|
140 */
|
4
|
141
|
|
142 #undef CMSG_SPACE
|
|
143 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
|
|
144
|
366
|
145 #undef CMSG_LEN
|
|
146 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
|
|
147
|
4
|
148 #undef CMSG_DATA
|
|
149 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
|
|
150
|
|
151 #endif
|
|
152
|
|
153
|
150
|
154 extern char **environ;
|
|
155
|
|
156
|
0
|
157 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */
|