Repository navigation
feat(libc): implement getw and putw - #7249
Merged
oneandonlydean merged 1 commit intoOct 17, 2026
Merged
Conversation
|
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.
|
12 tasks done
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
Implement the missing
getwandputwlibc exports for 32-bit little-endian binary words.getwreads through the existing guestfreadpath, including pushed-back bytes and EOF/error state.putwwrites under one stream lock, returns zero on success and reports byte-write failures; concurrent writers cannot interleave a word's bytes. A successfully read -1 remains distinguishable from EOF through the stream indicators.The word format and return conventions follow FreeBSD 11.4 getw.c and putw.c. Host buffering/error timing and unverified console behavior are documented in the existing libc debt file.
Tested
Windows x64, WinLibs MinGW-w64 GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ONin the full runtime CMake configuration:main5859889b2fails to link on the missinggetw_nid_postfixandputw_nid_postfixexports.libc,guest_binary_word_tests,guest_standard_stream_tests,file_streams_testsandfile_position_tests.922dc8999,ctest --test-dir build -R "^(guest_binary_word|guest_standard_streams|guest_standard_streams_closed_stdout|file_streams|file_position)$" --output-on-failure --repeat until-fail:5: all five tests pass five times each.nid_patcher, patched a copy oflibc.prx, and verified the final PE exportsAoLA2MRWJvc(getw) andDwcWtj3tSPA(putw).git diff --checkpass.python tools/pr_overlap.py --branch feat/libc-binary-word-io --repo boykopovar/AnyPS5found no confirmed overlap or duplicate export. It could not fully compare eleven PRs already conflicting with main. Manually reviewed their current shared CMake/debt diffs: feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, fix(libc): follow measured wide printf behavior #5303, fix(libc): keep the host standard stream when a guest freopen of it fails #5668, test: organize library tests and label CTest suites #6044, Macos m4 #6222, feat(libc): implement the remaining Dinkumware _Atomic helpers #6334, fix(libc): leave a range that a mutation waits for out of new leases #6565, feat(libc): implement ios_base::_Addstd #6975, fix(libs): share Sony CRT handler and lconv state between libc and libSceAmpr #7081, feat(libc): implement guest backtrace capture #7084 and Macos port #7201. None implements these APIs or adds the new test; their edits are separate from the new registration and debt entry.No Linux runtime, full all-library build or title run. The completed runtime validation is scoped to libc and the tests listed above.
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)