]>
Commit | Line | Data |
---|---|---|
1 | /* Solaris specific fixes */ | |
2 | ||
3 | #if defined(__GNUC__) | |
4 | #undef isnan | |
5 | #define isnan(x) \ | |
6 | __extension__({ __typeof (x) __x_a = (x); \ | |
7 | __builtin_expect(__x_a != __x_a, 0); }) | |
8 | ||
9 | #undef isfinite | |
10 | #define isfinite(x) \ | |
11 | __extension__ ({ __typeof (x) __x_f = (x); \ | |
12 | __builtin_expect(!isnan(__x_f - __x_f), 1); }) | |
13 | ||
14 | #undef isinf | |
15 | #define isinf(x) \ | |
16 | __extension__ ({ __typeof (x) __x_i = (x); \ | |
17 | __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); }) | |
18 | #endif /* __GNUC__ */ |