Skip to content

Commit 3fb377f

Browse files
committed
patch 8.2.0249: MS-Windows: various warnings
Problem: MS-Windows: various warnings. Solution: Set the charset to utf-8. Add _WIN32_WINNT and _USING_V110_SDK71_. (Ken Takata, closes #5625)
1 parent 2f18975 commit 3fb377f

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/GvimExt/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ TARGETOS = WINNT
1010
!ifndef APPVER
1111
APPVER = 5.01
1212
!endif
13+
!ifndef WINVER
14+
WINVER = 0x0501
15+
!endif
1316

1417
!if "$(DEBUG)" != "yes"
1518
NODEBUG = 1
@@ -53,6 +56,13 @@ olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib
5356
# include CPUARG
5457
cflags = $(cflags) $(CPUARG)
5558

59+
# set WINVER and _WIN32_WINNT
60+
cflags = $(cflags) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
61+
62+
!if "$(CL)" == "/D_USING_V110_SDK71_"
63+
rcflags = $(rcflags) /D_USING_V110_SDK71_
64+
!endif
65+
5666
SUBSYSTEM = console
5767
!if "$(SUBSYSTEM_VER)" != ""
5868
SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)

src/Make_mvc.mak

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,12 @@ NODEFAULTLIB =
626626
NODEFAULTLIB = /nodefaultlib
627627
!endif
628628

629+
# Specify source code charset to suppress warning C4819 on non-English
630+
# environment. Only available from MSVC 14.
631+
!if $(MSVC_MAJOR) >= 14
632+
CFLAGS = $(CFLAGS) /source-charset:utf-8
633+
!endif
634+
629635
# Use multiprocess build on MSVC 10
630636
!if ("$(USE_MP)" == "yes") && ($(MSVC_MAJOR) >= 10)
631637
CFLAGS = $(CFLAGS) /MP
@@ -669,6 +675,9 @@ CFLAGS = $(CFLAGS) $(WP64CHECK)
669675

670676
CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
671677
RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
678+
! if "$(CL)" == "/D_USING_V110_SDK71_"
679+
RCFLAGS = $(RCFLAGS) /D_USING_V110_SDK71_
680+
! endif
672681
! ifdef USE_MSVCRT
673682
CFLAGS = $(CFLAGS) /MD
674683
LIBC = msvcrt.lib

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ static char *(features[]) =
742742

743743
static int included_patches[] =
744744
{ /* Add new patch number below this line */
745+
/**/
746+
249,
745747
/**/
746748
248,
747749
/**/

0 commit comments

Comments
 (0)