feat(libc): export wcstombs_s #8396
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8396"
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 Chuk49 on 2026-10-20T12:12:59Z.
What
libc.prxdid not exportwcstombs_s(sZLrjx-yEx4); onlylibSceAmpr.prxdid. Ghost of Yotei imports it fromlibc.prxand stops during symbol resolution (#8383).The implementation moves from libSceAmpr to libc's
Multibyte.cpp, next towcsrtombs_s. libSceAmpr keeps exporting the NID throughAPS5_EXPORT("sZLrjx-yEx4", sceAmprWcstombsS), which forwards to libc. A plainwcstombs_s_nid_postfixdefinition in libSceAmpr would lose its NID: the patcher leaves any name that libc also exports unrenamed (--preserve-export-list). This is the same pattern libSceAmpr already uses formbstowcsandwcscpy_s.The other import in #8383,
mbstowcs_s(tdcAqgCS+uI), is implemented by #7841, so this PR leaves it alone.Tested
Linux (Arch), GCC 16.2.1, full build with
BUILD_TESTING=ON:guest_wcsrtombs_snow also checkswcstombs_sin libc: conversion,lenlimit, count-only, ERANGE, EINVAL and EILSEQ.guest_ampr_threadsruns its existingwcstombs_scases through the libSceAmpr exportsceAmprWcstombsS.ctest -R "ampr|wcs|mbs|crt|patched_libraries|nid|multibyte": 21/21 pass.nm -Don the patchedbuild/core/libs/libs/libc.prxandlibSceAmpr.prx: both definesZLrjx-yEx4.No title run.
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)wcstombs_sfrom #8383;mbstowcs_sis #7841)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T12:32:39Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestAmprThreads.cppcore/libs/tests/GuestWcsrtombsS.cppcore/libs/prx/libSceAmpr/Export.cppcore/libs/prx/libSceAmpr/Export.cpp