mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 02:29:08 +00:00
Woraround a bug in MinGW
This commit is contained in:
parent
b2207f9d05
commit
6bca5ca109
2
posix.cc
2
posix.cc
@ -97,7 +97,7 @@ void fmt::BufferedFile::close() {
|
|||||||
throw SystemError(errno, "cannot close file");
|
throw SystemError(errno, "cannot close file");
|
||||||
}
|
}
|
||||||
|
|
||||||
int fmt::BufferedFile::fileno() const {
|
int (fmt::BufferedFile::fileno)() const {
|
||||||
int fd = FMT_POSIX_CALL(fileno(file_));
|
int fd = FMT_POSIX_CALL(fileno(file_));
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
throw SystemError(errno, "cannot get file descriptor");
|
throw SystemError(errno, "cannot get file descriptor");
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
# include <crtdbg.h> // for _CrtSetReportMode
|
# include <crtdbg.h> // for _CrtSetReportMode
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
# undef fileno
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
|
Loading…
Reference in New Issue
Block a user