summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <roche@httrack.com>2023-01-15 11:30:47 +0100
committerXavier Roche <roche@httrack.com>2023-01-15 11:40:19 +0100
commit37c0c19a8cca5883ebcc88d4e27be1b280d59207 (patch)
tree5dda35c7fb74c1ba3f73d673b591fc59f17bd714
parent9b7ad3c899d3382b8efecf1496e4bd133c41bc0b (diff)
Fixed build error due to renamed zlib's OF() macro
Closes #246
-rw-r--r--src/Makefile.am2
-rw-r--r--src/minizip/ioapi.h3
-rw-r--r--src/minizip/ioapi.h.diff24
-rw-r--r--src/minizip/iowin32.h3
-rw-r--r--src/minizip/iowin32.h.diff12
-rw-r--r--src/minizip/iowin32.h.orig28
6 files changed, 65 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8c5cefa..fd34487 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -95,11 +95,13 @@ EXTRA_DIST = httrack.h webhttrack \
minizip/zip.c.diff \
minizip/zip.h.diff \
minizip/mztools.c.diff \
+ minizip/iowin32.h.diff \
minizip/ioapi.c.orig \
minizip/ioapi.h.orig \
minizip/mztools.c.orig \
minizip/zip.c.orig \
minizip/zip.h.orig \
+ minizip/iowin32.h.orig \
minizip/MiniZip64_Changes.txt \
minizip/MiniZip64_info.txt \
proxy/AUTHORS \
diff --git a/src/minizip/ioapi.h b/src/minizip/ioapi.h
index a531284..865ddda 100644
--- a/src/minizip/ioapi.h
+++ b/src/minizip/ioapi.h
@@ -21,6 +21,9 @@
#ifndef _ZLIBIOAPI64_H
#define _ZLIBIOAPI64_H
+#undef OF
+#define OF(x) x
+
#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
// Linux needs this to support file operation on files larger then 4+GB
diff --git a/src/minizip/ioapi.h.diff b/src/minizip/ioapi.h.diff
index 1cb407a..6a21c11 100644
--- a/src/minizip/ioapi.h.diff
+++ b/src/minizip/ioapi.h.diff
@@ -1,6 +1,16 @@
---- ioapi.h.orig 2012-01-17 03:51:31.000000000 +0100
-+++ ioapi.h 2014-06-08 21:54:18.326360527 +0200
-@@ -67,6 +67,24 @@
+--- ioapi.h.orig 2022-11-20 19:28:12.877767071 +0100
++++ ioapi.h 2023-01-15 11:29:37.790645280 +0100
+@@ -21,6 +21,9 @@
+ #ifndef _ZLIBIOAPI64_H
+ #define _ZLIBIOAPI64_H
+
++#undef OF
++#define OF(x) x
++
+ #if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
+
+ // Linux needs this to support file operation on files larger then 4+GB
+@@ -67,6 +70,24 @@
#endif
#endif
@@ -25,7 +35,7 @@
/*
#ifndef ZPOS64_T
#ifdef _WIN32
-@@ -135,6 +153,7 @@
+@@ -135,6 +156,7 @@
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
@@ -33,7 +43,7 @@
typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-@@ -148,6 +167,7 @@
+@@ -148,6 +170,7 @@
open_file_func zopen_file;
read_file_func zread_file;
write_file_func zwrite_file;
@@ -41,7 +51,7 @@
tell_file_func ztell_file;
seek_file_func zseek_file;
close_file_func zclose_file;
-@@ -164,6 +184,7 @@
+@@ -164,6 +187,7 @@
open64_file_func zopen64_file;
read_file_func zread_file;
write_file_func zwrite_file;
@@ -49,7 +59,7 @@
tell64_file_func ztell64_file;
seek64_file_func zseek64_file;
close_file_func zclose_file;
-@@ -186,6 +207,7 @@
+@@ -186,6 +210,7 @@
#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
diff --git a/src/minizip/iowin32.h b/src/minizip/iowin32.h
index 0ca0969..fd53c91 100644
--- a/src/minizip/iowin32.h
+++ b/src/minizip/iowin32.h
@@ -18,6 +18,9 @@
extern "C" {
#endif
+#undef OF
+#define OF(x) x
+
void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
diff --git a/src/minizip/iowin32.h.diff b/src/minizip/iowin32.h.diff
new file mode 100644
index 0000000..10d025a
--- /dev/null
+++ b/src/minizip/iowin32.h.diff
@@ -0,0 +1,12 @@
+--- iowin32.h.orig 2023-01-15 11:29:28.234622529 +0100
++++ iowin32.h 2023-01-15 11:29:37.790645280 +0100
+@@ -18,6 +18,9 @@
+ extern "C" {
+ #endif
+
++#undef OF
++#define OF(x) x
++
+ void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+ void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
+ void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
diff --git a/src/minizip/iowin32.h.orig b/src/minizip/iowin32.h.orig
new file mode 100644
index 0000000..0ca0969
--- /dev/null
+++ b/src/minizip/iowin32.h.orig
@@ -0,0 +1,28 @@
+/* iowin32.h -- IO base function header for compress/uncompress .zip
+ Version 1.1, February 14h, 2010
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+ Modifications for Zip64 support
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+ For more info read MiniZip_info.txt
+
+*/
+
+#include <windows.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def));
+
+#ifdef __cplusplus
+}
+#endif