* lib/strftime.c (FPUTC): On failure, return FAILURE, not EOF.
(width_cpy) [FPRINTFTIME]: Write -1 as FAILURE, for consistency.
+2025-11-01 Bruno Haible <bruno@clisp.org>
+
+ fprintftime: Return -1 on output error.
+ * lib/strftime.c (FPUTC): On failure, return FAILURE, not EOF.
+ (width_cpy) [FPRINTFTIME]: Write -1 as FAILURE, for consistency.
+
2025-10-31 Paul Eggert <eggert@cs.ucla.edu>
fprintftime: return negative on output error
{ \
int _r = fputc (Byte, P); \
if (_r < 0) \
- return _r; \
+ return FAILURE; \
} \
while (false)
for (byte_count_t _i = 0; _i < _n; _i++) \
FPUTC (TOUPPER ((UCHAR_T) _s[_i], loc), p); \
else if (fwrite (_s, _n, 1, p) == 0) \
- return -1; \
+ return FAILURE; \
} \
while (0) \
)