diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:26:29 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:26:29 -0700 |
commit | 639be997883d9016baaf46017a2802b2ce1698bd (patch) | |
tree | db90fc577d10564b335980824111e8d11c5527e2 /crc32.c | |
parent | d6231142d2b883a8c3b253fa34992b5cdb4ac2fe (diff) | |
download | zlib-639be997883d9016baaf46017a2802b2ce1698bd.tar.gz |
zlib 1.2.3.3v1.2.3.3
Diffstat (limited to 'crc32.c')
-rw-r--r-- | crc32.c | 41 |
1 files changed, 39 insertions, 2 deletions
@@ -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 <rbrown64@csc.com.au> 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 |