Mercurial > hg > nginx
view auto/types/sizeof @ 194:2357fa41738a
nginx-0.0.1-2003-11-21-09:30:49 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 21 Nov 2003 06:30:49 +0000 |
parents | dd66383796a5 |
children | 8dee38ea9117 |
line wrap: on
line source
echo "Checking for $NGX_TYPE size" BYTES= echo "#include <sys/types.h>" > autotest.c echo "int main() {" >> autotest.c echo "printf(\"%d\", sizeof($NGX_TYPE));" >> autotest.c echo "return 0; }" >> autotest.c eval "${CC} -o autotest autotest.c > /dev/null 2>&1" if [ -x ./autotest ]; then BYTES=`./autotest` echo " + $NGX_TYPE is $BYTES bytes" fi rm autotest* case $BYTES in 4) NGX_MAX_SIZE=2147483647 ;; 8) NGX_MAX_SIZE=9223372036854775807 ;; *) echo "$0: error: can not detect $NGX_TYPE size" exit 1 esac