mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-02 19:29:21 +00:00
Protect against undefinition/redefinition of fpclassify.
This commit is contained in:
parent
6d8e019443
commit
aaec648e69
@ -43,16 +43,17 @@ int __fpclassifyl(long double);
|
||||
int __signbit(long double);
|
||||
int __fpcompare(long double, long double, short);
|
||||
|
||||
#define fpclassify(x) _Generic((x), \
|
||||
#define __fpclassify(x) _Generic((x), \
|
||||
float: __fpclassifyf, \
|
||||
double: __fpclassifyd, \
|
||||
long double: __fpclassifyl)(x)
|
||||
|
||||
#define isfinite(x) (((fpclassify(x) + 1) & 0xF0) == 0)
|
||||
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
||||
#define isnan(x) (fpclassify((long double)(x)) == FP_NAN)
|
||||
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
||||
#define signbit(x) __signbit(x)
|
||||
#define fpclassify(x) __fpclassify(x)
|
||||
#define isfinite(x) (((__fpclassify(x) + 1) & 0xF0) == 0)
|
||||
#define isinf(x) (__fpclassify(x) == FP_INFINITE)
|
||||
#define isnan(x) (__fpclassify((long double)(x)) == FP_NAN)
|
||||
#define isnormal(x) (__fpclassify(x) == FP_NORMAL)
|
||||
#define signbit(x) __signbit(x)
|
||||
|
||||
#define isgreater(x,y) __fpcompare((x),(y),0x40)
|
||||
#define isgreaterequal(x,y) __fpcompare((x),(y),0x42)
|
||||
|
Loading…
Reference in New Issue
Block a user