mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-19 17:11:00 +00:00
b0a4b6a1ee
https://kristerw.blogspot.com/2016/02/how-undefined-signed-overflow-enables.html Doing this as cleanly as possible involved demoting several function parameters concerning object sizes and counts from size_t to int--I'm fine with this change as the functions in question are not actually capable of handling input with sizes larger than what can be stored in a signed 32-bit integer, making the use of size_t here misleading at best. git-svn-id: https://svn.eduke32.com/eduke32@7673 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/polymost.cpp # source/build/src/texcache.cpp # source/build/src/tilepacker.cpp
25 lines
363 B
C
25 lines
363 B
C
#ifndef crc32_h_
|
|
#define crc32_h_
|
|
|
|
#include "compat.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define POLY 0xEDB88320
|
|
|
|
#ifdef BITNESS64
|
|
extern uint32_t crc32table[8][256];
|
|
#else
|
|
extern uint32_t crc32table[4][256];
|
|
#endif
|
|
|
|
extern uint32_t Bcrc32(const void* data, int length, uint32_t crc);
|
|
extern void initcrc32table(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|