Mercurial > hg > nginx
comparison auto/fmt/fmt @ 370:54f76b0b8dca
nginx-0.0.7-2004-06-27-22:01:57 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 27 Jun 2004 18:01:57 +0000 |
parents | 1903c6821958 |
children | 42d11f017717 |
comparison
equal
deleted
inserted
replaced
369:9c2515d70489 | 370:54f76b0b8dca |
---|---|
9 for fmt in $ngx_formats | 9 for fmt in $ngx_formats |
10 do | 10 do |
11 | 11 |
12 cat << END > $NGX_AUTOTEST.c | 12 cat << END > $NGX_AUTOTEST.c |
13 | 13 |
14 #include <stdio.h> | |
15 #include <sys/types.h> | 14 #include <sys/types.h> |
16 #include <sys/time.h> | 15 #include <sys/time.h> |
16 #include <stdio.h> | |
17 #include <sys/resource.h> | 17 #include <sys/resource.h> |
18 $NGX_INTTYPES_H | 18 $NGX_INTTYPES_H |
19 $NGX_AUTO_CONFIG | 19 $NGX_AUTO_CONFIG |
20 | 20 |
21 int main() { | 21 int main() { |
22 printf("$fmt", ($ngx_type) $ngx_max_size); | 22 printf("$fmt", ($ngx_type) $ngx_max_value); |
23 return 0; | 23 return 0; |
24 } | 24 } |
25 | 25 |
26 END | 26 END |
27 | 27 |
28 eval "$CC_WARN $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c \ | 28 eval "$CC_WARN $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c \ |
29 >> $NGX_ERR 2>&1" | 29 >> $NGX_ERR 2>&1" |
30 | 30 |
31 max_size=`echo $ngx_max_size | sed -e "s/L*\$//"` | 31 max_value=`echo $ngx_max_value | sed -e "s/L*\$//"` |
32 | 32 |
33 if [ -x $NGX_AUTOTEST ]; then | 33 if [ -x $NGX_AUTOTEST ]; then |
34 if [ "`$NGX_AUTOTEST`" = $max_size ]; then | 34 if [ "`$NGX_AUTOTEST`" = $max_value ]; then |
35 if [ $ngx_fmt_collect = yes ]; then | 35 if [ $ngx_fmt_collect = yes ]; then |
36 echo $ngx_n "$comma \"${fmt}\" is appropriate" $ngx_c | 36 echo $ngx_n "$comma \"${fmt}\" is appropriate" $ngx_c |
37 else | 37 else |
38 echo $ngx_n "$comma \"${fmt}\" used" $ngx_c | 38 echo $ngx_n "$comma \"${fmt}\" used" $ngx_c |
39 fi | 39 fi |
43 | 43 |
44 rm $NGX_AUTOTEST* | 44 rm $NGX_AUTOTEST* |
45 | 45 |
46 if [ $ngx_fmt != no ]; then | 46 if [ $ngx_fmt != no ]; then |
47 if [ $ngx_fmt_collect = yes ]; then | 47 if [ $ngx_fmt_collect = yes ]; then |
48 eval "ngx_${ngx_bytes}_fmt=\"\${ngx_${ngx_bytes}_fmt} \$ngx_fmt\"" | 48 eval "ngx_${ngx_size}_fmt=\"\${ngx_${ngx_size}_fmt} \$ngx_fmt\"" |
49 comma="," | 49 comma="," |
50 continue | 50 continue |
51 else | 51 else |
52 break | 52 break |
53 fi | 53 fi |