Bug 1300124 - make MurmurHash3.cpp compile with clang-cl; r?bkelly draft
authorNathan Froyd <froydnj@mozilla.com>
Tue, 06 Sep 2016 15:46:01 -0400
changeset 410420 fdf51c35477a78eb6b718d9d8de3d372b21a42b2
parent 410419 2189cddbc44ca25fdad5142cbc5904a23e7313c1
child 530584 1ddb3f82a3b789f99bba6c1ae2fc7e5d6e59ca9a
push id28743
push userbmo:nfroyd@mozilla.com
push dateTue, 06 Sep 2016 20:00:30 +0000
reviewersbkelly
bugs1300124
milestone51.0a1
Bug 1300124 - make MurmurHash3.cpp compile with clang-cl; r?bkelly Including headers inside anonymous namespaces, especially standard headers, is super-unusual; let's just move the header to the toplevel instead. MozReview-Commit-ID: CNykWQA5ndY
dom/canvas/MurmurHash3.cpp
--- a/dom/canvas/MurmurHash3.cpp
+++ b/dom/canvas/MurmurHash3.cpp
@@ -3,30 +3,29 @@
 // domain. The author hereby disclaims copyright to this source code.
 
 // Note - The x86 and x64 versions do _not_ produce the same results, as the
 // algorithms are optimized for their respective platforms. You can still
 // compile and run any of them on any platform, but your performance with the
 // non-native version will be less than optimal.
 
 #include "MurmurHash3.h"
+#include <stdlib.h>
 
 namespace {
 
 //-----------------------------------------------------------------------------
 // Platform-specific functions and macros
 
 // Microsoft Visual Studio
 
 #if defined(_MSC_VER)
 
 #define FORCE_INLINE	__forceinline
 
-#include <stdlib.h>
-
 #define ROTL32(x,y)	_rotl(x,y)
 #define ROTL64(x,y)	_rotl64(x,y)
 
 #define BIG_CONSTANT(x) (x)
 
 // Other compilers
 
 #else	// defined(_MSC_VER)