mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-28 18:32:46 +00:00
Fix a warning.
This commit is contained in:
parent
11b3b5128e
commit
7ad88eff13
@ -43,11 +43,15 @@
|
||||
#endif
|
||||
|
||||
#if FMT_USE_DUP
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# include <fcntl.h>
|
||||
|
||||
# ifdef _WIN32
|
||||
|
||||
# include <io.h>
|
||||
|
||||
# define O_WRONLY _O_WRONLY
|
||||
# define O_CREAT _O_CREAT
|
||||
# define O_TRUNC _O_TRUNC
|
||||
@ -57,6 +61,13 @@
|
||||
# define close _close
|
||||
# define dup _dup
|
||||
# define dup2 _dup2
|
||||
|
||||
namespace {
|
||||
int open(const char *path, int oflag, int pmode) {
|
||||
_sopen_s(fd, path, oflag, _SH_DENYNO, pmode);
|
||||
return fd;
|
||||
}
|
||||
}
|
||||
# else
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user