Fix Windows build, again.

This commit is contained in:
David Anderson
2014-04-22 20:04:12 -07:00
parent cb32e3d8f9
commit c64edf31fc
3 changed files with 17 additions and 3 deletions
+12
View File
@@ -34,6 +34,8 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <float.h>
#if defined(_MSC_VER)
# include <intrin.h>
#endif
@@ -218,6 +220,16 @@ FindRightmostBit(size_t number)
#endif
}
static inline bool
IsNaN(double v)
{
#ifdef _MSC_VER
return _isnan(v);
#else
return isnan(v);
#endif
}
static inline bool
IsPowerOfTwo(size_t value)
{