feat(libc): implement localeconv #3310

Closed
renzipego-cpu wants to merge 1 commit from upstream-pr/3310 into main
renzipego-cpu commented 2026-10-11 06:56:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by renzipego-cpu on 2026-10-11T06:56:05Z.


Resubmits #3245 (closed by the intake rule). Fixes #3249.

What

libc does not export localeconv (0hlfW1O4Aa4, named with tools/nid_names.py against aerolib). main stops with:

Confirmed on main for:

  • PPSA99600 (Cloud Play)
  • PPSA17641 (SymphonyStation5)

localeconv() takes no arguments and returns a pointer to the standard static C-locale lconv (offsets asserted: sizeof == 0x60, decimal_point at 0x00, negative_sign at 0x48, int_frac_digits at 0x50, int_n_sign_posn at 0x5d); string fields are "." for decimal_point and "" for the rest, character fields CHAR_MAX. Recorded in TechnicalDebt: setlocale is not supported, so the structure never changes.

Note: open PR #545 re-exports this NID from libSceAmpr; this PR implements the libc import the affected titles reference.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, BUILD_TESTING=ON: guest_locale passes (asserts every field value, a stable pointer across calls and that errno is untouched). python3 -I tools/check_conventions.py --base origin/main and tools/check_test_registration.py pass. Titles were not run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4817224659 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3310). Originally posted by [renzipego-cpu](https://github.com/renzipego-cpu) on 2026-10-11T06:56:05Z. --- Resubmits #3245 (closed by the intake rule). Fixes #3249. ### What libc does not export `localeconv` (`0hlfW1O4Aa4`, named with tools/nid_names.py against aerolib). `main` stops with: Confirmed on `main` for: - PPSA99600 (Cloud Play) - PPSA17641 (SymphonyStation5) `localeconv()` takes no arguments and returns a pointer to the standard static C-locale `lconv` (offsets asserted: `sizeof == 0x60`, `decimal_point` at 0x00, `negative_sign` at 0x48, `int_frac_digits` at 0x50, `int_n_sign_posn` at 0x5d); string fields are `"."` for `decimal_point` and `""` for the rest, character fields `CHAR_MAX`. Recorded in TechnicalDebt: `setlocale` is not supported, so the structure never changes. Note: open PR #545 re-exports this NID from libSceAmpr; this PR implements the libc import the affected titles reference. ### Tested Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, `BUILD_TESTING=ON`: `guest_locale` passes (asserts every field value, a stable pointer across calls and that `errno` is untouched). `python3 -I tools/check_conventions.py --base origin/main` and `tools/check_test_registration.py` pass. Titles were not run. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 06:56:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T06:56:14Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106441073 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3310#issuecomment-6106441073). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T06:56:14Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3310
No description provided.