gpakosz / smhasher

Forked from code.google.com/p/smhasher
0 stars 0 forks source link

MSVC2010 compilation. #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compilation of MurmurHash3.cpp under MSVC2010 failed with error "redefinition 
of uint32_t...".
I changed line "#if defined(_MSC_VER)" to "#if defined(_MSC_VER) && (_MSC_VER 
<= 1500)" and it worked for me.
Thank you!

Original issue reported on code.google.com by Slav...@gmail.com on 20 Dec 2012 at 10:03

GoogleCodeExporter commented 9 years ago
Note that the issue here is that the system stdint.h on Windows (vs2010 / 1600 
and later) uses 'typedef int uint32_t;'. These both 'work' since on Windows 
'int' and 'long' are both 32 bits. Note that pstdint.h has the same issue in 
that it attempts to always use the 'longest' possible type which will work. I 
have attached a proposed patch to fix these issues.

Original comment by bunge...@chromium.org on 15 Oct 2013 at 10:31

Attachments:

GoogleCodeExporter commented 9 years ago
Note: This was done at r151 (thanks!), so this issue can presumably be marked 
as fixed.

Original comment by vtl@google.com on 7 Jan 2014 at 6:32

GoogleCodeExporter commented 9 years ago
Great.

Original comment by Slav...@gmail.com on 7 Jan 2014 at 7:25

GoogleCodeExporter commented 9 years ago

Original comment by tanj...@gmail.com on 14 Jan 2014 at 3:13