[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value
From: |
Paul Eggert |
Subject: |
Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value |
Date: |
Fri, 04 Jan 2013 13:25:27 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 01/04/2013 11:52 AM, Jim Meyering wrote:
> I would be happy with that.
OK, I pushed this:
---
ChangeLog | 3 +++
lib/strftime.c | 9 ++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index da4a068..f036ac1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-01-04 Paul Eggert <address@hidden>
+ 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 213ced8..c82d585 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) \
)
--
1.7.11.7
- [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/03
- [PATCH 2/3] unicodeio: depend on stdio, not ignore-value, Paul Eggert, 2013/01/03
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Jim Meyering, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Jim Meyering, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Eric Blake, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Jim Meyering, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value,
Paul Eggert <=