comparison auto/types/uintptr_t @ 210:00cafae0bdf1

nginx-0.0.1-2003-12-14-23:10:27 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 14 Dec 2003 20:10:27 +0000
parents 11fbd0fc041d
children 1903c6821958
comparison
equal deleted inserted replaced
209:e1c815be05ae 210:00cafae0bdf1
1 1
2 echo 'checking for uintptr_t' 2 echo -n "checking for uintptr_t ... "
3 echo >> $NGX_ERR
4 echo "checking for uintptr_t" >> $NGX_ERR
3 5
4 FOUND=NO 6 found=no
5 7
6 echo "#include <sys/types.h>" > autotest.c 8 cat << END > $NGX_AUTOTEST.c
7 echo "$NGX_INTTYPES_H" >> autotest.c
8 echo "int main() { uintptr_t i = 0; return 0; }" >> autotest.c
9 9
10 eval "$CC -o autotest autotest.c > /dev/null 2>&1" 10 #include <sys/types.h>
11 $NGX_INTTYPES_H
11 12
12 if [ -x autotest ]; then 13 int main() {
13 echo " + uintptr_t found" 14 uintptr_t i = 0;
14 FOUND=YES 15 return 0;
16 }
17
18 END
19
20 eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
21
22 if [ -x $NGX_AUTOTEST ]; then
23 echo " uintptr_t found"
24 found=yes
15 else 25 else
16 echo " + uintptr_t not found" 26 echo -n " uintptr_t not found"
17 fi 27 fi
18 28
19 rm autotest* 29 rm $NGX_AUTOTEST*
20 30
21 31
22 if [ $FOUND = NO ]; then 32 if [ $found = no ]; then
23 FOUND="uint`expr 8 \* $NGX_PTR_BYTES`_t" 33 found="uint`expr 8 \* $ngx_ptr_bytes`_t"
24 echo " + $FOUND used" 34 echo ", $found used"
25 echo "typedef $FOUND uintptr_t;" >> $NGX_AUTO_CONFIG_H 35
26 echo >> $NGX_AUTO_CONFIG_H 36 echo "typedef $found uintptr_t;" >> $NGX_AUTO_CONFIG_H
27 fi 37 fi