Mercurial > hg > nginx-quic
annotate auto/cc/msvc @ 7168:46ebff8c6396
Inherit valid_unparsed_uri in cloned subrequests (ticket #1430).
Inheriting this flag will make the cloned subrequest behave consistently with
the parent. Specifically, the upstream HTTP request and cache key created by
the proxy module may depend directly on unparsed_uri if valid_unparsed_uri flag
is set. Previously, the flag was zero for cloned requests, which could make
background update proxy a request different than its parent and cache the result
with a different key. For example, if client URI contained the escaped slash
character %2F, it was used as is by the proxy module in the main request, but
was unescaped in the subrequests.
Similar problems exist in the slice module.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 20 Nov 2017 21:11:19 +0300 |
parents | b7b7f3a0cc28 |
children | 955c4b186354 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
6 # MSVC 6.0 SP2 cl 12.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
7 # MSVC Toolkit 2003 (7.1) cl 13.10 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
8 # MSVC 2005 Express Edition SP1 (8.0) cl 14.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
9 # MSVC 2008 Express Edition (9.0) cl 15.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
10 # MSVC 2010 (10.0) cl 16.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
11 # MSVC 2015 (14.0) cl 19.00 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
12 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
13 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
14 NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'Compiler Version' 2>&1 \ |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
15 | sed -e 's/^.* Version \(.*\)/\1/'` |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
16 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
17 echo " + cl version: $NGX_MSVC_VER" |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
18 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
19 have=NGX_COMPILER value="\"cl $NGX_MSVC_VER\"" . auto/define |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
20 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
21 |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
22 ngx_msvc_ver=`echo $NGX_MSVC_VER | sed -e 's/^\([0-9]*\).*/\1/'` |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
23 |
455 | 24 |
25 # optimizations | |
26 | |
509 | 27 # maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy |
455 | 28 CFLAGS="$CFLAGS -O2" |
509 | 29 |
455 | 30 # enable global optimization |
509 | 31 #CFLAGS="$CFLAGS -Og" |
455 | 32 # enable intrinsic functions |
509 | 33 #CFLAGS="$CFLAGS -Oi" |
34 | |
35 # disable inline expansion | |
36 #CFLAGS="$CFLAGS -Ob0" | |
37 # explicit inline expansion | |
38 #CFLAGS="$CFLAGS -Ob1" | |
39 # explicit and implicit inline expansion | |
40 #CFLAGS="$CFLAGS -Ob2" | |
41 | |
455 | 42 # enable frame pointer omission |
509 | 43 #CFLAGS="$CFLAGS -Oy" |
455 | 44 # disable stack checking calls |
509 | 45 #CFLAGS="$CFLAGS -Gs" |
46 | |
47 # pools strings as read/write | |
48 #CFLAGS="$CFLAGS -Gf" | |
49 # pools strings as read-only | |
50 #CFLAGS="$CFLAGS -GF" | |
51 | |
455 | 52 |
53 case $CPU in | |
54 pentium) | |
55 # optimize for Pentium and Athlon | |
56 CPU_OPT="-G5" | |
57 ;; | |
58 | |
59 pentiumpro) | |
60 # optimize for Pentium Pro, Pentium II and Pentium III | |
61 CPU_OPT="-G6" | |
62 ;; | |
63 | |
64 pentium4) | |
461 | 65 # optimize for Pentium 4, MSVC 7 |
66 CPU_OPT="-G7" | |
455 | 67 ;; |
68 esac | |
69 | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
2630
diff
changeset
|
70 # __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm |
583 | 71 #CPU_OPT="$CPU_OPT -Gd" |
503 | 72 # __stdcall |
73 #CPU_OPT="$CPU_OPT -Gz" | |
74 # __fastcall | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
2630
diff
changeset
|
75 #CPU_OPT="$CPU_OPT -Gr" |
503 | 76 |
77 | |
455 | 78 CFLAGS="$CFLAGS $CPU_OPT" |
79 | |
80 | |
81 # warnings | |
82 | |
83 CFLAGS="$CFLAGS -W4" | |
84 | |
85 # stop on warning | |
86 CFLAGS="$CFLAGS -WX" | |
87 | |
461 | 88 # disable logo |
89 CFLAGS="$CFLAGS -nologo" | |
90 | |
91 # the link flags | |
92 CORE_LINK="$CORE_LINK -link -verbose:lib" | |
93 | |
2630 | 94 # link with libcmt.lib, multithreaded |
95 LIBC="-MT" | |
96 # link with msvcrt.dll | |
97 # however, MSVC Toolkit 2003 has no MSVCRT.LIB | |
98 #LIBC="-MD" | |
455 | 99 |
100 CFLAGS="$CFLAGS $LIBC" | |
101 | |
2725 | 102 CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib" |
103 | |
461 | 104 # Win32 GUI mode application |
2725 | 105 #CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup" |
455 | 106 |
107 # debug | |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
108 # msvc under Wine issues |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
109 # C1902: Program database manager mismatch; please check your installation |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
110 if [ -z "$NGX_WINE" ]; then |
1639
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
111 CFLAGS="$CFLAGS -Zi" |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
112 CORE_LINK="$CORE_LINK -debug" |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
113 fi |
455 | 114 |
461 | 115 |
2723
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
116 # MSVC 2005 supports C99 variadic macros |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
117 if [ "$ngx_msvc_ver" -ge 14 ]; then |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
118 have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have |
2723
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
119 fi |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
120 |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
121 |
455 | 122 # precompiled headers |
1636
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
123 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch" |
5639
ce98b460606e
Win32: fixed link flags with MSVC, broken by bfe536716dbf.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5577
diff
changeset
|
124 CORE_LINK="$CORE_LINK $NGX_OBJS/ngx_pch.obj" |
1636
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
125 NGX_PCH="$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
126 NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
127 NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
461 | 128 |
129 | |
130 # the resource file | |
469 | 131 NGX_RES="$NGX_OBJS/nginx.res" |
461 | 132 NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC" |
133 CORE_LINK="$NGX_RES $CORE_LINK" | |
134 | |
455 | 135 |
6383 | 136 # dynamic modules |
137 #MAIN_LINK="-link -def:$NGX_OBJS/nginx.def" | |
138 #MODULE_LINK="-LD $NGX_OBJS/nginx.lib" | |
139 | |
140 | |
141 ngx_pic_opt= | |
455 | 142 ngx_objout="-Fo" |
143 ngx_binout="-Fe" | |
144 ngx_objext="obj" | |
145 | |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
146 ngx_long_start='@<< |
2896 | 147 ' |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
148 ngx_long_end='<<' |
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
149 ngx_long_regex_cont=' \ |
633 | 150 ' |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
151 ngx_long_cont=' |
573 | 152 ' |
633 | 153 |
631 | 154 # MSVC understand / in path |
455 | 155 #ngx_regex_dirsep='\\' |
156 #ngx_dirsep="\\" |