math.h: Remove support for old gcc versions

Remove support for old gcc versions by unconditionally defining
__MATH_BUILTIN_RELOPS and __MATH_BUILTIN_CONSTANTS. Per kib's request,
don't #undef those so it's easier to understand what the builtins are
doing.

Reviewed by:		brooks
Differential Revision:	https://reviews.freebsd.org/D45655
Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2024-06-20 17:03:05 -06:00
parent 67d1a1cd9e
commit fa1e8538d1

View file

@ -31,13 +31,8 @@ extern const union __nan_un {
float __uf;
} __nan;
#if __GNUC_PREREQ__(3, 3)
#define __MATH_BUILTIN_CONSTANTS
#endif
#if __GNUC_PREREQ__(3, 0)
#define __MATH_BUILTIN_RELOPS
#endif
#ifdef __MATH_BUILTIN_CONSTANTS
#define HUGE_VAL __builtin_huge_val()
@ -79,7 +74,7 @@ extern const union __nan_un {
float: f, \
double: d, \
long double: ld)(x)
#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
#elif !defined(__cplusplus)
#define __fp_type_select(x, f, d, ld) __builtin_choose_expr( \
__builtin_types_compatible_p(__typeof(x), long double), ld(x), \
__builtin_choose_expr( \