# HG changeset patch # User Piotr Sikora <[email protected]> # Date 1467064810 25200 # Mon Jun 27 15:00:10 2016 -0700 # Node ID a2892701d91e6aba62719b54792e1e14eeea11a0 # Parent 1059f59c44039020843ced5bca39f165c322bacb Core: remove NGX_TIME_T_SIZE.
Replace ./configure-time test with equivalent compile-time test. Signed-off-by: Piotr Sikora <[email protected]> diff -r 1059f59c4403 -r a2892701d91e auto/unix --- a/auto/unix +++ b/auto/unix @@ -624,7 +624,6 @@ ngx_param=NGX_MAX_OFF_T_VALUE; ngx_value ngx_param=NGX_OFF_T_LEN; ngx_value=$ngx_max_len; . auto/types/value ngx_type="time_t"; . auto/types/sizeof -ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value ngx_param=NGX_MAX_TIME_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value diff -r 1059f59c4403 -r a2892701d91e src/core/ngx_module.h --- a/src/core/ngx_module.h +++ b/src/core/ngx_module.h @@ -18,9 +18,7 @@ #define NGX_MODULE_UNSET_INDEX (ngx_uint_t) -1 -#define NGX_MODULE_SIGNATURE_0 \ - ngx_value(NGX_PTR_SIZE) "," \ - ngx_value(NGX_TIME_T_SIZE) "," +#define NGX_MODULE_SIGNATURE_0 ngx_value(NGX_PTR_SIZE) "," #if (NGX_HAVE_KQUEUE) #define NGX_MODULE_SIGNATURE_1 "1" diff -r 1059f59c4403 -r a2892701d91e src/core/ngx_parse_time.c --- a/src/core/ngx_parse_time.c +++ b/src/core/ngx_parse_time.c @@ -264,13 +264,9 @@ ngx_parse_http_time(u_char *value, size_ - 719527 + 31 + 28) * 86400 + hour * 3600 + min * 60 + sec; -#if (NGX_TIME_T_SIZE <= 4) - - if (time > 0x7fffffff) { + if (sizeof(time_t) <= 4 && time > 0x7fffffff) { return NGX_ERROR; } -#endif - return (time_t) time; } diff -r 1059f59c4403 -r a2892701d91e src/os/win32/ngx_win32_config.h --- a/src/os/win32/ngx_win32_config.h +++ b/src/os/win32/ngx_win32_config.h @@ -200,7 +200,6 @@ typedef int sig_atomic_t #define NGX_SIZE_T_LEN (sizeof("-9223372036854775808") - 1) #define NGX_MAX_SIZE_T_VALUE 9223372036854775807 #define NGX_TIME_T_LEN (sizeof("-9223372036854775808") - 1) -#define NGX_TIME_T_SIZE 8 #define NGX_MAX_TIME_T_VALUE 9223372036854775807 #else @@ -209,7 +208,6 @@ typedef int sig_atomic_t #define NGX_SIZE_T_LEN (sizeof("-2147483648") - 1) #define NGX_MAX_SIZE_T_VALUE 2147483647 #define NGX_TIME_T_LEN (sizeof("-2147483648") - 1) -#define NGX_TIME_T_SIZE 4 #define NGX_MAX_TIME_T_VALUE 2147483647 #endif _______________________________________________ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel
