mirror of git://gcc.gnu.org/git/gcc.git
re PR bootstrap/40854 (Conflicting crc32 functions in libiberty and zlib)
include/: PR bootstrap/40854 * libiberty.h (xcrc32): Rename from crc32. libiberty/: PR bootstrap/40854 * crc32.c (xcrc32): Rename from crc32. From-SVN: r150075
This commit is contained in:
parent
67a6e81679
commit
330b922f19
|
@ -1,3 +1,8 @@
|
||||||
|
2009-07-24 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
PR bootstrap/40854
|
||||||
|
* libiberty.h (xcrc32): Rename from crc32.
|
||||||
|
|
||||||
2009-07-24 Ian Lance Taylor <iant@google.com>
|
2009-07-24 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
* libiberty.h (crc32): Declare.
|
* libiberty.h (crc32): Declare.
|
||||||
|
|
|
@ -313,7 +313,7 @@ extern double physmem_total (void);
|
||||||
extern double physmem_available (void);
|
extern double physmem_available (void);
|
||||||
|
|
||||||
/* Compute the 32-bit CRC of a block of memory. */
|
/* Compute the 32-bit CRC of a block of memory. */
|
||||||
extern unsigned int crc32 (const unsigned char *, int, unsigned int);
|
extern unsigned int xcrc32 (const unsigned char *, int, unsigned int);
|
||||||
|
|
||||||
/* These macros provide a K&R/C89/C++-friendly way of allocating structures
|
/* These macros provide a K&R/C89/C++-friendly way of allocating structures
|
||||||
with nice encapsulation. The XDELETE*() macros are technically
|
with nice encapsulation. The XDELETE*() macros are technically
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2009-07-24 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
PR bootstrap/40854
|
||||||
|
* crc32.c (xcrc32): Rename from crc32.
|
||||||
|
|
||||||
2009-07-24 Ian Lance Taylor <iant@google.com>
|
2009-07-24 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
* crc32.c: New file.
|
* crc32.c: New file.
|
||||||
|
|
|
@ -150,12 +150,25 @@ protocol for the @samp{qCRC} command. In order to get the same
|
||||||
results as gdb for a block of data, you must pass the first CRC
|
results as gdb for a block of data, you must pass the first CRC
|
||||||
parameter as @code{0xffffffff}.
|
parameter as @code{0xffffffff}.
|
||||||
|
|
||||||
|
This CRC can be specified as:
|
||||||
|
|
||||||
|
Width : 32
|
||||||
|
Poly : 0x04c11db7
|
||||||
|
Init : parameter, typically 0xffffffff
|
||||||
|
RefIn : false
|
||||||
|
RefOut : false
|
||||||
|
XorOut : 0
|
||||||
|
|
||||||
|
This differs from the "standard" CRC-32 algorithm in that the values
|
||||||
|
are not reflected, and there is no final XOR value. These differences
|
||||||
|
make it easy to compose the values of multiple blocks.
|
||||||
|
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
crc32 (const unsigned char *buf, int len, unsigned int init)
|
xcrc32 (const unsigned char *buf, int len, unsigned int init)
|
||||||
{
|
{
|
||||||
unsigned int crc = init;
|
unsigned int crc = init;
|
||||||
while (len--)
|
while (len--)
|
||||||
|
|
Loading…
Reference in New Issue