summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2009-10-27 18:39:47 +0100
committerantirez <antirez@gmail.com>2009-10-27 18:39:47 +0100
commit0bc1b2f651aa054cf1b83b3d1379120b98902150 (patch)
treefbca5138b90baec6dfd313cbd65923a7f0edd6ba
parent5043dff351f4ad9095f66bbef8e08d363cd959a0 (diff)
downloadredis-0bc1b2f651aa054cf1b83b3d1379120b98902150.tar.gz
a fix for the solaris fix itself ;)
-rw-r--r--redis.c3
-rw-r--r--solarisfixes.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/redis.c b/redis.c
index e26e676f6..f62533314 100644
--- a/redis.c
+++ b/redis.c
@@ -58,7 +58,8 @@
#include <sys/resource.h>
#include <limits.h>
#include <math.h>
-#if defined(__sun) && defined(__GNUC__)
+
+#if defined(__sun)
#include "solarisfixes.h"
#endif
diff --git a/solarisfixes.h b/solarisfixes.h
index 36f192016..8786965ae 100644
--- a/solarisfixes.h
+++ b/solarisfixes.h
@@ -1,5 +1,6 @@
/* Solaris specific fixes */
+#if defined(__GNUC__)
#undef isnan
#define isnan(x) \
__extension__({ __typeof (x) __x_a = (x); \
@@ -14,3 +15,4 @@
#define isinf(x) \
__extension__ ({ __typeof (x) __x_i = (x); \
__builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
+#endif /* __GNUC__ */