From c462f48e323e80ae195da27243d40bf08e8f5928 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Thu, 13 Dec 2018 10:27:36 +0300 Subject: C++98 build fix Because of mentioned bug in CMake script, the C++11 mode was turned on, therefore once CMake build was fixed to enforce C++98, the dbopl.cpp was failed to build where are INT16_MIN and INT16_MAX macros was used. --- src/chips/dosbox/dbopl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/chips/dosbox/dbopl.cpp b/src/chips/dosbox/dbopl.cpp index 1931203..5260c37 100644 --- a/src/chips/dosbox/dbopl.cpp +++ b/src/chips/dosbox/dbopl.cpp @@ -72,6 +72,17 @@ #define PI 3.14159265358979323846 #endif +/* + * Workaround for some compilers are has no those macros in their headers! + */ +#ifndef INT16_MIN +#define INT16_MIN (-0x7fff - 1) +#endif +#ifndef INT16_MAX +#define INT16_MAX 0x7fff +#endif + + struct NoCopy { NoCopy() {} private: -- cgit v1.2.3