summaryrefslogtreecommitdiff
path: root/auto
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
commit1b73583ba2c0e4b72d951218827e0c621427d389 (patch)
tree9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /auto
parentd6f24959428caed68a509a19ca4fd866d978a69c (diff)
downloadnginx-1b73583ba2c0e4b72d951218827e0c621427d389.tar.gz
nginx-0.1.5-RELEASE importrelease-0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
Diffstat (limited to 'auto')
-rw-r--r--auto/cc/bcc18
-rw-r--r--auto/cc/conf20
-rw-r--r--auto/cc/gcc3
-rw-r--r--auto/cc/icc3
-rw-r--r--auto/cc/msvc48
-rw-r--r--auto/cc/name13
-rw-r--r--auto/cc/owc15
-rw-r--r--auto/feature1
-rw-r--r--auto/lib/md5/conf4
-rw-r--r--auto/lib/pcre/conf4
-rw-r--r--auto/lib/zlib/conf4
-rw-r--r--auto/make30
-rw-r--r--auto/modules18
-rw-r--r--auto/options14
-rw-r--r--auto/os/conf6
-rw-r--r--auto/os/linux7
-rw-r--r--auto/os/win323
-rw-r--r--auto/sources7
-rwxr-xr-xauto/unix72
19 files changed, 198 insertions, 92 deletions
diff --git a/auto/cc/bcc b/auto/cc/bcc
index 5765c4713..a76b68f70 100644
--- a/auto/cc/bcc
+++ b/auto/cc/bcc
@@ -32,17 +32,31 @@ CFLAGS="$CFLAGS -w!"
# disable logo
CFLAGS="$CFLAGS -q"
+
# precompiled headers
CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.csm"
NGX_PCH="$OBJS/ngx_config.csm"
NGX_BUILD_PCH="-H=$OBJS/ngx_config.csm"
NGX_USE_PCH="-Hu -H=$OBJS/ngx_config.csm"
-LINK="\$(CC)"
+
+# Win32 GUI mode application
+LINK="\$(CC) -laa"
+
+
+# the resource file
+NGX_RES="$OBJS/nginx.res"
+NGX_RCC="brcc32 -fo$OBJS/nginx.res \$(CORE_INCS) $NGX_WIN32_RC"
+# the pragma allows to link the resource file using bcc32 and
+# to avoid the direct ilink32 calling and the c0w32.obj's WinMain/main problem
+NGX_PRAGMA="#pragma resource \"$OBJS/nginx.res\""
+
ngx_include_opt="-I"
ngx_objout="-o"
ngx_binout="-e"
ngx_objext="obj"
ngx_binext=".exe"
-ngx_dirsep='\\'
+
+ngx_regex_dirsep='\\'
+ngx_dirsep="\\"
diff --git a/auto/cc/conf b/auto/cc/conf
index 77eeda79e..acb68f8a5 100644
--- a/auto/cc/conf
+++ b/auto/cc/conf
@@ -64,8 +64,8 @@ else
# . auto/cc/acc
# ;;
- msvc)
- # MSVC 6.0 SP2
+ msvc*)
+ # MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
. auto/cc/msvc
;;
@@ -93,6 +93,22 @@ CFLAGS="$CFLAGS $NGX_CC_OPT"
if [ "$PLATFORM" != win32 ]; then
+ if test -n "$NGX_LD_OPT"; then
+ ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\"
+ ngx_feature_name=DUMMY
+ ngx_feature_run=no
+ ngx_feature_incs=
+ ngx_feature_libs=
+ ngx_feature_test=
+ . auto/feature
+
+ if [ $ngx_found = no ]; then
+ echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\"
+ echo
+ exit 1
+ fi
+ fi
+
ngx_feature="gcc variadic macros"
ngx_feature_name=HAVE_GCC_VARIADIC_MACROS
ngx_feature_run=yes
diff --git a/auto/cc/gcc b/auto/cc/gcc
index 61f048b7b..756e3977a 100644
--- a/auto/cc/gcc
+++ b/auto/cc/gcc
@@ -104,6 +104,3 @@ if [ ".$CPP" = "." ]; then
fi
LINK="\$(CC)"
-
-
-CC_STRONG="-Wall -Werror"
diff --git a/auto/cc/icc b/auto/cc/icc
index 94d5cddc5..89c6f3500 100644
--- a/auto/cc/icc
+++ b/auto/cc/icc
@@ -64,6 +64,3 @@ CFLAGS="$CFLAGS -Werror"
CFLAGS="$CFLAGS -g"
LINK="\$(CC)"
-
-
-CC_STRONG="-w1 -Werror"
diff --git a/auto/cc/msvc b/auto/cc/msvc
index d47d4b2a0..8272cac9a 100644
--- a/auto/cc/msvc
+++ b/auto/cc/msvc
@@ -2,7 +2,7 @@
# Copyright (C) Igor Sysoev
-# MSVC 6.0 SP2
+# MSVC 6.0 SP2, MSVC Toolkit 2003 (7.1)
# optimizations
@@ -31,8 +31,8 @@ case $CPU in
;;
pentium4)
- # optimize for Pentium 4
- #CPU_OPT="-G7"
+ # optimize for Pentium 4, MSVC 7
+ CPU_OPT="-G7"
;;
esac
@@ -47,30 +47,48 @@ CFLAGS="$CFLAGS -W4"
# stop on warning
CFLAGS="$CFLAGS -WX"
-# link with libcmt.lib, multithreaded
-#LIBC="-MT"
-# link with msvcrt.dll
-LIBC="-MD"
-
-CFLAGS="$CFLAGS $LIBC"
-
# disable logo
CFLAGS="$CFLAGS -nologo"
+
LINK="\$(CC)"
-# link flags
+# the link flags
CORE_LINK="$CORE_LINK -link -verbose:lib"
+if [ $NGX_CC_NAME = msvc7 ]; then
+ # link with libcmt.lib, multithreaded
+ LIBC="-MT"
+else
+ # link with msvcrt.dll
+ LIBC="-MD"
+fi
+
+CFLAGS="$CFLAGS $LIBC"
+
+# Win32 GUI mode application
+CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib"
+CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup"
+
# debug
CFLAGS="$CFLAGS -Yd"
CORE_LINK="$CORE_LINK -debug -debugtype:coff"
+
# precompiled headers
-CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch"
-NGX_PCH="$OBJS/ngx_config.pch"
-NGX_BUILD_PCH="-Ycngx_config.h -Fp$OBJS/ngx_config.pch"
-NGX_USE_PCH="-Yungx_config.h -Fp$OBJS/ngx_config.pch"
+if [ $NGX_CC_NAME != msvc7 ]; then
+ CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch"
+ NGX_PCH="$OBJS/ngx_config.pch"
+ NGX_BUILD_PCH="-Ycngx_config.h -Fp$OBJS/ngx_config.pch"
+ NGX_USE_PCH="-Yungx_config.h -Fp$OBJS/ngx_config.pch"
+fi
+
+
+# the resource file
+NGX_RES="$OBJS/nginx.res"
+NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC"
+CORE_LINK="$NGX_RES $CORE_LINK"
+
ngx_objout="-Fo"
ngx_binout="-Fe"
diff --git a/auto/cc/name b/auto/cc/name
index b9744799c..cbed6a741 100644
--- a/auto/cc/name
+++ b/auto/cc/name
@@ -6,8 +6,17 @@ echo $ngx_n "checking for C compiler ...$ngx_c"
if [ $CC = cl ]; then
- NGX_CC_NAME=msvc
- echo " using Microsoft Visual C compiler"
+ if `$NGX_WINE $CC -v 2>&1 \
+ | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13' \
+ 2>&1 >/dev/null`; then
+
+ NGX_CC_NAME=msvc7
+ echo " using Microsoft Visual C++ 7 compiler"
+
+ else
+ NGX_CC_NAME=msvc
+ echo " using Microsoft Visual C++ compiler"
+ fi
else
if [ $CC = wcl386 ]; then
diff --git a/auto/cc/owc b/auto/cc/owc
index 0c8194dbb..789ffadae 100644
--- a/auto/cc/owc
+++ b/auto/cc/owc
@@ -59,18 +59,25 @@ CFLAGS="$CFLAGS -d2"
CFLAGS="$CFLAGS -zq"
# Open Watcom C 1.2
-#have=HAVE_C99_VARIADIC_MACROS . auto/have
+#have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
-# precompiled headers
+
+# the precompiled headers
CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch"
NGX_PCH="$OBJS/ngx_config.pch"
NGX_BUILD_PCH="-fhq=$OBJS/ngx_config.pch"
NGX_USE_PCH="-fh=$OBJS/ngx_config.pch"
+
LINK="\$(CC)"
-# link flags
-CORE_LINK="$CORE_LINK -l=nt"
+# the link flags, built target is NT GUI mode application
+CORE_LINK="$CORE_LINK -l=nt_win"
+
+
+# the resource file
+NGX_RCC="wrc \$(CORE_INCS) -fo=$OBJS/nginx.res $NGX_WIN32_RC $OBJS/nginx.exe"
+
ngx_include_opt="-i="
ngx_objout="-fo"
diff --git a/auto/feature b/auto/feature
index 78676ef09..410f5398f 100644
--- a/auto/feature
+++ b/auto/feature
@@ -35,6 +35,7 @@ END
ngx_test="$CC $CC_TEST_FLAGS $CC_WARN $CC_AUX_FLAGS \
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
+
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf
index 623986f0f..27fd64127 100644
--- a/auto/lib/md5/conf
+++ b/auto/lib/md5/conf
@@ -17,12 +17,12 @@ if [ $MD5 != NONE ]; then
case "$NGX_CC_NAME" in
- msvc | owc | bcc)
+ msvc* | owc* | bcc)
LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
;;
- icc)
+ icc*)
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
# to allow -ipo optimization we link with the *.o but not library
diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf
index cd516e1e7..cf26be27a 100644
--- a/auto/lib/pcre/conf
+++ b/auto/lib/pcre/conf
@@ -9,7 +9,7 @@ if [ $PCRE != NONE ]; then
case "$NGX_CC_NAME" in
- msvc | owc | bcc)
+ msvc* | owc* | bcc)
have=NGX_PCRE . auto/have
have=PCRE_STATIC . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
@@ -17,7 +17,7 @@ if [ $PCRE != NONE ]; then
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
;;
- icc)
+ icc*)
have=NGX_PCRE . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
diff --git a/auto/lib/zlib/conf b/auto/lib/zlib/conf
index f833d6165..797a2d309 100644
--- a/auto/lib/zlib/conf
+++ b/auto/lib/zlib/conf
@@ -7,12 +7,12 @@ if [ $ZLIB != NONE ]; then
case "$NGX_CC_NAME" in
- msvc | owc | bcc)
+ msvc* | owc* | bcc)
LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
;;
- icc)
+ icc*)
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
# to allow -ipo optimization we link with the *.o but not library
diff --git a/auto/make b/auto/make
index 8744d1f5f..c165078cf 100644
--- a/auto/make
+++ b/auto/make
@@ -132,7 +132,15 @@ ngx_all_objs=`echo $ngx_all_srcs \
ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
-ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $LINK_DEPS \
+
+if test -n "$NGX_RES"; then
+ ngx_res=$NGX_RES
+else
+ ngx_res="$NGX_RC $NGX_ICONS"
+ ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"`
+fi
+
+ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $ngx_res $LINK_DEPS \
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
-e "s/\//$ngx_regex_dirsep/g"`
@@ -146,10 +154,12 @@ ngx_libs=${CORE_LIBS:+`echo $NGX_LD_OPT $CORE_LIBS \
ngx_link=${CORE_LINK:+`echo $CORE_LINK \
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_regex_cont/"`}
+
cat << END >> $NGX_MAKEFILE
$NGX_OBJS${ngx_dirsep}nginx${ngx_binext}: $ngx_deps$ngx_spacer
\$(LINK) ${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx$ngx_cont$ngx_objs$ngx_libs$ngx_link
+ $ngx_rcc
END
@@ -256,6 +266,24 @@ END
fi
+# Win32 resource file
+
+if test -n "$NGX_RES"; then
+
+ ngx_res=`echo "$NGX_RES: $NGX_RC $NGX_ICONS" \
+ | sed -e "s/\//$ngx_regex_dirsep/g"`
+ ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"`
+
+ cat << END >> $NGX_MAKEFILE
+
+$ngx_res
+ $ngx_rcc
+
+END
+
+fi
+
+
# the precompiled headers
if test -n "$NGX_PCH"; then
diff --git a/auto/modules b/auto/modules
index 7d79205fe..39dfa9df2 100644
--- a/auto/modules
+++ b/auto/modules
@@ -154,9 +154,14 @@ if [ $IMAP = YES ]; then
fi
-echo "#include <ngx_config.h>" > $NGX_MODULES_C
-echo "#include <ngx_core.h>" >> $NGX_MODULES_C
-echo >> $NGX_MODULES_C
+cat << END > $NGX_MODULES_C
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+
+$NGX_PRAGMA
+
+END
for mod in $modules
do
@@ -171,5 +176,8 @@ do
echo " &$mod," >> $NGX_MODULES_C
done
-echo " NULL" >> $NGX_MODULES_C
-echo "};" >> $NGX_MODULES_C
+cat << END >> $NGX_MODULES_C
+ NULL
+};
+
+END
diff --git a/auto/options b/auto/options
index 40a09b9bd..72e5b36bf 100644
--- a/auto/options
+++ b/auto/options
@@ -26,6 +26,9 @@ TEST_BUILD_DEVPOLL=NO
TEST_BUILD_EPOLL=NO
TEST_BUILD_RTSIG=NO
+PLATFORM=
+NGX_WINE=
+
EVENT_FOUND=NO
EVENT_RTSIG=NO
@@ -195,9 +198,8 @@ if [ $HTTP = NO ]; then
fi
-if [ ".$PLATFORM" = ".win32" -a $EVENT_POLL = YES ]; then
- EVENT_POLL=NO
- echo "$0: warning: --with-poll_module option is ignored for win32"
+if [ ".$PLATFORM" = ".win32" ]; then
+ NGX_WINE=$WINE
fi
@@ -211,12 +213,6 @@ if test -z "$NGX_GROUP"; then
fi
-if test -z "$NGX_USER"; then
- NGX_USER=nobody
- NGX_GROUP=nobody
-fi
-
-
case ".$SBIN_PATH" in
./*)
;;
diff --git a/auto/os/conf b/auto/os/conf
index 5154f2bba..5dcf400da 100644
--- a/auto/os/conf
+++ b/auto/os/conf
@@ -45,6 +45,12 @@ esac
if [ $PLATFORM != win32 ]; then
+ if test -z "$NGX_USER"; then
+ NGX_USER=nobody
+ NGX_GROUP=nobody
+ fi
+
+
ngx_feature="/dev/poll"
ngx_feature_name="devpoll"
ngx_feature_run=no
diff --git a/auto/os/linux b/auto/os/linux
index e68a0d27d..8518c6170 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -20,6 +20,13 @@ ngx_spacer='
CC_AUX_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
+
+if test -z "$NGX_USER"; then
+ NGX_USER=nobody
+ NGX_GROUP=nogroup
+fi
+
+
# Linux kernel version
version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \
diff --git a/auto/os/win32 b/auto/os/win32
index 9e83e67fe..dfbb246c8 100644
--- a/auto/os/win32
+++ b/auto/os/win32
@@ -15,7 +15,8 @@ CORE_INCS="$WIN32_INCS"
CORE_DEPS="$WIN32_DEPS"
CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
OS_CONFIG="$WIN32_CONFIG"
-CORE_LIBS="$CORE_LIBS ws2_32.lib"
+CORE_LIBS="$CORE_LIBS shell32.lib ws2_32.lib"
+NGX_ICONS="$NGX_WIN32_ICONS"
EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
EVENT_FOUND=YES
diff --git a/auto/sources b/auto/sources
index bf5829f3b..2729f1bd7 100644
--- a/auto/sources
+++ b/auto/sources
@@ -175,8 +175,10 @@ WIN32_DEPS="$CORE_DEPS $EVENT_DEPS \
src/os/win32/ngx_shared.h \
src/os/win32/ngx_process.h \
src/os/win32/ngx_atomic.h \
+ src/os/win32/ngx_thread.h \
src/os/win32/ngx_socket.h \
src/os/win32/ngx_os.h \
+ src/os/win32/ngx_gui.h \
src/os/win32/ngx_process_cycle.h"
WIN32_CONFIG=src/os/win32/ngx_win32_config.h
@@ -187,14 +189,19 @@ WIN32_SRCS="$CORE_SRCS $EVENT_SRCS \
src/os/win32/ngx_files.c \
src/os/win32/ngx_time.c \
src/os/win32/ngx_process.c \
+ src/os/win32/ngx_thread.c \
src/os/win32/ngx_socket.c \
src/os/win32/ngx_wsarecv.c \
src/os/win32/ngx_wsarecv_chain.c \
src/os/win32/ngx_wsasend_chain.c \
src/os/win32/ngx_win32_init.c \
+ src/os/win32/ngx_gui.c \
src/os/win32/ngx_process_cycle.c \
src/event/ngx_event_acceptex.c"
+NGX_WIN32_ICONS="src/os/win32/nginx.ico src/os/win32/tray.ico"
+NGX_WIN32_RC="src/os/win32/nginx.rc"
+
HTTP_MODULES="ngx_http_module \
ngx_http_core_module \
diff --git a/auto/unix b/auto/unix
index ec0e3952d..af9ee01df 100755
--- a/auto/unix
+++ b/auto/unix
@@ -8,17 +8,17 @@ ngx_fmt_collect=yes
# C types
ngx_type="int"; . auto/types/sizeof
-ngx_formats="%d"; . auto/fmt/fmt
+#ngx_formats="%d"; . auto/fmt/fmt
ngx_type="long"; . auto/types/sizeof
-ngx_formats="%ld"; . auto/fmt/fmt
+#ngx_formats="%ld"; . auto/fmt/fmt
ngx_type="long long"; . auto/types/sizeof
-ngx_formats="%lld %qd"; . auto/fmt/fmt
+#ngx_formats="%lld %qd"; . auto/fmt/fmt
ngx_type="void *"; . auto/types/sizeof; ngx_ptr_size=$ngx_size
-ngx_fmt_name=PTR_FMT;
-eval ngx_formats=\${ngx_${ngx_ptr_size}_fmt}; . auto/fmt/ptrfmt
+#ngx_fmt_name=PTR_FMT;
+#eval ngx_formats=\${ngx_${ngx_ptr_size}_fmt}; . auto/fmt/ptrfmt
# POSIX types
@@ -46,28 +46,28 @@ ngx_type="rlim_t"; ngx_types="int"; . auto/types/typedef
# printf() formats
-CC_WARN=$CC_STRONG
-ngx_fmt_collect=no
-
-ngx_fmt_name=OFF_T_FMT; ngx_type="off_t"; . auto/types/sizeof
+#CC_WARN=$CC_STRONG
+#ngx_fmt_collect=no
+#
+#ngx_fmt_name=OFF_T_FMT; ngx_type="off_t"; . auto/types/sizeof
ngx_param=OFF_T_MAX_VALUE; ngx_value=$ngx_max_value; . auto/types/value
-eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
-
-ngx_fmt_name=TIME_T_FMT; ngx_type="time_t"; . auto/types/sizeof
+#eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
+#
+#ngx_fmt_name=TIME_T_FMT; ngx_type="time_t"; . auto/types/sizeof
ngx_param=TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
ngx_param=TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
-eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
-
-ngx_fmt_name=SIZE_T_FMT; ngx_type="size_t"; . auto/types/sizeof
-eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
-
-ngx_fmt_name=SIZE_T_X_FMT; . auto/fmt/xfmt
-
-ngx_fmt_name=PID_T_FMT; ngx_type="pid_t"; . auto/types/sizeof
-eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
-
-ngx_fmt_name=RLIM_T_FMT; ngx_type="rlim_t"; . auto/types/sizeof
-eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
+#eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
+#
+#ngx_fmt_name=SIZE_T_FMT; ngx_type="size_t"; . auto/types/sizeof
+#eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
+#
+#ngx_fmt_name=SIZE_T_X_FMT; . auto/fmt/xfmt
+#
+#ngx_fmt_name=PID_T_FMT; ngx_type="pid_t"; . auto/types/sizeof
+#eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
+#
+#ngx_fmt_name=RLIM_T_FMT; ngx_type="rlim_t"; . auto/types/sizeof
+#eval ngx_formats=\${ngx_${ngx_size}_fmt}; . auto/fmt/fmt
# syscalls, libc calls and some features
@@ -93,19 +93,23 @@ ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
ngx_feature="strerror_r()"
ngx_feature_name="strerror_r"
-ngx_feature_run=no
+ngx_feature_run=yes
ngx_feature_incs="#include <string.h>"
ngx_feature_libs=
-ngx_feature_test="char buf[20]; int n; n = strerror_r(1, buf, 20)"
+ngx_feature_test="char buf[32]; int n; n = strerror_r(1, buf, 32);
+ if (n > 32) return 1;"
. auto/feature
-ngx_feature="gnu_strerror_r()"
+# GNU style strerror_r() returns not length, but pointer
+
+ngx_feature="gnu style strerror_r()"
ngx_feature_name="gnu_strerror_r"
-ngx_feature_run=no
+ngx_feature_run=yes
ngx_feature_incs="#include <string.h>"
ngx_feature_libs=
-ngx_feature_test="char buf[20], *str; str = strerror_r(1, buf, 20)"
+ngx_feature_test="char buf[32]; int n; n = strerror_r(1, buf, 32);
+ if (n < 32) return 1;"
. auto/feature
@@ -184,16 +188,6 @@ ngx_feature_test="int id;
. auto/feature
-ngx_feature="struct sockaddr_in.sin_len"
-ngx_feature_name="sin_len"
-ngx_feature_run=no
-ngx_feature_incs="#include <sys/socket.h>
-#include <netinet/in.h>"
-ngx_feature_libs=
-ngx_feature_test="struct sockaddr_in sa; sa.sin_len = 5"
-. auto/feature
-
-
ngx_feature="struct msghdr.msg_control"
ngx_feature_name="msghdr_msg_control"
ngx_feature_run=no