Update posix.cc

This commit is contained in:
codicodi 2016-11-01 23:33:44 +01:00 committed by GitHub
parent 0ff7310160
commit 92a1b16c36

View File

@ -88,7 +88,7 @@ int u8open(fmt::CStringRef filename, int flags, int mode) {
FMT_THROW(fmt::WindowsError(::GetLastError(), FMT_THROW(fmt::WindowsError(::GetLastError(),
"couldn't convert filename to native encoding")); "couldn't convert filename to native encoding"));
int fd = -1; int fd = -1;
FMT_POSIX_CALL(wsopen_s(&fd, namebuff, flags, _SH_DENYNO, mode)); FMT_SYSTEM(_wsopen_s(&fd, namebuff, flags, _SH_DENYNO, mode));
return fd; return fd;
#else #else
return FMT_POSIX_CALL(open(filename, flags, mode)); return FMT_POSIX_CALL(open(filename, flags, mode));