diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-03-29 11:01:09 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-03-29 11:01:09 +0000 |
commit | 897b76cf5ad26f8a839641b8905bed3d2d79da1c (patch) | |
tree | 3314f48f993660b2d83cd429c219de9871101293 /Build/source | |
parent | cbb84e3cc7d8a9522ef9ed74cee36a6864c3e35f (diff) |
libs/zziplib: Another Windows bug fix from Akira
git-svn-id: svn://tug.org/texlive/trunk@36667 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
3 files changed, 12 insertions, 4 deletions
diff --git a/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/ChangeLog b/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/ChangeLog index 934f50c32e6..98ecda061fc 100644 --- a/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/ChangeLog +++ b/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/patch-02-bugfix b/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/patch-02-bugfix index 5885b3c7f5f..3cdb42a64c4 100644 --- a/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/patch-02-bugfix +++ b/Build/source/libs/zziplib/zziplib-0.13.62-PATCHES/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 2014-07-14 11:27:20.000000000 +0200 -@@ -50,21 +50,29 @@ ++++ 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 */ @@ -33,7 +33,11 @@ diff -ur zziplib-0.13.62.orig/zzip/__mmap.h zziplib-0.13.62/zzip/__mmap.h if (*user) { char* p = 0; -@@ -75,18 +83,27 @@ + 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; } } diff --git a/Build/source/libs/zziplib/zziplib-0.13.62/zzip/__mmap.h b/Build/source/libs/zziplib/zziplib-0.13.62/zzip/__mmap.h index b57324c4b90..5dfc45dcda2 100644 --- a/Build/source/libs/zziplib/zziplib-0.13.62/zzip/__mmap.h +++ b/Build/source/libs/zziplib/zziplib-0.13.62/zzip/__mmap.h @@ -77,7 +77,7 @@ static void* win32_mmap (long* user, int fd, zzip_off_t offs, size_t len) { 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; |