From: Lasse Collin Date: Tue, 22 Sep 2009 10:40:19 +0000 (+0300) Subject: Avoid non-standard preprocessor construct. X-Git-Tag: upstream/5.1.3~416 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c3630ec4179fe9265407a35c4db1374ffc82372;p=platform%2Fupstream%2Fxz.git Avoid non-standard preprocessor construct. Thanks to Jouk Jansen. --- diff --git a/src/common/tuklib_common.h b/src/common/tuklib_common.h index 791b894..31fbab5 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__))