diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2024-03-19 02:52:02 -0400 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-03-19 19:30:27 +0100 |
commit | aa08e304c46dd25daa50a097fc8bbf74be13fc86 (patch) | |
tree | 691a1ba20aa8c0ae7fc51cf9ce835d10e6c28d4a /osdep | |
parent | 374470d471a49491bceb4e1241402e3e56ccb209 (diff) | |
download | mpv-aa08e304c46dd25daa50a097fc8bbf74be13fc86.tar.bz2 mpv-aa08e304c46dd25daa50a097fc8bbf74be13fc86.tar.xz |
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 c36e051470dceb24c75d36316490e063a77dacba.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/osdep/io.c b/osdep/io.c index 4306a04a6d..d2f1a60c6e 100644 --- a/osdep/io.c +++ b/osdep/io.c @@ -528,7 +528,8 @@ FILE *mp_fopen(const char *filename, const char *mode) for (const char *pos = mode + 1; *pos; pos++) { switch (*pos) { case '+': rwmode = _O_RDWR; break; - // Ignore unknown flags + case 'x': oflags |= _O_EXCL; break; + // Ignore unknown flags (glibc does too) default: break; } } |