comparison auto/unix @ 4:4b2dafa26fe2 NGINX_0_1_2

nginx 0.1.2 *) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS options in configure. *) Feature: the server_name directive supports *.domain.tld. *) Bugfix: the portability improvements. *) Bugfix: if configuration file was set in command line, the reconfiguration was impossible; bug appeared in 0.1.1. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used. *) Bugfix: with sendfile the response was not recoded according to the charset module directives; bug appeared in 0.1.1. *) Bugfix: very seldom bug in the kqueue processing. *) Bugfix: the gzip module compressed the proxied responses that was already compressed.
author Igor Sysoev <http://sysoev.ru>
date Thu, 21 Oct 2004 00:00:00 +0400
parents f0b350454894
children 46833bd150cb
comparison
equal deleted inserted replaced
3:8beaf7b3241f 4:4b2dafa26fe2
1 1
2 # Copyright (C) Igor Sysoev 2 # Copyright (C) Igor Sysoev
3 3
4 4
5 CC_WARN=$CC 5 CC_WARN=
6 ngx_fmt_collect=yes 6 ngx_fmt_collect=yes
7 7
8 # C types 8 # C types
9 9
10 ngx_type="int"; . auto/types/sizeof 10 ngx_type="int"; . auto/types/sizeof
21 eval ngx_formats=\${ngx_${ngx_ptr_size}_fmt}; . auto/fmt/ptrfmt 21 eval ngx_formats=\${ngx_${ngx_ptr_size}_fmt}; . auto/fmt/ptrfmt
22 22
23 23
24 # POSIX types 24 # POSIX types
25 25
26 NGX_AUTO_CONFIG="#include \"../$NGX_AUTO_CONFIG_H\"" 26 NGX_INCLUDE_AUTO_CONFIG_H="#include \"../$NGX_AUTO_CONFIG_H\""
27 27
28 ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef 28 ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
29 29
30 ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef 30 ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
31 . auto/types/sizeof 31 . auto/types/sizeof
70 eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt 70 eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
71 71
72 72
73 # syscalls, libc calls and some features 73 # syscalls, libc calls and some features
74 74
75 ngx_feature_libs= 75
76 ngx_func_libs= 76 ngx_feature="pread()"
77 77 ngx_feature_name="pread"
78 78 ngx_feature_run=no
79 ngx_func="pread()" 79 ngx_feature_incs=
80 ngx_func_inc= 80 ngx_feature_libs=
81 ngx_func_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0)" 81 ngx_feature_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0)"
82 . auto/func 82 . auto/feature
83 83
84 84
85 ngx_func="pwrite()" 85 ngx_feature="pwrite()"
86 ngx_func_inc= 86 ngx_feature_name="pwrite"
87 ngx_func_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)" 87 ngx_feature_run=no
88 . auto/func 88 ngx_feature_incs=
89 89 ngx_feature_libs=
90 90 ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
91 #ngx_func="strsignal()" 91 . auto/feature
92 #ngx_func_inc="#include <string.h>" 92
93 #ngx_func_test="char *s = strsignal(1)" 93
94 #. auto/func 94 ngx_feature="strerror_r()"
95 95 ngx_feature_name="strerror_r"
96 96 ngx_feature_run=no
97 ngx_func="strerror_r()" 97 ngx_feature_incs="#include <string.h>"
98 ngx_func_inc="#include <string.h>" 98 ngx_feature_libs=
99 ngx_func_test="char buf[20]; int n; n = strerror_r(1, buf, 20)" 99 ngx_feature_test="char buf[20]; int n; n = strerror_r(1, buf, 20)"
100 . auto/func 100 . auto/feature
101 101
102 102
103 ngx_func="gnu_strerror_r()" 103 ngx_feature="gnu_strerror_r()"
104 ngx_func_inc="#include <string.h>" 104 ngx_feature_name="gnu_strerror_r"
105 ngx_func_test="char buf[20], *str; str = strerror_r(1, buf, 20)" 105 ngx_feature_run=no
106 . auto/func 106 ngx_feature_incs="#include <string.h>"
107 107 ngx_feature_libs=
108 108 ngx_feature_test="char buf[20], *str; str = strerror_r(1, buf, 20)"
109 ngx_func="localtime_r()" 109 . auto/feature
110 ngx_func_inc="#include <time.h>" 110
111 ngx_func_test="struct tm t; time_t c=0; localtime_r(&c, &t)" 111
112 . auto/func 112 ngx_feature="localtime_r()"
113 113 ngx_feature_name="localtime_r"
114 114 ngx_feature_run=no
115 ngx_func="posix_memalign()" 115 ngx_feature_incs="#include <time.h>"
116 ngx_func_inc="#include <stdlib.h>" 116 ngx_feature_libs=
117 ngx_func_test="void *p; int n; n = posix_memalign(&p, 4096, 4096)" 117 ngx_feature_test="struct tm t; time_t c=0; localtime_r(&c, &t)"
118 . auto/func 118 . auto/feature
119 119
120 120
121 ngx_func="memalign()" 121 ngx_feature="posix_memalign()"
122 ngx_func_inc="#include <stdlib.h>" 122 ngx_feature_name="posix_memalign"
123 ngx_func_test="void *p; p = memalign(4096, 4096)" 123 ngx_feature_run=no
124 . auto/func 124 ngx_feature_incs="#include <stdlib.h>"
125 125 ngx_feature_libs=
126 ngx_feature_test="void *p; int n; n = posix_memalign(&p, 4096, 4096)"
127 . auto/feature
128
129
130 ngx_feature="memalign()"
131 ngx_feature_name="memalign"
132 ngx_feature_run=no
133 ngx_feature_incs="#include <stdlib.h>"
134 ngx_feature_libs=
135 ngx_feature_test="void *p; p = memalign(4096, 4096)"
136 . auto/feature
137
138
139 ngx_feature="sched_yield()"
140 ngx_feature_name="HAVE_SCHED_YIELD"
141 ngx_feature_run=no
142 ngx_feature_incs="#include <sched.h>"
143 ngx_feature_libs=
144 ngx_feature_test="sched_yield()"
145 . auto/feature
126 146
127 147
128 ngx_feature="mmap(MAP_ANON|MAP_SHARED)" 148 ngx_feature="mmap(MAP_ANON|MAP_SHARED)"
129 ngx_feature_name="MAP_ANON" 149 ngx_feature_name="MAP_ANON"
130 ngx_feature_inc="#include <sys/mman.h>" 150 ngx_feature_run=yes
151 ngx_feature_incs="#include <sys/mman.h>"
152 ngx_feature_libs=
131 ngx_feature_test="void *p; 153 ngx_feature_test="void *p;
132 p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, 154 p = mmap(NULL, 4096, PROT_READ|PROT_WRITE,
133 MAP_ANON|MAP_SHARED, -1, 0); 155 MAP_ANON|MAP_SHARED, -1, 0);
134 if (p == MAP_FAILED) return 1;" 156 if (p == MAP_FAILED) return 1;"
135 ngx_feature_run=yes
136 . auto/feature 157 . auto/feature
137 158
138 159
139 ngx_feature='mmap("/dev/zero", MAP_SHARED)' 160 ngx_feature='mmap("/dev/zero", MAP_SHARED)'
140 ngx_feature_name="MAP_DEVZERO" 161 ngx_feature_name="MAP_DEVZERO"
141 ngx_feature_inc="#include <sys/mman.h> 162 ngx_feature_run=yes
163 ngx_feature_incs="#include <sys/mman.h>
142 #include <sys/stat.h> 164 #include <sys/stat.h>
143 #include <fcntl.h>" 165 #include <fcntl.h>"
166 ngx_feature_libs=
144 ngx_feature_test='void *p; int fd; 167 ngx_feature_test='void *p; int fd;
145 fd = open("/dev/zero", O_RDWR); 168 fd = open("/dev/zero", O_RDWR);
146 p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 169 p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
147 if (p == MAP_FAILED) return 1;' 170 if (p == MAP_FAILED) return 1;'
148 . auto/feature 171 . auto/feature
149 172
150 173
151 ngx_feature="System V shared memory" 174 ngx_feature="System V shared memory"
152 ngx_feature_name="SYSVSHM" 175 ngx_feature_name="SYSVSHM"
153 ngx_feature_inc="#include <sys/ipc.h> 176 ngx_feature_run=yes
177 ngx_feature_incs="#include <sys/ipc.h>
154 #include <sys/shm.h>" 178 #include <sys/shm.h>"
179 ngx_feature_libs=
155 ngx_feature_test="int id; 180 ngx_feature_test="int id;
156 id = shmget(IPC_PRIVATE, 4096, (SHM_R|SHM_W|IPC_CREAT)); 181 id = shmget(IPC_PRIVATE, 4096, (SHM_R|SHM_W|IPC_CREAT));
157 if (id == -1) return 1; 182 if (id == -1) return 1;
158 shmctl(id, IPC_RMID, NULL);" 183 shmctl(id, IPC_RMID, NULL);"
159 . auto/feature 184 . auto/feature
160 185
161 186
162
163 ngx_feature="struct sockaddr_in.sin_len" 187 ngx_feature="struct sockaddr_in.sin_len"
164 ngx_feature_name="sin_len" 188 ngx_feature_name="sin_len"
165 ngx_feature_inc="#include <sys/socket.h> 189 ngx_feature_run=no
190 ngx_feature_incs="#include <sys/socket.h>
166 #include <netinet/in.h>" 191 #include <netinet/in.h>"
192 ngx_feature_libs=
167 ngx_feature_test="struct sockaddr_in sa; sa.sin_len = 5" 193 ngx_feature_test="struct sockaddr_in sa; sa.sin_len = 5"
168 ngx_feature_run=no
169 . auto/feature 194 . auto/feature
170 195
171 196
172 ngx_feature="struct msghdr.msg_control" 197 ngx_feature="struct msghdr.msg_control"
173 ngx_feature_name="msghdr_msg_control" 198 ngx_feature_name="msghdr_msg_control"
174 ngx_feature_inc="#include <sys/socket.h>" 199 ngx_feature_run=no
200 ngx_feature_incs="#include <sys/socket.h>"
201 ngx_feature_libs=
175 ngx_feature_test="struct msghdr msg; msg.msg_control = NULL" 202 ngx_feature_test="struct msghdr msg; msg.msg_control = NULL"
176 . auto/feature 203 . auto/feature
177 204
178
179 case $PLATFORM in
180 Linux:*)
181 ngx_feature_inc="#include <sys/ioctl.h>"
182 ;;
183
184 *)
185 ngx_feature_inc="#include <sys/filio.h>"
186 ;;
187 esac
188 205
189 ngx_feature="ioctl(FIONBIO)" 206 ngx_feature="ioctl(FIONBIO)"
190 ngx_feature_name="FIONBIO" 207 ngx_feature_name="FIONBIO"
208 ngx_feature_run=no
209 ngx_feature_incs="#include <sys/ioctl.h>
210 $NGX_INCLUDE_SYS_FILIO_H"
211 ngx_feature_libs=
191 ngx_feature_test="int i; i = FIONBIO" 212 ngx_feature_test="int i; i = FIONBIO"
192 . auto/feature 213 . auto/feature
193 214
194 215
195 ngx_feature="struct tm.tm_gmtoff" 216 ngx_feature="struct tm.tm_gmtoff"
196 ngx_feature_name="gmtoff" 217 ngx_feature_name="gmtoff"
197 ngx_feature_inc="#include <time.h>" 218 ngx_feature_run=no
219 ngx_feature_incs="#include <time.h>"
220 ngx_feature_libs=
198 ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0" 221 ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0"
199 . auto/feature 222 . auto/feature