Merge of r4682, r4694, r4699, r4704, r4705: minor nits.
*) Fixed spelling of "endianness", and called it "byte ordering" in the
user visible part.
*) Fixed return type of ngx_strerror_init().
*) Fixed a harmless error in spelling of "Connection: close" when computing
the response header length.
*) Style.
*) Added code to look up Google perftools in /opt/local/, for MacPorts.
Maxim Dounin
10 years ago
0 | |
|
1 | |
# Copyright (C) Igor Sysoev
|
2 | |
# Copyright (C) Nginx, Inc.
|
3 | |
|
4 | |
|
5 | |
echo $ngx_n "checking for system endianess ...$ngx_c"
|
6 | |
echo >> $NGX_ERR
|
7 | |
echo "checking for system endianess" >> $NGX_ERR
|
8 | |
|
9 | |
|
10 | |
cat << END > $NGX_AUTOTEST.c
|
11 | |
|
12 | |
int main() {
|
13 | |
int i = 0x11223344;
|
14 | |
char *p;
|
15 | |
|
16 | |
p = (char *) &i;
|
17 | |
if (*p == 0x44) return 0;
|
18 | |
return 1;
|
19 | |
}
|
20 | |
|
21 | |
END
|
22 | |
|
23 | |
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
24 | |
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
25 | |
|
26 | |
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
27 | |
|
28 | |
if [ -x $NGX_AUTOTEST ]; then
|
29 | |
if $NGX_AUTOTEST >/dev/null 2>&1; then
|
30 | |
echo " little endianess"
|
31 | |
have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
32 | |
else
|
33 | |
echo " big endianess"
|
34 | |
fi
|
35 | |
|
36 | |
rm $NGX_AUTOTEST*
|
37 | |
|
38 | |
else
|
39 | |
rm $NGX_AUTOTEST*
|
40 | |
|
41 | |
echo
|
42 | |
echo "$0: error: can not detect system endianess"
|
43 | |
exit 1
|
44 | |
fi
|
|
0 |
|
|
1 |
# Copyright (C) Igor Sysoev
|
|
2 |
# Copyright (C) Nginx, Inc.
|
|
3 |
|
|
4 |
|
|
5 |
echo $ngx_n "checking for system byte ordering ...$ngx_c"
|
|
6 |
echo >> $NGX_ERR
|
|
7 |
echo "checking for system byte ordering" >> $NGX_ERR
|
|
8 |
|
|
9 |
|
|
10 |
cat << END > $NGX_AUTOTEST.c
|
|
11 |
|
|
12 |
int main() {
|
|
13 |
int i = 0x11223344;
|
|
14 |
char *p;
|
|
15 |
|
|
16 |
p = (char *) &i;
|
|
17 |
if (*p == 0x44) return 0;
|
|
18 |
return 1;
|
|
19 |
}
|
|
20 |
|
|
21 |
END
|
|
22 |
|
|
23 |
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
|
24 |
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
|
25 |
|
|
26 |
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
|
27 |
|
|
28 |
if [ -x $NGX_AUTOTEST ]; then
|
|
29 |
if $NGX_AUTOTEST >/dev/null 2>&1; then
|
|
30 |
echo " little endian"
|
|
31 |
have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
|
32 |
else
|
|
33 |
echo " big endian"
|
|
34 |
fi
|
|
35 |
|
|
36 |
rm $NGX_AUTOTEST*
|
|
37 |
|
|
38 |
else
|
|
39 |
rm $NGX_AUTOTEST*
|
|
40 |
|
|
41 |
echo
|
|
42 |
echo "$0: error: cannot detect system byte ordering"
|
|
43 |
exit 1
|
|
44 |
fi
|
28 | 28 |
fi
|
29 | 29 |
|
30 | 30 |
|
|
31 |
if [ $ngx_found = no ]; then
|
|
32 |
|
|
33 |
# MacPorts
|
|
34 |
|
|
35 |
ngx_feature="Google perftools in /opt/local/"
|
|
36 |
|
|
37 |
if [ $NGX_RPATH = YES ]; then
|
|
38 |
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lprofiler"
|
|
39 |
else
|
|
40 |
ngx_feature_libs="-L/opt/local/lib -lprofiler"
|
|
41 |
fi
|
|
42 |
|
|
43 |
. auto/feature
|
|
44 |
fi
|
|
45 |
|
|
46 |
|
31 | 47 |
if [ $ngx_found = yes ]; then
|
32 | 48 |
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
33 | 49 |
|
463 | 463 |
|
464 | 464 |
. auto/types/uintptr_t
|
465 | 465 |
|
466 | |
. auto/endianess
|
|
466 |
. auto/endianness
|
467 | 467 |
|
468 | 468 |
ngx_type="size_t"; . auto/types/sizeof
|
469 | 469 |
ngx_param=NGX_MAX_SIZE_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
|
68 | 68 |
|
69 | 69 |
|
70 | 70 |
u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size);
|
71 | |
ngx_uint_t ngx_strerror_init(void);
|
|
71 |
ngx_int_t ngx_strerror_init(void);
|
72 | 72 |
|
73 | 73 |
|
74 | 74 |
#endif /* _NGX_ERRNO_H_INCLUDED_ */
|
58 | 58 |
|
59 | 59 |
|
60 | 60 |
u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size);
|
61 | |
ngx_uint_t ngx_strerror_init(void);
|
|
61 |
ngx_int_t ngx_strerror_init(void);
|
62 | 62 |
|
63 | 63 |
|
64 | 64 |
#endif /* _NGX_ERRNO_H_INCLUDED_ */
|