Workaround a bug in MinGW

This commit is contained in:
vitaut 2015-06-24 11:36:28 -07:00
parent 0a7e5141c1
commit 5b9b485f57
2 changed files with 5 additions and 5 deletions

View File

@ -38,10 +38,6 @@
#include "util.h" #include "util.h"
#ifdef __MINGW32__
# undef fileno
#endif
namespace { namespace {
#ifdef _MSC_VER #ifdef _MSC_VER
@ -376,7 +372,7 @@ TEST(OutputRedirectTest, FlushErrorInCtor) {
TEST(OutputRedirectTest, DupErrorInCtor) { TEST(OutputRedirectTest, DupErrorInCtor) {
BufferedFile f = open_buffered_file(); BufferedFile f = open_buffered_file();
int fd = f.fileno(); int fd = (f.fileno)();
File copy = File::dup(fd); File copy = File::dup(fd);
FMT_POSIX(close(fd)); FMT_POSIX(close(fd));
OutputRedirect *redir = 0; OutputRedirect *redir = 0;

View File

@ -31,6 +31,10 @@
#include "posix.h" #include "posix.h"
#include "util.h" #include "util.h"
#ifdef __MINGW32__
# undef fileno
#endif
using fmt::BufferedFile; using fmt::BufferedFile;
using fmt::ErrorCode; using fmt::ErrorCode;
using fmt::File; using fmt::File;