Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/stdio



    Date:        Mon, 1 Feb 2021 17:50:54 +0000
    From:        "Jaromir Dolecek" <jdolecek%netbsd.org@localhost>
    Message-ID:  <20210201175054.112E7FA91%cvs.NetBSD.org@localhost>

  | 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



Home | Main Index | Thread Index | Old Index