aboutsummaryrefslogtreecommitdiff
path: root/src/chips/dosbox/dbopl.cpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-12-13 10:27:36 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-12-13 10:27:36 +0300
commitc462f48e323e80ae195da27243d40bf08e8f5928 (patch)
treeeda3ff11335f6658c2735b63adb9b64d0284aeba /src/chips/dosbox/dbopl.cpp
parent68c03edbb563983b6ac3e81a826871bfdf9e3bd4 (diff)
downloadlibADLMIDI-c462f48e323e80ae195da27243d40bf08e8f5928.tar.gz
libADLMIDI-c462f48e323e80ae195da27243d40bf08e8f5928.tar.bz2
libADLMIDI-c462f48e323e80ae195da27243d40bf08e8f5928.zip
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.
Diffstat (limited to 'src/chips/dosbox/dbopl.cpp')
-rw-r--r--src/chips/dosbox/dbopl.cpp11
1 files changed, 11 insertions, 0 deletions
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: