From: James Turner Date: Wed, 1 Jun 2016 21:58:03 +0000 (+0100) Subject: VS2015 compatability fixes. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=24e6150d738b6d674d884e63e6b1cffda028b4b3;p=flightgear.git VS2015 compatability fixes. --- diff --git a/3rdparty/iaxclient/lib/libiax2/src/winpoop.h b/3rdparty/iaxclient/lib/libiax2/src/winpoop.h index 4e9d11208..03d80dde7 100644 --- a/3rdparty/iaxclient/lib/libiax2/src/winpoop.h +++ b/3rdparty/iaxclient/lib/libiax2/src/winpoop.h @@ -15,8 +15,12 @@ #if defined(_MSC_VER) #define INLINE __inline #define inline __inline + +#if _MSC_VER < 1900 #define snprintf _snprintf -// should try without these +#endif + + // should try without these #pragma warning(disable: 4996 4244 4305 4018 4804) #if defined(_WIN64) typedef __int64 ssize_t; diff --git a/CMakeLists.txt b/CMakeLists.txt index ab74f68d6..914133f16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,10 +360,15 @@ if(WIN32) # SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}") # endforeach(warning) - set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS -Dstrdup=_strdup") + set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS") if (${MSVC_VERSION} GREATER 1599) set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" ) endif (${MSVC_VERSION} GREATER 1599) + + if (${MSVC_VERSION} GREATER 1899) + # needed for debug builds with VS2015 + set( MSVC_FLAGS "${MSVC_FLAGS} /bigobj" ) + endif() endif(MSVC) set(NOMINMAX 1) diff --git a/utils/fgpanel/FGGLApplication.cxx b/utils/fgpanel/FGGLApplication.cxx index 2783737d9..30bbba2f7 100644 --- a/utils/fgpanel/FGGLApplication.cxx +++ b/utils/fgpanel/FGGLApplication.cxx @@ -25,8 +25,8 @@ #ifdef HAVE_WINDOWS_H #include -#define snprintf sprintf_s #endif + #if defined (SG_MAC) #include #include