summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/TLpatches
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-03-18 00:25:18 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-03-18 00:25:18 +0000
commite62a7bd0553ee23d5ff91ef2fa89a5558ccc58db (patch)
tree8e0b25559cc31478e6d19f21fe10cac841e5b327 /Build/source/libs/zziplib/TLpatches
parentde28cbce128eea40f3e90af96d0e1807b742c3a6 (diff)
zziplib-0.13.69
git-svn-id: svn://tug.org/texlive/trunk@47004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zziplib/TLpatches')
-rw-r--r--Build/source/libs/zziplib/TLpatches/ChangeLog8
-rw-r--r--Build/source/libs/zziplib/TLpatches/TL-Changes9
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-01-binary126
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-02-bugfix129
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr26
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-04-strnlen20
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-05-no-const12
7 files changed, 26 insertions, 304 deletions
diff --git a/Build/source/libs/zziplib/TLpatches/ChangeLog b/Build/source/libs/zziplib/TLpatches/ChangeLog
index b763da0f436..8810129388c 100644
--- a/Build/source/libs/zziplib/TLpatches/ChangeLog
+++ b/Build/source/libs/zziplib/TLpatches/ChangeLog
@@ -1,3 +1,11 @@
+2018-03-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * Import zziplib-0.13.69.
+ * patch-01-binary, patch-02-bugfix, patch-03-w64-ptr,
+ patch-04-strnlen: Removed.
+ * patch-05-no-const: Added because a crash occurs on
+ Windows for -D_USE_MMAP=1.
+
2018-03-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* patch-04-strnlen: Add for platforms without strnlen.
diff --git a/Build/source/libs/zziplib/TLpatches/TL-Changes b/Build/source/libs/zziplib/TLpatches/TL-Changes
index b0b5549a54a..54e06ec3c75 100644
--- a/Build/source/libs/zziplib/TLpatches/TL-Changes
+++ b/Build/source/libs/zziplib/TLpatches/TL-Changes
@@ -1,15 +1,18 @@
-Changes applied to the zziplib-0.13.68/ tree as obtained from:
- http://zziplib.sourceforge.net/
+Changes applied to the zziplib-0.13.69 tree as obtained from:
+https://github.com/gdraheim/zziplib/archive/v0.13.69.tar.gz
Copied:
m4/ax_prefix_config_h.m4 -> ../m4/ (without AC_BEFORE)
m4/ac_sys_largefile_sensitive.m4 -> ../m4/
Removed:
+ .cdtproject
+ .gitignore
+ .pydevproject
aclocal.m4
+ msvc/
uses/
zzip/_msvc.h
- zzip/_config.h
Converted Dos/Win line ends to native:
docs/README.MSVC6
diff --git a/Build/source/libs/zziplib/TLpatches/patch-01-binary b/Build/source/libs/zziplib/TLpatches/patch-01-binary
deleted file mode 100644
index a5779974392..00000000000
--- a/Build/source/libs/zziplib/TLpatches/patch-01-binary
+++ /dev/null
@@ -1,126 +0,0 @@
-diff -ur zziplib-0.13.68.orig/bins/unzip-mem.c zziplib-0.13.68/bins/unzip-mem.c
---- zziplib-0.13.68.orig/bins/unzip-mem.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/bins/unzip-mem.c Tue Feb 06 08:07:16 2018
-@@ -96,7 +96,7 @@
- static void zzip_mem_entry_make(ZZIP_MEM_DISK* disk,
- ZZIP_MEM_ENTRY* entry)
- {
-- FILE* file = fopen (entry->zz_name, "w");
-+ FILE* file = fopen (entry->zz_name, "wb");
- if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); }
- perror (entry->zz_name);
- if (status < EXIT_WARNINGS) status = EXIT_WARNINGS;
-diff -ur zziplib-0.13.68.orig/bins/unzzipcat-big.c zziplib-0.13.68/bins/unzzipcat-big.c
---- zziplib-0.13.68.orig/bins/unzzipcat-big.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/bins/unzzipcat-big.c Tue Feb 06 09:58:56 2018
-@@ -89,7 +89,7 @@
- int argn;
- FILE* disk;
-
-- disk = fopen (argv[1], "r");
-+ disk = fopen (argv[1], "rb");
- if (! disk) {
- perror(argv[1]);
- return exitcode(errno);
-@@ -106,7 +106,7 @@
- done = EXIT_WARNINGS;
- continue;
- }
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- if (errno != EISDIR) done = EXIT_ERRORS;
- continue;
-@@ -139,7 +139,7 @@
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
- {
- FILE* out = stdout;
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- if (errno != EISDIR) done = EXIT_ERRORS;
- continue;
-diff -ur zziplib-0.13.68.orig/bins/unzzipcat-mem.c zziplib-0.13.68/bins/unzzipcat-mem.c
---- zziplib-0.13.68.orig/bins/unzzipcat-mem.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/bins/unzzipcat-mem.c Tue Feb 06 09:59:22 2018
-@@ -114,7 +114,7 @@
- {
- char* name = zzip_mem_entry_to_name (entry);
- FILE* out = stdout;
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- if (errno != EISDIR) done = EXIT_ERRORS;
- continue;
-@@ -146,7 +146,7 @@
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
- {
- FILE* out = stdout;
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- if (errno != EISDIR) done = EXIT_ERRORS;
- continue;
-diff -ur zziplib-0.13.68.orig/bins/unzzipcat-mix.c zziplib-0.13.68/bins/unzzipcat-mix.c
---- zziplib-0.13.68.orig/bins/unzzipcat-mix.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/bins/unzzipcat-mix.c Tue Feb 06 09:59:45 2018
-@@ -56,7 +56,7 @@
-
- static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out)
- {
-- ZZIP_FILE* file = zzip_fopen(name, "r");
-+ ZZIP_FILE* file = zzip_fopen(name, "rb");
- if (file)
- {
- char buffer[1024]; int len;
-@@ -124,7 +124,7 @@
- {
- char* name = entry->d_name;
- FILE* out = stdout;
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- if (errno != EISDIR) done = EXIT_ERRORS;
- continue;
-@@ -155,7 +155,7 @@
- memcpy(mix_name, zip_name, zip_name_len);
- mix_name[zip_name_len] = '/';
- strcpy(mix_name + zip_name_len + 1, name);
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- if (errno != EISDIR) done = EXIT_ERRORS;
- continue;
-diff -ur zziplib-0.13.68.orig/bins/unzzipcat-zip.c zziplib-0.13.68/bins/unzzipcat-zip.c
---- zziplib-0.13.68.orig/bins/unzzipcat-zip.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/bins/unzzipcat-zip.c Tue Feb 06 10:00:14 2018
-@@ -124,7 +124,7 @@
- {
- char* name = entry.d_name;
- FILE* out = stdout;
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- DBG3("fopen' %s : %s", name, strerror(errno));
- if (errno != EISDIR) done = EXIT_ERRORS;
-@@ -146,7 +146,7 @@
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
- {
- FILE* out = stdout;
-- if (extract) out = create_fopen(name, "w", 1);
-+ if (extract) out = create_fopen(name, "wb", 1);
- if (! out) {
- DBG3("fopen. %s : %s", name, strerror(errno));
- if (errno != EISDIR) done = EXIT_ERRORS;
-diff -ur zziplib-0.13.68.orig/bins/unzzipdir-big.c zziplib-0.13.68/bins/unzzipdir-big.c
---- zziplib-0.13.68.orig/bins/unzzipdir-big.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/bins/unzzipdir-big.c Tue Feb 06 08:20:44 2018
-@@ -35,7 +35,7 @@
- int argn;
- FILE* disk;
-
-- disk = fopen (argv[1], "r");
-+ disk = fopen (argv[1], "rb");
- if (! disk) {
- perror(argv[1]);
- return exitcode(errno);
diff --git a/Build/source/libs/zziplib/TLpatches/patch-02-bugfix b/Build/source/libs/zziplib/TLpatches/patch-02-bugfix
deleted file mode 100644
index a9bbbf3169e..00000000000
--- a/Build/source/libs/zziplib/TLpatches/patch-02-bugfix
+++ /dev/null
@@ -1,129 +0,0 @@
-diff -ur zziplib-0.13.68.orig/zzip/__fnmatch.h zziplib-0.13.68/zzip/__fnmatch.h
---- zziplib-0.13.68.orig/zzip/__fnmatch.h Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/__fnmatch.h Tue Feb 06 10:35:33 2018
-@@ -20,13 +20,7 @@
- #else
- # define _zzip_FNM_CASEFOLD 0
- /* if your system does not have fnmatch, we fall back to strcmp: */
--static int _zzip_fnmatch(char* pattern, char* string, int flags)
--{
--# ifdef DBG2
-- DBG1("<zzip:mmapped:strcmp>");
--# endif
-- return strcmp (pattern, string);
--}
-+#define _zzip_fnmatch(x,y,z) strcmp ((x),(y))
- #endif
-
- #endif
-diff -ur zziplib-0.13.68.orig/zzip/__mmap.h zziplib-0.13.68/zzip/__mmap.h
---- zziplib-0.13.68.orig/zzip/__mmap.h Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/__mmap.h Tue Feb 06 08:37:50 2018
-@@ -45,43 +45,61 @@
- #define MAP_FAILED 0
- #endif
- /* we (ab)use the "*user" variable to store the FileMapping handle */
-- /* which assumes (sizeof(long) == sizeof(HANDLE)) */
-+ /* and make sure (sizeof(*user) == sizeof(HANDLE)) */
-
- static size_t win32_getpagesize (void)
- {
- SYSTEM_INFO si; GetSystemInfo (&si);
- return si.dwAllocationGranularity;
- }
-+#ifdef _WIN64
-+static void* win32_mmap (__int64* user, int fd, zzip_off_t offs, size_t len)
-+#else
- static void* win32_mmap (long* user, int fd, zzip_off_t offs, size_t len)
-+#endif
- {
- if (! user || *user != 1) /* || offs % getpagesize() */
- return 0;
- {
- HANDLE hFile = (HANDLE)_get_osfhandle(fd);
- if (hFile)
-- *user = (int) CreateFileMapping (hFile, 0, PAGE_READONLY, 0, 0, NULL);
-+#ifdef _WIN64
-+ *user = (__int64) CreateFileMapping (hFile, 0, PAGE_READONLY, 0, 0, NULL);
-+#else
-+ *user = (long) CreateFileMapping (hFile, 0, PAGE_READONLY, 0, 0, NULL);
-+#endif
- if (*user)
- {
- char* p = 0;
- p = MapViewOfFile(*(HANDLE*)user, FILE_MAP_READ, 0, offs, len);
-- if (p) return p + offs;
-+ if (p) return p;
- CloseHandle (*(HANDLE*)user); *user = 1;
- }
- return MAP_FAILED;
- }
- }
-+#ifdef _WIN64
-+static void win32_munmap (__int64* user, char* fd_map, size_t len)
-+#else
- static void win32_munmap (long* user, char* fd_map, size_t len)
-+#endif
- {
- UnmapViewOfFile (fd_map);
- CloseHandle (*(HANDLE*)user); *user = 1;
- }
-
-+#ifdef _WIN64
-+#define _zzip_mmap(user, fd, offs, len) \
-+ win32_mmap ((__int64*) &(user), fd, offs, len)
-+#define _zzip_munmap(user, ptr, len) \
-+ win32_munmap ((__int64*) &(user), ptr, len)
-+#else
- #define _zzip_mmap(user, fd, offs, len) \
- win32_mmap ((long*) &(user), fd, offs, len)
- #define _zzip_munmap(user, ptr, len) \
- win32_munmap ((long*) &(user), ptr, len)
-+#endif
- #define _zzip_getpagesize(user) win32_getpagesize()
--
- #else /* disable */
- #define USE_MMAP 0
- /* USE_MAP is intentional: we expect the compiler to do some "code removal"
-diff -ur zziplib-0.13.68.orig/zzip/mmapped.h zziplib-0.13.68/zzip/mmapped.h
---- zziplib-0.13.68.orig/zzip/mmapped.h Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/mmapped.h Tue Feb 06 08:39:00 2018
-@@ -37,7 +37,11 @@
- void* reserved; /* - for later extensions (might be renamed) */
- void* user; /* - free for applications (use this!) */
- long flags; /* bit 0: findfile searches case-insensitive */
-+#ifdef _WIN64
-+ __int64 mapped;
-+#else
- long mapped; /* used for mmap() wrappers of zzip/__mmap.h */
-+#endif
- long unused; /* - for later extensions (might be renamed) */
- long code; /* - free for applications (use this!) */
- };
-diff -ur zziplib-0.13.68.orig/zzip/plugin.c zziplib-0.13.68/zzip/plugin.c
---- zziplib-0.13.68.orig/zzip/plugin.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/plugin.c Tue Feb 06 08:40:30 2018
-@@ -38,7 +38,7 @@
- return st.st_size;
- }
-
--static const struct zzip_plugin_io default_io = {
-+static struct zzip_plugin_io default_io = {
- &open,
- &close,
- &_zzip_read,
-diff -ur zziplib-0.13.68.orig/zzip/plugin.h zziplib-0.13.68/zzip/plugin.h
---- zziplib-0.13.68.orig/zzip/plugin.h Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/plugin.h Tue Feb 06 08:41:43 2018
-@@ -42,7 +42,11 @@
- zzip_ssize_t (*read)(int fd, void* buf, zzip_size_t len);
- zzip_off_t (*seeks)(int fd, zzip_off_t offset, int whence);
- zzip_off_t (*filesize)(int fd);
-+#ifdef _WIN64
-+ __int64 sys;
-+#else
- long sys;
-+#endif
- long type;
- zzip_ssize_t (*write)(int fd, _zzip_const void* buf, zzip_size_t len);
- };
diff --git a/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr b/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr
deleted file mode 100644
index d671c0b5eea..00000000000
--- a/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -ur zziplib-0.13.68.orig/zzip/zip.c zziplib-0.13.68/zzip/zip.c
---- zziplib-0.13.68.orig/zzip/zip.c Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/zip.c Tue Feb 06 08:29:37 2018
-@@ -381,15 +381,19 @@
- * making pointer alignments to values that can be handled as structures
- * is tricky. We assume here that an align(4) is sufficient even for
- * 64 bit machines. Note that binary operations are not usually allowed
-- * to pointer types but we do need only the lower bits in this implementation,
-- * so we can just cast the value to a long value.
-+ * to pointer types but we can cast the value to a suitably sized integer.
- */
- _zzip_inline static char *
- __zzip_aligned4(char *p)
- {
- #define aligned4 __zzip_aligned4
-- p += ((long) p) & 1; /* warnings about truncation of a "pointer" */
-- p += ((long) p) & 2; /* to a "long int" may be safely ignored :) */
-+#ifdef _WIN64
-+ p += ((__int64) p) & 1;
-+ p += ((__int64) p) & 2;
-+#else
-+ p += ((long) p) & 1;
-+ p += ((long) p) & 2;
-+#endif
- return p;
- }
diff --git a/Build/source/libs/zziplib/TLpatches/patch-04-strnlen b/Build/source/libs/zziplib/TLpatches/patch-04-strnlen
deleted file mode 100644
index a5f8c38eb2f..00000000000
--- a/Build/source/libs/zziplib/TLpatches/patch-04-strnlen
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -ur zziplib-0.13.68.orig/zzip/__string.h zziplib-0.13.68/zzip/__string.h
---- zziplib-0.13.68.orig/zzip/__string.h Tue Feb 06 05:00:56 2018
-+++ zziplib-0.13.68/zzip/__string.h Thu Mar 01 12:13:00 2018
-@@ -18,6 +18,16 @@
- #define _zzip_strndup strndup
- #else
-
-+static size_t my_strnlen(const char* str, size_t maxlen)
-+{
-+ char *p = memchr(str, 0, maxlen);
-+ if (p == NULL)
-+ return maxlen;
-+ else
-+ return (p - str);
-+}
-+#define strnlen(x,y) my_strnlen((x),(y))
-+
- /* if your system does not have strndup: */
- zzip__new__ static char *
- _zzip_strndup(char const *p, size_t maxlen)
diff --git a/Build/source/libs/zziplib/TLpatches/patch-05-no-const b/Build/source/libs/zziplib/TLpatches/patch-05-no-const
new file mode 100644
index 00000000000..b90c3867f80
--- /dev/null
+++ b/Build/source/libs/zziplib/TLpatches/patch-05-no-const
@@ -0,0 +1,12 @@
+diff -ur zziplib-0.13.69/zzip/plugin.c zziplib-src/zzip/plugin.c
+--- zziplib-0.13.69/zzip/plugin.c Sat Mar 17 21:46:45 2018
++++ zziplib-src/zzip/plugin.c Sun Mar 18 08:04:42 2018
+@@ -41,7 +41,7 @@
+ return st.st_size;
+ }
+
+-static const struct zzip_plugin_io default_io = {
++static struct zzip_plugin_io default_io = {
+ &open,
+ &close,
+ &_zzip_read,