Repository navigation
feat(libc): implement clearerr_unlocked, fileno_unlocked and fgetln - #7282
Merged
oneandonlydean merged 1 commit intoOct 18, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for your contribution! Authors with no pull requests merged into |
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements
clearerr_unlocked,fileno_unlockedandfgetlnfollowing the console's decryptedlibSceLibcInternal.sprx(SDK 4.5x build ofJ03950001):clearerr_unlockedclears the stream's end-of-file and error flags asclearerrdoes,fileno_unlockedreturns -1 for a null stream instead of dereferencing it, andfgetlnis ahltinstruction on the console, so it throws (recorded in the debt file).getwandputware left to #7249.Tested
Windows 11 (MinGW GCC 15.2) and Ubuntu 26.04 on WSL2 (GCC 15.2), Release builds:
ctestfor guest_standard_streams passes on both, with all of this batch applied together and on its own. Compared with the console's own exports on a PS5 (firmware 13.60) from a homebrew payload that resolves them by NID:clearerr_unlockedandfileno_unlocked;fgetlnwas not run, as itshltwould end the probe; the results match this implementation except where the debt file says otherwise. Not tested with a title.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)🤖 Generated with Claude Code