Skip to content

Commit

Permalink
nginx: update to latest mainline
Browse files Browse the repository at this point in the history
  % ./update_nginx.sh 1.7.11
  • Loading branch information
kenhys committed Mar 25, 2015
1 parent 43c3527 commit e0bbba9
Show file tree
Hide file tree
Showing 428 changed files with 4,553 additions and 3,402 deletions.
2 changes: 1 addition & 1 deletion nginx_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.9
1.7.11
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
. auto/unix
fi

. auto/threads
. auto/modules
. auto/lib/conf

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ END
;;

*)
case $USE_THREADS in
NO) OPENSSL_OPT="$OPENSSL_OPT no-threads" ;;
*) OPENSSL_OPT="$OPENSSL_OPT threads" ;;
esac

case $OPENSSL in
/*) ngx_prefix="$OPENSSL/.openssl" ;;
*) ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ fi
modules="$CORE_MODULES $EVENT_MODULES"


# thread pool module should be initialized after events
if [ $USE_THREADS = YES ]; then
modules="$modules $THREAD_POOL_MODULE"
fi


if [ $USE_OPENSSL = YES ]; then
modules="$modules $OPENSSL_MODULE"
CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ do
--without-poll_module) EVENT_POLL=NONE ;;
--with-aio_module) EVENT_AIO=YES ;;

#--with-threads=*) USE_THREADS="$value" ;;
#--with-threads) USE_THREADS="pthreads" ;;
--with-threads) USE_THREADS=YES ;;

--with-file-aio) NGX_FILE_AIO=YES ;;
--with-ipv6) NGX_IPV6=YES ;;
Expand Down Expand Up @@ -354,6 +353,8 @@ cat << END
--with-poll_module enable poll module
--without-poll_module disable poll module

--with-threads enable thread pool support

--with-file-aio enable file AIO support
--with-ipv6 enable IPv6 support

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ ngx_feature_test="int s = 0, fd = 1;
. auto/feature

if [ $ngx_found = yes ]; then
have=NGX_HAVE_SENDFILE . auto/have
CORE_SRCS="$CORE_SRCS $DARWIN_SENDFILE_SRCS"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ if [ $osreldate -gt 300007 ]; then
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
fi

if [ $osreldate -gt 502103 ]; then
echo " + sendfile()'s SF_NODISKIO found"
if [ $NGX_FILE_AIO = YES ]; then
if [ $osreldate -gt 502103 ]; then
echo " + sendfile()'s SF_NODISKIO found"

have=NGX_HAVE_AIO_SENDFILE . auto/have
have=NGX_HAVE_AIO_SENDFILE . auto/have
fi
fi

# POSIX semaphores
Expand Down Expand Up @@ -78,7 +80,7 @@ fi
NGX_KQUEUE_CHECKED=YES


# kqueue's NOTE_LAWAT
# kqueue's NOTE_LOWAT

if [ \( $version -lt 500000 -a $version -ge 430000 \) \
-o $version -ge 500018 ]
Expand All @@ -97,25 +99,6 @@ then
fi


if [ $USE_THREADS = "rfork" ]; then

echo " + using rfork()"

# # kqueue's EVFILT_SIGNAL is safe
#
# if [ $version -gt 460101 ]; then
# echo " + kqueue's EVFILT_SIGNAL is safe"
# have=NGX_HAVE_SAFE_EVFILT_SIGNAL . auto/have
# else
# echo "$0: error: the kqueue's EVFILT_SIGNAL is unsafe on this"
# echo "FreeBSD version, so --with-threads=rfork could not be used"
# echo
#
# exit 1
# fi
fi


if [ $EVENT_AIO = YES ]; then
if [ \( $version -lt 500000 -a $version -ge 430000 \) \
-o $version -ge 500014 ]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,12 @@ EVENT_INCS="src/event src/event/modules"
EVENT_DEPS="src/event/ngx_event.h \
src/event/ngx_event_timer.h \
src/event/ngx_event_posted.h \
src/event/ngx_event_busy_lock.h \
src/event/ngx_event_connect.h \
src/event/ngx_event_pipe.h"

EVENT_SRCS="src/event/ngx_event.c \
src/event/ngx_event_timer.c \
src/event/ngx_event_posted.c \
src/event/ngx_event_busy_lock.c \
src/event/ngx_event_accept.c \
src/event/ngx_event_connect.c \
src/event/ngx_event_pipe.c"
Expand Down Expand Up @@ -193,14 +191,16 @@ UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \

POSIX_DEPS=src/os/unix/ngx_posix_config.h

THREAD_POOL_MODULE=ngx_thread_pool_module
THREAD_POOL_DEPS=src/core/ngx_thread_pool.h
THREAD_POOL_SRCS="src/core/ngx_thread_pool.c
src/os/unix/ngx_thread_cond.c
src/os/unix/ngx_thread_mutex.c
src/os/unix/ngx_thread_id.c"

FREEBSD_DEPS="src/os/unix/ngx_freebsd_config.h src/os/unix/ngx_freebsd.h"
FREEBSD_SRCS=src/os/unix/ngx_freebsd_init.c
FREEBSD_SENDFILE_SRCS=src/os/unix/ngx_freebsd_sendfile_chain.c
FREEBSD_RFORK_DEPS="src/os/unix/ngx_freebsd_rfork_thread.h"
FREEBSD_RFORK_SRCS="src/os/unix/ngx_freebsd_rfork_thread.c"
FREEBSD_RFORK_THREAD_SRCS="src/os/unix/rfork_thread.S"

PTHREAD_SRCS="src/os/unix/ngx_pthread_thread.c"

LINUX_DEPS="src/os/unix/ngx_linux_config.h src/os/unix/ngx_linux.h"
LINUX_SRCS=src/os/unix/ngx_linux_init.c
Expand Down Expand Up @@ -295,8 +295,7 @@ HTTP_DEPS="src/http/ngx_http.h \
src/http/ngx_http_variables.h \
src/http/ngx_http_script.h \
src/http/ngx_http_upstream.h \
src/http/ngx_http_upstream_round_robin.h \
src/http/ngx_http_busy_lock.h"
src/http/ngx_http_upstream_round_robin.h"

HTTP_SRCS="src/http/ngx_http.c \
src/http/ngx_http_core_module.c \
Expand All @@ -320,9 +319,6 @@ HTTP_SRCS="src/http/ngx_http.c \
src/http/modules/ngx_http_headers_filter_module.c \
src/http/modules/ngx_http_not_modified_filter_module.c"

# STUB
HTTP_SRCS="$HTTP_SRCS src/http/ngx_http_busy_lock.c"

HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c

HTTP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.c
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,13 @@
# Copyright (C) Nginx, Inc.


### STUB

if [ $USE_THREADS != NO ]; then

cat << END

$0: error: the threads support is broken now.

END
exit 1
fi

###


echo
echo "Configuration summary"


#case $USE_THREADS in
# rfork) echo " + using rfork()ed threads" ;;
# pthreads) echo " + using libpthread threads library" ;;
# libthr) echo " + using FreeBSD libthr threads library" ;;
# libc_r) echo " + using FreeBSD libc_r threads library" ;;
# linuxthreads) echo " + using FreeBSD LinuxThreads port library" ;;
# NO) echo " + threads are not used" ;;
# *) echo " + using lib$USE_THREADS threads library" ;;
#esac
if [ $USE_THREADS = YES ]; then
echo " + using threads"
fi

if [ $USE_PCRE = DISABLED ]; then
echo " + PCRE library is disabled"
Expand Down
20 changes: 20 additions & 0 deletions vendor/nginx-1.7.11/auto/threads
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

# Copyright (C) Nginx, Inc.


if [ $USE_THREADS = YES ]; then

if [ "$NGX_PLATFORM" = win32 ]; then
cat << END

$0: --with-threads is not supported on Windows

END
exit 1
fi

have=NGX_THREADS . auto/have
CORE_DEPS="$CORE_DEPS $THREAD_POOL_DEPS"
CORE_SRCS="$CORE_SRCS $THREAD_POOL_SRCS"
CORE_LIBS="$CORE_LIBS -lpthread"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,12 @@ rm -rf $NGX_AUTOTEST*

case $ngx_size in
4)
if [ "$ngx_type"="long" ]; then
ngx_max_value=2147483647L
else
ngx_max_value=2147483647
fi

ngx_max_value=2147483647
ngx_max_len='(sizeof("-2147483648") - 1)'
;;

8)
if [ "$ngx_type"="long long" ]; then
ngx_max_value=9223372036854775807LL
else
ngx_max_value=9223372036854775807L
fi

ngx_max_value=9223372036854775807LL
ngx_max_len='(sizeof("-9223372036854775808") - 1)'
;;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions vendor/nginx-1.7.9/auto/unix → vendor/nginx-1.7.11/auto/unix
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,29 @@ Currently file AIO is supported on FreeBSD 4.3+ and Linux 2.6.22+ only
END
exit 1
fi

else

ngx_feature="eventfd()"
ngx_feature_name="NGX_HAVE_EVENTFD"
ngx_feature_run=no
ngx_feature_incs="#include <sys/eventfd.h>"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="(void) eventfd(0, 0)"
. auto/feature

if [ $ngx_found = yes ]; then
have=NGX_HAVE_SYS_EVENTFD_H . auto/have
fi

if [ $ngx_found = no ]; then

ngx_feature="eventfd() (SYS_eventfd)"
ngx_feature_incs="#include <sys/syscall.h>"
ngx_feature_test="int n = SYS_eventfd"
. auto/feature
fi
fi


Expand Down Expand Up @@ -510,6 +533,7 @@ ngx_param=NGX_OFF_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
ngx_type="time_t"; . auto/types/sizeof
ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
ngx_param=NGX_MAX_TIME_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value


# syscalls, libc calls and some features
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2014 Igor Sysoev
* Copyright (C) 2011-2014 Nginx, Inc.
* Copyright (C) 2002-2015 Igor Sysoev
* Copyright (C) 2011-2015 Nginx, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
File renamed without changes.
Loading

0 comments on commit e0bbba9

Please sign in to comment.