Fix mingw build

This commit is contained in:
vitaut 2015-03-12 08:00:56 -07:00
parent 6bca5ca109
commit 03ee6a0295
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ int (fmt::BufferedFile::fileno)() const {
fmt::File::File(fmt::StringRef path, int oflag) {
int mode = S_IRUSR | S_IWUSR;
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
fd_ = -1;
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
#else

View File

@ -63,7 +63,7 @@
// Fix warnings about deprecated symbols.
# define FMT_POSIX_CALL(call) ::_##call
# else
# define FMT_POSIX_CALL(call) ::call
# define FMT_POSIX_CALL(call) (::call)
# endif
#endif