Commit Graph
11 Commits
Author SHA1 Message Date
bluandClaude Opus 5.5 428e9cb5f3 fix(libc): size the num_get<char> vtable to the console's 17 slots
mazen320 read KfcTPbeaOqg from the console's libSceLibcInternal.sprx
symbol table: an object of 136 bytes, 17 pointer slots. Export that
size instead of the 15 derived from Dinkumware's crt.vc12 xlocnum, and
say in the debt entry that which two virtual functions are added is
not known.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 13:45:04 -07:00
bluandClaude Fable 5.1 46c36c304f feat(libc): export the num_get and time_get locale objects as data
The public SDK's libSceLibcInternal table declares num_get<char>::id, time_get<char>::id and the
num_get<char> vtable as objects; libSceAmpr exported their NIDs as functions that throw, which a
data consumer reads as code (#8875). libc now defines them the way the other facet ids and the
num_put and codecvt vtables are kept: the ids zero, the vtable 15 zeroed slots (two header
entries, the two destructor entries and Dinkumware's eleven do_get), and libSceAmpr drops the
functions. An import qualified to libSceAmpr.prx falls back to libc, so each object has one
identity.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 21:13:08 -07:00
T3cm0 6fdb88fd48 fix(libc): share slot 8 in ios_base::_Addstd as the console does 2026-10-19 14:41:10 +02:00
tecmo 4bf4fc9864 feat(libc): implement ios_base::_Addstd
Queue the stream in the table of the 8 standard stream
slots of Dinkumware's ios.cpp: the first free slot or the one
that already holds the stream, with a reference count per slot,
and the destructor suppresses the destruction of a standard
stream while its slot still has open references.
2026-10-19 14:41:10 +02:00
Adrià 6b8228b2bf Merge pull request #6585 from Mouad-Scriptz-0/feat/libc-setw
feat(libc): export std::setw(int)
2026-10-19 09:02:04 +02:00
Mouad-Scriptz-0andClaude Sonnet 5.5 2e86b69fb7 feat(libc): export std::setw(int)
Dinkumware's setw returns a manipulator holding a function pointer and the
width, which the caller applies to the stream; the function stores the
width in the stream's ios_base. The export returns that pair in RAX:RDX and
the function writes ios_base::width, leaving flags and precision alone.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-15 21:20:48 +00:00
notaxeltvandCursor 511db2e8ff feat(libc): export locale::classic for the C locale
Absent PPSA34015 import; return a stable facade over the classic _Locimp.

Co-authored-by: Cursor <[email protected]>
2026-10-15 18:57:39 +02:00
Yunus Shaikh 433bf1ebc2 fix(libc): map _Towctrans descriptors 1 and 2 to lower and upper case
_Towctrans passed the guest's descriptor to the host towctrans.
Dinkumware's <wctype.h> (xwcc.h) defines towlower(wc) as
_Towctrans(wc, 1) and towupper(wc) as _Towctrans(wc, 2), the values
FreeBSD's wctrans.c also uses for "tolower" and "toupper". UCRT reads
1 as toupper and other nonzero values as tolower, so on Windows
towlower(L'A') returned L'A' and towupper(L'a') returned L'a', while
towlower(L'a') returned L'A'. The host wint_t is 16 bits there, which
also turned WEOF into 0xffff. glibc's wctrans_t is a pointer to a
table that towctrans reads, so on Linux descriptor 1 or 2 is
dereferenced as an address.

_Towctrans now takes the guest's 32-bit wint_t and size_t descriptor.
1 and 2 map 0..255 through the C locale tables behind _Getptolower and
_Getptoupper and return other values unchanged. Any other descriptor
sets errno to EINVAL and returns wc unchanged, as FreeBSD's
towctrans_l does.
2026-10-11 16:05:26 -07:00
Nahuel Genchi 2b83a533b8 test(libc): match the immortal classic locale and run guest_locale in ctest 2026-10-07 00:00:12 -03:00
boykopovar 9a4c8eab8b fix(libc): update locale signatures + add sysv abi to math funcs 2026-09-24 22:57:49 +03:00
boykopovar c9a82af00c fix(libc): add guest-compatible c++ locale abi 2026-09-24 10:51:11 +03:00