aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/scummsys.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index aeffbbfcf3..099b12b291 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -144,6 +144,11 @@
#endif
#endif
+// The following math constants are usually defined by the system math.h header, but
+// they are not part of the ANSI C++ standards and so can NOT be relied upon to be
+// present i.e. when -std=c++11 is passed to GCC, enabling strict ANSI compliance.
+// As we rely on these being present, we define them if they are not set.
+
#ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
#endif