Mercurial > hg > nginx-vendor-0-8
comparison src/core/nginx.c @ 418:ff86d646f9df NGINX_0_7_21
nginx 0.7.21
*) Changes in the ngx_http_limit_req_module.
*) Feature: the EXSLT support in the ngx_http_xslt_module.
Thanks to Denis F. Latypoff.
*) Workaround: compatibility with glibc 2.3.
Thanks to Eric Benson and Maxim Dounin.
*) Bugfix: nginx could not run on MacOSX 10.4 and earlier; the bug had
appeared in 0.7.6.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 11 Nov 2008 00:00:00 +0300 |
parents | 79c5df00501e |
children | a8424ffa495c |
comparison
equal
deleted
inserted
replaced
417:735cec38a814 | 418:ff86d646f9df |
---|---|
189 | 189 |
190 | 190 |
191 int ngx_cdecl | 191 int ngx_cdecl |
192 main(int argc, char *const *argv) | 192 main(int argc, char *const *argv) |
193 { | 193 { |
194 char *p; | |
195 ssize_t n; | |
194 ngx_int_t i; | 196 ngx_int_t i; |
195 ngx_log_t *log; | 197 ngx_log_t *log; |
196 ngx_cycle_t *cycle, init_cycle; | 198 ngx_cycle_t *cycle, init_cycle; |
197 ngx_core_conf_t *ccf; | 199 ngx_core_conf_t *ccf; |
198 | 200 |
238 if (ngx_getopt(&init_cycle, argc, ngx_argv) != NGX_OK) { | 240 if (ngx_getopt(&init_cycle, argc, ngx_argv) != NGX_OK) { |
239 return 1; | 241 return 1; |
240 } | 242 } |
241 | 243 |
242 if (ngx_show_version) { | 244 if (ngx_show_version) { |
243 ngx_write_fd(ngx_stderr_fileno, "nginx version: " NGINX_VER CRLF, | 245 |
244 sizeof("nginx version: " NGINX_VER CRLF) - 1); | 246 p = "nginx version: " NGINX_VER CRLF; |
247 n = sizeof("nginx version: " NGINX_VER CRLF) - 1; | |
248 | |
249 if (ngx_write_fd(ngx_stderr_fileno, p, n) != n) { | |
250 return 1; | |
251 } | |
245 | 252 |
246 if (ngx_show_configure) { | 253 if (ngx_show_configure) { |
247 #ifdef NGX_COMPILER | 254 #ifdef NGX_COMPILER |
248 ngx_write_fd(ngx_stderr_fileno, "built by " NGX_COMPILER CRLF, | 255 p = "built by " NGX_COMPILER CRLF; |
249 sizeof("built by " NGX_COMPILER CRLF) - 1); | 256 n = sizeof("built by " NGX_COMPILER CRLF) - 1; |
250 #endif | 257 |
251 | 258 if (ngx_write_fd(ngx_stderr_fileno, p, n) != n) { |
252 #ifndef __WATCOMC__ | 259 return 1; |
253 | 260 } |
254 /* OpenWatcomC could not build the long NGX_CONFIGURE string */ | 261 #endif |
255 | 262 |
256 ngx_write_fd(ngx_stderr_fileno, | 263 p = "configure arguments: " NGX_CONFIGURE CRLF; |
257 "configure arguments: " NGX_CONFIGURE CRLF, | 264 n = sizeof("configure arguments :" NGX_CONFIGURE CRLF) - 1; |
258 sizeof("configure arguments :" NGX_CONFIGURE CRLF) - 1); | 265 |
259 #endif | 266 if (ngx_write_fd(ngx_stderr_fileno, p, n) != n) { |
267 return 1; | |
268 } | |
260 } | 269 } |
261 | 270 |
262 if (!ngx_test_config) { | 271 if (!ngx_test_config) { |
263 return 0; | 272 return 0; |
264 } | 273 } |