zlib: fix duplicate function declarations for largefile support
[openwrt.git] / package / zlib / patches / 110-largefile_fix.patch
1 --- a/zlib.h
2 +++ b/zlib.h
3 @@ -1563,12 +1563,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
4 * without large file support, _LFS64_LARGEFILE must also be true
5 */
6 #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
7 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
8 - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
9 - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
10 - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
11 - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
12 - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
13 + #define __zlib_largefile64
14 #endif
15
16 #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
17 @@ -1578,13 +1573,8 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
18 # define gzoffset gzoffset64
19 # define adler32_combine adler32_combine64
20 # define crc32_combine crc32_combine64
21 -# ifdef _LARGEFILE64_SOURCE
22 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
23 - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
24 - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
25 - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
26 - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
27 - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
28 +# ifndef __zlib_largefile64
29 +# define __zlib_largefile64
30 # endif
31 #else
32 ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
33 @@ -1595,6 +1585,15 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
34 ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
35 #endif
36
37 +#ifdef __zlib_largefile64
38 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
39 + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
40 + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
41 + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
42 + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
43 + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
44 +#endif
45 +
46 /* hack for buggy compilers */
47 #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
48 struct internal_state {int dummy;};
This page took 0.040663 seconds and 5 git commands to generate.