From e40a5bf0b1483ce4275464a0a75a3d99035ca71c Mon Sep 17 00:00:00 2001 From: Naios Date: Wed, 18 Mar 2015 19:18:19 +0100 Subject: Dep/CppFormat: Update cppformat to cppformat/cppformat@bf8636c9596fbfddd * fixes detecting support of * fixes build on solaris --- dep/cppformat/posix.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'dep/cppformat/posix.h') diff --git a/dep/cppformat/posix.h b/dep/cppformat/posix.h index e16ac521642..70a0db1a560 100644 --- a/dep/cppformat/posix.h +++ b/dep/cppformat/posix.h @@ -28,6 +28,11 @@ #ifndef FMT_POSIX_H_ #define FMT_POSIX_H_ +#ifdef __MINGW32__ +// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/. +# undef __STRICT_ANSI__ +#endif + #include #include // for O_RDONLY #include @@ -41,7 +46,7 @@ #endif #ifndef FMT_POSIX -# ifdef _WIN32 +# if defined(_WIN32) && !defined(__MINGW32__) // Fix warnings about deprecated symbols. # define FMT_POSIX(call) _##call # else @@ -188,7 +193,9 @@ public: // Returns the pointer to a FILE object representing this file. FILE *get() const FMT_NOEXCEPT { return file_; } - int fileno() const; + // We place parentheses around fileno to workaround a bug in some versions + // of MinGW that define fileno as a macro. + int (fileno)() const; void print(fmt::StringRef format_str, const ArgList &args) { fmt::print(file_, format_str, args); -- cgit v1.2.3