Bruno Haible via Gnulib discussion list <[email protected]> writes:

> Paul Eggert wrote:
>> +       int _r = fputc (Byte, P); \
>> +       if (_r < 0) \
>> +         return _r; \
>
> When fputc fails, it returns EOF, which POSIX [1] guarantees to be negative.
> But in fprintftime.h we make the stronger assertion that the return value
> is == -1, not only negative. (Although, admittedly, all existing platforms
> define EOF to -1 or (-1).)

The POSIX requirement is adopted from ISO C. See C23 § 7.24.1 or C99 §
7.19.1.

Collin

Reply via email to