Mercurial > hg > nginx-quic
comparison auto/types/sizeof @ 193:dd66383796a5
nginx-0.0.1-2003-11-20-20:36:43 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Nov 2003 17:36:43 +0000 |
parents | |
children | 2357fa41738a |
comparison
equal
deleted
inserted
replaced
192:31824be1fc66 | 193:dd66383796a5 |
---|---|
1 | |
2 echo "Checking for $NGX_TYPE size" | |
3 | |
4 BYTES= | |
5 | |
6 echo "int main() {" > autotest.c | |
7 echo "printf(\"%d\", sizeof($NGX_TYPE));" >> autotest.c | |
8 echo "return 0; }" >> autotest.c | |
9 | |
10 eval "${CC} -o autotest autotest.c > /dev/null 2>&1" | |
11 | |
12 if [ -x ./autotest ]; then | |
13 BYTES=`./autotest` | |
14 echo " + $NGX_TYPE is $BYTES bytes" | |
15 fi | |
16 | |
17 rm autotest* | |
18 | |
19 case $BYTES in | |
20 4) | |
21 NGX_MAX_SIZE=4294967295 | |
22 ;; | |
23 | |
24 8) | |
25 NGX_MAX_SIZE=18446744073709551615 | |
26 ;; | |
27 | |
28 *) | |
29 echo "$0: error: can not detect $NGX_TYPE size" | |
30 exit 1 | |
31 esac |