]> git.saurik.com Git - redis.git/blob - src/solarisfixes.h
Use correct variable name for value to convert.
[redis.git] / src / solarisfixes.h
1 /* Solaris specific fixes */
2
3 #if defined(__GNUC__)
4 #include <math.h>
5 #undef isnan
6 #define isnan(x) \
7 __extension__({ __typeof (x) __x_a = (x); \
8 __builtin_expect(__x_a != __x_a, 0); })
9
10 #undef isfinite
11 #define isfinite(x) \
12 __extension__ ({ __typeof (x) __x_f = (x); \
13 __builtin_expect(!isnan(__x_f - __x_f), 1); })
14
15 #undef isinf
16 #define isinf(x) \
17 __extension__ ({ __typeof (x) __x_i = (x); \
18 __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
19
20 #define u_int uint
21 #define u_int32_t uint32_t
22 #endif /* __GNUC__ */