mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 20:18:49 +00:00
Workaround MinGW's braindamage
This commit is contained in:
parent
4825fb4a0d
commit
c6d3a73201
5
posix.cc
5
posix.cc
@ -98,8 +98,11 @@ void fmt::BufferedFile::close() {
|
|||||||
throw SystemError(errno, "cannot close file");
|
throw SystemError(errno, "cannot close file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A macro used to prevent expansion of fileno on broken versions of MinGW.
|
||||||
|
#define FMT_ARGS
|
||||||
|
|
||||||
int fmt::BufferedFile::fileno() const {
|
int fmt::BufferedFile::fileno() const {
|
||||||
int fd = FMT_POSIX_CALL(fileno(file_));
|
int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_));
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
throw SystemError(errno, "cannot get file descriptor");
|
throw SystemError(errno, "cannot get file descriptor");
|
||||||
return fd;
|
return fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user