mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Update os.h
Provide shared read access to log files under windows
This commit is contained in:
parent
137e354108
commit
87c0770c42
@ -120,7 +120,8 @@ constexpr inline unsigned short eol_size()
|
||||
inline int fopen_s(FILE** fp, const std::string& filename, const char* mode)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ::fopen_s(fp, filename.c_str(), mode);
|
||||
*fp = _fsopen((filename.c_str()), mode, _SH_DENYWR);
|
||||
return *fp == nullptr;
|
||||
#else
|
||||
*fp = fopen((filename.c_str()), mode);
|
||||
return *fp == nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user