summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2015-03-18 02:04:39 +0300
committerRuslan Ermilov <ru@nginx.com>2015-03-18 02:04:39 +0300
commitb89e3bc03448cb83cc339781a6037e6a73954c01 (patch)
treeaee71b26227a58d87e8cf75532cd0642c5f954ab
parent4fe0a09942f8aed90f84c77969847980e9aadd98 (diff)
downloadnginx-b89e3bc03448cb83cc339781a6037e6a73954c01.tar.gz
nginx-b89e3bc03448cb83cc339781a6037e6a73954c01.tar.bz2
Configure: fixed type max value detection.
The code tried to use suffixes for "long" and "long long" types, but it never worked as intended due to the bug in the shell code. Also, the max value for any 64-bit type other than "long long" on platforms with 32-bit "long" would be incorrect if the bug was fixed. So instead of fixing the bug in the shell code, always use the "int" constant for 32-bit types, and "long long" constant for 64-bit types.
Diffstat (limited to '')
-rw-r--r--auto/types/sizeof14
1 files changed, 2 insertions, 12 deletions
diff --git a/auto/types/sizeof b/auto/types/sizeof
index 9215a545f..a5f66bbd9 100644
--- a/auto/types/sizeof
+++ b/auto/types/sizeof
@@ -50,22 +50,12 @@ rm -rf $NGX_AUTOTEST*
case $ngx_size in
4)
- if [ "$ngx_type"="long" ]; then
- ngx_max_value=2147483647L
- else
- ngx_max_value=2147483647
- fi
-
+ ngx_max_value=2147483647
ngx_max_len='(sizeof("-2147483648") - 1)'
;;
8)
- if [ "$ngx_type"="long long" ]; then
- ngx_max_value=9223372036854775807LL
- else
- ngx_max_value=9223372036854775807L
- fi
-
+ ngx_max_value=9223372036854775807LL
ngx_max_len='(sizeof("-9223372036854775808") - 1)'
;;