diff options
-rw-r--r-- | src/node.c | 5 | ||||
-rw-r--r-- | tests/serd_test.c | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -22,6 +22,11 @@ #include <math.h> #include <float.h> +#ifdef _WIN32 +# define isnan(x) _isnan(x) +# define isinf(x) (!_finite(x)) +#endif + SERD_API SerdNode serd_node_from_string(SerdType type, const uint8_t* buf) diff --git a/tests/serd_test.c b/tests/serd_test.c index 5e37824c..259f244a 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -25,6 +25,11 @@ #define USTR(s) ((const uint8_t*)(s)) +#ifdef _WIN32 +# define INFINITY (DBL_MAX + DBL_MAX) +# define NAN (INFINITY - INFINITY) +#endif + static int failure(const char* fmt, ...) { |