Title: [184545] releases/WebKitGTK/webkit-2.4/Source/WebCore
Revision
184545
Author
[email protected]
Date
2015-05-18 23:15:12 -0700 (Mon, 18 May 2015)

Log Message

[W32][GTK] Conflict between NO_ERROR from W32API and GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=143768

Patch by Руслан Ижбулатов <[email protected]> on 2015-04-15
Reviewed by Carlos Garcia Campos.

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/_javascript_Core/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.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (184544 => 184545)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog	2015-05-19 06:05:16 UTC (rev 184544)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog	2015-05-19 06:15:12 UTC (rev 184545)
@@ -1,5 +1,27 @@
 2015-04-15  Руслан Ижбулатов  <[email protected]>
 
+        [W32][GTK] Conflict between NO_ERROR from W32API and GraphicsContext3D
+        https://bugs.webkit.org/show_bug.cgi?id=143768
+
+        Reviewed by Carlos Garcia Campos.
+
+        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/_javascript_Core/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.
+
+2015-04-15  Руслан Ижбулатов  <[email protected]>
+
         [W32] Fails to build - missing references to OpenGL context functions
         https://bugs.webkit.org/show_bug.cgi?id=143769
 

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (184544 => 184545)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2015-05-19 06:05:16 UTC (rev 184544)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2015-05-19 06:15:12 UTC (rev 184545)
@@ -85,6 +85,14 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
+#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS))
+#undef NO_ERROR
+#endif
+
+#if PLATFORM(GTK)
+#undef VERSION
+#endif
+
 namespace WebCore {
 
 const double secondsBetweenRestoreAttempts = 1.0;

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/GraphicsContext3D.h (184544 => 184545)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/GraphicsContext3D.h	2015-05-19 06:05:16 UTC (rev 184544)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/GraphicsContext3D.h	2015-05-19 06:15:12 UTC (rev 184545)
@@ -43,9 +43,11 @@
 #endif
 
 // FIXME: Find a better way to avoid the name confliction for NO_ERROR.
-#if PLATFORM(WIN)
+#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS))
 #undef NO_ERROR
-#elif PLATFORM(GTK)
+#endif
+
+#if PLATFORM(GTK)
 // This define is from the X11 headers, but it's used below, so we must undefine it.
 #undef VERSION
 #endif

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp (184544 => 184545)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp	2015-05-19 06:05:16 UTC (rev 184544)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp	2015-05-19 06:15:12 UTC (rev 184545)
@@ -49,6 +49,10 @@
 #include <wtf/MainThread.h>
 #include <wtf/Vector.h>
 
+#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS))
+#undef NO_ERROR
+#endif
+
 namespace WebCore {
 
 Extensions3DOpenGLCommon::Extensions3DOpenGLCommon(GraphicsContext3D* context)

Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp (184544 => 184545)


--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp	2015-05-19 06:05:16 UTC (rev 184544)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp	2015-05-19 06:15:12 UTC (rev 184545)
@@ -29,6 +29,10 @@
 
 #include <wtf/text/StringBuilder.h>
 
+#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS))
+#undef NO_ERROR
+#endif
+
 #define STRINGIFY(...) #__VA_ARGS__
 
 namespace WebCore {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to