Skip to content

Commit 60a50f7

Browse files
NGINX teamkolbyjack
NGINX team
authored andcommitted
Changes with nginx 1.1.18 28 Mar 2012
*) Change: keepalive connections are no longer disabled for Safari by default. *) Feature: the $connection_requests variable. *) Feature: $tcpinfo_rtt, $tcpinfo_rttvar, $tcpinfo_snd_cwnd and $tcpinfo_rcv_space variables. *) Feature: the "worker_cpu_affinity" directive now works on FreeBSD. *) Feature: the "xslt_param" and "xslt_string_param" directives. Thanks to Samuel Behan. *) Bugfix: in configure tests. Thanks to Piotr Sikora. *) Bugfix: in the ngx_http_xslt_filter_module. *) Bugfix: nginx could not be built on Debian GNU/Hurd.
1 parent 3e2cd74 commit 60a50f7

36 files changed

+597
-160
lines changed

CHANGES

+23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11

2+
Changes with nginx 1.1.18 28 Mar 2012
3+
4+
*) Change: keepalive connections are no longer disabled for Safari by
5+
default.
6+
7+
*) Feature: the $connection_requests variable.
8+
9+
*) Feature: $tcpinfo_rtt, $tcpinfo_rttvar, $tcpinfo_snd_cwnd and
10+
$tcpinfo_rcv_space variables.
11+
12+
*) Feature: the "worker_cpu_affinity" directive now works on FreeBSD.
13+
14+
*) Feature: the "xslt_param" and "xslt_string_param" directives.
15+
Thanks to Samuel Behan.
16+
17+
*) Bugfix: in configure tests.
18+
Thanks to Piotr Sikora.
19+
20+
*) Bugfix: in the ngx_http_xslt_filter_module.
21+
22+
*) Bugfix: nginx could not be built on Debian GNU/Hurd.
23+
24+
225
Changes with nginx 1.1.17 15 Mar 2012
326

427
*) Security: content of previously freed memory might be sent to a

CHANGES.ru

+23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11

2+
Изменения в nginx 1.1.18 28.03.2012
3+
4+
*) Изменение: теперь keepalive соединения не запрещены для Safari по
5+
умолчанию.
6+
7+
*) Добавление: переменная $connection_requests.
8+
9+
*) Добавление: переменные $tcpinfo_rtt, $tcpinfo_rttvar,
10+
$tcpinfo_snd_cwnd и $tcpinfo_rcv_space.
11+
12+
*) Добавление: директива worker_cpu_affinity теперь работает на FreeBSD.
13+
14+
*) Добавление: директивы xslt_param и xslt_string_param.
15+
Спасибо Samuel Behan.
16+
17+
*) Исправление: в configure.
18+
Спасибо Piotr Sikora.
19+
20+
*) Исправление: в модуле ngx_http_xslt_filter_module.
21+
22+
*) Исправление: nginx не собирался на Debian GNU/Hurd.
23+
24+
225
Изменения в nginx 1.1.17 15.03.2012
326

427
*) Безопасность: содержимое ранее освобождённой памяти могло быть

auto/lib/pcre/conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ else
9898
ngx_feature_incs="#include <pcre.h>"
9999
ngx_feature_path=
100100
ngx_feature_libs="-lpcre"
101-
ngx_feature_test="pcre *re; re = pcre_compile(NULL, 0, NULL, 0, NULL)"
101+
ngx_feature_test="pcre *re;
102+
re = pcre_compile(NULL, 0, NULL, 0, NULL);
103+
if (re == NULL) return 1"
102104
. auto/feature
103105

104106
if [ $ngx_found = no ]; then

auto/os/freebsd

+8
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,11 @@ END
134134
exit 1
135135
fi
136136
fi
137+
138+
139+
# cpuset_setaffinity()
140+
141+
if [ $version -ge 701000 ]; then
142+
echo " + cpuset_setaffinity() found"
143+
have=NGX_HAVE_CPUSET_SETAFFINITY . auto/have
144+
fi

auto/os/linux

+5-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ngx_feature_run=yes
5252
ngx_feature_incs="#include <sys/epoll.h>"
5353
ngx_feature_path=
5454
ngx_feature_libs=
55-
ngx_feature_test="int efd = 0, fd = 1, n;
55+
ngx_feature_test="int efd = 0;
5656
struct epoll_event ee;
5757
ee.events = EPOLLIN|EPOLLOUT|EPOLLET;
5858
ee.data.ptr = NULL;
@@ -128,8 +128,9 @@ ngx_feature_run=no
128128
ngx_feature_incs="#include <sched.h>"
129129
ngx_feature_path=
130130
ngx_feature_libs=
131-
ngx_feature_test="long mask = 0;
132-
sched_setaffinity(0, 32, (cpu_set_t *) &mask)"
131+
ngx_feature_test="cpu_set_t mask;
132+
CPU_ZERO(&mask);
133+
sched_setaffinity(0, sizeof(cpu_set_t), &mask)"
133134
. auto/feature
134135

135136

@@ -142,7 +143,7 @@ ngx_feature_incs="#include <crypt.h>"
142143
ngx_feature_path=
143144
ngx_feature_libs=-lcrypt
144145
ngx_feature_test="struct crypt_data cd;
145-
crypt_r(NULL, NULL, &cd);"
146+
crypt_r(\"key\", \"salt\", &cd);"
146147
. auto/feature
147148

148149

auto/os/solaris

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ ngx_feature_path=
3535
ngx_feature_libs="-lsendfile"
3636
ngx_feature_test="int fd = 1; sendfilevec_t vec[1];
3737
size_t sent; ssize_t n;
38-
n = sendfilev(fd, vec, 1, &sent)"
38+
n = sendfilev(fd, vec, 1, &sent);
39+
if (n == -1) return 1"
3940
. auto/feature
4041

4142

auto/sources

+2
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \
145145
src/os/unix/ngx_channel.h \
146146
src/os/unix/ngx_shmem.h \
147147
src/os/unix/ngx_process.h \
148+
src/os/unix/ngx_setaffinity.h \
148149
src/os/unix/ngx_setproctitle.h \
149150
src/os/unix/ngx_atomic.h \
150151
src/os/unix/ngx_gcc_atomic_x86.h \
@@ -179,6 +180,7 @@ UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
179180
src/os/unix/ngx_shmem.c \
180181
src/os/unix/ngx_process.c \
181182
src/os/unix/ngx_daemon.c \
183+
src/os/unix/ngx_setaffinity.c \
182184
src/os/unix/ngx_setproctitle.c \
183185
src/os/unix/ngx_posix_init.c \
184186
src/os/unix/ngx_user.c \

auto/types/sizeof

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ cat << END > $NGX_AUTOTEST.c
2020
#include <sys/time.h>
2121
$NGX_INCLUDE_UNISTD_H
2222
#include <signal.h>
23+
#include <stdio.h>
2324
#include <sys/resource.h>
2425
$NGX_INCLUDE_INTTYPES_H
2526
$NGX_INCLUDE_AUTO_CONFIG_H
2627

2728
int main() {
28-
printf("%d", sizeof($ngx_type));
29+
printf("%d", (int) sizeof($ngx_type));
2930
return 0;
3031
}
3132

auto/types/typedef

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $NGX_INCLUDE_INTTYPES_H
2929

3030
int main() {
3131
$ngx_try i = 0;
32-
return 0;
32+
return (int) i;
3333
}
3434

3535
END

auto/types/uintptr_t

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55

66
echo $ngx_n "checking for uintptr_t ...$ngx_c"
7-
echo >> $NGX_ERR
8-
echo "checking for uintptr_t" >> $NGX_ERR
7+
echo >> $NGX_AUTOCONF_ERR
8+
echo "checking for uintptr_t" >> $NGX_AUTOCONF_ERR
99

1010
found=no
1111

@@ -16,12 +16,15 @@ $NGX_INTTYPES_H
1616

1717
int main() {
1818
uintptr_t i = 0;
19-
return 0;
19+
return (int) i;
2020
}
2121

2222
END
2323

24-
eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
24+
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
25+
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT"
26+
27+
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
2528

2629
if [ -x $NGX_AUTOTEST ]; then
2730
echo " uintptr_t found"

auto/unix

+54-21
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ ngx_feature_run=no
3333
ngx_feature_incs="#include <poll.h>"
3434
ngx_feature_path=
3535
ngx_feature_libs=
36-
ngx_feature_test="int n, dp; struct pollfd pl;
37-
dp = 0;
36+
ngx_feature_test="int n; struct pollfd pl;
3837
pl.fd = 0;
3938
pl.events = 0;
4039
pl.revents = 0;
41-
n = poll(&pl, 1, 0)"
40+
n = poll(&pl, 1, 0);
41+
if (n == -1) return 1"
4242
. auto/feature
4343

4444
if [ $ngx_found = no ]; then
@@ -57,7 +57,8 @@ ngx_feature_test="int n, dp; struct dvpoll dvp;
5757
dvp.dp_fds = NULL;
5858
dvp.dp_nfds = 0;
5959
dvp.dp_timeout = 0;
60-
n = ioctl(dp, DP_POLL, &dvp)"
60+
n = ioctl(dp, DP_POLL, &dvp);
61+
if (n == -1) return 1"
6162
. auto/feature
6263

6364
if [ $ngx_found = yes ]; then
@@ -237,7 +238,7 @@ ngx_feature_incs="$NGX_INCLUDE_SYS_PARAM_H
237238
ngx_feature_path=
238239
ngx_feature_libs=
239240
ngx_feature_test="struct statfs fs;
240-
statfs(NULL, &fs);"
241+
statfs(\".\", &fs);"
241242
. auto/feature
242243

243244

@@ -249,7 +250,7 @@ ngx_feature_incs="#include <sys/types.h>
249250
ngx_feature_path=
250251
ngx_feature_libs=
251252
ngx_feature_test="struct statvfs fs;
252-
statvfs(NULL, &fs);"
253+
statvfs(\".\", &fs);"
253254
. auto/feature
254255

255256

@@ -343,6 +344,24 @@ ngx_feature_test="setsockopt(0, IPPROTO_TCP, TCP_KEEPIDLE, NULL, 0);
343344
. auto/feature
344345

345346

347+
ngx_feature="TCP_INFO"
348+
ngx_feature_name="NGX_HAVE_TCP_INFO"
349+
ngx_feature_run=no
350+
ngx_feature_incs="#include <sys/socket.h>
351+
#include <netinet/in.h>
352+
#include <netinet/tcp.h>"
353+
ngx_feature_path=
354+
ngx_feature_libs=
355+
ngx_feature_test="socklen_t optlen = sizeof(struct tcp_info);
356+
struct tcp_info ti;
357+
ti.tcpi_rtt = 0;
358+
ti.tcpi_rttvar = 0;
359+
ti.tcpi_snd_cwnd = 0;
360+
ti.tcpi_rcv_space = 0;
361+
getsockopt(0, IPPROTO_TCP, TCP_INFO, &ti, &optlen)"
362+
. auto/feature
363+
364+
346365
ngx_feature="accept4()"
347366
ngx_feature_name="NGX_HAVE_ACCEPT4"
348367
ngx_feature_run=no
@@ -481,7 +500,7 @@ fi
481500
ngx_feature="setproctitle()"
482501
ngx_feature_name="NGX_HAVE_SETPROCTITLE"
483502
ngx_feature_run=no
484-
ngx_feature_incs=
503+
ngx_feature_incs="#include <stdlib.h>"
485504
ngx_feature_path=
486505
ngx_feature_libs=$NGX_SETPROCTITLE_LIB
487506
ngx_feature_test="setproctitle(\"test\");"
@@ -494,7 +513,8 @@ ngx_feature_run=no
494513
ngx_feature_incs=
495514
ngx_feature_path=
496515
ngx_feature_libs=
497-
ngx_feature_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0)"
516+
ngx_feature_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0);
517+
if (n == -1) return 1"
498518
. auto/feature
499519

500520

@@ -504,7 +524,8 @@ ngx_feature_run=no
504524
ngx_feature_incs=
505525
ngx_feature_path=
506526
ngx_feature_libs=
507-
ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0)"
527+
ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0);
528+
if (n == -1) return 1"
508529
. auto/feature
509530

510531

@@ -578,17 +599,20 @@ ngx_feature_run=no
578599
ngx_feature_incs="#include <stdlib.h>"
579600
ngx_feature_path=
580601
ngx_feature_libs=
581-
ngx_feature_test="void *p; int n; n = posix_memalign(&p, 4096, 4096)"
602+
ngx_feature_test="void *p; int n; n = posix_memalign(&p, 4096, 4096);
603+
if (n != 0) return 1"
582604
. auto/feature
583605

584606

585607
ngx_feature="memalign()"
586608
ngx_feature_name="NGX_HAVE_MEMALIGN"
587609
ngx_feature_run=no
588-
ngx_feature_incs="#include <stdlib.h>"
610+
ngx_feature_incs="#include <stdlib.h>
611+
#include <malloc.h>"
589612
ngx_feature_path=
590613
ngx_feature_libs=
591-
ngx_feature_test="void *p; p = memalign(4096, 4096)"
614+
ngx_feature_test="void *p; p = memalign(4096, 4096);
615+
if (p == NULL) return 1"
592616
. auto/feature
593617

594618

@@ -675,51 +699,60 @@ fi
675699
ngx_feature="struct msghdr.msg_control"
676700
ngx_feature_name="NGX_HAVE_MSGHDR_MSG_CONTROL"
677701
ngx_feature_run=no
678-
ngx_feature_incs="#include <sys/socket.h>"
702+
ngx_feature_incs="#include <sys/socket.h>
703+
#include <stdio.h>"
679704
ngx_feature_path=
680705
ngx_feature_libs=
681-
ngx_feature_test="struct msghdr msg; msg.msg_control = NULL"
706+
ngx_feature_test="struct msghdr msg;
707+
printf(\"%d\", (int) sizeof(msg.msg_control))"
682708
. auto/feature
683709

684710

685711
ngx_feature="ioctl(FIONBIO)"
686712
ngx_feature_name="NGX_HAVE_FIONBIO"
687713
ngx_feature_run=no
688714
ngx_feature_incs="#include <sys/ioctl.h>
715+
#include <stdio.h>
689716
$NGX_INCLUDE_SYS_FILIO_H"
690717
ngx_feature_path=
691718
ngx_feature_libs=
692-
ngx_feature_test="int i; i = FIONBIO"
719+
ngx_feature_test="int i = FIONBIO; printf(\"%d\", i)"
693720
. auto/feature
694721

695722

696723
ngx_feature="struct tm.tm_gmtoff"
697724
ngx_feature_name="NGX_HAVE_GMTOFF"
698725
ngx_feature_run=no
699-
ngx_feature_incs="#include <time.h>"
726+
ngx_feature_incs="#include <time.h>
727+
#include <stdio.h>"
700728
ngx_feature_path=
701729
ngx_feature_libs=
702-
ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0"
730+
ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0;
731+
printf(\"%d\", (int) tm.tm_gmtoff)"
703732
. auto/feature
704733

705734

706735
ngx_feature="struct dirent.d_namlen"
707736
ngx_feature_name="NGX_HAVE_D_NAMLEN"
708737
ngx_feature_run=no
709-
ngx_feature_incs="#include <dirent.h>"
738+
ngx_feature_incs="#include <dirent.h>
739+
#include <stdio.h>"
710740
ngx_feature_path=
711741
ngx_feature_libs=
712-
ngx_feature_test="struct dirent dir; dir.d_namlen = 0"
742+
ngx_feature_test="struct dirent dir; dir.d_namlen = 0;
743+
printf(\"%d\", (int) dir.d_namlen)"
713744
. auto/feature
714745

715746

716747
ngx_feature="struct dirent.d_type"
717748
ngx_feature_name="NGX_HAVE_D_TYPE"
718749
ngx_feature_run=no
719-
ngx_feature_incs="#include <dirent.h>"
750+
ngx_feature_incs="#include <dirent.h>
751+
#include <stdio.h>"
720752
ngx_feature_path=
721753
ngx_feature_libs=
722-
ngx_feature_test="struct dirent dir; dir.d_type = DT_REG"
754+
ngx_feature_test="struct dirent dir; dir.d_type = DT_REG;
755+
printf(\"%d\", (int) dir.d_type)"
723756
. auto/feature
724757

725758

0 commit comments

Comments
 (0)