From 440a2ef271306b00798b3f9123c3dd3a7f6a7b97 Mon Sep 17 00:00:00 2001 From: Shaun Lowry Date: Fri, 10 Jul 2020 14:55:09 -0600 Subject: [PATCH] Compile with VS2010+ Visual Studio 2010 and later come with stdint.h but also define uint32_t and others elsewhere which cause compilation failures --- mmh3module.cpp | 2 +- murmur_hash_3.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mmh3module.cpp b/mmh3module.cpp index 7bc7c02..5fa8914 100644 --- a/mmh3module.cpp +++ b/mmh3module.cpp @@ -3,7 +3,7 @@ #include #include "murmur_hash_3.hpp" -#if defined(_MSC_VER) +#if defined(_MSC_VER) && _MSC_VER < 1600 // Visual C++ typedef signed char int8_t; typedef signed long int32_t; diff --git a/murmur_hash_3.hpp b/murmur_hash_3.hpp index 7080f66..e6edd9c 100644 --- a/murmur_hash_3.hpp +++ b/murmur_hash_3.hpp @@ -1,6 +1,6 @@ #pragma once -#if defined(_MSC_VER) +#if defined(_MSC_VER) && _MSC_VER < 1600 typedef unsigned char uint8_t; typedef unsigned long uint32_t; typedef unsigned __int64 uint64_t;