mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-06 13:09:00 +08:00
71 lines
2.2 KiB
Diff
71 lines
2.2 KiB
Diff
From 823171a129401d226ac4821fb997ce585045170c Mon Sep 17 00:00:00 2001
|
|
From: Manuel Massing <m.massing@warped-space.de>
|
|
Date: Wed, 23 Nov 2016 23:50:12 +0100
|
|
Subject: [PATCH] Add support for MSVC1900 (backported from GDAL2)
|
|
|
|
---
|
|
nmake.opt | 6 ++++++
|
|
port/cpl_config.h.vc | 8 +++++---
|
|
2 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/nmake.opt b/nmake.opt
|
|
index 8900135..4d1c4fa 100644
|
|
--- a/nmake.opt
|
|
+++ b/nmake.opt
|
|
@@ -31,6 +31,7 @@
|
|
# Check version of Visual C++ compiler:
|
|
# nmake -f makefile.vc MSVC_VER=xxxx
|
|
# where xxxx is one of following:
|
|
+# 1900 = 14.0(2015)
|
|
# 1800 = 12.0(2013)
|
|
# 1700 = 11.0(2012)
|
|
# 1600 = 10.0(2010)
|
|
@@ -627,8 +628,13 @@ GDALLIB = $(GDAL_ROOT)/gdal.lib
|
|
!ENDIF
|
|
|
|
!IFDEF ODBC_SUPPORTED
|
|
+!IF $(MSVC_VER) >= 1900
|
|
+# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries
|
|
+ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib
|
|
+!ELSE
|
|
ODBCLIB = odbc32.lib odbccp32.lib user32.lib
|
|
!ENDIF
|
|
+!ENDIF
|
|
|
|
!IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) || DEFINED(MRSID_LIDAR_DIR)
|
|
!IF "$(MRSID_PLUGIN)" != "YES"
|
|
diff --git a/port/cpl_config.h.vc b/port/cpl_config.h.vc
|
|
index bfff8f6..fe7b82a 100644
|
|
--- a/port/cpl_config.h.vc
|
|
+++ b/port/cpl_config.h.vc
|
|
@@ -1,5 +1,5 @@
|
|
|
|
-/* We define this here in general so that a VC++ build will publically
|
|
+/* We define this here in general so that a VC++ build will publicly
|
|
declare STDCALL interfaces even if an application is built against it
|
|
using MinGW */
|
|
|
|
@@ -17,7 +17,9 @@
|
|
#if defined(_MSC_VER) && (_MSC_VER < 1500)
|
|
# define vsnprintf _vsnprintf
|
|
#endif
|
|
-#define snprintf _snprintf
|
|
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
|
+# define snprintf _snprintf
|
|
+#endif
|
|
|
|
#define HAVE_GETCWD 1
|
|
/* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */
|
|
@@ -86,7 +88,7 @@
|
|
/* Set the native cpu bit order */
|
|
#define HOST_FILLORDER FILLORDER_LSB2MSB
|
|
|
|
-/* Define as 0 or 1 according to the floating point format suported by the
|
|
+/* Define as 0 or 1 according to the floating point format supported by the
|
|
machine */
|
|
#define HAVE_IEEEFP 1
|
|
|
|
--
|
|
2.10.1.windows.1
|
|
|