gzip: fix bug where you say "n" and gzip acts as if you said "y"
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Feb 2013 21:37:40 +0000 (13:37 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Feb 2013 22:20:14 +0000 (14:20 -0800)
Problem reported for GCC 4.7 x86-64 -O2 by Allan McRae in
<http://lists.gnu.org/archive/html/bug-gzip/2013-02/msg00000.html>.
* NEWS: Document this.  Use consistent format in earlier note.
* gzip.c: Include yesno.h.
* gzip.h (yesno): Remove decl; that's yesno.h's job.

NEWS
gzip.c
gzip.h

diff --git a/NEWS b/NEWS
index 218a73772ac6578ce60599387a8e841d01b21290..c8ae541f38e3d7ce71834b41593541461631765e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,11 @@ GNU gzip NEWS                                    -*- outline -*-
 ** Bug fixes
 
   gzip -d no longer malfunctions with certain invalid data in 'pack' format.
-  Problem reported by Aki Helin.  [bug introduced in gzip-0.8]
+  [bug introduced in gzip-0.8]
+
+  When overwriting, gzip no longer acts as if you typed "y" when you type "n",
+  on some platforms when compiled with optimization.
+  [bug introduced in gzip-1.3.6]
 
   zgrep no longer malfunctions with a multi-digit context option like -15.
   Now, it passes that option to grep (equivalent to -C15) just as it does
diff --git a/gzip.c b/gzip.c
index b9b4d64bfba4b34fadc1733d7c421d2043e30d89..66529e0fac586ff228bc752d687d0b54ba43b2b0 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -74,6 +74,7 @@ static char const *const license_msg[] = {
 #include "ignore-value.h"
 #include "stat-time.h"
 #include "version.h"
+#include "yesno.h"
 
                 /* configuration */
 
diff --git a/gzip.h b/gzip.h
index bf253d0afbf5b9dbdeb8a30ab9773a017be6964e..648073eee4b3106513c4102dddfd8de02e99ca1a 100644 (file)
--- a/gzip.h
+++ b/gzip.h
@@ -321,6 +321,3 @@ extern void fprint_off    (FILE *, off_t, int);
 
         /* in inflate.c */
 extern int inflate (void);
-
-        /* in yesno.c */
-extern int yesno (void);