comparison src/core/nginx.c @ 945:3a126fca07fc

the -V switch
author Igor Sysoev <igor@sysoev.ru>
date Sat, 23 Dec 2006 19:54:21 +0000
parents 45df22906c12
children bb748b37cabd
comparison
equal deleted inserted replaced
944:656dfccf7481 945:3a126fca07fc
174 174
175 175
176 ngx_uint_t ngx_max_module; 176 ngx_uint_t ngx_max_module;
177 177
178 static ngx_uint_t ngx_show_version; 178 static ngx_uint_t ngx_show_version;
179 static ngx_uint_t ngx_show_configure;
179 180
180 static char *ngx_null_environ = NULL; 181 static char *ngx_null_environ = NULL;
181 182
182 183
183 int ngx_cdecl 184 int ngx_cdecl
233 234
234 if (ngx_show_version) { 235 if (ngx_show_version) {
235 ngx_write_fd(ngx_stderr_fileno, "nginx version: " NGINX_VER CRLF, 236 ngx_write_fd(ngx_stderr_fileno, "nginx version: " NGINX_VER CRLF,
236 sizeof("nginx version: " NGINX_VER CRLF) - 1); 237 sizeof("nginx version: " NGINX_VER CRLF) - 1);
237 238
239 #ifndef __WATCOMC__
240
241 if (ngx_show_configure) {
238 #ifdef NGX_COMPILER 242 #ifdef NGX_COMPILER
239 ngx_write_fd(ngx_stderr_fileno, "built by " NGX_COMPILER CRLF, 243 ngx_write_fd(ngx_stderr_fileno, "built by " NGX_COMPILER CRLF,
240 sizeof("built by " NGX_COMPILER CRLF) - 1); 244 sizeof("built by " NGX_COMPILER CRLF) - 1);
241 #endif 245 #endif
246
247 ngx_write_fd(ngx_stderr_fileno,
248 "configure arguments " NGX_CONFIGURE CRLF,
249 sizeof("configure arguments " NGX_CONFIGURE CRLF) - 1);
250 }
251
252 #endif
253
242 if (!ngx_test_config) { 254 if (!ngx_test_config) {
243 return 0; 255 return 0;
244 } 256 }
245 } 257 }
246 258
496 508
497 case 'v': 509 case 'v':
498 ngx_show_version = 1; 510 ngx_show_version = 1;
499 break; 511 break;
500 512
513 case 'V':
514 ngx_show_version = 1;
515 ngx_show_configure = 1;
516 break;
517
501 case 't': 518 case 't':
502 ngx_test_config = 1; 519 ngx_test_config = 1;
503 break; 520 break;
504 521
505 case 'c': 522 case 'c':