summaryrefslogtreecommitdiffstats
path: root/third_party/zlib/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/zlib/contrib')
-rw-r--r--third_party/zlib/contrib/minizip/ioapi.c4
-rw-r--r--third_party/zlib/contrib/minizip/unzip.c18
2 files changed, 15 insertions, 7 deletions
diff --git a/third_party/zlib/contrib/minizip/ioapi.c b/third_party/zlib/contrib/minizip/ioapi.c
index f1bee23..3916d04 100644
--- a/third_party/zlib/contrib/minizip/ioapi.c
+++ b/third_party/zlib/contrib/minizip/ioapi.c
@@ -10,7 +10,9 @@
#include <stdlib.h>
#include <string.h>
-#include "zlib.h"
+/* NOTE(erikkay): this modification was needed to avoid picking up the system
+ version of zlib.h on the Mac */
+#include "third_party/zlib/zlib.h"
#include "ioapi.h"
diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib/minizip/unzip.c
index 9ad4766d..72d88f2 100644
--- a/third_party/zlib/contrib/minizip/unzip.c
+++ b/third_party/zlib/contrib/minizip/unzip.c
@@ -38,7 +38,9 @@ woven in by Terry Thorsen 1/2003.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "zlib.h"
+/* NOTE(erikkay): this modification was needed to avoid picking up the system
+ version of zlib.h on the Mac */
+#include "third_party/zlib/zlib.h"
#include "unzip.h"
#ifdef STDC
@@ -607,11 +609,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
/* we check the magic */
- if (err==UNZ_OK)
+ if (err==UNZ_OK) {
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x02014b50)
err=UNZ_BADZIPFILE;
+ }
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO;
@@ -687,11 +690,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
else
uSizeRead = extraFieldBufferSize;
- if (lSeek!=0)
+ if (lSeek!=0) {
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
+ }
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
@@ -712,11 +716,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
else
uSizeRead = commentBufferSize;
- if (lSeek!=0)
+ if (lSeek!=0) {
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
+ }
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
@@ -976,11 +981,12 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
return UNZ_ERRNO;
- if (err==UNZ_OK)
+ if (err==UNZ_OK) {
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE;
+ }
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
err=UNZ_ERRNO;
@@ -1534,7 +1540,7 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
char *szComment;
uLong uSizeBuf;
{
- int err=UNZ_OK;
+ //int err=UNZ_OK;
unz_s* s;
uLong uReadThis ;
if (file==NULL)