mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 02:27:32 -05:00
Rename crc32() to crc32_compute(), to avoid clashing catastrophically
with the crc32() function in the zlib interface. (Not that PuTTY itself _uses_ zlib, but on Unix it's linked against libgtk which uses libpng which uses zlib. And zlib has poor namespace management so it defines this ridiculously intrusive function name. Arrrrgh.) [originally from svn r3191]
This commit is contained in:
10
sshcrc.c
10
sshcrc.c
@ -76,12 +76,12 @@
|
||||
*
|
||||
* - Compile with no special #defines. Will generate a table
|
||||
* that's already initialised at compile time, and one function
|
||||
* crc32(buf,len) that uses it. Normal usage.
|
||||
* crc32_compute(buf,len) that uses it. Normal usage.
|
||||
*
|
||||
* - Compile with INITFUNC defined. Will generate an uninitialised
|
||||
* array as the table, and as well as crc32(buf,len) it will
|
||||
* also generate void crc32_init(void) which sets up the table
|
||||
* at run time. Useful if binary size is important.
|
||||
* array as the table, and as well as crc32_compute(buf,len) it
|
||||
* will also generate void crc32_init(void) which sets up the
|
||||
* table at run time. Useful if binary size is important.
|
||||
*
|
||||
* - Compile with GENPROGRAM defined. Will create a standalone
|
||||
* program that does the initialisation and outputs the table as
|
||||
@ -224,7 +224,7 @@ unsigned long crc32_update(unsigned long crcword, const void *buf, size_t len)
|
||||
return crcword;
|
||||
}
|
||||
|
||||
unsigned long crc32(const void *buf, size_t len)
|
||||
unsigned long crc32_compute(const void *buf, size_t len)
|
||||
{
|
||||
return crc32_update(0L, buf, len);
|
||||
}
|
||||
|
Reference in New Issue
Block a user