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