summaryrefslogtreecommitdiffstats
path: root/compat/zlib/contrib/minizip/iowin32.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-13 10:00:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-13 10:00:43 (GMT)
commitb9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034 (patch)
tree69d60a122f7e49529a41dbbbff1a808319dc1318 /compat/zlib/contrib/minizip/iowin32.c
parente1bed6530aea1d09e8256dd2fa27f5682d04a72e (diff)
parent9f8e844f9c423ce1ff450461016db86873db4a45 (diff)
downloadtcl-b9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034.zip
tcl-b9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034.tar.gz
tcl-b9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034.tar.bz2
Diffstat (limited to 'compat/zlib/contrib/minizip/iowin32.c')
-rw-r--r--compat/zlib/contrib/minizip/iowin32.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/compat/zlib/contrib/minizip/iowin32.c b/compat/zlib/contrib/minizip/iowin32.c
index a46d96c..274f39e 100644
--- a/compat/zlib/contrib/minizip/iowin32.c
+++ b/compat/zlib/contrib/minizip/iowin32.c
@@ -26,8 +26,9 @@
#endif
+// see Include/shared/winapifamily.h in the Windows Kit
#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
-#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
#define IOWIN32_USING_WINRT_API 1
#endif
#endif
@@ -243,7 +244,7 @@ static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *n
return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod);
#else
LONG lHigh = pos.HighPart;
- DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, FILE_CURRENT);
+ DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, dwMoveMethod);
BOOL fOk = TRUE;
if (dwNewPos == 0xFFFFFFFF)
if (GetLastError() != NO_ERROR)
@@ -370,7 +371,7 @@ long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T off
{
LARGE_INTEGER pos;
pos.QuadPart = offset;
- if (!MySetFilePointerEx(hFile, pos, NULL, FILE_CURRENT))
+ if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod))
{
DWORD dwErr = GetLastError();
((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;