diff options
| -rw-r--r-- | contrib/minizip/iowin32.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/minizip/iowin32.c b/contrib/minizip/iowin32.c index a46d96c..274f39e 100644 --- a/contrib/minizip/iowin32.c +++ b/contrib/minizip/iowin32.c | |||
| @@ -26,8 +26,9 @@ | |||
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | // see Include/shared/winapifamily.h in the Windows Kit | ||
| 29 | #if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) | 30 | #if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) |
| 30 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) | 31 | #if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) |
| 31 | #define IOWIN32_USING_WINRT_API 1 | 32 | #define IOWIN32_USING_WINRT_API 1 |
| 32 | #endif | 33 | #endif |
| 33 | #endif | 34 | #endif |
| @@ -243,7 +244,7 @@ static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *n | |||
| 243 | return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod); | 244 | return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod); |
| 244 | #else | 245 | #else |
| 245 | LONG lHigh = pos.HighPart; | 246 | LONG lHigh = pos.HighPart; |
| 246 | DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, FILE_CURRENT); | 247 | DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, dwMoveMethod); |
| 247 | BOOL fOk = TRUE; | 248 | BOOL fOk = TRUE; |
| 248 | if (dwNewPos == 0xFFFFFFFF) | 249 | if (dwNewPos == 0xFFFFFFFF) |
| 249 | if (GetLastError() != NO_ERROR) | 250 | if (GetLastError() != NO_ERROR) |
| @@ -370,7 +371,7 @@ long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T off | |||
| 370 | { | 371 | { |
| 371 | LARGE_INTEGER pos; | 372 | LARGE_INTEGER pos; |
| 372 | pos.QuadPart = offset; | 373 | pos.QuadPart = offset; |
| 373 | if (!MySetFilePointerEx(hFile, pos, NULL, FILE_CURRENT)) | 374 | if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod)) |
| 374 | { | 375 | { |
| 375 | DWORD dwErr = GetLastError(); | 376 | DWORD dwErr = GetLastError(); |
| 376 | ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; | 377 | ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; |
