nginx-0.0.1-2003-11-21-09:30:49 import
diff --git a/auto/configure b/auto/configure
index 8b182d9..792eee2 100755
--- a/auto/configure
+++ b/auto/configure
@@ -1,8 +1,28 @@
 
 CC=cc
-CPP='cc -E'
+CC_STRONG="$CC -Wall -Werror"
+CPP="$CC -E"
 
-echo > ngx_auto_config.h
+NGX_AUTO_CONFIG_H=ngx_auto_config.h
+
+echo > $NGX_AUTO_CONFIG_H
+
+
+CC_WARN=$CC_STRONG
+
+NGX_FMT_NAME=OFF_FMT
+NGX_TYPE="off_t"; . auto/types/sizeof
+NGX_FORMATS="%ld %lld %qd"; . auto/fmt/fmt
+
+NGX_FMT_NAME=TIME_FMT
+NGX_TYPE="time_t"; . auto/types/sizeof
+NGX_FORMATS="%d %ld %lld %qd"; . auto/fmt/fmt
+
+
+CC_WARN=$CC
+
+exit
+
 
 NGX_TYPE="long"; . auto/types/sizeof; NGX_MAX_LONG=$NGX_MAX_SIZE
 NGX_FORMATS="l"; . auto/fmt/fmt
@@ -11,6 +31,15 @@
 NGX_TYPE="long long"; . auto/types/sizeof; NGX_MAX_LONG_LONG=$NGX_MAX_SIZE
 NGX_FORMATS="ll q"; . auto/fmt/fmt
 
+
+CC_WARN=$CC_STRONG
+
+NGX_TYPE="off_t"; . auto/types/sizeof
+NGX_FORMATS="l ll q"; . auto/fmt/fmt
+
+
+CC_WARN=$CC
+
 #NGX_TYPE="__int64_t"; . auto/types/typedef; NGX_TIME_T_FMT=$NGX_FMT
 
 #NGX_TYPE="time_t"; . auto/types/typedef; NGX_TIME_T_FMT=$NGX_FMT
@@ -18,8 +47,6 @@
 
 #exit
 
-. auto/types/time_t
-
 . auto/types/uint64_t
 . auto/types/uintptr_t
 
diff --git a/auto/fmt/fmt b/auto/fmt/fmt
index 5d270e8..695dd33 100644
--- a/auto/fmt/fmt
+++ b/auto/fmt/fmt
@@ -1,21 +1,24 @@
 
-echo "Checking for printf() $NGX_TYPE format"
+echo "Checking for $NGX_TYPE printf() format"
 
 NGX_FMT=NO
 
 for FMT in $NGX_FORMATS
 do
-    echo "int main() {" > autotest.c
-    echo "printf(\"%${FMT}u\", (unsigned $NGX_TYPE) -1);" >> autotest.c
+    echo "#include <unistd.h>" > autotest.c
+    echo "#include <stdio.h>" >> autotest.c
+    echo "#include <sys/types.h>" >> autotest.c
+    echo "int main() {" >> autotest.c
+    echo "printf(\"${FMT}\", ($NGX_TYPE) $NGX_MAX_SIZE);" >> autotest.c
     echo "return 0; }" >> autotest.c
 
-    eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+    eval "${CC_WARN} -o autotest autotest.c > /dev/null 2>&1"
 
-    if [ -x ./autotest -a "`./autotest`" = $NGX_MAX_SIZE ]; then
-        echo " + \"%${FMT}\" used"
-        NGX_FMT=$FMT
-    else
-        echo " + \"%${FMT}\" is not appropriate"
+    if [ -x ./autotest ]; then
+        if [ "`./autotest`" = $NGX_MAX_SIZE ]; then
+            echo " + \"${FMT}\" used"
+            NGX_FMT=$FMT
+        fi
     fi
 
     rm autotest*
@@ -23,6 +26,8 @@
     if [ $NGX_FMT != NO ]; then
         break
     fi
+
+    echo " + \"${FMT}\" is not appropriate"
 done
 
 
@@ -30,3 +35,9 @@
     echo "printf() $NGX_TYPE format not found"
     exit 1
 fi
+
+
+echo "#ifndef $NGX_FMT_NAME"                 >> $NGX_AUTO_CONFIG_H
+echo "#define $NGX_FMT_NAME  \"$NGX_FMT\""   >> $NGX_AUTO_CONFIG_H
+echo "#endif"                                >> $NGX_AUTO_CONFIG_H
+echo                                         >> $NGX_AUTO_CONFIG_H
diff --git a/auto/types/sizeof b/auto/types/sizeof
index f24f4b6..bf7ee3c 100644
--- a/auto/types/sizeof
+++ b/auto/types/sizeof
@@ -3,7 +3,8 @@
 
 BYTES=
 
-echo "int main() {" > autotest.c
+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
 
@@ -18,11 +19,11 @@
 
 case $BYTES in
     4)
-        NGX_MAX_SIZE=4294967295
+        NGX_MAX_SIZE=2147483647
     ;;
 
     8)
-        NGX_MAX_SIZE=18446744073709551615
+        NGX_MAX_SIZE=9223372036854775807
     ;;
 
     *)