Commit Graph

454 Commits

Author SHA1 Message Date
Maxim Dounin
f3dcfd8c20 Merge of r5071: rebuild perl module on headers change.
Configure: rebuild perl module nginx.so if headers are changed.

Note: the "-p" argument of cp(1) dropped intentionally, to force nginx.so
rebuild.  It is considered too boring to properly list all dependencies
in Makefile.PL.
2013-03-29 17:13:45 +00:00
Maxim Dounin
431111e8d8 Merge of r5014, r5015, r5016, r5030: geoip ipv6 support.
*) Configure: fixed style of include directories.

*) Configure: fixed GeoIP library detection.

*) GeoIP: IPv6 support.  When using IPv6 databases, IPv4 addresses are
   looked up as IPv4-mapped IPv6 addresses.  Mostly based on a patch
   by Gregor Kališnik (ticket #250).

*) GeoIP: removed pseudo-support of "proxy" and "netspeed" databases.
2013-02-11 15:34:30 +00:00
Maxim Dounin
ad45350460 Merge of r5012: configure: removed redundant variable assignment. 2013-02-11 15:28:50 +00:00
Maxim Dounin
eef05677eb Merge of r4985, r4986, r4987, r4988, r4989, r5002: access_log gzip.
*) Access log: fixed redundant buffer reallocation.  Previously a new
   buffer was allocated for every "access_log" directive with the same
   file path and "buffer=" parameters, while only one buffer per file
   is used.

*) Reopening log files code moved to a separate function.  The code
   refactored in a way to call custom handler that can do appropriate
   cleanup work (if any), like flushing buffers, finishing compress
   streams, finalizing connections to log daemon, etc..

*) Access log: the "flush" parameter of the "access_log" directive.

*) Configure: added the NGX_ZLIB define.  This was introduced for
   conditional compilation of the code that requires the zlib library.

*) Access log: the "gzip" parameter of the "access_log" directive.
   Note: this requires zlib version 1.2.0.4 or above to work.

*) The data pointer in ngx_open_file_t objects must be initialized.
   Uninitialized pointer may result in arbitrary segfaults if access_log
   is used without buffer and without variables in file path.
   Patch by Tatsuhiko Kubo (ticket #268).
2013-02-11 14:34:00 +00:00
Maxim Dounin
a2107a6705 Merge of r4961: configure: better check for PCRE JIT.
On Mac OS X system toolchain by default prefers include files
from /usr/local/include, but libraries from /usr/lib.  This might result in
various problems, in particular the one outlined below.

If the PCRE library is installed into /usr/local/, this results in pcre.h
being used from /usr/local/include (with PCRE_CONFIG_JIT defined), but
libpcre from /usr/lib (as shipped with the OS, without pcre_free_study()
symbol).  As a result build fails as we use pcre_free_study() function
if we try to compile with PCRE JIT support.

Obvious workaround to the root cause is to ask compiler to prefer
library from /usr/local/lib via ./configure --with-ld-opt="-L/usr/local/lib".
On the other hand, in any case it would be good to check if the function
we are going to use is available, hence the change.

See thread here for details:
http://mailman.nginx.org/pipermail/nginx-devel/2012-December/003074.html

Prodded by Piotr Sikora.
2013-02-10 03:18:08 +00:00
Maxim Dounin
deee4cafa0 Merge of r4946, r4978: perl.
*) Fixed build with embedded perl in certain setups (ticket #48).

*) Brought the link to ngx_http_perl_module documentation up to date.
2013-02-10 02:58:03 +00:00
Maxim Dounin
033598bc07 Merge of r4870, r4871, r4890, r4895: minor fixes.
*) Made sure to initialize the entire ngx_file_t structure.
   Found by Coverity.

*) Correct plural form for "path" in the whole source base.

*) Removed conditional compilation from waitpid() error test.

   There are reports that call to a signal handler for an exited process
   despite waitpid() already called for the process may happen on Linux
   as well.

*) Style, parentheses instead of braces in misc/GNUMakefile.
2012-11-12 18:39:51 +00:00
Maxim Dounin
745c7d9c8e Merge of r4866, r4867: configure fixes.
*) Configure: help updated to list upstream keepalive and least_conn.
   Patch by Joshua Zhu.

*) Configure: additional test for ExtUtils::Embed perl module presence.
   Now perl configure will correctly fail if ExtUtils::Embed perl module
   is not present in the system (found on Amazon Linux AMI, as of
   release 2012.03).
2012-11-12 17:57:57 +00:00
Maxim Dounin
90c3d53146 Merge of r4842: fixed make macros to use parentheses.
Configure: fixed make macros to use parentheses instead of braces.
Parentheses are more portable, in particular they are understood by
nmake while braces aren't.
2012-09-24 18:46:50 +00:00
Maxim Dounin
ae5736bfa4 Merge of r4779, r4840, r4843, r4844: win32 changes.
*) Fixed build with Visual Studio 2005 Express.

   It is available via winetricks which makes it still usable, and has
   an old crtdefs.h which uses _CRT_SECURE_NO_DEPRECATE instead of
   _CRT_SECURE_NO_WARNINGS to suppress warnings.

   Reported by HAYASHI Kentaro,
   http://mailman.nginx.org/pipermail/nginx-devel/2012-August/002542.html

*) Configure: provide inflate() when building zlib on win32.

*) Helper target "win32" to run configure for win32 builds.

*) Updated zlib used for win32 builds.
2012-09-24 18:37:14 +00:00
Maxim Dounin
8dd36f4aaf Merge of r4763: added the Clang compiler support.
The -Werror is commented out to not break builds on Linux.
2012-08-06 17:10:35 +00:00
Maxim Dounin
20ce4fcbbf Merge of r4760, r4761: -Wmissing-prototypes.
Fixed compilation with -Wmissing-prototypes.  Added a commented
out -Wmissing-prototypes to CFLAGS.  It is commented out to not break
builds with 3rd party modules.
2012-08-06 17:07:28 +00:00
Maxim Dounin
a24d4d23f7 Merge of r4759, r4762, r4768: configure minor fixes.
*) Replaced a number of "else if" with "elif".

*) Made sure to run configure in a "C" locale.  Otherwise, we may fail
   to properly detect a version of compiler.

*) Removed extraneous GCC warning flags.
2012-08-06 17:03:01 +00:00
Maxim Dounin
1c1cccf673 Merge of r4741: fixed "make" used instead of "${MAKE}". 2012-08-06 15:47:15 +00:00
Maxim Dounin
92486bd9cc Merge of r4698: X-Forwarded-For conditionals.
Fixed compile-time conditionals used to detect if X-Forwarded-For support
is needed.

Note: compatibility shims were added during merge to avoid possible
breakage of 3rd party modules.  At least cache purge module was broken
by the original commit, as it used to rely on NGX_HTTP_PROXY define.
2012-07-02 17:41:52 +00:00
Maxim Dounin
37cf05e2af Merge of r4693: fixed "sendmsg() failed" alerts on HP-UX.
HP-UX needs _HPUX_ALT_XOPEN_SOCKET_API to be defined to be able to
use various POSIX versions of networking functions.  Notably sendmsg()
resulted in "sendmsg() failed (9: Bad file number)" alerts without it.

See xopen_networking(7) for more details.
2012-07-02 17:22:31 +00:00
Maxim Dounin
a6633971fb Merge of r4691: changed default alignment to 16.
This fixes alignment problems observerd on ARMs, and likely also needed
for MIPSes.  Unless we know alignment is not required just assume we
need 16, which appears to be safe default for all architectures.

See here for details:
http://mailman.nginx.org/pipermail/nginx/2012-June/034139.html
2012-07-02 17:08:26 +00:00
Maxim Dounin
7138ca1704 Merge of r4682, r4694, r4699, r4704, r4705: minor nits.
*) Fixed spelling of "endianness", and called it "byte ordering" in the
   user visible part.

*) Fixed return type of ngx_strerror_init().

*) Fixed a harmless error in spelling of "Connection: close" when computing
   the response header length.

*) Style.

*) Added code to look up Google perftools in /opt/local/, for MacPorts.
2012-07-02 16:51:02 +00:00
Maxim Dounin
eaf3544e15 Merge of r4655, r4656, r4657, r4695, r4696: upstream changes.
*) Upstream: least_conn balancer module.

*) Upstream: weights and IPv6 support in ip_hash balancer.

*) Upstream keepalive: "single" parameter deprecated.
2012-07-02 16:41:13 +00:00
Maxim Dounin
917e4ab3fb Merge of r4639, r4640: C++ fixes.
Fixed the ngx_regex.h header file compatibility with C++.  Fixed
building --with-cpp_test_module on some systems.
2012-06-29 17:32:43 +00:00
Maxim Dounin
97d7f3d827 Configure: fixed msghdr.msg_control test on 64bit platforms.
Broken by r4560.
2012-03-28 12:38:03 +00:00
Maxim Dounin
a3bdd737e5 Fixed more gcc46 warnings in configure tests.
Steps to reproduce:

./configure --with-cc="gcc46" --with-cc-opt="-Wall -Werror -O2"
2012-03-27 16:44:52 +00:00
Ruslan Ermilov
fd601af84c The addition of $tcpinfo_* variables has broken the build on Linux
systems with glibc versions prior to 2.7.  Fixed this by checking
the existence of "struct tcp_info" members during configuration.
2012-03-21 15:35:05 +00:00
Ruslan Ermilov
fbd32d4d19 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support. 2012-03-21 13:58:51 +00:00
Ruslan Ermilov
926ded6f4c Implemented $tcpinfo_rtt, $tcpinfo_rttvar, $tcpinfo_snd_cwnd, and
$tcpinfo_rcv_space variables.  Supported on Linux and FreeBSD.
2012-03-16 19:15:33 +00:00
Ruslan Ermilov
c2afb66e88 Some older OSes (notably FreeBSD 4.x) did not have %zu
format specifier, so revert to using %d.
2012-03-16 07:33:55 +00:00
Ruslan Ermilov
4489fa8893 Fixed compilation warnings in configuration C tests.
Based on a patch by Piotr Sikora.
2012-03-15 20:39:38 +00:00
Maxim Dounin
075e852a4e Configure: moved icc detection before gcc.
New versions of icc confuse auto/cc/name due to introduced handling
of a "icc -v":

$ icc -v
icc version 12.1.3 (gcc version 4.6.0 compatibility)
$ icc -V
Intel(R) C Compiler XE for applications running on IA-32, Version 12.1.3.293 Build 20120212
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

See report here:
http://mailman.nginx.org/pipermail/nginx/2012-February/032177.html
2012-02-27 16:23:44 +00:00
Andrey Belov
71205c3fbc Added openat()/fstatat(). 2012-02-13 16:13:21 +00:00
Maxim Dounin
8cb7134f49 Fixed build with embedded perl and --with-openssl. 2012-02-13 15:38:48 +00:00
Valentin Bartenev
891b43db32 Added ngx_ncpu detection for most *nix platforms.
This inaccurate detection by using sysconf(_SC_NPROCESSORS_ONLN) can improve
usage of the mutex lock optimization on multicore systems.
2012-02-10 11:24:19 +00:00
Maxim Konovalov
f8d59e33f3 Copyright updated. 2012-01-18 15:07:43 +00:00
Valentin Bartenev
9d712d9bf1 Fixed configure with system PCRE library on Solaris.
The bug has been introduced in r4389.
2011-12-29 15:58:53 +00:00
Maxim Konovalov
f08ba92492 Some questionable optomizations flags for icc were removed
in order to simplify support of its future versions.
2011-12-29 15:36:07 +00:00
Valentin Bartenev
bc5191c7bc Added support for regex study and PCRE JIT (ticket #41) optimizations on
configuration phase.
2011-12-26 13:10:36 +00:00
Sergey Budnevitch
2f6e243499 configure on Solaris fixed 2011-12-20 16:20:23 +00:00
Valentin Bartenev
92edf47ff9 Added the "so_keepalive=" parameter to the "listen" directive.
The "so_keepalive" directive in mail module was deprecated.

Thanks to Vsevolod Stakhov for initial work.
2011-12-05 08:06:15 +00:00
Ruslan Ermilov
7cd93c6926 Made it possible to build/install from the SVN checkout. 2011-11-22 13:26:44 +00:00
Maxim Konovalov
d4a2f14262 o AIX 7 defines sys_nerr in errno.h, therefore <errno.h> included
in the sys_nerr test.

o When sys_nerr and _sys_nerr are missed on a particular platform
and our euristic for a maximum errno detection applied always
print the maximum errno number we reached instead of printing void.[*]

* patch from Maxim Dounin

This commit makes possible to build nginx on AIX 7.1.
2011-11-21 11:51:41 +00:00
Valentin Bartenev
255e20ad21 Renamed ngx_http_limit_zone_module to ngx_http_limit_conn_module. 2011-11-14 14:04:42 +00:00
Ruslan Ermilov
ac0e8cb2d3 Revamped "configure --help" text. 2011-10-26 13:18:33 +00:00
Igor Sysoev
cfd5148e88 Fix of building by Microsoft Visual C++ 10 compiler. 2011-10-26 08:16:59 +00:00
Ruslan Ermilov
88ca608da1 Fixed configuration summary and manpage contents for the special
--error-log-path=stderr case.
2011-10-12 09:04:59 +00:00
Maxim Dounin
44002e541f Upstream keepalive module. 2011-09-15 19:28:18 +00:00
Igor Sysoev
dde4d7e300 ngx_http_mp4_module 2011-09-09 10:22:34 +00:00
Maxim Dounin
ec8186c733 Move SO_ACCEPTFILTER and TCP_DEFER_ACCEPT checks into configure.
NetBSD 5.0+ has SO_ACCEPTFILTER support merged from FreeBSD, and having
accept filter check in FreeBSD-specific ngx_freebsd_config.h prevents it
from being used on NetBSD.  Therefore move the check into configure (and
do the same for Linux-specific TCP_DEFER_ACCEPT, just to be in line).
2011-08-21 11:37:37 +00:00
Maxim Dounin
400de576f9 Rebuild manpage only if needed. 2011-08-18 15:57:59 +00:00
Maxim Dounin
950b668076 Lower optimization level for Sun Studio before 12.1.
At least Sun Studio 12 has problems with bit-fields exposed by nginx code
(caught by test suite).  They seems to be fixed in Sun Studio 12.1.  As a
workaround use "-fast -xalias_level=any" for older versions, it resolves
the problem.
2011-08-18 15:10:23 +00:00
Maxim Dounin
b4d9ee220c Detect POSIX semaphores in librt on Solaris (ticket #3).
Patch by Denis Ivanov.
2011-08-17 08:35:54 +00:00
Maxim Dounin
1a664a80a9 Configure: catch up with new Linux version numbering (ticket #5).
Catch up with new Linux version numbering scheme as announced at [1] and
suppress unrecognized versions to actually use default 0.

[1] https://lkml.org/lkml/2011/5/29/204
2011-08-13 15:15:50 +00:00