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