The ctype functions threw std::invalid_argument for any value below EOF,
so a title passing a plain char with its high bit set, such as a UTF-8
byte, aborted. The libc.prx bundled with titles accepts -128 to -2: each
class function returns 0 for them, as for 128 to 255 in the C locale,
and toupper and tolower return them unchanged. Values outside -128 to
255 still throw.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
LocaleSupport.cpp: keep this branch's console class masks for the ctype
classifiers and main's new isascii and toascii.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
isalpha, isdigit, isspace and the other ctype classifiers returned 1 for
a match. The libc.prx bundled with eleven titles returns the matching
bits of its classification table instead, for example 0x20 from isdigit,
0x04 from isspace(' ') and 0x40 from isspace('\t'), and its table marks
tab with 0x400, which isblank returns. The classifiers now return the
exported table's bits under the console's masks, and the table gains the
tab bit; which characters match is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
setlocale returned a null pointer for a category outside 0 to 6 and
accepted "POSIX" as a name for "C". The libc.prx that titles ship
ignores the category, so setlocale(-1, NULL) and setlocale(7, "C")
return "C", and returns a null pointer for "POSIX" as for any name other
than "C" or the empty string.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in main up to 9958d26 (homebrew runtime, POSIX wrappers in
libkernel, sce_module guest modules and --skip-sce-module, the --to-intel
general pipeline, libSceRandom, libSceRtc, libScePosixForWebKit,
libRenoirCore, test wiring).
Resolutions where both sides implemented the same thing:
- libkernel pthread: main's structure (lazy static initialisation,
destroyed markers, MutexOperations/CondOperations, mutex protocol and
condattr clock) with this branch's TimedWait deadlines and condition
(precise timed lock/wait on Windows), wait tracing, the adaptive mutex
type 4, POSIX default ERRORCHECK mutexes, EDEADLK/EPERM results instead
of throws, and condition clocks honoured for absolute timeouts.
- libc locale: the guest Dinkumware ABI (_Locimp, facet vtables, short
ctype/case tables, locale ids, stream storage) is kept because guest code
inlines those layouts; main's C character functions are kept on top.
- libc stdio/strings/math: main's stream functions (guest FILE status
sync), strerror/perror, remove, formatting, string and math exports win
over this branch's duplicates.
- libc paths: main's working directory with this branch's path aliases
resolved on the normalised guest path.
- libkernel file: this branch's sceKernel* results as SCE errors, main's
POSIX wrappers and both fstat helpers.
- relinker: this branch's stub lowering keeps its trampolines through the
main executable path; guest modules refuse lowerings that need stubs.
- AGC driver: main's rendering wait is executed by this branch's workers.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo