feat(libSceLibcInternal): implement atoll #1852

Closed
kallmek3nny wants to merge 1 commit from upstream-pr/1852 into main
kallmek3nny commented 2026-10-08 22:03:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kallmek3nny on 2026-10-08T22:03:09Z.


What

Adds the missing atoll export to libSceLibcInternal, delegating decimal conversion to the host C runtime. This covers one unresolved import reported for the EVO-PLAYER homebrew title in #1578; it does not resolve the other missing imports in that report.

Tested

  • python tools/check_conventions.py --base origin/main (passed).
  • git diff --check (passed).
  • Build and runtime tests not run. The available Windows compiler is MinGW-w64 GCC 16.1.0; the project currently supports GCC 15.2.0 on Windows.

Checklist

  • Based on current main; no open PR implements atoll
  • One topic per PR
  • No code comments added
  • No unimplemented paths or silent stubs changed
  • No notes, investigation files or images added
  • No third-party code added
  • Generic standard-library behavior, not title-specific
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4793320986 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1852). Originally posted by [kallmek3nny](https://github.com/kallmek3nny) on 2026-10-08T22:03:09Z. --- ### What Adds the missing `atoll` export to `libSceLibcInternal`, delegating decimal conversion to the host C runtime. This covers one unresolved import reported for the EVO-PLAYER homebrew title in #1578; it does not resolve the other missing imports in that report. ### Tested - `python tools/check_conventions.py --base origin/main` (passed). - `git diff --check` (passed). - Build and runtime tests not run. The available Windows compiler is MinGW-w64 GCC 16.1.0; the project currently supports GCC 15.2.0 on Windows. ### Checklist - [x] Based on current `main`; no open PR implements `atoll` - [x] One topic per PR - [x] No code comments added - [x] No unimplemented paths or silent stubs changed - [x] No notes, investigation files or images added - [x] No third-party code added - [x] Generic standard-library behavior, not title-specific - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-08 22:03:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T22:03:33Z.


Progress report (ae91d97 → 5d007ee)

➖ System libraries: 84.76% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceLibcInternal atoll_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6069915736 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1852#issuecomment-6069915736). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T22:03:33Z. --- <!-- progress-report --> ### Progress report (ae91d97 → 5d007ee) ➖ **System libraries**: 84.76% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceLibcInternal | `atoll_nid_postfix` | </details>
github-actions[bot] commented 2026-10-08 22:21:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T22:21:02Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1869 core/libs/prx/libSceLibcInternal/Export.cpp L106
#1906 core/libs/prx/libSceLibcInternal/Export.cpp L106
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6070201280 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1852#issuecomment-6070201280). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T22:21:02Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1869 | `core/libs/prx/libSceLibcInternal/Export.cpp` [L106](https://github.com/boykopovar/AnyPS5/blob/d9484c719b2a5ac6201e27f8657e0fb0f01e648c/core/libs/prx/libSceLibcInternal/Export.cpp#L106) | | | | #1906 | `core/libs/prx/libSceLibcInternal/Export.cpp` [L106](https://github.com/boykopovar/AnyPS5/blob/d9484c719b2a5ac6201e27f8657e0fb0f01e648c/core/libs/prx/libSceLibcInternal/Export.cpp#L106) | | |
Dextroid17 commented 2026-10-09 03:01:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T03:01:25Z.

Review: COMMENTED


Verified on Linux — the half the body says was not run, plus a note on the host delegation.

  • cmake --build build --target libs → clean.
  • Module-level differential: readelf -sW build/core/libs/libs/unpatched/libSceLibcInternal.prx lists atoll_nid_postfix as a GLOBAL FUNC with the change; rebuilding the same way with this file at main gives 0. So the export is real and it lands in the module.
  • The delegation is safe here, unlike its sibling. long long atoll(const char*) returns long long, which is 64 bits on Windows too, so handing the conversion to the host C runtime gives the guest the width it expects. That is worth one sentence in the body: atol next door needed an explicit strtoll precisely because the host's long is 32 bits on Windows (#1868), and a reader who sees this one delegating to the host will ask why that one could not.

For the merge bar: #1578 line 32 lists atoll among the missing libSceLibcInternal imports, so the "why" exists — quoting the title's unresolved-import line here would put it alongside the fix.

Not verified: Windows; the runtime half — the export is proven present, not proven called.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5465230664 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1852#pullrequestreview-5465230664). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-09T03:01:25Z. **Review:** COMMENTED --- Verified on Linux — the half the body says was not run, plus a note on the host delegation. - `cmake --build build --target libs` → clean. - **Module-level differential**: `readelf -sW build/core/libs/libs/unpatched/libSceLibcInternal.prx` lists `atoll_nid_postfix` as a `GLOBAL FUNC` with the change; rebuilding the same way with this file at `main` gives **0**. So the export is real and it lands in the module. - **The delegation is safe here, unlike its sibling.** `long long atoll(const char*)` returns `long long`, which is 64 bits on Windows too, so handing the conversion to the host C runtime gives the guest the width it expects. That is worth one sentence in the body: `atol` next door needed an explicit `strtoll` precisely because the host's `long` is 32 bits on Windows (#1868), and a reader who sees this one delegating to the host will ask why that one could not. **For the merge bar**: #1578 line 32 lists `atoll` among the missing `libSceLibcInternal` imports, so the "why" exists — quoting the title's unresolved-import line here would put it alongside the fix. Not verified: Windows; the runtime half — the export is proven present, not proven called. Written with AI assistance.
oneandonlydean commented 2026-10-09 09:30:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:30:04Z.


Closing: atoll was EVO-PLAYER's stop on Windows for v0.10.0 when #1578 was opened, but v0.11.0 stops elsewhere on main. Reopen when it's a title's next stop on main, with the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6078235654 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1852#issuecomment-6078235654). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T09:30:04Z. --- Closing: `atoll` was EVO-PLAYER's stop on Windows for v0.10.0 when #1578 was opened, but v0.11.0 stops elsewhere on main. Reopen when it's a title's next stop on main, with the log line.

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!1852
No description provided.