comparison auto/lib/zlib/conf @ 5053:004af18ddb86 stable-1.2

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).
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 11 Feb 2013 14:34:00 +0000
parents d620f497c50f
children 78f8ac479735
comparison
equal deleted inserted replaced
5052:f2dcb25987df 5053:004af18ddb86
7 CORE_INCS="$CORE_INCS $ZLIB" 7 CORE_INCS="$CORE_INCS $ZLIB"
8 8
9 case "$NGX_CC_NAME" in 9 case "$NGX_CC_NAME" in
10 10
11 msvc* | owc* | bcc) 11 msvc* | owc* | bcc)
12 have=NGX_ZLIB . auto/have
12 LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib" 13 LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
13 CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib" 14 CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
14 ;; 15 ;;
15 16
16 icc*) 17 icc*)
18 have=NGX_ZLIB . auto/have
17 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" 19 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
18 20
19 # to allow -ipo optimization we link with the *.o but not library 21 # to allow -ipo optimization we link with the *.o but not library
20 CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o" 22 CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o"
21 CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o" 23 CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o"
28 CORE_LIBS="$CORE_LIBS $ZLIB/match.o" 30 CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
29 fi 31 fi
30 ;; 32 ;;
31 33
32 *) 34 *)
35 have=NGX_ZLIB . auto/have
33 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" 36 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
34 CORE_LIBS="$CORE_LIBS $ZLIB/libz.a" 37 CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
35 #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz" 38 #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
36 ;; 39 ;;
37 40
43 ZLIB=NO 46 ZLIB=NO
44 47
45 # FreeBSD, Solaris, Linux 48 # FreeBSD, Solaris, Linux
46 49
47 ngx_feature="zlib library" 50 ngx_feature="zlib library"
48 ngx_feature_name= 51 ngx_feature_name="NGX_ZLIB"
49 ngx_feature_run=no 52 ngx_feature_run=no
50 ngx_feature_incs="#include <zlib.h>" 53 ngx_feature_incs="#include <zlib.h>"
51 ngx_feature_path= 54 ngx_feature_path=
52 ngx_feature_libs="-lz" 55 ngx_feature_libs="-lz"
53 ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)" 56 ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"