comparison auto/types/uintptr_t @ 192:31824be1fc66

nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
author Igor Sysoev <igor@sysoev.ru>
date Thu, 20 Nov 2003 07:05:50 +0000
parents
children dd66383796a5
comparison
equal deleted inserted replaced
191:71ce40b3c37b 192:31824be1fc66
1
2 found=0
3
4 echo 'Checking for uintptr_t'
5
6 echo '#include <sys/types.h>' > autotest.c
7 echo 'int main() { uintptr_t i = 0; return i; }' >> autotest.c
8
9 eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
10
11 if [ -x autotest ]; then
12 echo ' + uintptr_t found'
13 found=1
14 else
15 echo ' + uintptr_t not found'
16 fi
17
18 rm autotest*
19
20
21 if [ $found = 0 ]; then
22 echo 'int main() { printf("%d", 8 * sizeof(void *)); return 0; }' \
23 > autotest.c
24 eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
25
26 if [ -x autotest ]; then
27 type="uint`./autotest`_t"
28 echo " + $type used"
29 type="typedef $type uintptr_t;"
30 found=2
31 fi
32 fi
33
34
35 if [ $found = 0 ]; then
36 echo "$0: error: uintptr_t not found"
37 exit 1
38 fi
39
40
41 if [ $found = 2 ]; then
42 echo $type >> ngx_auto_config.h
43 echo >> ngx_auto_config.h
44 fi
45