Commit 7ad88eff authored by Victor Zverovich's avatar Victor Zverovich

Fix a warning.

parent 11b3b512
...@@ -43,11 +43,15 @@ ...@@ -43,11 +43,15 @@
#endif #endif
#if FMT_USE_DUP #if FMT_USE_DUP
# include <sys/types.h> # include <sys/types.h>
# include <sys/stat.h> # include <sys/stat.h>
# include <fcntl.h> # include <fcntl.h>
# ifdef _WIN32 # ifdef _WIN32
# include <io.h> # include <io.h>
# define O_WRONLY _O_WRONLY # define O_WRONLY _O_WRONLY
# define O_CREAT _O_CREAT # define O_CREAT _O_CREAT
# define O_TRUNC _O_TRUNC # define O_TRUNC _O_TRUNC
...@@ -57,6 +61,13 @@ ...@@ -57,6 +61,13 @@
# define close _close # define close _close
# define dup _dup # define dup _dup
# define dup2 _dup2 # define dup2 _dup2
namespace {
int open(const char *path, int oflag, int pmode) {
_sopen_s(fd, path, oflag, _SH_DENYNO, pmode);
return fd;
}
}
# else # else
# include <unistd.h> # include <unistd.h>
# endif # endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment