feat(libc): implement stpcpy #1812
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1812"
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 DariusHQ on 2026-10-08T20:04:10Z.
What
stpcpy(ZSnX-xZBGCg) is absent from the libc exports. PICO-8 for PS5 (PPSA99808) imports it fromlibSceLibcInternal, one of the absent imports that #1578 lists for that title. Part of #1578POSIX.1-2008 defines
stpcpyasstrcpythat returns a pointer to the terminating null byte of the copy instead of to its start. The export copies the string with its terminator and returnsdestination + strlen(source)The NID matches the built
libc.prx:Tested
Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build with
BUILD_TESTING=ON:ctest477/477 passed.guest_stringschecks the returned pointer over two chained copies, that no byte past the terminator is written, and an empty source. The build and tests ran onb858fdc4; the branch was then rebased onto4b6ab6bb, whose new commits touch only shaders and CI. Not tested on Linux. No title run: PPSA99808 still has other absent imports.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T22:08:31Z.
Checked on Linux (main + this PR): build and ctest 523/523,
guest_stringspasses and fails to link without the change. NIDZSnX-xZBGCgmatchesstpcpy; semantics match POSIX.1-2008. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:10:58Z.
Progress report (
364a56b→e411282)➖ System libraries: 84.76% (+0.0%, +1 implemented functions)
✅ 1 implemented
stpcpy_nid_postfix