redict/solarisfixes.h

22 lines
535 B
C
Raw Normal View History

2009-10-27 13:38:25 -04:00
/* Solaris specific fixes */
2009-10-27 13:39:47 -04:00
#if defined(__GNUC__)
2009-10-27 13:38:25 -04:00
#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); })
2010-05-18 04:05:00 -04:00
#define u_int uint
2010-05-20 06:33:33 -04:00
#define u_int32_t uint32_t
2009-10-27 13:39:47 -04:00
#endif /* __GNUC__ */