Mercurial > hg > nginx
annotate auto/cc/msvc @ 4192:61e4af19df9f
Autoindex: escape '?' in file names.
For files with '?' in their names autoindex generated links with '?' not
escaped. This resulted in effectively truncated links as '?' indicates
query string start.
This is an updated version of the patch originally posted at [1]. It
introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but
unreserved characters as per RFC 3986. This approach also renders unneeded
special colon processing (as colon is percent-encoded now), it's dropped
accordingly.
[1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html
Reported by Konstantin Leonov.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 11 Oct 2011 17:56:51 +0000 |
parents | 22719ff8986f |
children | d620f497c50f |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
2630 | 5 # MSVC 6.0 SP2 |
6 # MSVC Toolkit 2003 (7.1) | |
7 # MSVC 2005 Express Edition SP1 (8.0) | |
455 | 8 |
9 # optimizations | |
10 | |
509 | 11 # maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy |
455 | 12 CFLAGS="$CFLAGS -O2" |
509 | 13 |
455 | 14 # enable global optimization |
509 | 15 #CFLAGS="$CFLAGS -Og" |
455 | 16 # enable intrinsic functions |
509 | 17 #CFLAGS="$CFLAGS -Oi" |
18 | |
19 # disable inline expansion | |
20 #CFLAGS="$CFLAGS -Ob0" | |
21 # explicit inline expansion | |
22 #CFLAGS="$CFLAGS -Ob1" | |
23 # explicit and implicit inline expansion | |
24 #CFLAGS="$CFLAGS -Ob2" | |
25 | |
455 | 26 # enable frame pointer omission |
509 | 27 #CFLAGS="$CFLAGS -Oy" |
455 | 28 # disable stack checking calls |
509 | 29 #CFLAGS="$CFLAGS -Gs" |
30 | |
31 # pools strings as read/write | |
32 #CFLAGS="$CFLAGS -Gf" | |
33 # pools strings as read-only | |
34 #CFLAGS="$CFLAGS -GF" | |
35 | |
455 | 36 |
37 case $CPU in | |
38 pentium) | |
39 # optimize for Pentium and Athlon | |
40 CPU_OPT="-G5" | |
41 ;; | |
42 | |
43 pentiumpro) | |
44 # optimize for Pentium Pro, Pentium II and Pentium III | |
45 CPU_OPT="-G6" | |
46 ;; | |
47 | |
48 pentium4) | |
461 | 49 # optimize for Pentium 4, MSVC 7 |
50 CPU_OPT="-G7" | |
455 | 51 ;; |
52 esac | |
53 | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
2630
diff
changeset
|
54 # __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm |
583 | 55 #CPU_OPT="$CPU_OPT -Gd" |
503 | 56 # __stdcall |
57 #CPU_OPT="$CPU_OPT -Gz" | |
58 # __fastcall | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
2630
diff
changeset
|
59 #CPU_OPT="$CPU_OPT -Gr" |
503 | 60 |
61 | |
455 | 62 CFLAGS="$CFLAGS $CPU_OPT" |
63 | |
64 | |
65 # warnings | |
66 | |
67 CFLAGS="$CFLAGS -W4" | |
68 | |
69 # stop on warning | |
70 CFLAGS="$CFLAGS -WX" | |
71 | |
461 | 72 # disable logo |
73 CFLAGS="$CFLAGS -nologo" | |
74 | |
75 | |
76 LINK="\$(CC)" | |
77 | |
78 # the link flags | |
79 CORE_LINK="$CORE_LINK -link -verbose:lib" | |
80 | |
2630 | 81 # link with libcmt.lib, multithreaded |
82 LIBC="-MT" | |
83 # link with msvcrt.dll | |
84 # however, MSVC Toolkit 2003 has no MSVCRT.LIB | |
85 #LIBC="-MD" | |
455 | 86 |
87 CFLAGS="$CFLAGS $LIBC" | |
88 | |
2725 | 89 CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib" |
90 | |
461 | 91 # Win32 GUI mode application |
2725 | 92 #CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup" |
455 | 93 |
94 # debug | |
2725 | 95 # msvc8 under Wine issues |
96 # Program database manager mismatch; please check your installation | |
1639
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
97 if [ $NGX_CC_NAME != msvc8 ]; then |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
98 CFLAGS="$CFLAGS -Zi" |
7d125a707158
msvc8 compatibility: it can not build with debug under Wine
Igor Sysoev <igor@sysoev.ru>
parents:
1638
diff
changeset
|
99 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
|
100 fi |
455 | 101 |
461 | 102 |
2723
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
103 # MSVC 2005 supports C99 variadic macros |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
104 if [ $NGX_CC_NAME = msvc8 ]; then |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
105 have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
106 fi |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
107 |
53be1d485af9
add variadic macros support for msvc8
Igor Sysoev <igor@sysoev.ru>
parents:
2712
diff
changeset
|
108 |
455 | 109 # precompiled headers |
1636
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
110 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
111 NGX_PCH="$NGX_OBJS/ngx_config.pch" |
f2cf053d14fb
enable precompiled headers for msvc7,
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
112 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
|
113 NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch" |
461 | 114 |
115 | |
116 # the resource file | |
469 | 117 NGX_RES="$NGX_OBJS/nginx.res" |
461 | 118 NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC" |
119 CORE_LINK="$NGX_RES $CORE_LINK" | |
120 | |
455 | 121 |
122 ngx_objout="-Fo" | |
123 ngx_binout="-Fe" | |
124 ngx_objext="obj" | |
125 ngx_binext=".exe" | |
126 | |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
127 ngx_long_start='@<< |
2896 | 128 ' |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
129 ngx_long_end='<<' |
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
130 ngx_long_regex_cont=' \ |
633 | 131 ' |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
132 ngx_long_cont=' |
573 | 133 ' |
633 | 134 |
631 | 135 # MSVC understand / in path |
455 | 136 #ngx_regex_dirsep='\\' |
137 #ngx_dirsep="\\" |