RESOLVED FIXED 143768
[W32][GTK] Conflict between NO_ERROR from W32API and GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=143768
Summary [W32][GTK] Conflict between NO_ERROR from W32API and GraphicsContext3D
LRN
Reported 2015-04-15 06:30:55 PDT
In file included from /mingw/include/_mingw.h:12:0, from ../webkitgtk-2.4.8/Source/WTF/wtf/Compiler.h:93, from ../webkitgtk-2.4.8/Source/WTF/wtf/Platform.h:32, from ../webkitgtk-2.4.8/Source/JavaScriptCore/config.h:30, from ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:27: ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: In member function 'virtual int WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB()': ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:144:31: error: expected unqualified-id before numeric constant return GraphicsContext3D::NO_ERROR; because NO_ERROR is also a macro defined in Windows headers. Ouch.
Attachments
Work around name conflicts (NO_ERROR) (6.03 KB, patch)
2015-04-15 10:08 PDT, LRN
no flags
Work around name conflicts (NO_ERROR) (6.00 KB, patch)
2015-04-15 13:15 PDT, LRN
cgarcia: review+
cgarcia: commit-queue-
LRN
Comment 1 2015-04-15 10:08:52 PDT
Created attachment 250814 [details] Work around name conflicts (NO_ERROR) In file included from /mingw/include/_mingw.h:12:0, from ../webkitgtk-2.4.8/Source/WTF/wtf/Compiler.h:93, from ../webkitgtk-2.4.8/Source/WTF/wtf/Platform.h:32, from ../webkitgtk-2.4.8/Source/JavaScriptCore/config.h:30, from ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:27: ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: In member function 'virtual int WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB()': ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:144:31: error: expected unqualified-id before numeric constant return GraphicsContext3D::NO_ERROR; because NO_ERROR is also a macro defined in Windows headers. Ouch. Also expand this to the (PLATFORM(GTK) && OS(WINDOWS)) combination, in addition to the workaround for VERSION already present there.
WebKit Commit Bot
Comment 2 2015-04-15 10:10:48 PDT
Attachment 250814 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:23: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
LRN
Comment 3 2015-04-15 13:15:15 PDT
Created attachment 250842 [details] Work around name conflicts (NO_ERROR) In file included from /mingw/include/_mingw.h:12:0, from ../webkitgtk-2.4.8/Source/WTF/wtf/Compiler.h:93, from ../webkitgtk-2.4.8/Source/WTF/wtf/Platform.h:32, from ../webkitgtk-2.4.8/Source/JavaScriptCore/config.h:30, from ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:27: ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: In member function 'virtual int WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB()': ../webkitgtk-2.4.8/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:144:31: error: expected unqualified-id before numeric constant return GraphicsContext3D::NO_ERROR; because NO_ERROR is also a macro defined in Windows headers. Ouch. Also expand this to the (PLATFORM(GTK) && OS(WINDOWS)) combination, in addition to the workaround for VERSION already present there.
Carlos Garcia Campos
Comment 4 2015-05-18 23:14:39 PDT
Comment on attachment 250842 [details] Work around name conflicts (NO_ERROR) View in context: https://bugs.webkit.org/attachment.cgi?id=250842&action=review I don't understand why the workaround needs to be duplicated, but LRN confirmed it doesn't build otherwise. > Source/WebCore/html/canvas/WebGLRenderingContext.cpp:88 > +#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(GTK) && OS(WINDOWS)) I'll remove the QT thing before landing
Carlos Garcia Campos
Comment 5 2015-05-18 23:15:37 PDT
Note You need to log in before you can comment on or make changes to this bug.