try Paul Eggert's upstream fix for the mingw compilation problem in 1.9
authorBdale Garbee <bdale@gag.com>
Sat, 4 Aug 2018 10:03:28 +0000 (18:03 +0800)
committerBdale Garbee <bdale@gag.com>
Sat, 4 Aug 2018 10:03:28 +0000 (18:03 +0800)
debian/changelog
debian/patches/0001-gzip-port-better-to-mingw-again.patch [new file with mode: 0644]
debian/patches/0001-gzip-port-better-to-mingw.patch [new file with mode: 0644]
debian/patches/series

index 39d40f8576ec74332162a89e668f49e81ccc1b89..50c546eda09243af5d19f634f32f4aea1201d8b4 100644 (file)
@@ -1,3 +1,9 @@
+gzip (1.9-2) unstable; urgency=medium
+
+  * move to upstream's less-ugly fix for mingw compilation failure
+
+ -- Bdale Garbee <bdale@gag.com>  Sat, 04 Aug 2018 18:03:03 +0800
+
 gzip (1.9-1) unstable; urgency=medium
 
   * new upstream version, closes: #855839
diff --git a/debian/patches/0001-gzip-port-better-to-mingw-again.patch b/debian/patches/0001-gzip-port-better-to-mingw-again.patch
new file mode 100644 (file)
index 0000000..b0526ed
--- /dev/null
@@ -0,0 +1,28 @@
+From 1252d056feaf71e7488cbaa5a78b3d45cd77f877 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sat, 4 Aug 2018 00:37:43 -0700
+Subject: [PATCH] gzip: port better to mingw again
+
+Problem reported by Bdale Garbee (Bug#32305#8).
+* gzip.c (do_chown): Use HAVE_FCHOWN || HAVE_CHOWN,
+which is configured, instead of DO_CHOWN, which is not.
+---
+ gzip.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gzip.c b/gzip.c
+index 02d5364..b26dd14 100644
+--- a/gzip.c
++++ b/gzip.c
+@@ -1923,7 +1923,7 @@ local int check_ofname()
+    the file and NAME its name.  Change it to user UID and to group GID.
+    If UID or GID is -1, though, do not change the corresponding user
+    or group.  */
+-#ifdef NO_CHOWN
++#if ! (HAVE_FCHOWN || HAVE_CHOWN)
+ /* The types uid_t and gid_t do not exist on mingw, so don't assume them.  */
+ # define do_chown(fd, name, uid, gid) ((void) 0)
+ #else
+-- 
+2.18.0
+
diff --git a/debian/patches/0001-gzip-port-better-to-mingw.patch b/debian/patches/0001-gzip-port-better-to-mingw.patch
new file mode 100644 (file)
index 0000000..e9e0c36
--- /dev/null
@@ -0,0 +1,41 @@
+From 222dc8c90f31f7027d0aa7a18206f5c56006f780 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 29 Jul 2018 11:27:32 -0700
+Subject: [PATCH] gzip: port better to mingw
+
+Problem reported by Bdale Garbee for Debian
+* gzip.c (do_chown): Don't assume uid_t and gid_t.
+---
+ gzip.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/gzip.c b/gzip.c
+index 429e554..a023d81 100644
+--- a/gzip.c
++++ b/gzip.c
+@@ -1914,17 +1914,20 @@ local int check_ofname()
+    the file and NAME its name.  Change it to user UID and to group GID.
+    If UID or GID is -1, though, do not change the corresponding user
+    or group.  */
++#ifdef NO_CHOWN
++/* The types uid_t and gid_t do not exist on mingw, so don't assume them.  */
++# define do_chown(fd, name, uid, gid) ((void) 0)
++#else
+ static void
+ do_chown (int fd, char const *name, uid_t uid, gid_t gid)
+ {
+-#ifndef NO_CHOWN
+ # if HAVE_FCHOWN
+   ignore_value (fchown (fd, uid, gid));
+ # else
+   ignore_value (chown (name, uid, gid));
+ # endif
+-#endif
+ }
++#endif
+ /* ========================================================================
+  * Copy modes, times, ownership from input file to output file.
+-- 
+2.18.0
+
index a0ba90ee750444437e8939ff670fd4b6d08dcb3c..69f81e332c897e24844a3c842408abfeb2738362 100644 (file)
@@ -1,4 +1,5 @@
 sigpipe.diff
 gzip_reproducible_build.diff
 zgrep-syntax-error.diff
-fix-mingw-compile.diff
+0001-gzip-port-better-to-mingw.patch
+0001-gzip-port-better-to-mingw-again.patch