diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-13 22:32:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-13 22:32:47 +0000 |
commit | 370b138f85fb5eee6e176bcd9ad772ba178cb843 (patch) | |
tree | 8a61482b1002160dab258c9dc051c14abd2ab46d /Build/source/libs/zziplib/TLpatches | |
parent | 11e8da1007c229802798bcb15cc69c62f5b8e5f6 (diff) |
TLpatches seems nicer than all uppercase; sorry for churn
git-svn-id: svn://tug.org/texlive/trunk@43214 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zziplib/TLpatches')
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/ChangeLog | 48 | ||||
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/TL-Changes | 26 | ||||
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/patch-01-binary | 15 | ||||
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/patch-02-bugfix | 111 | ||||
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr | 27 |
5 files changed, 227 insertions, 0 deletions
diff --git a/Build/source/libs/zziplib/TLpatches/ChangeLog b/Build/source/libs/zziplib/TLpatches/ChangeLog new file mode 100644 index 00000000000..98ecda061fc --- /dev/null +++ b/Build/source/libs/zziplib/TLpatches/ChangeLog @@ -0,0 +1,48 @@ +2015-03-29 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-02-bugfix: More fix mmap for WIN32/WIN64, from Akira. + +2014-07-15 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-03-w64-ptr: Avoid WIN64 warning due to different size. + +2014-07-14 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-02-bugfix (new): Fix mmap for WIN32/WIN64, from Akira. + +2014-07-11 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-01-binary (new): Do not convert NL => CRLF (required + under Windows for our test case), from Akira. + +2012-03-12 Peter Breitenlohner <peb@mppmu.mpg.de> + + Import zziplib-0.13.62. + +2011-01-07 Peter Breitenlohner <peb@mppmu.mpg.de> + + Adapted to zziplib-0.13.60. + * patch-02-aix-strcasecmp, patch-03-inline (removed): + Now in source tree. + +2010-10-04 Peter Breitenlohner <peb@mppmu.mpg.de> + + Adapted to zziplib-0.13.59. + * patch-01-old-style-parameter (removed): now in source tree. + * patch-03-inline: Add static instead of dropping inline. + +2010-07-05 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-03-inline (new): Can't use non-static inline for Sun + Studio C, mail from Vladimir Volovich, Wed, 16 Jun 2010 20:18:17. + +2010-06-04 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-02-aix-strcasecmp (new): Need to #include <strings.h> + under _AIX for declaration of strcasecmp(). + From Taco. + +2010-01-30 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-01-old-style-parameter (new): Avoid compiler warning. + diff --git a/Build/source/libs/zziplib/TLpatches/TL-Changes b/Build/source/libs/zziplib/TLpatches/TL-Changes new file mode 100644 index 00000000000..72c4023aac6 --- /dev/null +++ b/Build/source/libs/zziplib/TLpatches/TL-Changes @@ -0,0 +1,26 @@ +Changes applied to the zziplib-0.13.62/ tree as obtained from: + http://zziplib.sourceforge.net/ + +Copied: + m4/ax_prefix_config_h.m4 -> ../m4/ (without AC_BEFORE) + m4/ac_sys_largefile_sensitive.m4 -> ../m4/ + +Removed: + aclocal.m4 + uses/ + zzip/_config.h + zzip/_msvc.h + +Converted Dos/Win line ends to native: + docs/README.MSVC6 + docs/sdocbook.css + msvc6/*.dsp + msvc6/*.dsw + msvc7/*.sln + 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 new file mode 100644 index 00000000000..4d528511791 --- /dev/null +++ b/Build/source/libs/zziplib/TLpatches/patch-01-binary @@ -0,0 +1,15 @@ +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) + { + fprintf (stderr, "|output file %s: \n", d.d_name); diff --git a/Build/source/libs/zziplib/TLpatches/patch-02-bugfix b/Build/source/libs/zziplib/TLpatches/patch-02-bugfix new file mode 100644 index 00000000000..3cdb42a64c4 --- /dev/null +++ b/Build/source/libs/zziplib/TLpatches/patch-02-bugfix @@ -0,0 +1,111 @@ +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 @@ + #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.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 @@ + 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.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 @@ + 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.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 @@ + 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 new file mode 100644 index 00000000000..f11ec7e4819 --- /dev/null +++ b/Build/source/libs/zziplib/TLpatches/patch-03-w64-ptr @@ -0,0 +1,27 @@ +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 @@ + * 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; + } + |