mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 11:28:20 +00:00
Fix mingw build
This commit is contained in:
parent
6bca5ca109
commit
03ee6a0295
2
posix.cc
2
posix.cc
@ -106,7 +106,7 @@ int (fmt::BufferedFile::fileno)() const {
|
|||||||
|
|
||||||
fmt::File::File(fmt::StringRef path, int oflag) {
|
fmt::File::File(fmt::StringRef path, int oflag) {
|
||||||
int mode = S_IRUSR | S_IWUSR;
|
int mode = S_IRUSR | S_IWUSR;
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
fd_ = -1;
|
fd_ = -1;
|
||||||
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
|
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
|
||||||
#else
|
#else
|
||||||
|
2
posix.h
2
posix.h
@ -63,7 +63,7 @@
|
|||||||
// Fix warnings about deprecated symbols.
|
// Fix warnings about deprecated symbols.
|
||||||
# define FMT_POSIX_CALL(call) ::_##call
|
# define FMT_POSIX_CALL(call) ::_##call
|
||||||
# else
|
# else
|
||||||
# define FMT_POSIX_CALL(call) ::call
|
# define FMT_POSIX_CALL(call) (::call)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user