From 205d3300b85f7e477fa5ee10c0ec91f034d79e6f Mon Sep 17 00:00:00 2001 From: David Schultz Date: Fri, 16 Jul 2004 06:21:56 +0000 Subject: [PATCH] Tweak the conditions under which certain gcc builtins are used: - Unlike the builtin relational operators, builtin floating-point constants were not available until gcc 3.3, so account for this.[1] - Apparently some versions of the Intel C Compiler fallaciously define __GNUC__ without actually being compatible with the claimed gcc version. Account for this, too.[2] [1] Noticed by: Christian Hiris <4711@chello.at> [2] Submitted by: Alexander Leidinger --- lib/msun/src/math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 92dfd23cedf..82c8559554d 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -34,11 +34,11 @@ extern const union __nan_un { float __uf; } __nan; -#if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__INTEL_COMPILER) +#if (defined(__GNUC__) && ((__GNUC__ >= 3 && __GNUC_MINOR__ >= 3) || __GNUC__ >= 4)) || defined(__INTEL_COMPILER) #define __MATH_BUILTIN_CONSTANTS #endif -#if (defined(__GNUC__) && __GNUC__ >= 3) +#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER)) #define __MATH_BUILTIN_RELOPS #endif