correct conditional define of FLUID_[V]SNPRINTF

fixes build
This commit is contained in:
derselbst 2017-10-15 20:06:44 +02:00
parent a89c7c5183
commit 458cb94b93
2 changed files with 15 additions and 10 deletions

View file

@ -5,15 +5,8 @@
#define DSOUND_SUPPORT 1
#define WINMIDI_SUPPORT 1
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#define strcasecmp _stricmp
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

View file

@ -122,8 +122,6 @@
#ifdef MINGW32
#include <stdint.h>
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define DSOUND_SUPPORT 1
#define WINMIDI_SUPPORT 1
@ -242,9 +240,23 @@ typedef FILE* fluid_file;
#define FLUID_STRDUP(s) FLUID_STRCPY(FLUID_MALLOC(FLUID_STRLEN(s) + 1), s)
#endif
#define FLUID_SPRINTF sprintf
#define FLUID_SNPRINTF snprintf
#define FLUID_FPRINTF fprintf
#if (defined(WIN32) && _MSC_VER < 1900) || defined(MINGW32)
#define FLUID_SNPRINTF _snprintf
#else
#define FLUID_SNPRINTF snprintf
#endif
#if (defined(WIN32) && _MSC_VER < 1500) || defined(MINGW32)
#define FLUID_VSNPRINTF _vsnprintf
#else
#define FLUID_VSNPRINTF vsnprintf
#endif
#define fluid_clip(_val, _min, _max) \
{ (_val) = ((_val) < (_min))? (_min) : (((_val) > (_max))? (_max) : (_val)); }