Commit 5043dff3 authored by antirez's avatar antirez
Browse files

More Solaris fixes

parent d7f43c08
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
#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__)
#include "solarisfixes.h"
#endif
#include "redis.h" #include "redis.h"
#include "ae.h" /* Event driven programming library */ #include "ae.h" /* Event driven programming library */
......
/* Solaris specific fixes */
#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); })
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment