From 18316cb25f1f84714591288cf921f4d6997d5d99 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 6 Jun 2014 07:29:57 -0700 Subject: [PATCH] Fix windows build. --- test/format-test.cc | 3 --- test/util-test.cc | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/format-test.cc b/test/format-test.cc index 45cfe824..f00d01e5 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -35,10 +35,7 @@ #include #include -// Check if format.h compiles with windows.h included. #ifdef _WIN32 -# include - // Fix MSVC warning about "unsafe" fopen. FILE *FOpen(const char *filename, const char *mode) { FILE *f = 0; diff --git a/test/util-test.cc b/test/util-test.cc index bb89a97e..98f99d5b 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -27,9 +27,15 @@ #include #include "gtest-extra.h" -#include "format.h" #include "util.h" +// Check if format.h compiles with windows.h included. +#ifdef _WIN32 +# include +#endif + +#include "format.h" + using fmt::StringRef; namespace {