From 28947389ae968e2dd9a3d2039dd66004027852a1 Mon Sep 17 00:00:00 2001 From: Thomas Doerfler Date: Fri, 18 Mar 2011 10:11:37 +0000 Subject: Make code match prototype to eliminate warnings. eliminate unneeded comilation of 64 bit functions --- cpukit/zlib/ChangeLog | 8 +++++++- cpukit/zlib/adler32.c | 2 ++ cpukit/zlib/crc32.c | 2 ++ cpukit/zlib/gzlib.c | 3 +++ cpukit/zlib/zlib.h | 5 +++++ cpukit/zlib/zutil.c | 4 ++-- cpukit/zlib/zutil.h | 2 +- 7 files changed, 22 insertions(+), 4 deletions(-) (limited to 'cpukit') diff --git a/cpukit/zlib/ChangeLog b/cpukit/zlib/ChangeLog index cc4f466598..e602746373 100644 --- a/cpukit/zlib/ChangeLog +++ b/cpukit/zlib/ChangeLog @@ -1,3 +1,9 @@ +2010-03-26 Thomas Doerfler + + * zlib.h, zutil.c, zutil.h, gzlib.c, crc32.c, adler32.c: + Make code match prototype to eliminate warnings. + eliminate unneeded comilation of 64 bit functions + 2010-03-22 Joel Sherrill * ChangeLog.zlib, FAQ, Makefile.am, README, adler32.c, compress.c, @@ -14,7 +20,7 @@ 2008-09-02 Ralf Corsépius - * adler32.c, compress.c, crc32.c, deflate.c, gzio.c, infback.c, + * adler32.c, compress.c, crc32.c, deflate.c, gzio.c, infback.c, inflate.c, inffast.c, inftrees.c, trees.c, uncompr.c, zutil.c: Stop using old-style function definitions. diff --git a/cpukit/zlib/adler32.c b/cpukit/zlib/adler32.c index 65ad6a5adc..6889548657 100644 --- a/cpukit/zlib/adler32.c +++ b/cpukit/zlib/adler32.c @@ -160,6 +160,7 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2) return adler32_combine_(adler1, adler2, len2); } +#if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) uLong ZEXPORT adler32_combine64(adler1, adler2, len2) uLong adler1; uLong adler2; @@ -167,3 +168,4 @@ uLong ZEXPORT adler32_combine64(adler1, adler2, len2) { return adler32_combine_(adler1, adler2, len2); } +#endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */ diff --git a/cpukit/zlib/crc32.c b/cpukit/zlib/crc32.c index 6b81fb4a1c..c97c869aa1 100644 --- a/cpukit/zlib/crc32.c +++ b/cpukit/zlib/crc32.c @@ -433,6 +433,7 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2) return crc32_combine_(crc1, crc2, len2); } +#if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) uLong ZEXPORT crc32_combine64(crc1, crc2, len2) uLong crc1; uLong crc2; @@ -440,3 +441,4 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2) { return crc32_combine_(crc1, crc2, len2); } +#endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */ diff --git a/cpukit/zlib/gzlib.c b/cpukit/zlib/gzlib.c index 6fdb08a814..5d55549960 100644 --- a/cpukit/zlib/gzlib.c +++ b/cpukit/zlib/gzlib.c @@ -199,6 +199,7 @@ gzFile ZEXPORT gzopen(path, mode) return gz_open(path, -1, mode); } +#if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) /* -- see zlib.h -- */ gzFile ZEXPORT gzopen64(path, mode) const char *path; @@ -206,6 +207,7 @@ gzFile ZEXPORT gzopen64(path, mode) { return gz_open(path, -1, mode); } +#endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */ /* -- see zlib.h -- */ gzFile ZEXPORT gzdopen(fd, mode) @@ -386,6 +388,7 @@ z_off_t ZEXPORT gztell(file) } /* -- see zlib.h -- */ + z_off64_t ZEXPORT gzoffset64(file) gzFile file; { diff --git a/cpukit/zlib/zlib.h b/cpukit/zlib/zlib.h index f5785be7e0..976fb7a083 100644 --- a/cpukit/zlib/zlib.h +++ b/cpukit/zlib/zlib.h @@ -1587,6 +1587,11 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +# ifndef _LARGEFILE64_SOURCE + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); +# endif #endif #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) diff --git a/cpukit/zlib/zutil.c b/cpukit/zlib/zutil.c index 98a55a8838..c0616310cb 100644 --- a/cpukit/zlib/zutil.c +++ b/cpukit/zlib/zutil.c @@ -299,8 +299,8 @@ extern void free OF((voidpf ptr)); voidpf zcalloc (opaque, items, size) voidpf opaque; - unsigned items; - unsigned size; + uInt items; + uInt size; { if (opaque) items += size - size; /* make compiler happy */ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : diff --git a/cpukit/zlib/zutil.h b/cpukit/zlib/zutil.h index 025035dbe9..279a048804 100644 --- a/cpukit/zlib/zutil.h +++ b/cpukit/zlib/zutil.h @@ -276,7 +276,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif -voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); +voidpf zcalloc OF((voidpf opaque, uInt items, uInt size)); void zcfree OF((voidpf opaque, voidpf ptr)); #define ZALLOC(strm, items, size) \ -- cgit v1.2.3