Commit 8c68e2ca authored by vitaut's avatar vitaut

Fix fileno causing compile error when #defined

Error:
expected unqualified-id before '(' token
 int fmt::BufferedFile::fileno() const {

This is an issue with Android NDK and mingw32.

https://github.com/Gachapen/cppformat/commit/c2ffa146841535080a3483471fd9eec77c119c36
parent 368b66a8
...@@ -55,11 +55,14 @@ ...@@ -55,11 +55,14 @@
# ifdef __MINGW32__ # ifdef __MINGW32__
# define _SH_DENYNO 0x40 # define _SH_DENYNO 0x40
# undef fileno
# endif # endif
#endif // _WIN32 #endif // _WIN32
#ifdef fileno
# undef fileno
#endif
namespace { namespace {
#ifdef _WIN32 #ifdef _WIN32
// Return type of read and write functions. // Return type of read and write functions.
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "posix.h" #include "posix.h"
#include "util.h" #include "util.h"
#ifdef __MINGW32__ #ifdef fileno
# undef fileno # undef fileno
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment