Bug 143768 - [W32][GTK] Conflict between NO_ERROR from W32API and GraphicsContext3D
Summary: [W32][GTK] Conflict between NO_ERROR from W32API and GraphicsContext3D
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 133028
  Show dependency treegraph
 
Reported: 2015-04-15 06:30 PDT by LRN
Modified: 2015-05-18 23:15 PDT (History)
11 users (show)

See Also:


Attachments
Work around name conflicts (NO_ERROR) (6.03 KB, patch)
2015-04-15 10:08 PDT, LRN
no flags Details | Formatted Diff | Diff
Work around name conflicts (NO_ERROR) (6.00 KB, patch)
2015-04-15 13:15 PDT, LRN
cgarcia: review+
cgarcia: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description LRN 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.
Comment 1 LRN 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.
Comment 2 WebKit Commit Bot 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.
Comment 3 LRN 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.
Comment 4 Carlos Garcia Campos 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
Comment 5 Carlos Garcia Campos 2015-05-18 23:15:37 PDT
Committed to 2.4 http://trac.webkit.org/changeset/184545