aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-09-22 13:40:19 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-09-22 13:40:19 +0300
commit4c3630ec4179fe9265407a35c4db1374ffc82372 (patch)
treefd2c86f21a84c12d8c52d0bf1606d7bb214bb8e4 /src
parentMake sure that TUKLIB_DOSLIKE doesn't get defined on Cygwin. (diff)
downloadxz-4c3630ec4179fe9265407a35c4db1374ffc82372.tar.xz
Avoid non-standard preprocessor construct.
Thanks to Jouk Jansen.
Diffstat (limited to 'src')
-rw-r--r--src/common/tuklib_common.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/tuklib_common.h b/src/common/tuklib_common.h
index 791b8947..31fbab58 100644
--- a/src/common/tuklib_common.h
+++ b/src/common/tuklib_common.h
@@ -49,10 +49,13 @@
# endif
#endif
-#define TUKLIB_GNUC_REQ(major, minor) \
- (defined(__GNUC__) && defined(__GNUC_MINOR__) \
- && ((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
- || __GNUC__ > (major)))
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define TUKLIB_GNUC_REQ(major, minor) \
+ ((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
+ || __GNUC__ > (major))
+#else
+# define TUKLIB_GNUC_REQ(major, minor) 0
+#endif
#if TUKLIB_GNUC_REQ(2, 5)
# define tuklib_attr_noreturn __attribute__((__noreturn__))