From ddddb2acb5b6daeafcad632023b25c6ec0766c94 Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 26 Aug 2005 12:44:15 +0000 Subject: [PATCH] Added check for gcc git-svn-id: svn://svn.cc65.org/cc65/trunk@3590 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/inttypes.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.5