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