aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_config.h
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2015-03-17 00:24:34 +0300
committerRuslan Ermilov <ru@nginx.com>2015-03-17 00:24:34 +0300
commit309928b941edf6e4a00ba873a70521c3ce3fc94d (patch)
tree63c27f741ecef6730850946510c224973918a80a /src/core/ngx_config.h
parentd81db904550f719907df5922f7d8c384dd349cdc (diff)
downloadnginx-309928b941edf6e4a00ba873a70521c3ce3fc94d.tar.gz
nginx-309928b941edf6e4a00ba873a70521c3ce3fc94d.zip
Core: expose maximum values of time_t and ngx_int_t.
These are needed to detect overflows.
Diffstat (limited to 'src/core/ngx_config.h')
-rw-r--r--src/core/ngx_config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 1da71f8d1..145e43a44 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -85,8 +85,11 @@ typedef intptr_t ngx_flag_t;
#if (NGX_PTR_SIZE == 4)
#define NGX_INT_T_LEN NGX_INT32_LEN
+#define NGX_MAX_INT_T_VALUE 2147483647
+
#else
#define NGX_INT_T_LEN NGX_INT64_LEN
+#define NGX_MAX_INT_T_VALUE 9223372036854775807
#endif