build: use native file open flags in Windows-specific code

To comply with official documentation. Also to make code compile with
`NO_OLDNAMES` (mingw-w64) or `_CRT_DECLARE_NONSTDC_NAMES=0` (MSVC) set.

Ref: #15652

Closes #20516
This commit is contained in:
Viktor Szakats 2026-02-04 14:32:11 +01:00
parent 94349aa932
commit 462244447e
No known key found for this signature in database
6 changed files with 10 additions and 8 deletions

View file

@ -29,7 +29,7 @@
#include "tool_operate.h"
#ifdef _WIN32
#define OPENMODE S_IREAD | S_IWRITE
#define OPENMODE _S_IREAD | _S_IWRITE
#else
#define OPENMODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
#endif