]> git.saurik.com Git - redis.git/blame - solarisfixes.h
use rank to find starting point for ZRANGE and ZREVRANGE
[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); })
0bc1b2f6 18#endif /* __GNUC__ */