Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.13.12 ]​[ nginx-1.12.2 ]​

0001 
0002 # Copyright (C) Igor Sysoev
0003 # Copyright (C) Nginx, Inc.
0004 
0005 
0006 echo $ngx_n "checking for system byte ordering ...$ngx_c"
0007 
0008 cat << END >> $NGX_AUTOCONF_ERR
0009 
0010 ----------------------------------------
0011 checking for system byte ordering
0012 
0013 END
0014 
0015 
0016 cat << END > $NGX_AUTOTEST.c
0017 
0018 int main(void) {
0019     int i = 0x11223344;
0020     char *p;
0021 
0022     p = (char *) &i;
0023     if (*p == 0x44) return 0;
0024     return 1;
0025 }
0026 
0027 END
0028 
0029 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
0030           -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
0031 
0032 eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
0033 
0034 if [ -x $NGX_AUTOTEST ]; then
0035     if $NGX_AUTOTEST >/dev/null 2>&1; then
0036         echo " little endian"
0037         have=NGX_HAVE_LITTLE_ENDIAN . auto/have
0038     else
0039         echo " big endian"
0040     fi
0041 
0042     rm -rf $NGX_AUTOTEST*
0043 
0044 else
0045     rm -rf $NGX_AUTOTEST*
0046 
0047     echo
0048     echo "$0: error: cannot detect system byte ordering"
0049     exit 1
0050 fi