diff --git a/src/os.cc b/src/os.cc index c682625a..04b4dc50 100644 --- a/src/os.cc +++ b/src/os.cc @@ -26,9 +26,6 @@ # endif # include -# define O_CREAT _O_CREAT -# define O_TRUNC _O_TRUNC - # ifndef S_IRUSR # define S_IRUSR _S_IREAD # endif @@ -41,10 +38,6 @@ # ifndef S_IROTH # define S_IROTH 0 # endif - -# ifdef __MINGW32__ -# define _SH_DENYNO 0x40 -# endif # endif // _WIN32 #endif // FMT_USE_FCNTL @@ -107,8 +100,6 @@ int detail::utf16_to_utf8::convert(basic_string_view s) { namespace detail { -using mode_t = int; - class system_message { system_message(const system_message&) = delete; void operator=(const system_message&) = delete; @@ -220,7 +211,9 @@ int buffered_file::fileno() const { #if FMT_USE_FCNTL file::file(cstring_view path, int oflag) { - using namespace detail; +# ifdef _WIN32 + using mode_t = int; +# endif mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; # if defined(_WIN32) && !defined(__MINGW32__) fd_ = -1;