mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
zlibWrapper: Update for zlib 1.2.12 (#3217)
In zlib 1.2.12 the OF macro was changed to _Z_OF breaking any project that used zlibWrapper. To fix this the OF has been changed to _Z_OF everywhere and _Z_OF is defined as OF in the case it is not yet defined for zlib 1.2.11 and older. Fixes: https://github.com/facebook/zstd/issues/3216
This commit is contained in:
@ -126,8 +126,8 @@
|
||||
|
||||
/* gz* functions always use library allocation functions */
|
||||
#ifndef STDC
|
||||
extern voidp malloc OF((uInt size));
|
||||
extern void free OF((voidpf ptr));
|
||||
extern voidp malloc _Z_OF((uInt size));
|
||||
extern void free _Z_OF((voidpf ptr));
|
||||
#endif
|
||||
|
||||
/* get errno and strerror definition */
|
||||
@ -145,10 +145,10 @@
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
|
||||
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
|
||||
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 _Z_OF((const char *, const char *));
|
||||
ZEXTERN z_off64_t ZEXPORT gzseek64 _Z_OF((gzFile, z_off64_t, int));
|
||||
ZEXTERN z_off64_t ZEXPORT gztell64 _Z_OF((gzFile));
|
||||
ZEXTERN z_off64_t ZEXPORT gzoffset64 _Z_OF((gzFile));
|
||||
#endif
|
||||
|
||||
/* default memLevel */
|
||||
@ -213,9 +213,9 @@ typedef union {
|
||||
} gz_statep;
|
||||
|
||||
/* shared functions */
|
||||
void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
|
||||
void ZLIB_INTERNAL gz_error _Z_OF((gz_statep, int, const char *));
|
||||
#if defined UNDER_CE
|
||||
char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
|
||||
char ZLIB_INTERNAL *gz_strwinerror _Z_OF((DWORD error));
|
||||
#endif
|
||||
|
||||
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
|
||||
@ -224,6 +224,6 @@ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
|
||||
#ifdef INT_MAX
|
||||
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
|
||||
#else
|
||||
unsigned ZLIB_INTERNAL gz_intmax OF((void));
|
||||
unsigned ZLIB_INTERNAL gz_intmax _Z_OF((void));
|
||||
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user