Mercurial > hg > nginx
comparison auto/fmt/fmt @ 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 printf() $NGX_TYPE format" | |
3 | |
4 NGX_FMT=NO | |
5 | |
6 for FMT in $NGX_FORMATS | |
7 do | |
8 echo "int main() {" > autotest.c | |
9 echo "printf(\"%${FMT}u\", (unsigned $NGX_TYPE) -1);" >> autotest.c | |
10 echo "return 0; }" >> autotest.c | |
11 | |
12 eval "${CC} -o autotest autotest.c > /dev/null 2>&1" | |
13 | |
14 if [ -x ./autotest -a "`./autotest`" = $NGX_MAX_SIZE ]; then | |
15 echo " + \"%${FMT}\" used" | |
16 NGX_FMT=$FMT | |
17 else | |
18 echo " + \"%${FMT}\" is not appropriate" | |
19 fi | |
20 | |
21 rm autotest* | |
22 | |
23 if [ $NGX_FMT != NO ]; then | |
24 break | |
25 fi | |
26 done | |
27 | |
28 | |
29 if [ $NGX_FMT = NO ]; then | |
30 echo "printf() $NGX_TYPE format not found" | |
31 exit 1 | |
32 fi |