mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
FreeBSD's __sflags reads the access character, then b, +, x, e and v, and stops at the first other character without failing, so "rt" opens for reading. On Windows fopen inserted b after the first character and passed the rest on, so "rt" became "rbt", the CRT rejected it with EINVAL, and fopen threw. vkQuake opens history.txt with "rt" at startup. freopen accepted only a fixed list of modes. Both now parse the mode like __sflags. An unknown access character, or x on a read-only stream, returns NULL with EINVAL; x on an existing file returns NULL with EEXIST; e and v are accepted and ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>