mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
Backport zlib iowin32.c to avoid oversized files on Windows.
https://github.com/madler/zlib/issues/128
This commit is contained in:
parent
cd3b3d2f9c
commit
12443dc3c6
1 changed files with 3 additions and 3 deletions
6
third_party/minizip/iowin32.c
vendored
6
third_party/minizip/iowin32.c
vendored
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
|
||||
#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 +243,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 +370,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue