Fixed compilation on Visual Studio 2010 and 2012 (issue #107)

This commit is contained in:
Benoit Blanchon
2015-08-27 21:47:49 +02:00
parent 01c287bc89
commit a1943e21ed
4 changed files with 14 additions and 1 deletions

View File

@ -17,6 +17,13 @@
#pragma GCC diagnostic ignored "-Wfloat-conversion"
#endif
// Visual Studo 2012 didn't have isnan, nor isinf
#if defined(_MSC_VER) && _MSC_VER <= 1700
#include <float.h>
#define isnan(x) _isnan(x)
#define isinf(x) (!_finite(x))
#endif
size_t Print::print(const char s[]) {
size_t n = 0;
while (*s) {