From 25ce6c5132d52def02653b08de65447b38d26419 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Mon, 14 May 2018 03:44:25 +0300 Subject: Attempt to fix the build on MinGW without C++11 --- src/adlmidi_private.hpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src/adlmidi_private.hpp') diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 9fd6f97..d66daf4 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -88,17 +88,13 @@ typedef int32_t ssize_t; #include #include #include -#if !(defined(__APPLE__) && defined(__GLIBCXX__)) && !defined(__ANDROID__) -#include //PRId32, PRIu32, etc. -#else -#include -#endif #include // vector #include // deque #include // exp, log, ceil #if defined(__WATCOMC__) #include // round, sqrt #endif +#include #include #include #include // numeric_limit @@ -110,6 +106,28 @@ typedef int32_t ssize_t; #include #include +/* + * Workaround for some compilers are has no those macros in their headers! + */ +#ifndef INT8_MIN +#define INT8_MIN (-0x7f - 1) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-0x7fff - 1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-0x7fffffff - 1) +#endif +#ifndef INT8_MAX +#define INT8_MAX 0x7f +#endif +#ifndef INT16_MAX +#define INT16_MAX 0x7fff +#endif +#ifndef INT32_MAX +#define INT32_MAX 0x7fffffff +#endif + #ifdef _MSC_VER #pragma warning(disable:4319) #pragma warning(disable:4267) -- cgit v1.2.3