annotate auto/cc/conf @ 7690:8253424d1aff

Added size check to ngx_http_alloc_large_header_buffer(). This ensures that copying won't write more than the buffer size even if the buffer comes from hc->free and it is smaller than the large client header buffer size in the virtual host configuration. This might happen if size of large client header buffers is different in name-based virtual hosts, similarly to the problem with number of buffers fixed in 6926:e662cbf1b932.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 06 Aug 2020 05:02:22 +0300
parents 4925a6d13746
children 9bcc5cc94ff4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 3673
diff changeset
3 # Copyright (C) Nginx, Inc.
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
487
31ff3e943e16 nginx-0.1.18-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 469
diff changeset
6 LINK="\$(CC)"
31ff3e943e16 nginx-0.1.18-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 469
diff changeset
7
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
8 MAIN_LINK=
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
9 MODULE_LINK="-shared"
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
10
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 ngx_include_opt="-I "
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
12 ngx_compile_opt="-c"
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
13 ngx_pic_opt="-fPIC"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14 ngx_objout="-o "
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
15 ngx_binout="-o "
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
16 ngx_objext="o"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
17 ngx_binext=
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
18 ngx_modext=".so"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
19
573
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 561
diff changeset
20 ngx_long_start=
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 561
diff changeset
21 ngx_long_end=
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 561
diff changeset
22
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
23 ngx_regex_dirsep="\/"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
24 ngx_dirsep='/'
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
26 ngx_regex_cont=' \\\
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
27 '
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
28 ngx_cont=' \
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
29 '
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30 ngx_tab=' \
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
31 '
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
32 ngx_spacer=
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
33
573
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 561
diff changeset
34 ngx_long_regex_cont=$ngx_regex_cont
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 561
diff changeset
35 ngx_long_cont=$ngx_cont
58475592100c nginx-0.3.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 561
diff changeset
36
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
37 . auto/cc/name
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
38
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39 if test -n "$CFLAGS"; then
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
41 CC_TEST_FLAGS="$CFLAGS $NGX_CC_OPT"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
43 case $NGX_CC_NAME in
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
45 ccc)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
46 # Compaq C V6.5-207
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
47
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
48 ngx_include_opt="-I"
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
49 ;;
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
50
5366
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
51 sunc)
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
52
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
53 MAIN_LINK=
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
54 MODULE_LINK="-G"
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
55
5366
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
56 case "$NGX_MACHINE" in
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
57
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
58 i86pc)
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
59 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
60 ;;
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
61
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
62 sun4u | sun4v)
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
63 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
64 ;;
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
65
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
66 esac
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
67
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
68 case $CPU in
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
69
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
70 amd64)
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
71 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
72 ;;
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
73
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
74 esac
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
75 ;;
945aa9c7f282 Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents: 4762
diff changeset
76
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
77 esac
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
78
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
79 else
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
80
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
81 case $NGX_CC_NAME in
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
82 gcc)
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
83 # gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
84 # 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
561
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
85 # 4.0.0, 4.0.1, 4.1.0
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
86
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
87 . auto/cc/gcc
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
88 ;;
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
89
4762
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
90 clang)
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
91 # Clang C compiler
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
92
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
93 . auto/cc/clang
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
94 ;;
182aee3b1bf5 Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
95
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
96 icc)
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
97 # Intel C++ compiler 7.1, 8.0, 8.1
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
98
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
99 . auto/cc/icc
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
100 ;;
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
101
561
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
102 sunc)
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
103 # Sun C 5.7 Patch 117837-04 2005/05/11
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
104
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
105 . auto/cc/sunc
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
106 ;;
e48ebafc6939 nginx-0.3.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 517
diff changeset
107
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
108 ccc)
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
109 # Compaq C V6.5-207
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
110
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
111 . auto/cc/ccc
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
112 ;;
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
113
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
114 acc)
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
115 # aCC: HP ANSI C++ B3910B A.03.55.02
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
116
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
117 . auto/cc/acc
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
118 ;;
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
119
461
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
120 msvc*)
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
121 # MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
122
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
123 . auto/cc/msvc
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
124 ;;
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
125
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
126 owc)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
127 # Open Watcom C 1.0, 1.2
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
128
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
129 . auto/cc/owc
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
130 ;;
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
131
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
132 bcc)
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
133 # Borland C++ 5.5
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
134
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
135 . auto/cc/bcc
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
136 ;;
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
137
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
138 esac
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
139
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
140 CC_TEST_FLAGS="$CC_TEST_FLAGS $NGX_CC_OPT"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
141
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
142 fi
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
143
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
144 CFLAGS="$CFLAGS $NGX_CC_OPT"
3367
568a854383f9 test invalid --with-ld-opt in right place
Igor Sysoev <igor@sysoev.ru>
parents: 3366
diff changeset
145 NGX_TEST_LD_OPT="$NGX_LD_OPT"
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
146
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 467
diff changeset
147 if [ "$NGX_PLATFORM" != win32 ]; then
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
148
461
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
149 if test -n "$NGX_LD_OPT"; then
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
150 ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\"
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 467
diff changeset
151 ngx_feature_name=
461
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
152 ngx_feature_run=no
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
153 ngx_feature_incs=
875
7af8276b1c2f test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
154 ngx_feature_path=
461
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
155 ngx_feature_libs=
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
156 ngx_feature_test=
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
157 . auto/feature
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
158
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
159 if [ $ngx_found = no ]; then
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
160 echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\"
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
161 echo
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
162 exit 1
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
163 fi
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
164 fi
a88a3e4e158f nginx-0.1.5-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 455
diff changeset
165
3362
b57a4a704f3c GCC 4.1 builtin atomic operations
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
166
6383
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
167 ngx_feature="-Wl,-E switch"
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
168 ngx_feature_name=
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
169 ngx_feature_run=no
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
170 ngx_feature_incs=
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
171 ngx_feature_path=
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
172 ngx_feature_libs=-Wl,-E
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
173 ngx_feature_test=
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
174 . auto/feature
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
175
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
176 if [ $ngx_found = yes ]; then
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
177 MAIN_LINK="-Wl,-E"
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
178 fi
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
179
85dea406e18f Dynamic modules.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5366
diff changeset
180
6999
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
181 if [ "$NGX_CC_NAME" = "sunc" ]; then
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
182 echo "checking for gcc builtin atomic operations ... disabled"
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
183 else
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
184 ngx_feature="gcc builtin atomic operations"
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
185 ngx_feature_name=NGX_HAVE_GCC_ATOMIC
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
186 ngx_feature_run=yes
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
187 ngx_feature_incs=
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
188 ngx_feature_path=
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
189 ngx_feature_libs=
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
190 ngx_feature_test="long n = 0;
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
191 if (!__sync_bool_compare_and_swap(&n, 0, 1))
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
192 return 1;
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
193 if (__sync_fetch_and_add(&n, 1) != 1)
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
194 return 1;
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
195 if (n != 2)
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
196 return 1;
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
197 __sync_synchronize();"
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
198 . auto/feature
4925a6d13746 Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents: 6998
diff changeset
199 fi
3362
b57a4a704f3c GCC 4.1 builtin atomic operations
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
200
b57a4a704f3c GCC 4.1 builtin atomic operations
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
201
517
dadfa78d2270 nginx-0.1.33-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 515
diff changeset
202 if [ "$NGX_CC_NAME" = "ccc" ]; then
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
203 echo "checking for C99 variadic macros ... disabled"
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
204 else
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
205 ngx_feature="C99 variadic macros"
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
206 ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
207 ngx_feature_run=yes
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
208 ngx_feature_incs="#include <stdio.h>
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
209 #define var(dummy, ...) sprintf(__VA_ARGS__)"
875
7af8276b1c2f test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
210 ngx_feature_path=
515
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
211 ngx_feature_libs=
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
212 ngx_feature_test="char buf[30]; buf[0] = '0';
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
213 var(0, buf, \"%d\", 1);
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
214 if (buf[0] != '1') return 1"
417a087c9c4d nginx-0.1.32-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 487
diff changeset
215 . auto/feature
6998
775f621eacae Configure: style.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6621
diff changeset
216 fi
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
217
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
218
3673
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
219 ngx_feature="gcc variadic macros"
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
220 ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
221 ngx_feature_run=yes
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
222 ngx_feature_incs="#include <stdio.h>
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
223 #define var(dummy, args...) sprintf(args)"
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
224 ngx_feature_path=
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
225 ngx_feature_libs=
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
226 ngx_feature_test="char buf[30]; buf[0] = '0';
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
227 var(0, buf, \"%d\", 1);
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
228 if (buf[0] != '1') return 1"
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
229 . auto/feature
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
230
e27070fb6c6b try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents: 3367
diff changeset
231
6395
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
232 ngx_feature="gcc builtin 64 bit byteswap"
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
233 ngx_feature_name="NGX_HAVE_GCC_BSWAP64"
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
234 ngx_feature_run=no
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
235 ngx_feature_incs=
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
236 ngx_feature_path=
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
237 ngx_feature_libs=
6621
0c3e464682e2 Configure: fix build with -Werror=unused-value.
Piotr Sikora <piotrsikora@google.com>
parents: 6395
diff changeset
238 ngx_feature_test="if (__builtin_bswap64(0)) return 1"
6395
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
239 . auto/feature
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
240
ba3c2ca21aa5 HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents: 6383
diff changeset
241
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
242 # ngx_feature="inline"
469
2ff194b74f1e nginx-0.1.9-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 467
diff changeset
243 # ngx_feature_name=
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
244 # ngx_feature_run=no
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
245 # ngx_feature_incs="int inline f(void) { return 1 }"
875
7af8276b1c2f test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents: 573
diff changeset
246 # ngx_feature_path=
467
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
247 # ngx_feature_libs=
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
248 # ngx_feature_test=
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
249 # . auto/feature
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
250 #
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
251 # if [ $ngx_found = yes ]; then
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
252 # fi
bbd6b0b4a2b1 nginx-0.1.8-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 461
diff changeset
253
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
254 fi