From c464d01778adc75ec5b70805ae2d7e9f5f5baf6a Mon Sep 17 00:00:00 2001 From: Jean-Louis Date: Thu, 24 Dec 2020 03:18:09 +0100 Subject: [PATCH] Fix fopen64, ftello64, fseeko64 declarations on all platforms --- contrib/unzip/ioapi.h | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/contrib/unzip/ioapi.h b/contrib/unzip/ioapi.h index 416909fab..0e49543e5 100644 --- a/contrib/unzip/ioapi.h +++ b/contrib/unzip/ioapi.h @@ -21,25 +21,24 @@ #include "zlib.h" #if defined(USE_FILE32API) -# define fopen64 fopen -# define ftello64 ftell -# define fseeko64 fseek +# define fopen64 fopen +# define ftello64 ftell +# define fseeko64 fseek #else -# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__ANDROID__) -# define fopen64 fopen -# define ftello64 ftello -# define fseeko64 fseeko -# endif -# ifdef _MSC_VER -# define fopen64 fopen -# if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) -# define ftello64 _ftelli64 -# define fseeko64 _fseeki64 -# else /* old MSC */ -# define ftello64 ftell -# define fseeko64 fseek -# endif -# endif +#if defined(_MSC_VER) +# define fopen64 fopen +# if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) +# define ftello64 _ftelli64 +# define fseeko64 _fseeki64 +# else /* old MSC */ +# define ftello64 ftell +# define fseeko64 fseek +# endif +#else +# define fopen64 fopen +# define ftello64 ftello +# define fseeko64 fseeko +#endif #endif #ifdef __cplusplus