aboutsummaryrefslogtreecommitdiff
path: root/crc32.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:29 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:29 -0700
commit639be997883d9016baaf46017a2802b2ce1698bd (patch)
treedb90fc577d10564b335980824111e8d11c5527e2 /crc32.c
parentd6231142d2b883a8c3b253fa34992b5cdb4ac2fe (diff)
downloadzlib-639be997883d9016baaf46017a2802b2ce1698bd.tar.gz
zlib-639be997883d9016baaf46017a2802b2ce1698bd.tar.bz2
zlib-639be997883d9016baaf46017a2802b2ce1698bd.zip
zlib 1.2.3.3v1.2.3.3
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/crc32.c b/crc32.c
index f658a9e..b34a510 100644
--- a/crc32.c
+++ b/crc32.c
@@ -1,5 +1,5 @@
1/* crc32.c -- compute the CRC-32 of a data stream 1/* crc32.c -- compute the CRC-32 of a data stream
2 * Copyright (C) 1995-2005 Mark Adler 2 * Copyright (C) 1995-2006 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 * 4 *
5 * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster 5 * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
@@ -68,6 +68,12 @@
68local unsigned long gf2_matrix_times OF((unsigned long *mat, 68local unsigned long gf2_matrix_times OF((unsigned long *mat,
69 unsigned long vec)); 69 unsigned long vec));
70local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); 70local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
71#ifdef _LARGEFILE64_SOURCE
72 local uLong crc32_combine_(uLong crc1, uLong crc2, off64_t len2);
73#else
74 local uLong crc32_combine_(uLong crc1, uLong crc2, z_off_t len2);
75#endif
76
71 77
72#ifdef DYNAMIC_CRC_TABLE 78#ifdef DYNAMIC_CRC_TABLE
73 79
@@ -367,10 +373,14 @@ local void gf2_matrix_square(square, mat)
367} 373}
368 374
369/* ========================================================================= */ 375/* ========================================================================= */
370uLong ZEXPORT crc32_combine(crc1, crc2, len2) 376local uLong crc32_combine_(crc1, crc2, len2)
371 uLong crc1; 377 uLong crc1;
372 uLong crc2; 378 uLong crc2;
379#ifdef _LARGEFILE64_SOURCE
380 off64_t len2;
381#else
373 z_off_t len2; 382 z_off_t len2;
383#endif
374{ 384{
375 int n; 385 int n;
376 unsigned long row; 386 unsigned long row;
@@ -421,3 +431,30 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2)
421 crc1 ^= crc2; 431 crc1 ^= crc2;
422 return crc1; 432 return crc1;
423} 433}
434
435/* ========================================================================= */
436uLong ZEXPORT crc32_combine(crc1, crc2, len2)
437 uLong crc1;
438 uLong crc2;
439 z_off_t len2;
440{
441 return crc32_combine_(crc1, crc2, len2);
442}
443
444#ifdef _LARGEFILE64_SOURCE
445uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
446 uLong crc1;
447 uLong crc2;
448 off64_t len2;
449{
450 return crc32_combine_(crc1, crc2, len2);
451}
452#else
453uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
454 uLong crc1;
455 uLong crc2;
456 z_off_t len2;
457{
458 return crc32_combine_(crc1, crc2, len2);
459}
460#endif