zip: add patch for gcc@14: (#45006)
This commit is contained in:
parent
a14e76b98d
commit
2afaeba292
@ -0,0 +1,26 @@
|
||||
From: Santiago Vila <sanvila@debian.org>
|
||||
Subject: manpage typo: amgibuities -> ambiguities
|
||||
X-Debian-version: 3.0-12
|
||||
|
||||
--- a/man/zip.1
|
||||
+++ b/man/zip.1
|
||||
@@ -297,7 +297,7 @@
|
||||
If Zip64 support for large files and archives is enabled and
|
||||
\fIzip\fR is used as a filter, \fIzip\fR creates a Zip64 archive
|
||||
that requires a PKZIP 4.5 or later compatible unzip to read it. This is
|
||||
-to avoid amgibuities in the zip file structure as defined in the current
|
||||
+to avoid ambiguities in the zip file structure as defined in the current
|
||||
zip standard (PKWARE AppNote) where the decision to use Zip64 needs to
|
||||
be made before data is written for the entry, but for a stream the size
|
||||
of the data is not known at that point. If the data is known to be smaller
|
||||
--- a/zip.txt
|
||||
+++ b/zip.txt
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
If Zip64 support for large files and archives is enabled and zip is
|
||||
used as a filter, zip creates a Zip64 archive that requires a PKZIP 4.5
|
||||
- or later compatible unzip to read it. This is to avoid amgibuities in
|
||||
+ or later compatible unzip to read it. This is to avoid ambiguities in
|
||||
the zip file structure as defined in the current zip standard (PKWARE
|
||||
AppNote) where the decision to use Zip64 needs to be made before data
|
||||
is written for the entry, but for a stream the size of the data is not
|
@ -0,0 +1,71 @@
|
||||
diff --git a/unix/configure b/unix/configure
|
||||
index 6a3d1d9..148a6d6 100644
|
||||
--- a/unix/configure
|
||||
+++ b/unix/configure
|
||||
@@ -509,17 +509,32 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
|
||||
# Check for missing functions
|
||||
# add NO_'function_name' to flags if missing
|
||||
|
||||
-for func in rmdir strchr strrchr rename mktemp mktime mkstemp
|
||||
+for func_hdr in unistd/rmdir string/strchr string/strrchr stdio/renaae \
|
||||
+ stdlib/mktemp time/mktime stdlib/mkstemp
|
||||
do
|
||||
- echo Check for $func
|
||||
+ hdr=${func_hdr%/*}
|
||||
+ func=${func_hdr#*/}
|
||||
+ echo -n Check for $func
|
||||
echo "int main(){ $func(); return 0; }" > conftest.c
|
||||
$CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
|
||||
- [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
|
||||
-done
|
||||
+ if [ $? -ne 0 ] ; then
|
||||
+ echo " ... in $hdr"
|
||||
+ cat > conftest.c << _EOF_
|
||||
+#include <$hdr.h>
|
||||
+int main(){ $func(); return 0; }
|
||||
+_EOF_
|
||||
+ [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
|
||||
+ else
|
||||
+ echo
|
||||
+ fi
|
||||
+ done
|
||||
|
||||
|
||||
echo Check for memset
|
||||
-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
|
||||
+cat > conftest.c << _EOF_
|
||||
+#include <string.h>
|
||||
+int main(){ char k; memset(&k,0,0); return 0; }
|
||||
+_EOF_
|
||||
$CC -o conftest conftest.c >/dev/null 2>/dev/null
|
||||
[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
|
||||
|
||||
@@ -544,7 +559,7 @@ $CC -o conftest conftest.c >/dev/null 2>/dev/null
|
||||
echo Check for errno declaration
|
||||
cat > conftest.c << _EOF_
|
||||
#include <errno.h>
|
||||
-main()
|
||||
+int main()
|
||||
{
|
||||
errno = 0;
|
||||
return 0;
|
||||
@@ -556,6 +571,7 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
|
||||
|
||||
echo Check for directory libraries
|
||||
cat > conftest.c << _EOF_
|
||||
+#include <dirent.h>
|
||||
int main() { return closedir(opendir(".")); }
|
||||
_EOF_
|
||||
|
||||
diff --git a/timezone.c b/timezone.c
|
||||
index 485ec02..325fd5a 100644
|
||||
--- a/timezone.c
|
||||
+++ b/timezone.c
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "zip.h"
|
||||
#include "timezone.h"
|
||||
+#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
@ -32,6 +32,11 @@ class Zip(MakefilePackage):
|
||||
patch("08-hardening-build-fix-1.patch")
|
||||
patch("09-hardening-build-fix-2.patch")
|
||||
patch("10-remove-build-date.patch")
|
||||
patch("11-typo-it-is-ambiguities-not-amgibuities.patch")
|
||||
|
||||
# Configure and header changes needed for comatibility with strict gcc14+
|
||||
# these are not from the debian branch
|
||||
patch("12-gcc14-no-implicit-declarations-fix.patch", when="%gcc@14:")
|
||||
|
||||
executables = ["^zip$"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user