fix(libc): print the FreeBSD printf extensions and stray percent signs on Windows #5087
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5087"
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 ErenYeager1836 on 2026-10-13T11:15:00Z.
What
The Windows printf formatting implementation threw on the FreeBSD
qlength modifier (%qd,%qu, etc.),%D,%Oand%Uconversions, unknown conversion characters, and formats ending with a trailing%.qlength modifier by mapping to 64-bit integer formatting (ll).%D,%Oand%Uconversions to long formats per FreeBSD 11.4vfprintf.c.%character.core/libs/tests/Formatting.cpp.docs/dev/debt/libc.md.Carried from @HusseinKadhim with attribution preserved.
Tested
Windows and Linux:
core/libs/tests/Formatting.cpptest suite passes for FreeBSD printf conversion extensions.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)Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T11:45:01Z.
Review note (static): behavior matches FreeBSD 11.4
vfprintf.cas far as I checked:%D,%O,%Uact as%ld,%lo,%lu, a conversion character that is not known prints as%cwith that character (including width), and a format that ends in%ends the output. One question: for%hD/%hhDthe code switches tol, which agrees with FreeBSD where the long flag takes precedence over the short flag; a test line for%hhDwould pin that. The tests sit in the Windows-only part ofFormatting.cpp; the description does not say whether they were run on Windows. The branch also editsdocs/dev/debt/libc.mdat the end of the file, where #5070 and #4981 add entries too, so expect a rebase of the debt file when one of them lands.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T16:02:16Z.
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.
main)core/libs/prx/libc/include/WindowsFormatting.hppL309, L314-316, L393docs/dev/debt/libc.mdL68Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-13T18:43:22Z.
Closing in favor of earlier open PR #3987 by @MarcZX100.
Pull request closed