comparison auto/types/sizeof @ 194:2357fa41738a

nginx-0.0.1-2003-11-21-09:30:49 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 21 Nov 2003 06:30:49 +0000
parents dd66383796a5
children 8dee38ea9117
comparison
equal deleted inserted replaced
193:dd66383796a5 194:2357fa41738a
1 1
2 echo "Checking for $NGX_TYPE size" 2 echo "Checking for $NGX_TYPE size"
3 3
4 BYTES= 4 BYTES=
5 5
6 echo "int main() {" > autotest.c 6 echo "#include <sys/types.h>" > autotest.c
7 echo "int main() {" >> autotest.c
7 echo "printf(\"%d\", sizeof($NGX_TYPE));" >> autotest.c 8 echo "printf(\"%d\", sizeof($NGX_TYPE));" >> autotest.c
8 echo "return 0; }" >> autotest.c 9 echo "return 0; }" >> autotest.c
9 10
10 eval "${CC} -o autotest autotest.c > /dev/null 2>&1" 11 eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
11 12
16 17
17 rm autotest* 18 rm autotest*
18 19
19 case $BYTES in 20 case $BYTES in
20 4) 21 4)
21 NGX_MAX_SIZE=4294967295 22 NGX_MAX_SIZE=2147483647
22 ;; 23 ;;
23 24
24 8) 25 8)
25 NGX_MAX_SIZE=18446744073709551615 26 NGX_MAX_SIZE=9223372036854775807
26 ;; 27 ;;
27 28
28 *) 29 *)
29 echo "$0: error: can not detect $NGX_TYPE size" 30 echo "$0: error: can not detect $NGX_TYPE size"
30 exit 1 31 exit 1