diff --git a/CHANGES b/CHANGES index 778795c120..8ae257e9c2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3987. [func] Handle future Visual Studio 14 incompatible changes. + [RT #37380] + 3986. [doc] Add the BIND version number to page footers in the ARM. [RT #37398] diff --git a/config.h.win32 b/config.h.win32 index 643b7f98c8..1d2c98127d 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -185,7 +185,9 @@ char *getpassphrase(const char *); * WIN32 specials until some other way of dealing with these is decided. */ +#if _MSC_VER < 1900 #define snprintf _snprintf +#endif #if _MSC_VER <= 1400 #define vsnprintf _vsnprintf #endif diff --git a/lib/dns/gen.c b/lib/dns/gen.c index ff41de6d62..7a7dafb461 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -23,10 +23,12 @@ */ #define _CRT_SECURE_NO_DEPRECATE 1 /* - * We use snprintf. + * We use snprintf which was defined late in Windows even it is in C99. */ +#if _MSC_VER < 1900 #define snprintf _snprintf #endif +#endif #include diff --git a/lib/isc/win32/win32os.c b/lib/isc/win32/win32os.c index 035ac4a97b..65cf5be04f 100644 --- a/lib/isc/win32/win32os.c +++ b/lib/isc/win32/win32os.c @@ -33,6 +33,7 @@ initialize_action(void) { /* * NOTE: VC++ 6.0 gets this function declaration wrong * so we compensate by casting the argument + * NOTE: GetVersionEx() deprecated in Windows 8.1 */ osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); bSuccess = GetVersionEx((OSVERSIONINFO *) &osVer); diff --git a/lib/lwres/compat.c b/lib/lwres/compat.c index b8ae31f196..3b7a07048e 100644 --- a/lib/lwres/compat.c +++ b/lib/lwres/compat.c @@ -123,6 +123,7 @@ lwres_strtoul(const char *nptr, char **endptr, int base) { acc = ULONG_MAX; errno = ERANGE; } else if (neg) + /* XXX: acc was declared unsigned! */ acc = -acc; if (endptr != 0) DE_CONST(any ? s - 1 : nptr, *endptr); diff --git a/win32utils/Configure b/win32utils/Configure index 3aac50c518..b059146c05 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -2940,6 +2940,7 @@ exit 0; # --with-dlz-* ? # # Notes: MSVC versions +# MSVC 14.0 _MSC_VER == 1900 (VS 14 (2014)) # MSVC 12.0 _MSC_VER == 1800 (VS 2013) # MSVC 11.0 _MSC_VER == 1700 (VS 2012) # MSVC 10.0 _MSC_VER == 1600 (VS 2010)