From 9d49321115cacb2447d7a8eef86948000ab4672f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 5 Feb 2013 07:43:15 -0800 Subject: [PATCH] Fix MSVC build. --- format.cc | 10 ---------- format.h | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/format.cc b/format.cc index c592f8ae..03c10e40 100644 --- a/format.cc +++ b/format.cc @@ -31,19 +31,9 @@ #undef _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS -#include - #include "format.h" #include -#include -#include - -#if _MSC_VER -# undef snprintf -# define snprintf _snprintf -# define isinf(x) (!_finite(x)) -#endif const char fmt::internal::DIGITS[] = "0001020304050607080910111213141516171819" diff --git a/format.h b/format.h index b62356b4..d5971618 100644 --- a/format.h +++ b/format.h @@ -181,6 +181,9 @@ inline int SignBit(double value) { _ecvt(value, 0, &dec, &sign); return sign; } +inline int isinf(double x) { return !_finite(x); } +# undef snprintf +# define snprintf _snprintf #endif template