Skip to content

Commit

Permalink
a fix for the solaris fix itself ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Oct 27, 2009
1 parent 5043dff commit 0bc1b2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redis.c
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions solarisfixes.h
@@ -1,5 +1,6 @@
/* Solaris specific fixes */

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

0 comments on commit 0bc1b2f

Please sign in to comment.