details: http://hg.nginx.org/nginx/rev/e11a8e7e8e0c branches: changeset: 6015:e11a8e7e8e0c user: Ruslan Ermilov <r...@nginx.com> date: Wed Mar 18 02:04:39 2015 +0300 description: 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: auto/types/sizeof | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-) diffs (28 lines): diff -r e370c5fdf4c8 -r e11a8e7e8e0c auto/types/sizeof --- a/auto/types/sizeof Tue Mar 17 00:26:27 2015 +0300 +++ b/auto/types/sizeof Wed Mar 18 02:04:39 2015 +0300 @@ -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)' ;; _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel