mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Workaround a bug in MinGW
This commit is contained in:
parent
0a7e5141c1
commit
5b9b485f57
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user