diff options
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; |