mirror of
https://github.com/fmtlib/fmt.git
synced 2025-06-27 18:31:07 +02:00
Change default open mode to -rw-r--r-- (#2530)
This commit is contained in:
@ -32,10 +32,15 @@
|
|||||||
# ifndef S_IRUSR
|
# ifndef S_IRUSR
|
||||||
# define S_IRUSR _S_IREAD
|
# define S_IRUSR _S_IREAD
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef S_IWUSR
|
# ifndef S_IWUSR
|
||||||
# define S_IWUSR _S_IWRITE
|
# define S_IWUSR _S_IWRITE
|
||||||
# endif
|
# endif
|
||||||
|
# ifndef S_IRGRP
|
||||||
|
# define S_IRGRP 0
|
||||||
|
# endif
|
||||||
|
# ifndef S_IROTH
|
||||||
|
# define S_IROTH 0
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef __MINGW32__
|
# ifdef __MINGW32__
|
||||||
# define _SH_DENYNO 0x40
|
# define _SH_DENYNO 0x40
|
||||||
@ -213,7 +218,7 @@ 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) {
|
||||||
int mode = S_IRUSR | S_IWUSR;
|
int mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
|
||||||
# if defined(_WIN32) && !defined(__MINGW32__)
|
# if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
fd_ = -1;
|
fd_ = -1;
|
||||||
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
|
FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
|
||||||
|
Reference in New Issue
Block a user