From 9b1c5d5ba78d83eb3977352ce2111d416922c6bb Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Sun, 22 Jan 2012 22:40:20 +0100 Subject: only msvc needs these workarounds --- src/ninja.cc | 2 +- src/util.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ninja.cc b/src/ninja.cc index a599c6e..4e750f4 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -709,7 +709,7 @@ reload: printf("\n"); int count = (int)globals.state->paths_.size(); int buckets = -#ifdef _WIN32 +#ifdef _MSC_VER (int)globals.state->paths_.comp.bucket_size; #else (int)globals.state->paths_.bucket_count(); diff --git a/src/util.h b/src/util.h index c401c30..9b4e745 100644 --- a/src/util.h +++ b/src/util.h @@ -68,12 +68,14 @@ const char* SpellcheckString(const string& text, ...); /// Removes all Ansi escape codes (http://www.termsys.demon.co.uk/vtansi.htm). string StripAnsiEscapeCodes(const string& in); -#ifdef _WIN32 +#ifdef _MSC_VER #define snprintf _snprintf #define fileno _fileno #define unlink _unlink #define chdir _chdir +#endif +#ifdef _WIN32 /// Convert the value returned by GetLastError() into a string. string GetLastErrorString(); #endif -- cgit v0.12