Date: Mon, 1 Feb 2021 17:50:54 +0000 From: "Jaromir Dolecek" <jdole...@netbsd.org> Message-ID: <20210201175054.112e7f...@cvs.netbsd.org>
| FreeBSD has a similar check, but they return EINVAL instead, feel | free to adjust if SUS or other standard mandates specific value Not currently (unless the C standard says something) - but EINVAL would be a better choice, fread() incorporates all errors from fgetc() (and fwrite() from fputc()) and there EOVERFLOW is used to indicate that the file offset exceeds the maximum possible file size, which is quite a different problem. EINVAL is currently unused (at least in POSIX) but makes more sense for this problem (which is am invalid arg combination). FWIW, I submitted a defect report on this issue with the Austin Group (POSIX maintainers) yesterday, though I am expecting they'll simply punt it to the C standards group. kre