bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM


From: Jim Meyering
Subject: Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM
Date: Thu, 05 Nov 2009 18:29:33 +0100

Eric Blake wrote:
> Jim Meyering <jim <at> meyering.net> writes:
>
>> -      if (!dry_run && close_stream (stdout))
>> +      if (!dry_run && (ferror (stdout) || fflush (stdout) != 0))
>
> That means #include "close-stream.h" is no longer required.

Right, and there was no rule to detect that, so I added one,
even though with your eventual patch, mktemp.c still uses close_stream.

>From 46b36899e091f58a96df1d64c145d6ccf392718d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 5 Nov 2009 18:26:32 +0100
Subject: [PATCH] maint.mk: Prohibit inclusion of "close-stream.h" without use.

* top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
---
 ChangeLog    |    5 +++++
 top/maint.mk |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ccde1b8..7e9d945 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-05  Jim Meyering  <address@hidden>
+
+       maint.mk: Prohibit inclusion of "close-stream.h" without use.
+       * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
+
 2009-11-05  Simon Josefsson  <address@hidden>

        * modules/pmccabe2html (configure.ac): Check for pmccabe tool.
diff --git a/top/maint.mk b/top/maint.mk
index 996344a..73ea8ea 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -257,6 +257,10 @@ endef
 sc_prohibit_assert_without_use:
        @h='<assert.h>' re='\<assert *\(' $(_header_without_use)

+# Prohibit the inclusion of close-stream.h without an actual use.
+sc_prohibit_close_stream_without_use:
+       @h='"close-stream.h"' re='\<close_stream *\(' $(_header_without_use)
+
 # Prohibit the inclusion of getopt.h without an actual use.
 sc_prohibit_getopt_without_use:
        @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_header_without_use)
--
1.6.5.2.303.g13162




reply via email to

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