Create and apply VS2015 compatibility patch

This commit is contained in:
Leland Lucius 2019-12-15 02:48:30 -06:00
parent 99010038a5
commit f96196dfdc
3 changed files with 28 additions and 2 deletions

View File

@ -441,7 +441,7 @@ static void PaJack_WaitForStreamDataToBecomeAvailable( PaJackStream *stream )
#endif
}
#if defined(WIN32)
#if defined(WIN32) && _MSC_VER < 1900
#define snprintf _snprintf
#endif

View File

@ -101,7 +101,7 @@ of a device for the duration of active stream using those devices
#include <math.h>
#ifdef _MSC_VER
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif

View File

@ -0,0 +1,26 @@
diff --git a/lib-src/portaudio-v19/src/hostapi/jack/pa_jack.c b/lib-src/portaudio-v19/src/hostapi/jack/pa_jack.c
index 887128c3b..787d81ddb 100644
--- a/lib-src/portaudio-v19/src/hostapi/jack/pa_jack.c
+++ b/lib-src/portaudio-v19/src/hostapi/jack/pa_jack.c
@@ -441,7 +441,7 @@ static void PaJack_WaitForStreamDataToBecomeAvailable( PaJackStream *stream )
#endif
}
-#if defined(WIN32)
+#if defined(WIN32) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
diff --git a/lib-src/portaudio-v19/src/hostapi/wdmks/pa_win_wdmks.c b/lib-src/portaudio-v19/src/hostapi/wdmks/pa_win_wdmks.c
index 70a48d8ff..d413391a2 100644
--- a/lib-src/portaudio-v19/src/hostapi/wdmks/pa_win_wdmks.c
+++ b/lib-src/portaudio-v19/src/hostapi/wdmks/pa_win_wdmks.c
@@ -101,7 +101,7 @@ of a device for the duration of active stream using those devices
#include <math.h>
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif