]> git.saurik.com Git - redis.git/blame - solarisfixes.h
Merge http://github.com/ngmoco/redis
[redis.git] / solarisfixes.h
CommitLineData
5043dff3 1/* Solaris specific fixes */
2
0bc1b2f6 3#if defined(__GNUC__)
5043dff3 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); })
9caf1a20 18
19#define u_int uint
9b883415 20#define u_int32_t uint32_t
0bc1b2f6 21#endif /* __GNUC__ */