diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3aaec87..78e2fa7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ project(SMHasher) -cmake_minimum_required(VERSION 2.4) +cmake_minimum_required(VERSION 3.0) set(CMAKE_BUILD_TYPE Release) diff --git a/src/PMurHash.h b/src/PMurHash.h index 28ead00..c1e8c4d 100644 --- a/src/PMurHash.h +++ b/src/PMurHash.h @@ -15,13 +15,14 @@ * any version provided by the system headers or application. */ /* First look for special cases */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) && _MSC_VER < 1600 #define MH_UINT32 unsigned long #endif /* If the compiler says it's C99 then take its word for it */ #if !defined(MH_UINT32) && ( \ - defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) + (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(_MSC_VER) && _MSC_VER >= 1600) ) #include #define MH_UINT32 uint32_t #endif diff --git a/src/pstdint.h b/src/pstdint.h index 8bd4ad7..92d2119 100644 --- a/src/pstdint.h +++ b/src/pstdint.h @@ -73,7 +73,7 @@ * include stdint.h. The hope is that one or the other can be * used with no real difference. * - * 5) In the current verison, if your platform can't represent + * 5) In the current version, if your platform can't represent * int32_t, int16_t and int8_t, it just dumps out with a compiler * error. * @@ -190,7 +190,7 @@ * do nothing else. On the Mac OS X version of gcc this is _STDINT_H_. */ -#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) )) && !defined (_PSTDINT_H_INCLUDED) +#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined (_MSC_VER) && _MSC_VER >= 1600) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) )) && !defined (_PSTDINT_H_INCLUDED) #include #define _PSTDINT_H_INCLUDED # ifndef PRINTF_INT64_MODIFIER