From 164ebfe612d8460c15d7acf1927faef6943571b6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 4 Jan 2013 13:21:48 -0800 Subject: [PATCH] fprintftime: bring back and reword fwrite comment * lib/strftime.c (cpy) [FPRINTFTIME]: Re-add reworded comment. --- ChangeLog | 3 +++ lib/strftime.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index da4a068e23..f036ac11ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-01-04 Paul Eggert + fprintftime: bring back and reword fwrite comment + * lib/strftime.c (cpy) [FPRINTFTIME]: Re-add reworded comment. + stdio: remove now-unnecessary stdio.c Since stdio.in.h no longer uses inline functions, we no longer need to compile the extern versions. diff --git a/lib/strftime.c b/lib/strftime.c index 213ced860d..c82d585bfa 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -208,7 +208,14 @@ extern char *tzname[]; else if (to_uppcase) \ fwrite_uppcase (p, (s), _n); \ else \ - fwrite (s, _n, 1, p); \ + { \ + /* Ignore the value of fwrite. The caller can determine whether \ + an error occured by inspecting ferror (P). All known fwrite \ + implementations set the stream's error indicator when they \ + fail due to ENOMEM etc., even though C11 and POSIX.1-2008 do \ + not require this. */ \ + fwrite (s, _n, 1, p); \ + } \ } \ while (0) \ ) -- 2.39.5