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; }