gzip-1.10.patchset revision 762b32c4
1From b20ebcc4a50426942827a18edbff3a60f46d016d Mon Sep 17 00:00:00 2001
2From: fbrosson <fbrosson@localhost>
3Date: Tue, 26 Apr 2016 21:03:14 +0000
4Subject: Do not try to create hard links.
5
6
7diff --git a/Makefile.am b/Makefile.am
8index d4ecc3f..9c0b0f7 100644
9--- a/Makefile.am
10+++ b/Makefile.am
11@@ -146,7 +146,7 @@ install-exec-hook remove-installed-links:
12 	     rm -f "$$dest" && \
13 	     case $@ in \
14 	     install-exec-hook) \
15-	       ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \
16+	       $(LN_S) "$$source" "$$dest";; \
17 	     esac \
18 	    ) || exit; \
19 	  done; \
20-- 
212.19.1
22
23
24From e7a269065e8423a0e1666fcae5f5ec5732823ccd Mon Sep 17 00:00:00 2001
25From: Jerome Duval <jerome.duval@gmail.com>
26Date: Tue, 2 Oct 2018 15:27:27 +0200
27Subject: gcc2 patch
28
29
30diff --git a/gzip.c b/gzip.c
31index 9751c5e..631127d 100644
32--- a/gzip.c
33+++ b/gzip.c
34@@ -292,7 +292,7 @@ static const struct option longopts[] =
35 
36 /* local functions */
37 
38-local noreturn void try_help (void);
39+local __attribute__ ((__noreturn__)) void try_help (void);
40 local void help         (void);
41 local void license      (void);
42 local void version      (void);
43@@ -312,7 +312,7 @@ local void copy_stat    (struct stat *ifstat);
44 local void install_signal_handlers (void);
45 static void remove_output_file (bool);
46 static void abort_gzip_signal (int);
47-local noreturn void do_exit (int exitcode);
48+local __attribute__ ((__noreturn__)) void do_exit (int exitcode);
49 static void finish_out (void);
50       int main          (int argc, char **argv);
51 static int (*work) (int infile, int outfile) = zip; /* function to call */
52@@ -1175,6 +1175,7 @@ local char *get_suffix(name)
53         NULL, NULL};
54     char const **suf;
55     bool suffix_of_builtin = false;
56+    char *z_lower, *match;
57 
58     /* Normally put Z_SUFFIX at the start of KNOWN_SUFFIXES, but if it
59        is a suffix of one of them, put it at the end.  */
60@@ -1188,7 +1189,7 @@ local char *get_suffix(name)
61           }
62       }
63 
64-    char *z_lower = xstrdup(z_suffix);
65+    z_lower = xstrdup(z_suffix);
66     strlwr(z_lower);
67     known_suffixes[suffix_of_builtin
68                    ? sizeof known_suffixes / sizeof *known_suffixes - 2
69@@ -1203,7 +1204,7 @@ local char *get_suffix(name)
70     }
71     strlwr(suffix);
72     slen = strlen(suffix);
73-    char *match = NULL;
74+    match = NULL;
75     do {
76        int s = strlen(*suf);
77        if (slen > s && ! ISSLASH (suffix[slen - s - 1])
78diff --git a/gzip.h b/gzip.h
79index 329c9a5..83dc38a 100644
80--- a/gzip.h
81+++ b/gzip.h
82@@ -272,7 +272,7 @@ extern int unpack     (int in, int out);
83 extern int unlzh      (int in, int out);
84 
85         /* in gzip.c */
86-extern noreturn void abort_gzip (void);
87+extern __attribute__ ((__noreturn__)) void abort_gzip (void);
88 
89         /* in deflate.c */
90 extern void lm_init (int pack_level, ush *flags);
91@@ -305,11 +305,11 @@ extern char *gzip_base_name (char *fname) _GL_ATTRIBUTE_PURE;
92 extern int xunlink        (char *fname);
93 extern void make_simple_name (char *name);
94 extern char *add_envopt   (int *argcp, char ***argvp, char const *env);
95-extern noreturn void gzip_error    (char const *m);
96-extern noreturn void xalloc_die    (void);
97+extern __attribute__ ((__noreturn__)) void gzip_error    (char const *m);
98+extern __attribute__ ((__noreturn__)) void xalloc_die    (void);
99 extern void warning       (char const *m);
100-extern noreturn void read_error    (void);
101-extern noreturn void write_error   (void);
102+extern __attribute__ ((__noreturn__)) void read_error    (void);
103+extern __attribute__ ((__noreturn__)) void write_error   (void);
104 extern void display_ratio (off_t num, off_t den, FILE *file);
105 extern void fprint_off    (FILE *, off_t, int);
106 
107diff --git a/lib/filenamecat-lgpl.c b/lib/filenamecat-lgpl.c
108index f50ecc1..7bdd4fc 100644
109--- a/lib/filenamecat-lgpl.c
110+++ b/lib/filenamecat-lgpl.c
111@@ -51,6 +51,8 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result)
112   size_t dirlen = dirbase - dir + dirbaselen;
113   size_t baselen = strlen (base);
114   char sep = '\0';
115+  char *p_concat;
116+  char *p;
117   if (dirbaselen)
118     {
119       /* DIR is not a file system root, so separate with / if needed.  */
120@@ -67,8 +69,7 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result)
121       sep = '.';
122     }
123 
124-  char *p_concat = malloc (dirlen + (sep != '\0')  + baselen + 1);
125-  char *p;
126+  p_concat = malloc (dirlen + (sep != '\0')  + baselen + 1);
127 
128   if (p_concat == NULL)
129     return NULL;
130diff --git a/lib/stdnoreturn.in.h b/lib/stdnoreturn.in.h
131index b1d709d..d26a612 100644
132--- a/lib/stdnoreturn.in.h
133+++ b/lib/stdnoreturn.in.h
134@@ -17,7 +17,7 @@
135 
136 /* Written by Paul Eggert.  */
137 
138-#ifndef noreturn
139+#if !defined(noreturn) && !defined(__HAIKU__)
140 
141 /* ISO C11 <stdnoreturn.h> for platforms that lack it.
142 
143-- 
1442.19.1
145
146