Skip to content

Commit

Permalink
nginx-0.1.5-RELEASE import
Browse files Browse the repository at this point in the history
    *) 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.
  • Loading branch information
igorsysoev committed Nov 11, 2004
1 parent d6f2495 commit 1b73583
Show file tree
Hide file tree
Showing 132 changed files with 2,963 additions and 1,921 deletions.
18 changes: 16 additions & 2 deletions auto/cc/bcc
Original file line number Diff line number Diff line change
Expand Up @@ -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="\\"
20 changes: 18 additions & 2 deletions auto/cc/conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ else
# . auto/cc/acc
# ;;

msvc)
# MSVC 6.0 SP2
msvc*)
# MSVC++ 6.0 SP2, MSVC++ Toolkit 2003

. auto/cc/msvc
;;
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions auto/cc/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,3 @@ if [ ".$CPP" = "." ]; then
fi

LINK="\$(CC)"


CC_STRONG="-Wall -Werror"
3 changes: 0 additions & 3 deletions auto/cc/icc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,3 @@ CFLAGS="$CFLAGS -Werror"
CFLAGS="$CFLAGS -g"

LINK="\$(CC)"


CC_STRONG="-w1 -Werror"
48 changes: 33 additions & 15 deletions auto/cc/msvc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) Igor Sysoev


# MSVC 6.0 SP2
# MSVC 6.0 SP2, MSVC Toolkit 2003 (7.1)

# optimizations

Expand Down Expand Up @@ -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

Expand All @@ -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"
Expand Down
13 changes: 11 additions & 2 deletions auto/cc/name
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 11 additions & 4 deletions auto/cc/owc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions auto/feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
4 changes: 2 additions & 2 deletions auto/lib/md5/conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions auto/lib/pcre/conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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"
LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
;;

icc)
icc*)
have=NGX_PCRE . auto/have
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"

Expand Down
4 changes: 2 additions & 2 deletions auto/lib/zlib/conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 29 additions & 1 deletion auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
18 changes: 13 additions & 5 deletions auto/modules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
14 changes: 5 additions & 9 deletions auto/options
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand All @@ -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
./*)
;;
Expand Down
Loading

0 comments on commit 1b73583

Please sign in to comment.