tanjent@gmail.com | f3b7897 | 2012-03-01 03:38:55 +0000 | [diff] [blame] | 1 | //----------------------------------------------------------------------------- |
| 2 | // MurmurHash1 was written by Austin Appleby, and is placed in the public |
| 3 | // domain. The author hereby disclaims copyright to this source code. |
| 4 | |
| 5 | #ifndef _MURMURHASH1_H_ |
| 6 | #define _MURMURHASH1_H_ |
| 7 | |
| 8 | //----------------------------------------------------------------------------- |
| 9 | // Platform-specific functions and macros |
| 10 | |
| 11 | // Microsoft Visual Studio |
| 12 | |
aappleby@google.com | b52816c | 2013-12-30 21:23:01 +0000 | [diff] [blame^] | 13 | #if defined(_MSC_VER) && (_MSC_VER < 1600) |
tanjent@gmail.com | f3b7897 | 2012-03-01 03:38:55 +0000 | [diff] [blame] | 14 | |
| 15 | typedef unsigned char uint8_t; |
aappleby@google.com | b52816c | 2013-12-30 21:23:01 +0000 | [diff] [blame^] | 16 | typedef unsigned int uint32_t; |
tanjent@gmail.com | f3b7897 | 2012-03-01 03:38:55 +0000 | [diff] [blame] | 17 | typedef unsigned __int64 uint64_t; |
| 18 | |
| 19 | // Other compilers |
| 20 | |
| 21 | #else // defined(_MSC_VER) |
| 22 | |
| 23 | #include <stdint.h> |
| 24 | |
| 25 | #endif // !defined(_MSC_VER) |
| 26 | |
| 27 | //----------------------------------------------------------------------------- |
| 28 | |
| 29 | uint32_t MurmurHash1 ( const void * key, int len, uint32_t seed ); |
| 30 | uint32_t MurmurHash1Aligned ( const void * key, int len, uint32_t seed ); |
| 31 | |
| 32 | //----------------------------------------------------------------------------- |
| 33 | |
| 34 | #endif // _MURMURHASH1_H_ |