Closed Bug 1300124 Opened 5 years ago Closed 5 years ago

MurmurHash3.cpp includes <stdlib.h> inside an anonymous namespace

Categories

(Core :: DOM: Core & HTML, defect)

All
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

This might work--by accident--with MSVC, but it doesn't work with clang-cl's <stdlib.h>, and I'm not even sure it's supposed to work according to the standard.  (For instance, if you declare something in the std namespace, you're not actually declaring it in ::std, but someplace else, and that can cause problems later on.)

Moving it out of the anonymous namespace, while causing slightly more code to be included, isn't going to hurt in the long run.

Of course, "why another hashing implementation, when we already have one in MFBT?" is a reasonable question, but we can leave that for another day...
Comment on attachment 8788600 [details]
Bug 1300124 - make MurmurHash3.cpp compile with clang-cl;

https://reviewboard.mozilla.org/r/77032/#review75220
Attachment #8788600 - Flags: review?(bkelly) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9e15f606420
make MurmurHash3.cpp compile with clang-cl; r=bkelly
https://hg.mozilla.org/mozilla-central/rev/a9e15f606420
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.