blob: f2cfe6225f7e613753882b7a23b97b4fd65045bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
found=0
echo 'Checking for uintptr_t'
echo '#include <sys/types.h>' > autotest.c
echo 'int main() { uintptr_t i = 0; return i; }' >> autotest.c
eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
if [ -x autotest ]; then
echo ' + uintptr_t found'
found=1
else
echo ' + uintptr_t not found'
fi
rm autotest*
if [ $found = 0 ]; then
echo 'int main() { printf("%d", 8 * sizeof(void *)); return 0; }' \
> autotest.c
eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
if [ -x autotest ]; then
type="uint`./autotest`_t"
echo " + $type used"
type="typedef $type uintptr_t;"
found=2
fi
fi
if [ $found = 0 ]; then
echo "$0: error: uintptr_t not found"
exit 1
fi
if [ $found = 2 ]; then
echo $type >> ngx_auto_config.h
echo >> ngx_auto_config.h
fi
|