nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
diff --git a/auto/configure b/auto/configure
new file mode 100755
index 0000000..c30b52d
--- /dev/null
+++ b/auto/configure
@@ -0,0 +1,12 @@
+
+CC=cc
+CPP='cc -E'
+
+echo > ngx_auto_config.h
+
+. auto/types/time_t
+
+. auto/types/uint64_t
+. auto/types/uintptr_t
+
+. auto/types/socklen_t
diff --git a/auto/types/socklen_t b/auto/types/socklen_t
new file mode 100644
index 0000000..84d39fb
--- /dev/null
+++ b/auto/types/socklen_t
@@ -0,0 +1,28 @@
+
+found=0
+
+echo 'Checking for socklen_t'
+
+echo '#include <sys/types.h>' > autotest.c
+echo '#include <sys/socket.h>' >> autotest.c
+echo 'int main() { socklen_t i = 0; return 0; }' >> autotest.c
+
+eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+
+if [ -x autotest ]; then
+    echo ' + socklen_t found'
+    found=1
+else
+    echo ' + socklen_t not found'
+    echo ' + uint32_t used'
+    type='typedef uint32_t  socklen_t;'
+    found=2
+fi
+
+rm autotest*
+
+
+if [ $found = 2 ]; then
+    echo $type >> ngx_auto_config.h
+    echo >> ngx_auto_config.h
+fi
diff --git a/auto/types/time_t b/auto/types/time_t
new file mode 100644
index 0000000..ecd80ef
--- /dev/null
+++ b/auto/types/time_t
@@ -0,0 +1,30 @@
+
+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
diff --git a/auto/types/uint64_t b/auto/types/uint64_t
new file mode 100644
index 0000000..070f9e4
--- /dev/null
+++ b/auto/types/uint64_t
@@ -0,0 +1,50 @@
+
+found=0
+
+echo 'Checking for uint64_t'
+
+    echo '#include <sys/types.h>' > autotest.c
+    echo 'int main() { uint64_t i = 0; return 0; }' >> autotest.c
+
+    eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+
+    if [ -x autotest ]; then
+        echo ' + uint64_t found'
+        found=1
+    else
+        echo ' + uint64_t not found'
+    fi
+
+    rm autotest*
+
+
+if [ $found = 0 ]; then
+
+    echo '#include <sys/types.h>' > autotest.c
+    echo 'int main() { u_int64_t i = 0; return 0; }' >> autotest.c
+
+    eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+
+    if [ -x autotest ]; then
+        echo ' + u_int64_t used'
+        type='typedef u_int64_t  uint64_t;'
+        found=2
+    else
+        echo ' + u_int64_t not found'
+    fi
+
+    rm autotest*
+
+fi
+
+
+if [ $found = 0 ]; then
+    echo "$0: error: uint64_t not found"
+    exit 1
+fi
+
+
+if [ $found = 2 ]; then
+    echo $type >> ngx_auto_config.h
+    echo >> ngx_auto_config.h
+fi
diff --git a/auto/types/uintptr_t b/auto/types/uintptr_t
new file mode 100644
index 0000000..f2cfe62
--- /dev/null
+++ b/auto/types/uintptr_t
@@ -0,0 +1,45 @@
+
+found=0
+
+echo 'Checking for uintptr_t'
+
+    echo '#include <sys/types.h>' > autotest.c
+    echo 'int main() { uintptr_t i = 0; return i; }' >> autotest.c
+
+    eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+
+    if [ -x autotest ]; then
+        echo ' + uintptr_t found'
+        found=1
+    else
+        echo ' + uintptr_t not found'
+    fi
+
+    rm autotest*
+
+
+if [ $found = 0 ]; then
+    echo 'int main() { printf("%d", 8 * sizeof(void *)); return 0; }'	\
+          > autotest.c
+    eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+
+    if [ -x autotest ]; then
+        type="uint`./autotest`_t"
+        echo " + $type used"
+        type="typedef $type  uintptr_t;"
+        found=2
+    fi
+fi
+
+
+if [ $found = 0 ]; then
+    echo "$0: error: uintptr_t not found"
+    exit 1
+fi
+
+
+if [ $found = 2 ]; then
+    echo $type >> ngx_auto_config.h
+    echo >> ngx_auto_config.h
+fi
+