Changeset 6015:e11a8e7e8e0c in nginx


Ignore:
Timestamp:
03/17/15 23:04:39 (5 years ago)
Author:
Ruslan Ermilov <ru@…>
Branch:
default
Phase:
public
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • auto/types/sizeof

    r5309 r6015  
    5151case $ngx_size in
    5252    4)
    53         if [ "$ngx_type"="long" ]; then
    54             ngx_max_value=2147483647L
    55         else
    56             ngx_max_value=2147483647
    57         fi
    58 
     53        ngx_max_value=2147483647
    5954        ngx_max_len='(sizeof("-2147483648") - 1)'
    6055    ;;
    6156
    6257    8)
    63         if [ "$ngx_type"="long long" ]; then
    64             ngx_max_value=9223372036854775807LL
    65         else
    66             ngx_max_value=9223372036854775807L
    67         fi
    68 
     58        ngx_max_value=9223372036854775807LL
    6959        ngx_max_len='(sizeof("-9223372036854775808") - 1)'
    7060    ;;
Note: See TracChangeset for help on using the changeset viewer.