From: cuz Date: Fri, 26 Aug 2005 12:44:15 +0000 (+0000) Subject: Added check for gcc X-Git-Tag: V2.12.0~254 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ddddb2acb5b6daeafcad632023b25c6ec0766c94;p=cc65 Added check for gcc git-svn-id: svn://svn.cc65.org/cc65/trunk@3590 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/common/inttypes.h b/src/common/inttypes.h index 74b78f1ca..ca7f90106 100644 --- a/src/common/inttypes.h +++ b/src/common/inttypes.h @@ -38,8 +38,12 @@ -/* If we have stdint.h, include it, otherwise try some quesswork on types */ -#if __STDC_VERSION__ >= 199901 +/* If we have stdint.h, include it, otherwise try some quesswork on types. + * gcc doesn't define __STDC_VERSION__ without special flags, so check for + * gcc explicitly. Undefined symbols are replaced by zero, so a check for + * defined(__GNUC__) is not necessary. + */ +#if (__STDC_VERSION__ >= 199901) || (__GNUC__ >= 3) #include #else