From 2ea84459b66f3019833422b4be3959efa5019ea4 Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Tue, 18 Jun 2024 21:16:03 +0200 Subject: [PATCH] Defines are still needed for FMT_MODULE as well --- src/os.cc | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/os.cc b/src/os.cc index 7bc18e2a8e510..150bbc8bd520d 100644 --- a/src/os.cc +++ b/src/os.cc @@ -30,25 +30,6 @@ # define WIN32_LEAN_AND_MEAN # endif # include - -# ifndef S_IRUSR -# define S_IRUSR _S_IREAD -# endif -# ifndef S_IWUSR -# define S_IWUSR _S_IWRITE -# endif -# ifndef S_IRGRP -# define S_IRGRP 0 -# endif -# ifndef S_IWGRP -# define S_IWGRP 0 -# endif -# ifndef S_IROTH -# define S_IROTH 0 -# endif -# ifndef S_IWOTH -# define S_IWOTH 0 -# endif # endif // _WIN32 # endif // FMT_USE_FCNTL @@ -57,6 +38,29 @@ # endif #endif +#if FMT_USE_FCNTL +# ifdef _WIN32 +# ifndef S_IRUSR +# define S_IRUSR _S_IREAD +# endif +# ifndef S_IWUSR +# define S_IWUSR _S_IWRITE +# endif +# ifndef S_IRGRP +# define S_IRGRP 0 +# endif +# ifndef S_IWGRP +# define S_IWGRP 0 +# endif +# ifndef S_IROTH +# define S_IROTH 0 +# endif +# ifndef S_IWOTH +# define S_IWOTH 0 +# endif +# endif // _WIN32 +#endif // FMT_USE_FCNTL + namespace { #ifdef _WIN32 // Return type of read and write functions.