bitwiseworks / libc

LIBC Next (kLIBC fork)
9 stars 4 forks source link

fwrite returns EOF #120

Closed josch1710 closed 2 years ago

josch1710 commented 2 years ago

Describe the bug According to the man page of fwrite (cf. https://linux.die.net/man/3/fwrite), fwrite shall only return 0 or the number of successfully written items.

To Reproduce

  1. Build SDL2-os2
  2. Build tests
  3. Run testautomation.
  4. The test for a file that is open for reading fails, expecting a return value of 0, getting -1.

Expected behavior fwrite should never return EOF (-1).

Desktop (please complete the following information):

dmik commented 2 years ago

Thanks for reporting, should be fixed now. Please test http://rpm.netlabs.org/test/libcn0.zip (drop-in replace it after unlocking and reboot).

josch1710 commented 2 years ago

Works perfect. Thanks for the fast fix.