summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-12-31 20:54:51 +0100
committerBram Moolenaar <Bram@vim.org>2015-12-31 20:54:51 +0100
commit2bf2417612879de627dcea1dbb22ee2199b16963 (patch)
treedbaace8d9816195b2e4417dcce10517adcde31df
parent2d820808cda15b3ad9fe674393d1f1e997453d9e (diff)
patch 7.4.1011v7.4.1011
Problem: Can't build with Strawberry Perl. Solution: Include stdbool.h. (Ken Takata, closes #328)
-rw-r--r--Filelist1
-rw-r--r--src/Make_mvc.mak5
-rw-r--r--src/if_perl_msvc/stdbool.h3
-rw-r--r--src/version.c2
4 files changed, 11 insertions, 0 deletions
diff --git a/Filelist b/Filelist
index e653fa130b..6170610b6b 100644
--- a/Filelist
+++ b/Filelist
@@ -315,6 +315,7 @@ SRC_DOS = \
src/if_ole.cpp \
src/if_ole.h \
src/if_ole.idl \
+ src/if_perl_msvc/stdbool.h \
src/iid_ole.c \
src/os_dos.h \
src/os_msdos.c \
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index 5583ef2d96..c5c0a1220a 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -826,6 +826,11 @@ CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
PERL_INC = /I $(PERL_INCDIR)
+!if $(MSVC_MAJOR) <= 11
+# ActivePerl 5.20+ requires stdbool.h but VC2012 or earlier doesn't have it.
+# Use a stub stdbool.h.
+PERL_INC = $(PERL_INC) /I if_perl_msvc
+!endif
PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
!if exist($(XSUBPP))
diff --git a/src/if_perl_msvc/stdbool.h b/src/if_perl_msvc/stdbool.h
new file mode 100644
index 0000000000..de89e3b05e
--- /dev/null
+++ b/src/if_perl_msvc/stdbool.h
@@ -0,0 +1,3 @@
+/* A stub stdbool.h for VC2012 or earlier.
+ * ActivePerl 5.20+ requires stdbool.h but VC2012 doesn't have it. */
+#define bool char
diff --git a/src/version.c b/src/version.c
index 59f9bc075e..4023711279 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1011,
+/**/
1010,
/**/
1009,