Bug 143884

Summary: Prefix isnan() with std
Product: WebKit Reporter: Milan Crha <mcrha>
Component: WebKitGTKAssignee: Milan Crha <mcrha>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, joepeck
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 137488    
Attachments:
Description Flags
proposed wk patch cdumez: review+, cdumez: commit-queue-

Milan Crha
Reported 2015-04-17 11:03:48 PDT
Similar to bug #137966, the msys/mingw requires isnan() to be prefixed with std namespace, otherwise the build breaks.
Attachments
proposed wk patch (3.31 KB, patch)
2015-04-17 11:06 PDT, Milan Crha
cdumez: review+
cdumez: commit-queue-
Milan Crha
Comment 1 2015-04-17 11:06:09 PDT
Created attachment 251030 [details] proposed wk patch Simply do it.
Chris Dumez
Comment 2 2015-04-17 11:27:53 PDT
Fails to build on Mac: /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/runtime/Options.cpp:471:72: error: expected unqualified-id return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal)); ^ In file included from /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/runtime/Options.cpp:1: In file included from /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/JavaScriptCorePrefix.h:10: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/math.h:179:7: note: expanded from macro 'isnan' ( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \ ^ /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/runtime/Options.cpp:471:105: error: expected unqualified-id return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal)); ^ In file included from /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/runtime/Options.cpp:1: In file included from /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/JavaScriptCorePrefix.h:10: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/math.h:179:7: note: expanded from macro 'isnan' ( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \ ^ /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/runtime/Options.cpp:471:105: error: expected expression In file included from /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/runtime/Options.cpp:1: In file included from /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/JavaScriptCorePrefix.h:10: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/math.h:181:70: note: expanded from macro 'isnan' : __inline_isnanl((long double)(x))) ^ 3 errors generated.
Chris Dumez
Comment 3 2015-04-17 11:29:36 PDT
Comment on attachment 251030 [details] proposed wk patch View in context: https://bugs.webkit.org/attachment.cgi?id=251030&action=review > Source/JavaScriptCore/runtime/Options.cpp:471 > + return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal)); I think the problem is that this file includes math.h instead of cmath
Chris Dumez
Comment 4 2015-04-17 11:32:55 PDT
Comment on attachment 251030 [details] proposed wk patch r=me with the header include fixed.
Milan Crha
Comment 5 2015-04-23 10:38:51 PDT
(In reply to comment #3) > I think the problem is that this file includes math.h instead of cmath It might not be it, the Stopwatch.h includes cmath, but fails anyway.
Joseph Pecoraro
Comment 6 2016-06-03 18:41:38 PDT
Looks like someone else fixed these in: https://trac.webkit.org/changeset/187019 Marking bug as resolved.
Note You need to log in before you can comment on or make changes to this bug.