Revert "osdep/io: ignore 'x' mode for mp_fopen"

This flag is a GNU extension in C99, but was standardrized in C11,
so mpv should be able to use it. fopen is wrapped on win32 so
non-compliant MSVCRT.dll isn't a concern.
Since the upcoming commit uses this feature it can be brought back.

This reverts commit c36e051470.
This commit is contained in:
nanahi 2024-03-19 02:52:02 -04:00 committed by Kacper Michajłow
parent 374470d471
commit aa08e304c4
1 changed files with 2 additions and 1 deletions

View File

@ -528,7 +528,8 @@ FILE *mp_fopen(const char *filename, const char *mode)
for (const char *pos = mode + 1; *pos; pos++) { for (const char *pos = mode + 1; *pos; pos++) {
switch (*pos) { switch (*pos) {
case '+': rwmode = _O_RDWR; break; case '+': rwmode = _O_RDWR; break;
// Ignore unknown flags case 'x': oflags |= _O_EXCL; break;
// Ignore unknown flags (glibc does too)
default: break; default: break;
} }
} }