19 lines
488 B
C
19 lines
488 B
C
/* Solaris specific fixes */
|
|
|
|
#if defined(__GNUC__)
|
|
#undef isnan
|
|
#define isnan(x) \
|
|
__extension__({ __typeof (x) __x_a = (x); \
|
|
__builtin_expect(__x_a != __x_a, 0); })
|
|
|
|
#undef isfinite
|
|
#define isfinite(x) \
|
|
__extension__ ({ __typeof (x) __x_f = (x); \
|
|
__builtin_expect(!isnan(__x_f - __x_f), 1); })
|
|
|
|
#undef isinf
|
|
#define isinf(x) \
|
|
__extension__ ({ __typeof (x) __x_i = (x); \
|
|
__builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
|
|
#endif /* __GNUC__ */
|