mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Fix a warning.
This commit is contained in:
@ -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 @@
|
|||||||
# 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
|
||||||
|
Reference in New Issue
Block a user