diff options
author | Naios <naios-dev@live.de> | 2015-03-18 19:18:19 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2015-03-18 19:19:30 +0100 |
commit | e40a5bf0b1483ce4275464a0a75a3d99035ca71c (patch) | |
tree | 2966a61ae7120e9941773f39e2a79fb62557982f /dep/cppformat/posix.h | |
parent | 7e6ef94cb1b11078000248a54a19a285e23ed9c4 (diff) |
Dep/CppFormat: Update cppformat to cppformat/cppformat@bf8636c9596fbfddd
* fixes detecting support of <initializer_list>
* fixes build on solaris
Diffstat (limited to 'dep/cppformat/posix.h')
-rw-r--r-- | dep/cppformat/posix.h | 11 |
1 files changed, 9 insertions, 2 deletions
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 <errno.h> #include <fcntl.h> // for O_RDONLY #include <stdio.h> @@ -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); |