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 |