bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 1/3] fprintftime: depend on stdio, not ignore-value


From: Paul Eggert
Subject: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value
Date: Thu, 03 Jan 2013 18:07:08 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

* lib/strftime.c [FPRINTFTIME]: Do not include ignore-value.h.
(cpy) [FPRINTFTIME]: Use plain fwrite, not ignore_value of fwrite,
since the stdio module arranges to silence that warning now.
* modules/fprintftime (Depends-on): Depend on stdio, not ignore-value.
---
 ChangeLog           |  8 ++++++++
 lib/strftime.c      | 11 +----------
 modules/fprintftime |  2 +-
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8539bc9..ab35abd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-01-04  Paul Eggert  <address@hidden>
+
+       fprintftime: depend on stdio, not ignore-value
+       * lib/strftime.c [FPRINTFTIME]: Do not include ignore-value.h.
+       (cpy) [FPRINTFTIME]: Use plain fwrite, not ignore_value of fwrite,
+       since the stdio module arranges to silence that warning now.
+       * modules/fprintftime (Depends-on): Depend on stdio, not ignore-value.
+
 2012-10-04  Simon Josefsson  <address@hidden>
 
        stdint-tests: Fix expanded-before-required-warning.
diff --git a/lib/strftime.c b/lib/strftime.c
index 1d58f2a..213ced8 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -26,7 +26,6 @@
 #else
 # include <config.h>
 # if FPRINTFTIME
-#  include "ignore-value.h"
 #  include "fprintftime.h"
 # else
 #  include "strftime.h"
@@ -209,15 +208,7 @@ extern char *tzname[];
          else if (to_uppcase)                                                 \
            fwrite_uppcase (p, (s), _n);                                       \
          else                                                                 \
-           {                                                                  \
-             /* We are ignoring the value of fwrite here, in spite of the     \
-                fact that technically, that may not be valid: the fwrite      \
-                specification in POSIX 2008 defers to that of fputc, which    \
-                is intended to be consistent with the one from ISO C,         \
-                which permits failure due to ENOMEM *without* setting the     \
-                stream's error indicator.  */                                 \
-             ignore_value (fwrite ((s), _n, 1, p));                           \
-           }                                                                  \
+           fwrite (s, _n, 1, p);                                              \
        }                                                                      \
      while (0)                                                                \
     )
diff --git a/modules/fprintftime b/modules/fprintftime
index 54bba63..f1c2b8a 100644
--- a/modules/fprintftime
+++ b/modules/fprintftime
@@ -6,7 +6,7 @@ lib/fprintftime.h
 lib/fprintftime.c
 
 Depends-on:
-ignore-value
+stdio
 strftime
 
 configure.ac:
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]