view auto/types/time_t @ 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 31824be1fc66
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