Skip to content

Commit

Permalink
nginx-0.3.2-RELEASE import
Browse files Browse the repository at this point in the history
    *) Feature: the Sun Studio 10 C compiler support.

    *) Feature: the "proxy_upstream_max_fails",
       "proxy_upstream_fail_timeout", "fastcgi_upstream_max_fails", and
       "fastcgi_upstream_fail_timeout" directives.
  • Loading branch information
igorsysoev committed Oct 12, 2005
1 parent bbfe303 commit 7845223
Show file tree
Hide file tree
Showing 53 changed files with 1,087 additions and 636 deletions.
8 changes: 7 additions & 1 deletion auto/cc/conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else
gcc)
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
# 4.0.0
# 4.0.0, 4.0.1, 4.1.0

. auto/cc/gcc
;;
Expand All @@ -55,6 +55,12 @@ else
. auto/cc/icc
;;

sunc)
# Sun C 5.7 Patch 117837-04 2005/05/11

. auto/cc/sunc
;;

ccc)
# Compaq C V6.5-207

Expand Down
13 changes: 12 additions & 1 deletion auto/cc/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ if [ $ngx_found = yes ]; then
PIPE="-pipe"
fi


case "$NGX_PLATFORM" in

*:sun4u)
# "-mcpu=v9" enables the "casxa" assembler instruction
CFLAGS="$CFLAGS -mcpu=v9"
;;

esac


# optimizations

#NGX_GCC_OPT="-O2"
Expand All @@ -49,7 +60,7 @@ case $CPU in
CPU_OPT="-march=pentium"
;;

pentiumpro)
pentiumpro | pentium3)
# optimize for Pentium Pro, Pentium II and Pentium III
CPU_OPT="-march=pentiumpro"
;;
Expand Down
2 changes: 2 additions & 0 deletions auto/cc/icc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ CFLAGS="$CFLAGS -wd1418"
CFLAGS="$CFLAGS -wd1419"
# explicit conversion of a 64-bit integral type to a smaller integral type
CFLAGS="$CFLAGS -wd1683"
# conversion from pointer to same-sized integral type, warning on offsetof()
CFLAGS="$CFLAGS -wd1684"

case "$NGX_ICC_VER" in
8.* | 9.*)
Expand Down
6 changes: 6 additions & 0 deletions auto/cc/name
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if `$CC -V 2>&1 | grep '^Intel(R) C' 2>&1 >/dev/null`; then
NGX_CC_NAME=icc
echo " using Intel C++ compiler"

else
if `$CC -V 2>&1 | grep 'Sun C' 2>&1 >/dev/null`; then
NGX_CC_NAME=sunc
echo " using Sun C compiler"

else
if `$CC -V 2>&1 | grep '^Compaq C' 2>&1 >/dev/null`; then
NGX_CC_NAME=ccc
Expand All @@ -54,6 +59,7 @@ else

fi # acc
fi # ccc
fi # sunc
fi # icc
fi # gcc
fi # bcc
Expand Down
95 changes: 95 additions & 0 deletions auto/cc/sunc
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

# Copyright (C) Igor Sysoev


# Sun C 5.7 Patch 117837-04 2005/05/11

NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \
| sed -e 's/^.* Sun C \(.*\)/\1/'`

echo " + Sun C version: $NGX_SUNC_VER"

have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define


case "$NGX_PLATFORM" in

*:i86pc)
NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
;;

*:sun4u)
# "-xarch=v9" enables the "casa" assembler instruction
CFLAGS="$CFLAGS -xarch=v9"
CORE_LINK="$CORE_LINK -xarch=v9"
NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
;;

esac


# optimizations

CFLAGS="$CFLAGS -fast"


case $CPU in
pentium)
# optimize for Pentium and Athlon
CPU_OPT="-xchip=pentium"
;;

pentiumpro)
# optimize for Pentium Pro, Pentium II
CPU_OPT="-xchip=pentium_pro"
;;

pentium3)
# optimize for Pentium III
CPU_OPT="-xchip=pentium3"
#CPU_OPT="$CPU_OPT -xarch=sse"
CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4"
;;

pentium4)
# optimize for Pentium 4
CPU_OPT="-xchip=pentium4"
#CPU_OPT="$CPU_OPT -xarch=sse2"
CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8"
;;

opteron)
# optimize for Opteron
CPU_OPT="-xchip=opteron"
#CPU_OPT="$CPU_OPT -xarch=sse2"
CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
;;

amd64)
# build 64-bit amd64 binary
CPU_OPT="-xarch=amd64"
CORE_LINK="$CORE_LINK -xarch=amd64"
NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
;;

esac


CFLAGS="$CFLAGS $CPU_OPT"


if [ ".$PCRE_OPT" = "." ]; then
PCRE_OPT="-fast $CPU_OPT"
fi

if [ ".$MD5_OPT" = "." ]; then
MD5_OPT="-fast $CPU_OPT"
fi

if [ ".$ZLIB_OPT" = "." ]; then
ZLIB_OPT="-fast $CPU_OPT"
fi


# stop on warning
CFLAGS="$CFLAGS -errwarn=%all"
2 changes: 1 addition & 1 deletion auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if [ "$NGX_PLATFORM" != win32 ]; then
. auto/headers
fi

. auto/cc/conf
. auto/os/conf
. auto/cc/conf

if [ "$NGX_PLATFORM" != win32 ]; then
. auto/os/features
Expand Down
6 changes: 6 additions & 0 deletions auto/lib/openssl/conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ else
if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
OPENSSL=YES

case "$NGX_SYSTEM" in
SunOS)
CORE_LIBS="$CORE_LIBS -ldl"
;;
esac
fi

fi
Expand Down
2 changes: 1 addition & 1 deletion auto/lib/pcre/conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ $PCRE != NONE ]; then
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
;;

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

Expand Down
10 changes: 5 additions & 5 deletions auto/make
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fi
cat << END >> $NGX_MAKEFILE

$ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c
$ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c
$ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX

END

Expand All @@ -219,7 +219,7 @@ do
cat << END >> $NGX_MAKEFILE

$ngx_obj: \$(CORE_DEPS)$ngx_cont$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX

END

Expand Down Expand Up @@ -248,7 +248,7 @@ if [ $HTTP = YES ]; then
cat << END >> $NGX_MAKEFILE

$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX

END
done
Expand Down Expand Up @@ -278,7 +278,7 @@ if [ $IMAP = YES ]; then
cat << END >> $NGX_MAKEFILE

$ngx_obj: \$(CORE_DEPS) \$(IMAP_DEPS)$ngx_cont$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX

END
done
Expand Down Expand Up @@ -310,7 +310,7 @@ if test -n "$NGX_ADDON_SRCS"; then
cat << END >> $NGX_MAKEFILE

$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX

END
done
Expand Down
12 changes: 1 addition & 11 deletions auto/os/solaris
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@ CORE_LIBS="$CORE_LIBS -lsocket -lnsl -lrt"
# Solaris's make does not support a blank line between target and rules
ngx_spacer=

CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lrt"


case "$NGX_PLATFORM" in

*:sun4u)
# "-mcpu=v9" enables the "casa" assembler instruction
CFLAGS="$CFLAGS -mcpu=v9"
;;

esac
CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl -lrt"


if [ $ZLIB_ASM != NO ]; then
Expand Down
11 changes: 11 additions & 0 deletions auto/sources
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,23 @@ UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \
src/os/unix/ngx_process.h \
src/os/unix/ngx_setproctitle.h \
src/os/unix/ngx_atomic.h \
src/os/unix/ngx_gcc_atomic_x86.h \
src/os/unix/ngx_thread.h \
src/os/unix/ngx_socket.h \
src/os/unix/ngx_os.h \
src/os/unix/ngx_user.h \
src/os/unix/ngx_process_cycle.h"

# add to UNIX_DEPS
# src/os/unix/ngx_gcc_atomic_amd64.h \
# src/os/unix/ngx_gcc_atomic_sparc64.h \
# src/os/unix/ngx_gcc_atomic_ppc.h \
# src/os/unix/ngx_sunpro_atomic_sparc64.h \
# src/os/unix/ngx_sunpro_x86.il \
# src/os/unix/ngx_sunpro_amd64.il \
# src/os/unix/ngx_sunpro_sparc64.il \


UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
src/core/ngx_unix_domain.c \
src/os/unix/ngx_time.c \
Expand Down
26 changes: 26 additions & 0 deletions docs/xml/nginx/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,32 @@
<title lang="en">nginx changelog</title>


<changes ver="0.3.2" date="12.10.2005">

<change type="feature">
<para lang="ru">
ÐÏÄÄÅÒÖËÁ Sun Studio 10 C compiler.
</para>
<para lang="en">
the Sun Studio 10 C compiler support.
</para>
</change>

<change type="feature">
<para lang="ru">
ÄÉÒÅËÔÉ×Ù proxy_upstream_max_fails, proxy_upstream_fail_timeout,
fastcgi_upstream_max_fails É fastcgi_upstream_fail_timeout.
</para>
<para lang="en">
the "proxy_upstream_max_fails", "proxy_upstream_fail_timeout",
"fastcgi_upstream_max_fails", and "fastcgi_upstream_fail_timeout"
directives.
</para>
</change>

</changes>


<changes ver="0.3.1" date="10.10.2005">

<change type="bugfix">
Expand Down
2 changes: 1 addition & 1 deletion src/core/nginx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_


#define NGINX_VER "nginx/0.3.1"
#define NGINX_VER "nginx/0.3.2"

#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
Expand Down
2 changes: 1 addition & 1 deletion src/core/ngx_conf_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name)

name->len = cycle->root.len + old.len;

if (cycle->connections0) {
if (cycle->connections) {
name->data = ngx_palloc(cycle->pool, name->len + 1);
if (name->data == NULL) {
return NGX_ERROR;
Expand Down
2 changes: 1 addition & 1 deletion src/core/ngx_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ typedef long ngx_flag_t;

/* TODO: auto_conf: ngx_inline inline __inline __inline__ */
#ifndef ngx_inline
#define ngx_inline __inline
#define ngx_inline inline
#endif

#define NGX_ACCEPT_THRESHOLD 100
Expand Down
30 changes: 29 additions & 1 deletion src/core/ngx_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ ngx_close_listening_sockets(ngx_cycle_t *cycle)
ngx_connection_t *
ngx_get_connection(ngx_socket_t s, ngx_log_t *log)
{
ngx_connection_t *c;
ngx_uint_t instance;
ngx_event_t *rev, *wev;
ngx_connection_t *c;

/* disable warning: Win32 SOCKET is u_int while UNIX socket is int */

Expand Down Expand Up @@ -407,6 +409,32 @@ ngx_get_connection(ngx_socket_t s, ngx_log_t *log)
ngx_cycle->files[s] = c;
}

rev = c->read;
wev = c->write;

ngx_memzero(c, sizeof(ngx_connection_t));

c->read = rev;
c->write = wev;
c->fd = s;
c->log = log;

instance = rev->instance;

ngx_memzero(rev, sizeof(ngx_event_t));
ngx_memzero(wev, sizeof(ngx_event_t));

rev->instance = !instance;
wev->instance = !instance;

rev->index = NGX_INVALID_INDEX;
wev->index = NGX_INVALID_INDEX;

rev->data = c;
wev->data = c;

wev->write = 1;

return c;
}

Expand Down
Loading

0 comments on commit 7845223

Please sign in to comment.