Repository navigation
Conversation
FreeBSD 11.4 refill.c keeps returning EOF while __SEOF is set until clearerr, a seek or ungetc. Keep returning EOF from fgetc, getc, fgets, fread and fscanf while the stream is at end-of-file. Closes boykopovar#5279
|
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.
|
|
Windows check: Windows 11 (26300), WinLibs GCC 15.2.0, Release, head
Note: #5282 extends the same AI-assisted: yes (Claude Code) |
|
Heads-up for reviewers: this is the same change as #5222, husseinkad's own PR for the same fix, opened two hours earlier. This PR is a squash of #5222's four commits, with husseinkad still the author. #5222 has an empty description but the full branch, and this one has the description and LeandroLP23's Windows check. Only one can merge. It would help if the two authors agreed which continues and closed the other, with the description and test evidence carried over if #5222 is the one kept. |
|
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line. |
What
On Windows, after a stream reaches end-of-file, the host C runtime reads again on every call, returning newly appended bytes without a
clearerr. FreeBSD 11.4refill.ckeeps returning EOF while__SEOFis set untilclearerr, a seek orungetc.Keep returning EOF from
fgetc,getc,fgets,freadandfscanfwhile the stream is at end-of-file.fscanfdetermines its result at end-of-file from the first format directive matching FreeBSDvfscanf.c. Document%nand hostungetclimitations inTechnicalDebt.md.Closes #5279
Tested
/tmp/anyps5_build).ctest -R "^guest_standard_streams$": exercisesCheckStickyEndOfFileacrossfgetc,getc_unlocked,fgets,fread,clearerr,fseekoandfscanf.ctest -R "^file_streams$".python3 tools/check_conventions.py.Checklist
python3 tools/check_conventions.pydocs/dev/TechnicalDebt.md(if applicable)