From 0cfb40d0dcd55eb94ca791a025d663ed98c0e9bc Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 16 Mar 2008 16:39:06 +0000 Subject: [PATCH] Define HUGE_VAL in conditionally. That's what gcc's fixincludes hack math_huge_val_ifndef does, anyway. We do it ourselves and remove the therefore superfluous gcc math.h header. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24412 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/scripts/build_cross_tools | 5 +++++ headers/posix/math.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build/scripts/build_cross_tools b/build/scripts/build_cross_tools index 6d25aeaf52..582be8b8b7 100755 --- a/build/scripts/build_cross_tools +++ b/build/scripts/build_cross_tools @@ -121,6 +121,11 @@ make install-gcc-cross || { exit 1 } +# Remove the math.h gcc header. It has been generated by fixincludes +# (unconditional hack: math_huge_val_ifndef) from ours and it is semantically +# equivalent. +rm $installDir/lib/gcc-lib/i586-pc-beos/$haikuRequiredLegacyGCCVersion/include/math.h + # cleanup diff --git a/headers/posix/math.h b/headers/posix/math.h index 0b6bdfd6e6..4eb65bd227 100644 --- a/headers/posix/math.h +++ b/headers/posix/math.h @@ -26,7 +26,9 @@ /* platform independent IEEE floating point special values */ #define __HUGE_VAL_v 0x7ff0000000000000LL #define __huge_val_t union { unsigned char __c[8]; long long __ll; double __d; } -#define HUGE_VAL (((__huge_val_t) { __ll: __HUGE_VAL_v }).__d) +#ifndef HUGE_VAL +# define HUGE_VAL (((__huge_val_t) { __ll: __HUGE_VAL_v }).__d) +#endif #define __HUGE_VALF_v 0x7f800000L #define __huge_valf_t union { unsigned char __c[4]; long __l; float __f; }