aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChristoph Mallon2012-03-15 10:14:36 +0100
committerJohannes Schickel2012-03-17 20:09:45 +0100
commit757fa01a28163031a6429189e06e45bfa00a2122 (patch)
tree12d60986b2609ca4b0460988512b33827af4d600 /common
parent991d5364be542b54c5dc62be1a75cacf635c39f6 (diff)
downloadscummvm-rg350-757fa01a28163031a6429189e06e45bfa00a2122.tar.gz
scummvm-rg350-757fa01a28163031a6429189e06e45bfa00a2122.tar.bz2
scummvm-rg350-757fa01a28163031a6429189e06e45bfa00a2122.zip
COMMON: Add GCC_ATLEAST(major, minor) to simplify testing for versions of GCC.
Diffstat (limited to 'common')
-rw-r--r--common/scummsys.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index 6baab7c16f..85aaa46052 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -23,6 +23,9 @@
#ifndef COMMON_SCUMMSYS_H
#define COMMON_SCUMMSYS_H
+// This is a convenience macro to test whether the compiler used is a GCC
+// version, which is at least major.minor.
+#define GCC_ATLEAST(major, minor) (defined __GNUC__ && (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
#if defined(_WIN32_WCE) && _WIN32_WCE < 300
#define NONSTANDARD_PORT