Mercurial > hg > nginx
comparison src/core/ngx_config.h @ 6008:b92d5a26d55f
Core: expose maximum values of time_t and ngx_int_t.
These are needed to detect overflows.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 17 Mar 2015 00:24:34 +0300 |
parents | 626f288fa5ed |
children | 5805301f990f |
comparison
equal
deleted
inserted
replaced
6007:79b473d5381d | 6008:b92d5a26d55f |
---|---|
83 #define NGX_INT32_LEN (sizeof("-2147483648") - 1) | 83 #define NGX_INT32_LEN (sizeof("-2147483648") - 1) |
84 #define NGX_INT64_LEN (sizeof("-9223372036854775808") - 1) | 84 #define NGX_INT64_LEN (sizeof("-9223372036854775808") - 1) |
85 | 85 |
86 #if (NGX_PTR_SIZE == 4) | 86 #if (NGX_PTR_SIZE == 4) |
87 #define NGX_INT_T_LEN NGX_INT32_LEN | 87 #define NGX_INT_T_LEN NGX_INT32_LEN |
88 #define NGX_MAX_INT_T_VALUE 2147483647 | |
89 | |
88 #else | 90 #else |
89 #define NGX_INT_T_LEN NGX_INT64_LEN | 91 #define NGX_INT_T_LEN NGX_INT64_LEN |
92 #define NGX_MAX_INT_T_VALUE 9223372036854775807 | |
90 #endif | 93 #endif |
91 | 94 |
92 | 95 |
93 #ifndef NGX_ALIGNMENT | 96 #ifndef NGX_ALIGNMENT |
94 #define NGX_ALIGNMENT sizeof(unsigned long) /* platform word */ | 97 #define NGX_ALIGNMENT sizeof(unsigned long) /* platform word */ |