summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/TLpatches
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-20 00:49:02 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-20 00:49:02 +0000
commit64cebcd2742bed53c840feebf5b2f33981ba803d (patch)
tree9480befcce98ca0f5fd4797abc9898af5d1d0b26 /Build/source/libs/zziplib/TLpatches
parentb4e9c60b697e1dfc02443ed3baed2aededdf4572 (diff)
zziplib 0.13.66
git-svn-id: svn://tug.org/texlive/trunk@44647 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zziplib/TLpatches')
-rw-r--r--Build/source/libs/zziplib/TLpatches/ChangeLog5
-rw-r--r--Build/source/libs/zziplib/TLpatches/TL-Changes10
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-01-binary218
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-02-bugfix34
-rw-r--r--Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr9
5 files changed, 235 insertions, 41 deletions
diff --git a/Build/source/libs/zziplib/TLpatches/ChangeLog b/Build/source/libs/zziplib/TLpatches/ChangeLog
index 98ecda061fc..26fb88d57a4 100644
--- a/Build/source/libs/zziplib/TLpatches/ChangeLog
+++ b/Build/source/libs/zziplib/TLpatches/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * Import zziplib-0.13.66.
+ * patch-01-binary, patch-02-bugfix, patch-03-w64-ptr: Adapted.
+
2015-03-29 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-02-bugfix: More fix mmap for WIN32/WIN64, from Akira.
diff --git a/Build/source/libs/zziplib/TLpatches/TL-Changes b/Build/source/libs/zziplib/TLpatches/TL-Changes
index 72c4023aac6..0fd56e3ab7b 100644
--- a/Build/source/libs/zziplib/TLpatches/TL-Changes
+++ b/Build/source/libs/zziplib/TLpatches/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the zziplib-0.13.62/ tree as obtained from:
+Changes applied to the zziplib-0.13.66/ tree as obtained from:
http://zziplib.sourceforge.net/
Copied:
@@ -6,9 +6,12 @@ Copied:
m4/ac_sys_largefile_sensitive.m4 -> ../m4/
Removed:
+ .cdtproject
+ .gitignore
+ .pydevproject
aclocal.m4
+ msvc/
uses/
- zzip/_config.h
zzip/_msvc.h
Converted Dos/Win line ends to native:
@@ -20,7 +23,4 @@ Converted Dos/Win line ends to native:
msvc7/*.vcproj
msvc8/*.sln
msvc8/*.vcproj
- zzip/file.h
- zzip/stdint.h
zzip/zziplib.wpj
-
diff --git a/Build/source/libs/zziplib/TLpatches/patch-01-binary b/Build/source/libs/zziplib/TLpatches/patch-01-binary
index 4d528511791..518657f6493 100644
--- a/Build/source/libs/zziplib/TLpatches/patch-01-binary
+++ b/Build/source/libs/zziplib/TLpatches/patch-01-binary
@@ -1,15 +1,205 @@
-diff -ur zziplib-0.13.62.orig/bins/unzzip.c zziplib-0.13.62/bins/unzzip.c
---- zziplib-0.13.62.orig/bins/unzzip.c 2009-08-23 13:38:22.000000000 +0200
-+++ zziplib-0.13.62/bins/unzzip.c 2014-07-11 09:50:50.000000000 +0200
-@@ -72,7 +72,11 @@
- continue;
- }
-
-+#ifdef _WIN32
-+ output = _open (d.d_name, _O_CREAT | _O_BINARY | _O_RDWR);
-+#else
- output = creat (d.d_name, 0664);
-+#endif
- if (output == -1)
+diff -ur zziplib-0.13.66.orig/bins/unzip-mem.c zziplib-0.13.66/bins/unzip-mem.c
+--- zziplib-0.13.66.orig/bins/unzip-mem.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/bins/unzip-mem.c Wed May 24 21:13:24 2017
+@@ -100,7 +100,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.66.orig/bins/unzzipcat-big.c zziplib-0.13.66/bins/unzzipcat-big.c
+--- zziplib-0.13.66.orig/bins/unzzipcat-big.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/bins/unzzipcat-big.c Wed May 24 21:13:24 2017
+@@ -62,6 +62,21 @@
+ }
+ }
+
++#if !defined(HAVE_STRNDUP)
++static char *
++strndup(char *p, size_t maxlen)
++{
++ char *r;
++ if (!p)
++ return 0;
++ r = malloc(maxlen + 1);
++ if (!r)
++ return r;
++ strncpy(r, p, maxlen);
++ r[maxlen] = '\0';
++ return r;
++}
++#endif
+
+ static FILE* create_fopen(char* name, char* mode, int subdirs)
+ {
+@@ -83,7 +98,7 @@
+ int argn;
+ FILE* disk;
+
+- disk = fopen (argv[1], "r");
++ disk = fopen (argv[1], "rb");
+ if (! disk) {
+ perror(argv[1]);
+ return -1;
+@@ -96,7 +111,7 @@
+ {
+ char* name = zzip_entry_strdup_name (entry);
+ FILE* out = stdout;
+- if (extract) out = create_fopen(name, "w", 1);
++ if (extract) out = create_fopen(name, "wb", 1);
+ unzzip_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ free (name);
+@@ -125,7 +140,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);
+ unzzip_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ break; /* match loop */
+diff -ur zziplib-0.13.66.orig/bins/unzzipcat-mem.c zziplib-0.13.66/bins/unzzipcat-mem.c
+--- zziplib-0.13.66.orig/bins/unzzipcat-mem.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/bins/unzzipcat-mem.c Wed May 24 21:13:24 2017
+@@ -57,6 +57,22 @@
+ }
+ }
+
++#if !defined(HAVE_STRNDUP)
++static char *
++strndup(char *p, size_t maxlen)
++{
++ char *r;
++ if (!p)
++ return 0;
++ r = malloc(maxlen + 1);
++ if (!r)
++ return r;
++ strncpy(r, p, maxlen);
++ r[maxlen] = '\0';
++ return r;
++}
++#endif
++
+ static FILE* create_fopen(char* name, char* mode, int subdirs)
+ {
+ if (subdirs)
+@@ -97,7 +113,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);
+ unzzip_mem_disk_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ }
+@@ -125,7 +141,7 @@
+ FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
{
- fprintf (stderr, "|output file %s: \n", d.d_name);
+ FILE* out = stdout;
+- if (extract) out = create_fopen(name, "w", 1);
++ if (extract) out = create_fopen(name, "wb", 1);
+ unzzip_mem_disk_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ break; /* match loop */
+diff -ur zziplib-0.13.66.orig/bins/unzzipcat-mix.c zziplib-0.13.66/bins/unzzipcat-mix.c
+--- zziplib-0.13.66.orig/bins/unzzipcat-mix.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/bins/unzzipcat-mix.c Wed May 24 21:13:24 2017
+@@ -30,7 +30,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;
+@@ -43,6 +43,22 @@
+ }
+ }
+
++#if !defined(HAVE_STRNDUP)
++static char *
++strndup(char *p, size_t maxlen)
++{
++ char *r;
++ if (!p)
++ return 0;
++ r = malloc(maxlen + 1);
++ if (!r)
++ return r;
++ strncpy(r, p, maxlen);
++ r[maxlen] = '\0';
++ return r;
++}
++#endif
++
+ static FILE* create_fopen(char* name, char* mode, int subdirs)
+ {
+ if (subdirs)
+@@ -82,7 +98,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);
+ unzzip_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ }
+@@ -108,7 +124,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);
+ fprintf(stderr, "%s %s -> %s\n", zip_name, name, mix_name);
+ /* 'test1.zip' 'README' -> 'test1/README' */
+ unzzip_cat_file (disk, mix_name, out);
+diff -ur zziplib-0.13.66.orig/bins/unzzipcat-zip.c zziplib-0.13.66/bins/unzzipcat-zip.c
+--- zziplib-0.13.66.orig/bins/unzzipcat-zip.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/bins/unzzipcat-zip.c Wed May 24 21:13:24 2017
+@@ -43,6 +43,22 @@
+ }
+ }
+
++#if !defined(HAVE_STRNDUP)
++static char *
++strndup(char *p, size_t maxlen)
++{
++ char *r;
++ if (!p)
++ return 0;
++ r = malloc(maxlen + 1);
++ if (!r)
++ return r;
++ strncpy(r, p, maxlen);
++ r[maxlen] = '\0';
++ return r;
++}
++#endif
++
+ static FILE* create_fopen(char* name, char* mode, int subdirs)
+ {
+ if (subdirs)
+@@ -83,7 +99,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);
+ unzzip_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ }
+@@ -100,7 +116,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);
+ unzzip_cat_file (disk, name, out);
+ if (extract) fclose(out);
+ break; /* match loop */
diff --git a/Build/source/libs/zziplib/TLpatches/patch-02-bugfix b/Build/source/libs/zziplib/TLpatches/patch-02-bugfix
index 3cdb42a64c4..35830145acf 100644
--- a/Build/source/libs/zziplib/TLpatches/patch-02-bugfix
+++ b/Build/source/libs/zziplib/TLpatches/patch-02-bugfix
@@ -1,7 +1,7 @@
-diff -ur zziplib-0.13.62.orig/zzip/__mmap.h zziplib-0.13.62/zzip/__mmap.h
---- zziplib-0.13.62.orig/zzip/__mmap.h 2009-08-23 13:38:22.000000000 +0200
-+++ zziplib-0.13.62/zzip/__mmap.h 2015-03-29 12:44:43.000000000 +0200
-@@ -50,43 +50,60 @@
+diff -ur zziplib-0.13.66.orig/zzip/__mmap.h zziplib-0.13.66/zzip/__mmap.h
+--- zziplib-0.13.66.orig/zzip/__mmap.h Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/zzip/__mmap.h Wed May 24 21:14:48 2017
+@@ -45,43 +45,61 @@
#define MAP_FAILED 0
#endif
/* we (ab)use the "*user" variable to store the FileMapping handle */
@@ -50,7 +50,7 @@ diff -ur zziplib-0.13.62.orig/zzip/__mmap.h zziplib-0.13.62/zzip/__mmap.h
UnmapViewOfFile (fd_map);
CloseHandle (*(HANDLE*)user); *user = 1;
}
--
+
+#ifdef _WIN64
+#define _zzip_mmap(user, fd, offs, len) \
+ win32_mmap ((__int64*) &(user), fd, offs, len)
@@ -67,10 +67,10 @@ diff -ur zziplib-0.13.62.orig/zzip/__mmap.h zziplib-0.13.62/zzip/__mmap.h
#else /* disable */
#define USE_MMAP 0
/* USE_MAP is intentional: we expect the compiler to do some "code removal"
-diff -ur zziplib-0.13.62.orig/zzip/mmapped.h zziplib-0.13.62/zzip/mmapped.h
---- zziplib-0.13.62.orig/zzip/mmapped.h 2009-08-23 13:38:22.000000000 +0200
-+++ zziplib-0.13.62/zzip/mmapped.h 2014-07-14 11:25:47.000000000 +0200
-@@ -42,7 +42,11 @@
+diff -ur zziplib-0.13.66.orig/zzip/mmapped.h zziplib-0.13.66/zzip/mmapped.h
+--- zziplib-0.13.66.orig/zzip/mmapped.h Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/zzip/mmapped.h Wed May 24 21:14:48 2017
+@@ -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 */
@@ -82,10 +82,10 @@ diff -ur zziplib-0.13.62.orig/zzip/mmapped.h zziplib-0.13.62/zzip/mmapped.h
long unused; /* - for later extensions (might be renamed) */
long code; /* - free for applications (use this!) */
};
-diff -ur zziplib-0.13.62.orig/zzip/plugin.c zziplib-0.13.62/zzip/plugin.c
---- zziplib-0.13.62.orig/zzip/plugin.c 2010-12-27 02:14:27.000000000 +0100
-+++ zziplib-0.13.62/zzip/plugin.c 2014-07-14 11:23:23.000000000 +0200
-@@ -43,7 +43,7 @@
+diff -ur zziplib-0.13.66.orig/zzip/plugin.c zziplib-0.13.66/zzip/plugin.c
+--- zziplib-0.13.66.orig/zzip/plugin.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/zzip/plugin.c Wed May 24 21:14:48 2017
+@@ -38,7 +38,7 @@
return st.st_size;
}
@@ -94,10 +94,10 @@ diff -ur zziplib-0.13.62.orig/zzip/plugin.c zziplib-0.13.62/zzip/plugin.c
&open,
&close,
&_zzip_read,
-diff -ur zziplib-0.13.62.orig/zzip/plugin.h zziplib-0.13.62/zzip/plugin.h
---- zziplib-0.13.62.orig/zzip/plugin.h 2010-12-27 02:12:54.000000000 +0100
-+++ zziplib-0.13.62/zzip/plugin.h 2014-07-14 11:23:23.000000000 +0200
-@@ -47,7 +47,11 @@
+diff -ur zziplib-0.13.66.orig/zzip/plugin.h zziplib-0.13.66/zzip/plugin.h
+--- zziplib-0.13.66.orig/zzip/plugin.h Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/zzip/plugin.h Wed May 24 21:14:48 2017
+@@ -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);
diff --git a/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr b/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr
index f11ec7e4819..3ea18dd71e4 100644
--- a/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr
+++ b/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr
@@ -1,7 +1,7 @@
-diff -ur zziplib-0.13.62.orig/zzip/zip.c zziplib-0.13.62/zzip/zip.c
---- zziplib-0.13.62.orig/zzip/zip.c 2010-12-29 17:22:29.000000000 +0100
-+++ zziplib-0.13.62/zzip/zip.c 2014-07-14 17:05:48.000000000 +0200
-@@ -374,15 +374,19 @@
+diff -ur zziplib-0.13.66.orig/zzip/zip.c zziplib-0.13.66/zzip/zip.c
+--- zziplib-0.13.66.orig/zzip/zip.c Mon Apr 24 08:46:28 2017
++++ zziplib-0.13.66/zzip/zip.c Wed May 24 21:14:48 2017
+@@ -369,15 +369,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
@@ -24,4 +24,3 @@ diff -ur zziplib-0.13.62.orig/zzip/zip.c zziplib-0.13.62/zzip/zip.c
+#endif
return p;
}
-