a fix for the solaris fix itself ;)

This commit is contained in:
antirez 2009-10-27 18:39:47 +01:00
parent 5043dff351
commit 0bc1b2f651
2 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,8 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <limits.h> #include <limits.h>
#include <math.h> #include <math.h>
#if defined(__sun) && defined(__GNUC__)
#if defined(__sun)
#include "solarisfixes.h" #include "solarisfixes.h"
#endif #endif

View File

@ -1,5 +1,6 @@
/* Solaris specific fixes */ /* Solaris specific fixes */
#if defined(__GNUC__)
#undef isnan #undef isnan
#define isnan(x) \ #define isnan(x) \
__extension__({ __typeof (x) __x_a = (x); \ __extension__({ __typeof (x) __x_a = (x); \
@ -14,3 +15,4 @@
#define isinf(x) \ #define isinf(x) \
__extension__ ({ __typeof (x) __x_i = (x); \ __extension__ ({ __typeof (x) __x_i = (x); \
__builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); }) __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
#endif /* __GNUC__ */