summaryrefslogtreecommitdiff
path: root/auto/types
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-06-27 18:01:57 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-06-27 18:01:57 +0000
commitc02473048cee372cb8644e1f2d566431781074d2 (patch)
tree689654cd7b37636279b5587ddd3b45ad6bddbd3c /auto/types
parentb1af9bbcabf1bdbe119366971a2d0f6c3f8f595d (diff)
downloadnginx-c02473048cee372cb8644e1f2d566431781074d2.tar.gz
nginx-0.0.7-2004-06-27-22:01:57 import
Diffstat (limited to 'auto/types')
-rw-r--r--auto/types/maxvalue6
-rw-r--r--auto/types/sizeof23
-rw-r--r--auto/types/typedef2
-rw-r--r--auto/types/uintptr_t2
-rw-r--r--auto/types/value6
5 files changed, 22 insertions, 17 deletions
diff --git a/auto/types/maxvalue b/auto/types/maxvalue
deleted file mode 100644
index 91752a26d..000000000
--- a/auto/types/maxvalue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-cat << END >> $NGX_AUTO_CONFIG_H
-
-#ifndef $ngx_type_max_value
-#define $ngx_type_max_value $ngx_max_size
-#endif
diff --git a/auto/types/sizeof b/auto/types/sizeof
index ebb0fa9b6..102f343bc 100644
--- a/auto/types/sizeof
+++ b/auto/types/sizeof
@@ -3,14 +3,15 @@ echo $ngx_n "checking for $ngx_type size ..." $ngx_c
echo >> $NGX_ERR
echo "checking for $ngx_type size" >> $NGX_ERR
-ngx_bytes=
+ngx_size=
cat << END > $NGX_AUTOTEST.c
#include <sys/types.h>
#include <sys/time.h>
-#include <sys/resource.h>
$NGX_UNISTD_H
+#include <signal.h>
+#include <sys/resource.h>
$NGX_INTTYPES_H
$NGX_AUTO_CONFIG
@@ -24,27 +25,31 @@ END
eval "$CC $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
if [ -x $NGX_AUTOTEST ]; then
- ngx_bytes=`$NGX_AUTOTEST`
- echo " $ngx_bytes bytes"
+ ngx_size=`$NGX_AUTOTEST`
+ echo " $ngx_size bytes"
fi
rm $NGX_AUTOTEST*
-case $ngx_bytes in
+case $ngx_size in
4)
if [ "$ngx_type"="long" ]; then
- ngx_max_size=2147483647L
+ ngx_max_value=2147483647L
else
- ngx_max_size=2147483647
+ ngx_max_value=2147483647
fi
+
+ ngx_max_len='sizeof("-2147483648") - 1'
;;
8)
if [ "$ngx_type"="long long" ]; then
- ngx_max_size=9223372036854775807LL
+ ngx_max_value=9223372036854775807LL
else
- ngx_max_size=9223372036854775807L
+ ngx_max_value=9223372036854775807L
fi
+
+ ngx_max_len='sizeof("-9223372036854775808") - 1'
;;
*)
diff --git a/auto/types/typedef b/auto/types/typedef
index 531bb7e2f..2bf67cff2 100644
--- a/auto/types/typedef
+++ b/auto/types/typedef
@@ -10,8 +10,8 @@ do
cat << END > $NGX_AUTOTEST.c
-#include <signal.h>
#include <sys/types.h>
+#include <signal.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/resource.h>
diff --git a/auto/types/uintptr_t b/auto/types/uintptr_t
index f46ffb6b4..cd2df8da5 100644
--- a/auto/types/uintptr_t
+++ b/auto/types/uintptr_t
@@ -30,7 +30,7 @@ rm $NGX_AUTOTEST*
if [ $found = no ]; then
- found="uint`expr 8 \* $ngx_ptr_bytes`_t"
+ found="uint`expr 8 \* $ngx_ptr_size`_t"
echo ", $found used"
echo "typedef $found uintptr_t;" >> $NGX_AUTO_CONFIG_H
diff --git a/auto/types/value b/auto/types/value
new file mode 100644
index 000000000..c08012ce2
--- /dev/null
+++ b/auto/types/value
@@ -0,0 +1,6 @@
+
+cat << END >> $NGX_AUTO_CONFIG_H
+
+#ifndef $ngx_param
+#define $ngx_param $ngx_value
+#endif