summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-09-15 14:17:29 +0000
committerbde <bde@FreeBSD.org>2002-09-15 14:17:29 +0000
commit7819f421f3fd1e80387d5d7a0a52e8018b6f5edd (patch)
tree399ada7fb20342558eeb8a60fbf82ffdae9346a4 /sys
parent57c36dbd6c81eaa39e3f8511f05e0f9e4a39a693 (diff)
downloadFreeBSD-src-7819f421f3fd1e80387d5d7a0a52e8018b6f5edd.zip
FreeBSD-src-7819f421f3fd1e80387d5d7a0a52e8018b6f5edd.tar.gz
Define __LONG_LONG_SUPPORTED if the compiler claims to support C99.
Don't set __LONG_LONG_SUPPORTED for gcc-1. I didn't check exactly when gcc started to support long long, but it was in the version of gcc in FreeBSD-1.0 (gcc-2.4.5). Other C99 features should be ifdefed similarly, but the ifdefs for old versions of gcc will be more complicated since the features weren't in all versions of gcc-2.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/cdefs.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 9673b49..9096d96 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -133,8 +133,7 @@
#define __func__ NULL
#endif
-/* XXX: should use `#if __STDC_VERSION__ >= 199901'. */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#if __GNUC__ >= 2 && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
#define __LONG_LONG_SUPPORTED
#endif
OpenPOWER on IntegriCloud