diff auto/types/uintptr_t @ 210:00cafae0bdf1

nginx-0.0.1-2003-12-14-23:10:27 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 14 Dec 2003 20:10:27 +0000
parents 11fbd0fc041d
children 1903c6821958
line wrap: on
line diff
--- a/auto/types/uintptr_t
+++ b/auto/types/uintptr_t
@@ -1,27 +1,37 @@
 
-echo 'checking for uintptr_t'
+echo -n "checking for uintptr_t ... "
+echo >> $NGX_ERR
+echo "checking for uintptr_t" >> $NGX_ERR
 
-FOUND=NO
+found=no
+
+cat << END > $NGX_AUTOTEST.c
+
+#include <sys/types.h>
+$NGX_INTTYPES_H
 
-echo "#include <sys/types.h>" > autotest.c
-echo "$NGX_INTTYPES_H" >> autotest.c
-echo "int main() { uintptr_t i = 0; return 0; }" >> autotest.c
+int main() {
+    uintptr_t i = 0;
+    return 0;
+}
 
-eval "$CC -o autotest autotest.c > /dev/null 2>&1"
+END
 
-if [ -x autotest ]; then
-    echo " + uintptr_t found"
-    FOUND=YES
+eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
+
+if [ -x $NGX_AUTOTEST ]; then
+    echo " uintptr_t found"
+    found=yes
 else
-    echo " + uintptr_t not found"
+    echo -n " uintptr_t not found"
 fi
 
-rm autotest*
+rm $NGX_AUTOTEST*
 
 
-if [ $FOUND = NO ]; then
-    FOUND="uint`expr 8 \* $NGX_PTR_BYTES`_t"
-    echo " + $FOUND used"
-    echo "typedef $FOUND  uintptr_t;"   >> $NGX_AUTO_CONFIG_H
-    echo                                >> $NGX_AUTO_CONFIG_H
+if [ $found = no ]; then
+    found="uint`expr 8 \* $ngx_ptr_bytes`_t"
+    echo ", $found used"
+
+    echo "typedef $found  uintptr_t;"   >> $NGX_AUTO_CONFIG_H
 fi