feat(libSceLibcInternal): implement the codecvt<char,char,_Mbstatet> conversion members #18081
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18081"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by jaqb on 2026-11-10T10:42:33Z.
What
Implements nine
std::codecvt<char,char,_Mbstatet>exports of libSceLibcInternal that threw throughNotImplemented_nid_no_patch:do_always_noconv(7tIwDZyyKHo),do_in(P+q1OLiErP0),do_out(Uc+-Sx0UZ3U),do_unshift(iCWgjeqMHvg) anddo_length(Xk7IZcfHDD8) repeat thelibc.prxfacet incore/libs/prx/libc/src/LocaleSupport.cpp:do_always_noconvis true,do_inanddo_outreturnnoconvwith both next pointers at the range starts,do_unshiftreturnsokwith the next pointer at the start of the output range,do_lengthreturns the shorter of the range and the count.in(TNexGlwiVEQ),out(14xKj+SV72o),unshift(N7z+Dnk1cS0) andlength(ikBt0lqkxPc) call the object's vtable throughGuestLocale::CodecvtVtable, at thelibc.prxslot offsets 0x38, 0x40, 0x48 and 0x50.The exports move from
Err.cppto a newCodecvtChar.cpp; their declarations move fromErrExports.hpptoApi.hppwith real prototypes.sceLibcInternalPending3_035_nid_no_patchbecomessceLibcInternalCodecvtCharDoLength_nid_no_patch.Source of the behaviour: the existing libc facet, which
docs/dev/debt/libc.mdrecords as built from a consolelibc.prx. Nothing was compared with the console'slibSceLibcInternal.sprxand no title was seen calling these exports. The nine "import resolution only" debt entries are replaced by one entry stating that, including that the virtual dispatch of the four members and the slot order of vtableaK1Ymf-NhAsare unverified, and thatdo_lengthreturns 64 bits where Dinkumware<xlocale>declaresint.Tested
Windows 11, MinGW-w64 GCC (WinLibs), Release, full configure. Built
guest_libc_internal_codecvt_char_tests,guest_libc_internal_constant_members_tests,guest_libc_internal_unexpected_testsandguest_err_testsand ran:guest_libc_internal_codecvt_char(new): the five virtuals, the four members on a facet built from them, agreement with the facet libc's_Getcatbuilds, and dispatch of the four members to an overriding vtable. Passed.guest_libc_internal_constant_members,guest_libc_internal_unexpected,guest_err,public_headers. Passed.python tools/check_conventions.py --base upstream/main. Passed.Not tested: Linux, any title or homebrew, the rest of the test suite.
tools/pr_overlap.pywas not run (noghon this machine); open pull requests were searched by hand for these symbols and NIDs.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)