Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / src / os / unix / ngx_posix_config.h
blob4cf90cc9897f70aff78d7ded89befdfd59616b81
2 /*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
5 */
8 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
9 #define _NGX_POSIX_CONFIG_H_INCLUDED_
12 #if (NGX_HPUX)
13 #define _XOPEN_SOURCE
14 #define _XOPEN_SOURCE_EXTENDED 1
15 #define _HPUX_ALT_XOPEN_SOCKET_API
16 #endif
19 #if (NGX_TRU64)
20 #define _REENTRANT
21 #endif
24 #ifdef __CYGWIN__
25 #define timezonevar /* timezone is variable */
26 #define NGX_BROKEN_SCM_RIGHTS 1
27 #endif
30 #include <sys/types.h>
31 #include <sys/time.h>
32 #if (NGX_HAVE_UNISTD_H)
33 #include <unistd.h>
34 #endif
35 #if (NGX_HAVE_INTTYPES_H)
36 #include <inttypes.h>
37 #endif
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>
48 #include <glob.h>
49 #include <time.h>
50 #if (NGX_HAVE_SYS_PARAM_H)
51 #include <sys/param.h> /* statfs() */
52 #endif
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
60 #if (NGX_HAVE_SYS_FILIO_H)
61 #include <sys/filio.h> /* FIONBIO */
62 #endif
63 #include <sys/ioctl.h> /* FIONBIO */
65 #include <sys/uio.h>
66 #include <sys/stat.h>
67 #include <fcntl.h>
69 #include <sys/wait.h>
70 #include <sys/mman.h>
71 #include <sys/resource.h>
72 #include <sched.h>
74 #include <sys/socket.h>
75 #include <netinet/in.h>
76 #include <netinet/tcp.h> /* TCP_NODELAY */
77 #include <arpa/inet.h>
78 #include <netdb.h>
79 #include <sys/un.h>
81 #if (NGX_HAVE_LIMITS_H)
82 #include <limits.h> /* IOV_MAX */
83 #endif
85 #ifdef __CYGWIN__
86 #include <malloc.h> /* memalign() */
87 #endif
89 #if (NGX_HAVE_CRYPT_H)
90 #include <crypt.h>
91 #endif
94 #ifndef IOV_MAX
95 #define IOV_MAX 16
96 #endif
99 #include <ngx_auto_config.h>
102 #if (NGX_HAVE_POSIX_SEM)
103 #include <semaphore.h>
104 #endif
107 #if (NGX_HAVE_POLL)
108 #include <poll.h>
109 #endif
112 #if (NGX_HAVE_KQUEUE)
113 #include <sys/event.h>
114 #endif
117 #if (NGX_HAVE_DEVPOLL)
118 #include <sys/ioctl.h>
119 #include <sys/devpoll.h>
120 #endif
123 #if (NGX_HAVE_FILE_AIO)
124 #include <aio.h>
125 typedef struct aiocb ngx_aiocb_t;
126 #endif
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()
142 #undef CMSG_SPACE
143 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
145 #undef CMSG_LEN
146 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
148 #undef CMSG_DATA
149 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
151 #endif
154 extern char **environ;
157 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */