feat(libc): add BSD string and memory helpers #2277
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2277"
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 obojeoboje on 2026-10-09T14:17:49Z.
What
Implement six missing libc exports:
bcopy,index,rindex,memrchr,wcscspn, andflsl.bcopypreserves the BSD source-before-destination argument order and supports overlapping buffers. Reverse searches preserve the last matching address, character-to-byte conversion and the requested memory bounds.wcscspnoperates on 16-bit guest code units instead of hostwchar_t.flslaccepts a 64-bit guestlong, including on Windows, and returns a one-based highest-set-bit position or zero for zero.Contracts follow FreeBSD bcopy(3), string(3), memchr(3), wcscspn(3), and fls(3). Export names are present in the shadPS4 aerolib table.
Checked current open PR descriptions and the relevant patches in #2193, #1772 and #1423; no duplicate implementations found. The existing
strcasestrin libScePosixForWebKit is left with its current owner.The progress scanner changes from 2578/3044 (84.69%) to 2584/3050 (84.72%). Both counts grow because these are newly declared exports. This branch is independent of the other open libc contributions.
Tested
libstarget passed.guest_video_out_wqhd_detection_no_vulkan), zero failures; 42.44 seconds total.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 oneandonlydean on 2026-10-09T20:11:14Z.
Closing for the same reason as #2271: no title is shown to reach these on main. Reopen with the title ID and log line if one does.
Pull request closed