mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
The "x" mode for `fopen()` (open file only if it doesn't exist) used to be a glibc-exclusive extension, but was later standardized in C11, and is now also implemented as part of every other widely-used libc: * musl: https://git.musl-libc.org/cgit/musl/tree/src/stdio/__fmodeflags.c?id=0ccaf0572e9cccda2cced0f7ee659af4c1c6679a * Android Bionic / OpenBSD:731631f300/libc/upstream-openbsd/lib/libc/stdio/flags.c (86)* Apple / FreeBSD:63976b830a/stdio/FreeBSD/flags.c (L91-L92)As a result, "x" has already been working on all our automatically tested platforms that implement `SDL_IOFromFile()` via `fopen()`. So all we'd be missing for proper support is a Windows implementation using `CREATE_NEW`, and the documentation that this mode exists and is intended to work.