feat(libc): implement strsep #3192
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3192"
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 reyani-dev on 2026-10-11T00:51:36Z.
Resubmission of #2187, which was closed because no title was shown stopping on
strsep. Withexecvp(#2827) merged, VLC (PPSA85300) now stops atstrseponmain06da1176, per @babyhuey's catalog run withsce_module/libc.prxunwrapped (comment):cJWGxiQPmDQisstrsep. With this change the title moves on tonanf(DZU+K1wozGI), per the same run.strsepis still absent on currentmain, and no open PR implements it. The branch is rebased onto currentmain. Windows 11 (WinLibs GCC 15.2.0), Release:guest_stringspasses 3/3, andcheck_conventions.pyandpr_overlap.py --branchpass.What
Exports
strsepwith FreeBSD's semantics (lib/libc/string/strsep.c):*stringp, ending at the first delimiter.*stringpadvances past it.strtok.*stringpbecomes NULL; with*stringp == NULLit returns NULL.Title: PPSA99169 RetroArch imports it from
libSceLibcInternal(resolved throughlibc.prx), per the #1578 audit. I haven't run the title.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release,
-DBUILD_TESTING=ON:guest_string_tests, next to thestrtokcases:",a,,b;c"with",;");""and then NULL.strtok_r, which skips empty fields, makesguest_stringsfail.cmake --build build --target libs: the patchedlibc.prxexportscJWGxiQPmDQ.tools/check_conventions.pypasses, andtools/pr_overlap.py --branchreports no overlap. The function is placed away from the lines #1812, #1848 and #1972 change.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T00:51:58Z.
Progress report (
06da117→0f480c6)➖ System libraries: 85.96% (+0.0%, +1 implemented functions)
✅ 1 implemented
strsep_nid_postfixImported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T01:08:17Z.
Fork CI for this head merged onto current
main(run 38099856726):agc_unit_shadow,agc_driver_flat_apertures(timeout) andagc_driver_image_packed16_load, which fail identically inmain's own push build (run 38098335801). This PR only touches libc, so they're unrelated.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T01:37:00Z.
Checked with #3190, #3191 and #3192 stacked on
maind31b57a4(all merge cleanly), catalog builds withsce_module/libc.prxunwrapped. Linux (Ubuntu 24.04, GCC 13) and Windows 11 (WinLibs GCC 15.2), Release:guest_mathandguest_stringspass 5/5 (--repeat until-fail:5) on both, with no warnings inMath.cpporStringExtensions.cpp.VLC (PPSA85300) gets past
strsepon both:app.elf: symbol lookup error: app.elf: undefined symbol: DZU+K1wozGI(nanf)FAIL: unresolved ELF import Wn6I3wVATUE (daemon) from libSceLibcInternal.prxThe Windows loader names a different first missing import; both are missing on
main.