Cleanup os.cc

This commit is contained in:
Victor Zverovich 2021-12-01 06:47:41 -08:00
parent 9b1807a8a2
commit 713c7c7c62

View File

@ -26,9 +26,6 @@
# endif # endif
# include <io.h> # include <io.h>
# define O_CREAT _O_CREAT
# define O_TRUNC _O_TRUNC
# ifndef S_IRUSR # ifndef S_IRUSR
# define S_IRUSR _S_IREAD # define S_IRUSR _S_IREAD
# endif # endif
@ -41,10 +38,6 @@
# ifndef S_IROTH # ifndef S_IROTH
# define S_IROTH 0 # define S_IROTH 0
# endif # endif
# ifdef __MINGW32__
# define _SH_DENYNO 0x40
# endif
# endif // _WIN32 # endif // _WIN32
#endif // FMT_USE_FCNTL #endif // FMT_USE_FCNTL
@ -107,8 +100,6 @@ int detail::utf16_to_utf8::convert(basic_string_view<wchar_t> s) {
namespace detail { namespace detail {
using mode_t = int;
class system_message { class system_message {
system_message(const system_message&) = delete; system_message(const system_message&) = delete;
void operator=(const system_message&) = delete; void operator=(const system_message&) = delete;
@ -220,7 +211,9 @@ int buffered_file::fileno() const {
#if FMT_USE_FCNTL #if FMT_USE_FCNTL
file::file(cstring_view path, int oflag) { 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; mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
# if defined(_WIN32) && !defined(__MINGW32__) # if defined(_WIN32) && !defined(__MINGW32__)
fd_ = -1; fd_ = -1;