feat(libSceLibcInternal): implement remaining time_get facets #22526
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22526"
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 MarrasFederico on 2026-11-17T19:00:15Z.
What
Implements the eight remaining
std::time_getexports incore/libs/prx/libSceLibcInternal/TimeGetFields.cppand wires the remainingGuestLocale::TimeGetVtableslots ing_wideTimeGetVtable:time_get<char>::_Getint(8raXTYQ11cg) andtime_get<char>::_Getfmt(E7UermPZVcw), parameterizing_GetfmtinDoGetFmtImpl<TChar>acrosscharandwchar_t(adapted from Microsoft STLstl/inc/xloctime@770da5aa457af11f0a796600e1aa6f7f6fce14a6).time_get<char>::do_get_date(T85u2sPrKOo) andtime_get<wchar_t>::do_get_date(SYCwZXKZQ08) viaDoGetDateImpl<TChar>supportingno_order(mdy),dmy,mdy,ymd, andydmcomponent ordering, month-name overrides, and:/,//separators with surrounding whitespace.time_get<char>::do_get_weekday(xzYpD5d24aA) andtime_get<wchar_t>::do_get_weekday(hGlkh5YpcKw) via sharedDoGetNameFieldImpl<TChar>.time_get<char>::do_get(Vw03kdKZUN0) andtime_get<wchar_t>::do_get(0MzJAexrlr4) viaDoGetImpl<TChar>across all Dinkumware format specifiers (a,A,b,B,h,c,C,d,e,D,H,I,j,m,M,n,t,p,r,R,S,T,X,U,W,w,x,y,Y,%, and unknown specifierfailbithandling).g_wideTimeGetVtableslotsgetDate,getWeekday, andgetto the widedo_get_date,do_get_weekday, anddo_getexports (removingTimeFieldsWideUnsupported_nid_no_patchandTimeFieldsWideFieldUnsupported_nid_no_patch), removes the eight stub exports fromcore/libs/prx/libSceLibcInternal/Export.cpp, declares the eight exports incore/libs/prx/libSceLibcInternal/include/TimeGetFields.hpp, updates the#21895wide%Hthrowing expectation and adds coverage incore/libs/tests/GuestLibcInternalTimeGetFields.cpp, and adds the debt fragmentdocs/dev/debt/changes/feat-libcinternal-time-get-remaining.md.Based on
mainatb1727795a26b265ea42de24c754084bd0f9a2b7d; checked withgit merge-treeagainst livemainbefore publication.Tested
Linux x86-64 (Release, GCC 15.2.0, Ninja,
-DBUILD_TESTING=ON), not tested on Windows or hardware console:guest_libc_internal_time_get_fields_testsandguest_libc_internal_time_get_tests.ctest --output-on-failure -R "^guest_libc_internal_time_get":2/2passed (guest_libc_internal_time_get,guest_libc_internal_time_get_fields), plus3consecutive passing pre-commit test runs covering buffered and unbufferedstreambuf, all date orders, alldo_getspecifiers,g_wideTimeGetVtabledispatch, dynamicdlsymlookup of all 8_nid_postfixsymbols inlibSceLibcInternal.prx, and null-argumentNotImplementederror paths.ans == 12 ? 0 : anstoans == 12 ? 12 : ansinDoGetImplcausedguest_libc_internal_time_get_fieldsto fail as expected; restoring exact file SHA-256 restored the pass.python3 tools/check_conventions.py(0 findings, 0 errors),python3 core/libs/tests/test_public_headers.py --audit-only(413 libraries, 34713 exports),python3 tools/debt_fold.py --check,git diff --check, and cleangit merge-tree --write-tree HEAD upstream/main. Overlap notes:pr_overlap.py --namesshows no competing implementation PR;pr_overlap.py --branchreports#22462conflicting on lines ofmain(TimeGetFields.cppL395,L570-572,L596-602,L653-656,L658-685andGuestLibcInternalTimeGetFields.cppL16,L65-72,L690,L707), alias-rename#17300, and fail-closedShared files not comparedentries (#13778,#17300,#18135).The constructor follow-up #22528 is independent but shares
TimeGetFields.cpp, its public header, the test and CMake registration; landing either first will require resolving those textual changes while retaining both sets of tests. #22462 is a separate guest-pointer safety fix; this branch does not include it and its safety changes must be retained when combining the branches. The full shared-file diffs were checked manually, including comparisons the overlap tool could not complete; #17300 only renames throwing aliases, not their implementation.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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T19:01:57Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8959f868ed:tools/check_conventions.pypassed.guest_libc_internal_time_get_fields_testsbuilt cleanly.guest_libc_internal_time_get_fields):core/libs/prx/libSceLibcInternal/Export.cpp,core/libs/prx/libSceLibcInternal/TimeGetFields.cpp,core/libs/prx/libSceLibcInternal/include/TimeGetFields.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T19:43:52Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
00ad30a7ee:tools/check_conventions.pypassed.guest_libc_internal_time_get_fields_testsbuilt cleanly.guest_libc_internal_time_get_fields):core/libs/prx/libSceLibcInternal/Export.cpp,core/libs/prx/libSceLibcInternal/TimeGetFields.cpp,core/libs/prx/libSceLibcInternal/include/TimeGetFields.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me