Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: third_party/zlib/contrib/minizip/ioapi.c

Issue 2079313002: Revert of Update Zlib to version 1.2.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/zlib/contrib/minizip/ioapi.h ('k') | third_party/zlib/contrib/minizip/iowin32.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/contrib/minizip/ioapi.c
diff --git a/third_party/zlib/contrib/minizip/ioapi.c b/third_party/zlib/contrib/minizip/ioapi.c
index 7f5c191b2afd1624a653afafad3fef722e864bc3..49958f61ffd660c96031aa49dbcffd08b127ea45 100644
--- a/third_party/zlib/contrib/minizip/ioapi.c
+++ b/third_party/zlib/contrib/minizip/ioapi.c
@@ -10,21 +10,9 @@
*/
-#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS)))
+#if (defined(_WIN32))
#define _CRT_SECURE_NO_WARNINGS
#endif
-
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
-// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
-#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
-#define FTELLO_FUNC(stream) ftello(stream)
-#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
-#else
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
-#define FTELLO_FUNC(stream) ftello64(stream)
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
-#endif
-
#include "ioapi.h"
@@ -59,7 +47,7 @@
else
{
uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
- if ((tell_uLong) == MAXU32)
+ if ((tell_uLong) == ((uLong)-1))
return (ZPOS64_T)-1;
else
return tell_uLong;
@@ -124,7 +112,7 @@
mode_fopen = "wb";
if ((filename!=NULL) && (mode_fopen != NULL))
- file = FOPEN_FUNC((const char*)filename, mode_fopen);
+ file = fopen64((const char*)filename, mode_fopen);
return file;
}
@@ -154,7 +142,7 @@
static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
{
ZPOS64_T ret;
- ret = FTELLO_FUNC((FILE *)stream);
+ ret = ftello64((FILE *)stream);
return ret;
}
@@ -200,7 +188,7 @@
}
ret = 0;
- if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0)
+ if(fseeko64((FILE *)stream, offset, fseek_origin) != 0)
ret = -1;
return ret;
« no previous file with comments | « third_party/zlib/contrib/minizip/ioapi.h ('k') | third_party/zlib/contrib/minizip/iowin32.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698