diff options
author | Ruslan Ermilov <ru@nginx.com> | 2014-05-20 16:10:07 +0400 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2014-05-20 16:10:07 +0400 |
commit | 1736c180f4683d57d175b98d5596b779bab950d4 (patch) | |
tree | 0bdf61366c6dbc9232a40ac0c77b59ba4d1f6127 /src | |
parent | 27899a923a36c877cd3307dd054b501789764bcf (diff) | |
download | nginx-1736c180f4683d57d175b98d5596b779bab950d4.tar.gz nginx-1736c180f4683d57d175b98d5596b779bab950d4.zip |
Configure: the --build= option.
If set, its value is output in "nginx -v" and in the error log.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/nginx.c | 2 | ||||
-rw-r--r-- | src/core/nginx.h | 6 | ||||
-rw-r--r-- | src/os/unix/ngx_posix_init.c | 2 | ||||
-rw-r--r-- | src/os/win32/ngx_win32_init.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index 4cc80826e..c75ee4fd7 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -217,7 +217,7 @@ main(int argc, char *const *argv) } if (ngx_show_version) { - ngx_write_stderr("nginx version: " NGINX_VER NGX_LINEFEED); + ngx_write_stderr("nginx version: " NGINX_VER_BUILD NGX_LINEFEED); if (ngx_show_help) { ngx_write_stderr( diff --git a/src/core/nginx.h b/src/core/nginx.h index 8c7800abe..12e6e8a86 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -13,6 +13,12 @@ #define NGINX_VERSION "1.7.1" #define NGINX_VER "nginx/" NGINX_VERSION +#ifdef NGX_BUILD +#define NGINX_VER_BUILD NGINX_VER " (" NGX_BUILD ")" +#else +#define NGINX_VER_BUILD NGINX_VER +#endif + #define NGINX_VAR "NGINX" #define NGX_OLDPID_EXT ".oldbin" diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c index 58e6f7614..9a4de022d 100644 --- a/src/os/unix/ngx_posix_init.c +++ b/src/os/unix/ngx_posix_init.c @@ -82,7 +82,7 @@ ngx_os_init(ngx_log_t *log) void ngx_os_status(ngx_log_t *log) { - ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER); + ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER_BUILD); #ifdef NGX_COMPILER ngx_log_error(NGX_LOG_NOTICE, log, 0, "built by " NGX_COMPILER); diff --git a/src/os/win32/ngx_win32_init.c b/src/os/win32/ngx_win32_init.c index f7153fcc4..6fa1a57e5 100644 --- a/src/os/win32/ngx_win32_init.c +++ b/src/os/win32/ngx_win32_init.c @@ -247,7 +247,7 @@ ngx_os_status(ngx_log_t *log) { ngx_osviex_stub_t *osviex_stub; - ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER); + ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER_BUILD); if (osviex) { |