History

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.

nanahi committed 2 years ago

Commit aa08e301 parent 374470d1 file · +2 −1Browse files

Unified · Split

osdep/io.c+2−1
@@ -528,7 +528,8 @@ FILE *mp_fopen(const char *filename, const char *mode) · 527 unmodified lines
528 for (const char *pos = mode + 1; *pos; pos++) {528 for (const char *pos = mode + 1; *pos; pos++) {
529 switch (*pos) {529 switch (*pos) {
530 case '+': rwmode = _O_RDWR; break;530 case '+': rwmode = _O_RDWR; break;
531 // Ignore unknown flags531 case 'x': oflags |= _O_EXCL; break;
532 // Ignore unknown flags (glibc does too)
532 default: break;533 default: break;
533 }534 }
534 }535 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t