]> granicus.if.org Git - vim/commitdiff
patch 8.2.0249: MS-Windows: various warnings v8.2.0249
authorBram Moolenaar <Bram@vim.org>
Wed, 12 Feb 2020 20:52:32 +0000 (21:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 12 Feb 2020 20:52:32 +0000 (21:52 +0100)
Problem:    MS-Windows: various warnings.
Solution:   Set the charset to utf-8. Add _WIN32_WINNT and _USING_V110_SDK71_.
            (Ken Takata, closes #5625)

src/GvimExt/Makefile
src/Make_mvc.mak
src/version.c

index 975ba1170525e54c597cdf7002887f84b89c81c1..4b83f52dd5e4e7c9967166eeb663ffee9e6ed4ea 100644 (file)
@@ -10,6 +10,9 @@ TARGETOS = WINNT
 !ifndef APPVER
 APPVER = 5.01
 !endif
+!ifndef WINVER
+WINVER = 0x0501
+!endif
 
 !if "$(DEBUG)" != "yes"
 NODEBUG = 1
@@ -53,6 +56,13 @@ olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib
 # include CPUARG
 cflags = $(cflags) $(CPUARG)
 
+# set WINVER and _WIN32_WINNT
+cflags = $(cflags) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
+
+!if "$(CL)" == "/D_USING_V110_SDK71_"
+rcflags = $(rcflags) /D_USING_V110_SDK71_
+!endif
+
 SUBSYSTEM = console
 !if "$(SUBSYSTEM_VER)" != ""
 SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
index b95e936f068f85e60f2d717b444036ba45486211..da9a911d0ada31a2f8ab97ab52ea6970ce32855b 100644 (file)
@@ -626,6 +626,12 @@ NODEFAULTLIB =
 NODEFAULTLIB = /nodefaultlib
 !endif
 
+# Specify source code charset to suppress warning C4819 on non-English
+# environment. Only available from MSVC 14.
+!if $(MSVC_MAJOR) >= 14
+CFLAGS = $(CFLAGS) /source-charset:utf-8
+!endif
+
 # Use multiprocess build on MSVC 10
 !if ("$(USE_MP)" == "yes") && ($(MSVC_MAJOR) >= 10)
 CFLAGS = $(CFLAGS) /MP
@@ -669,6 +675,9 @@ CFLAGS = $(CFLAGS) $(WP64CHECK)
 
 CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
 RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
+! if "$(CL)" == "/D_USING_V110_SDK71_"
+RCFLAGS = $(RCFLAGS) /D_USING_V110_SDK71_
+! endif
 ! ifdef USE_MSVCRT
 CFLAGS = $(CFLAGS) /MD
 LIBC = msvcrt.lib
index ba79618268bbeedc5788c79feff196c92660ff95..7c31c195da5db0a3d0d2a17c1c63eab4ec725eeb 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    249,
 /**/
     248,
 /**/