From 639be997883d9016baaf46017a2802b2ce1698bd Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:26:29 -0700 Subject: zlib 1.2.3.3 --- crc32.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'crc32.c') diff --git a/crc32.c b/crc32.c index f658a9e..b34a510 100644 --- a/crc32.c +++ b/crc32.c @@ -1,5 +1,5 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2006 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster @@ -68,6 +68,12 @@ local unsigned long gf2_matrix_times OF((unsigned long *mat, unsigned long vec)); local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); +#ifdef _LARGEFILE64_SOURCE + local uLong crc32_combine_(uLong crc1, uLong crc2, off64_t len2); +#else + local uLong crc32_combine_(uLong crc1, uLong crc2, z_off_t len2); +#endif + #ifdef DYNAMIC_CRC_TABLE @@ -367,10 +373,14 @@ local void gf2_matrix_square(square, mat) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) +local uLong crc32_combine_(crc1, crc2, len2) uLong crc1; uLong crc2; +#ifdef _LARGEFILE64_SOURCE + off64_t len2; +#else z_off_t len2; +#endif { int n; unsigned long row; @@ -421,3 +431,30 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2) crc1 ^= crc2; return crc1; } + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} + +#ifdef _LARGEFILE64_SOURCE +uLong ZEXPORT crc32_combine64(crc1, crc2, len2) + uLong crc1; + uLong crc2; + off64_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} +#else +uLong ZEXPORT crc32_combine64(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} +#endif -- cgit v1.2.3-55-g6feb