Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_posix_config.h @ 2660:2ca36a62c8a1
autoconfigure crypt_r(): uclibc has no crypt_r()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 02 Apr 2009 13:46:39 +0000 |
parents | a3bcaabf2ec8 |
children | 6060225e9261 |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
6 |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_ |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_POSIX_CONFIG_H_INCLUDED_ |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
515 | 11 #if (NGX_HPUX) |
455 | 12 #define _XOPEN_SOURCE |
13 #define _XOPEN_SOURCE_EXTENDED 1 | |
14 #endif | |
15 | |
16 | |
515 | 17 #if (NGX_TRU64) |
467 | 18 #define _REENTRANT |
19 #endif | |
20 | |
21 | |
1576 | 22 #ifdef __CYGWIN__ |
23 #define timezonevar /* timezone is variable */ | |
1581
81774dc3db28
Cygwin can not pass SCM_RIGHTS via unix socket, use signals
Igor Sysoev <igor@sysoev.ru>
parents:
1576
diff
changeset
|
24 #define NGX_BROKEN_SCM_RIGHTS 1 |
1576 | 25 #endif |
26 | |
27 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
28 #include <sys/types.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 #include <sys/time.h> |
455 | 30 #if (NGX_HAVE_UNISTD_H) |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
31 #include <unistd.h> |
455 | 32 #endif |
33 #if (NGX_HAVE_INTTYPES_H) | |
34 #include <inttypes.h> | |
35 #endif | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 #include <stdarg.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 #include <stddef.h> /* offsetof() */ |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 #include <stdio.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
39 #include <stdlib.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
40 #include <errno.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
41 #include <string.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
42 #include <signal.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 #include <pwd.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
44 #include <grp.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
45 #include <dirent.h> |
727 | 46 #include <glob.h> |
2659
a3bcaabf2ec8
fix OpenBSD building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
47 #if (NGX_HAVE_SYS_PARAM_H) |
a3bcaabf2ec8
fix OpenBSD building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
48 #include <sys/param.h> /* statfs() */ |
a3bcaabf2ec8
fix OpenBSD building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
49 #endif |
2615 | 50 #if (NGX_HAVE_SYS_MOUNT_H) |
51 #include <sys/mount.h> /* statfs() */ | |
52 #endif | |
53 #if (NGX_HAVE_SYS_STATVFS_H) | |
54 #include <sys/statvfs.h> /* statvfs() */ | |
55 #endif | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
56 |
455 | 57 #if (NGX_HAVE_SYS_FILIO_H) |
58 #include <sys/filio.h> /* FIONBIO */ | |
59 #endif | |
60 #include <sys/ioctl.h> /* FIONBIO */ | |
61 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
62 #include <sys/uio.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
63 #include <sys/stat.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
64 #include <fcntl.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
65 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
66 #include <sys/wait.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
67 #include <sys/mman.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
68 #include <sys/resource.h> |
374
213f17e9f776
nginx-0.0.7-2004-07-02-09:47:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
69 #include <sched.h> |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
70 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
71 #include <sys/socket.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
72 #include <netinet/in.h> |
455 | 73 #include <netinet/tcp.h> /* TCP_NODELAY */ |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
74 #include <arpa/inet.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
75 #include <netdb.h> |
479 | 76 #include <sys/un.h> |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
77 |
455 | 78 #if (NGX_HAVE_LIMITS_H) |
79 #include <limits.h> /* IOV_MAX */ | |
80 #endif | |
81 | |
1954
d85e291b99f9
it seems that malloc.h is required for Cygwin only
Igor Sysoev <igor@sysoev.ru>
parents:
1901
diff
changeset
|
82 #ifdef __CYGWIN__ |
1576 | 83 #include <malloc.h> /* memalign() */ |
84 #endif | |
85 | |
86 #if (NGX_HAVE_CRYPT_H) | |
87 #include <crypt.h> | |
88 #endif | |
89 | |
90 | |
455 | 91 #ifndef IOV_MAX |
92 #define IOV_MAX 16 | |
93 #endif | |
94 | |
95 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
96 #include <ngx_auto_config.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
97 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
98 |
469 | 99 #if (NGX_HAVE_POLL) |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
100 #include <poll.h> |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
101 #endif |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
102 |
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
103 |
469 | 104 #if (NGX_HAVE_KQUEUE) |
455 | 105 #include <sys/event.h> |
106 #endif | |
107 | |
108 | |
469 | 109 #if (NGX_HAVE_DEVPOLL) |
455 | 110 #include <sys/ioctl.h> |
111 #include <sys/devpoll.h> | |
112 #endif | |
113 | |
114 | |
1377
0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
115 #define NGX_LISTEN_BACKLOG 511 |
0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
116 |
0d57c150115b
set default listen() backlog to 511 on all platforms except FreeBSD
Igor Sysoev <igor@sysoev.ru>
parents:
727
diff
changeset
|
117 |
455 | 118 #if (__FreeBSD__) && (__FreeBSD_version < 400017) |
119 | |
120 #include <sys/param.h> /* ALIGN() */ | |
121 | |
2006
b52cb9bf2064
style fix: remove tabs and trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1954
diff
changeset
|
122 /* |
1901
d880fa02fb65
use CMSG_LEN(), this fixes an alert "sendmsg() failed (9: Bad file descriptor)"
Igor Sysoev <igor@sysoev.ru>
parents:
1581
diff
changeset
|
123 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA() |
d880fa02fb65
use CMSG_LEN(), this fixes an alert "sendmsg() failed (9: Bad file descriptor)"
Igor Sysoev <igor@sysoev.ru>
parents:
1581
diff
changeset
|
124 */ |
455 | 125 |
126 #undef CMSG_SPACE | |
127 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l)) | |
128 | |
1901
d880fa02fb65
use CMSG_LEN(), this fixes an alert "sendmsg() failed (9: Bad file descriptor)"
Igor Sysoev <igor@sysoev.ru>
parents:
1581
diff
changeset
|
129 #undef CMSG_LEN |
d880fa02fb65
use CMSG_LEN(), this fixes an alert "sendmsg() failed (9: Bad file descriptor)"
Igor Sysoev <igor@sysoev.ru>
parents:
1581
diff
changeset
|
130 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l)) |
d880fa02fb65
use CMSG_LEN(), this fixes an alert "sendmsg() failed (9: Bad file descriptor)"
Igor Sysoev <igor@sysoev.ru>
parents:
1581
diff
changeset
|
131 |
455 | 132 #undef CMSG_DATA |
133 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr))) | |
134 | |
135 #endif | |
136 | |
137 | |
601 | 138 extern char **environ; |
139 | |
140 | |
355
0fb6c53fb135
nginx-0.0.7-2004-06-15-21:47:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
141 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */ |