view auto/types/time_t @ 192:31824be1fc66

nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
author Igor Sysoev <igor@sysoev.ru>
date Thu, 20 Nov 2003 07:05:50 +0000
parents
children
line wrap: on
line source


echo "Checking for printf() time_t format"

echo '#include <sys/types.h>' > autotest.c
type=`${CPP} autotest.c | awk '/^typedef.*time_t/ {print \$2}'`
rm autotest.c

case $type in
    long)
        echo ' + long: "%ld" used'
        fmt='"%ld"'
    ;;

    int)
        echo ' + int: "%d" used'
        fmt='"%d"'
    ;;

    *)
        echo "$0: error: unknown time_t definition: \"$type\""
        exit 1
    ;;

esac


echo "#ifndef TIME_FMT" >> ngx_auto_config.h
echo "#define TIME_FMT  $fmt" >> ngx_auto_config.h
echo "#endif" >> ngx_auto_config.h
echo >> ngx_auto_config.h