2007-12-20 Rodney Dawes <dobey@wayofthemonkey.com>
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2007 22:17:42 +0000 (22:17 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2007 22:17:42 +0000 (22:17 +0000)
        Reviewed by Darin Adler.

        Proxy includes of npruntime.h or npapi.h through npruntime_internal.h
        Include stdio.h in npapi.h for the use of FILE with XP_UNIX defined
        This is for building with X11, as some type and enum names conflict
        with #define names in X11 headers.
        http://bugs.webkit.org/show_bug.cgi?id=15669

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bindings/NP_jsobject.h:
        * bindings/npapi.h:
        * bindings/npruntime.cpp:
        * bindings/npruntime_impl.h:
        * bindings/npruntime_priv.h:
        * bindings/npruntime_internal.h:
        * bindings/testbindings.cpp:
        * bindings/c/c_class.h:
        * bindings/c/c_runtime.h:
        * bindings/c/c_utility.h:

2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>

        Reviewed by Darin Adler.

        Define XP_UNIX when building with plugins on X11.
        Use new npruntime_internal.h instead of npruntime.h.
        http://bugs.webkit.org/show_bug.cgi?id=15669

        * ForwardingHeaders/bindings/npruntime_internal.h
        * WebCore.pro:
        * html/HTMLPlugInElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/bindings/NP_jsobject.h
JavaScriptCore/bindings/c/c_class.h
JavaScriptCore/bindings/c/c_runtime.h
JavaScriptCore/bindings/c/c_utility.h
JavaScriptCore/bindings/npapi.h
JavaScriptCore/bindings/npruntime.cpp
JavaScriptCore/bindings/npruntime_impl.h
JavaScriptCore/bindings/npruntime_internal.h [new file with mode: 0644]
JavaScriptCore/bindings/npruntime_priv.h
JavaScriptCore/bindings/testbindings.cpp
WebCore/ChangeLog
WebCore/ForwardingHeaders/bindings/npruntime_internal.h [new file with mode: 0644]
WebCore/WebCore.pro
WebCore/html/HTMLPlugInElement.h

index ee66a7bbdaba5e10a44085e4dd3597070d452f83..3c49dd9b3141284bf11110e61b19dbaae88220f5 100644 (file)
@@ -1,3 +1,25 @@
+2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>
+
+        Reviewed by Darin Adler.
+
+        Proxy includes of npruntime.h or npapi.h through npruntime_internal.h
+        Include stdio.h in npapi.h for the use of FILE with XP_UNIX defined
+        This is for building with X11, as some type and enum names conflict
+        with #define names in X11 headers.
+        http://bugs.webkit.org/show_bug.cgi?id=15669
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * bindings/NP_jsobject.h:
+        * bindings/npapi.h:
+        * bindings/npruntime.cpp:
+        * bindings/npruntime_impl.h:
+        * bindings/npruntime_priv.h:
+        * bindings/npruntime_internal.h:
+        * bindings/testbindings.cpp:
+        * bindings/c/c_class.h:
+        * bindings/c/c_runtime.h:
+        * bindings/c/c_utility.h:
+
 2007-12-20  Darin Adler  <darin@apple.com>
 
         - re-fix http://bugs.webkit.org/show_bug.cgi?id=16471
index 8e5a0943d1e48d547cf051a3c4e2208dedfd7cd9..6ee8dc91203f4de154c797e0cca29d3d070bf120 100644 (file)
@@ -88,6 +88,7 @@
                5186111E0CC824900081412B /* Deque.h in Headers */ = {isa = PBXBuildFile; fileRef = 5186111D0CC824830081412B /* Deque.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51F648D70BB4E2CA0033D760 /* RetainPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F648D60BB4E2CA0033D760 /* RetainPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5DA479660CFBCF56009328A0 /* TCPackedCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA479650CFBCF56009328A0 /* TCPackedCache.h */; };
+               5DAF21B00D1B1ED60000B392 /* npruntime_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DAF21AF0D1B1ED60000B392 /* npruntime_internal.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5DBD18AC0C54018700C15EAE /* CollectorHeapIntrospector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DBD18AA0C54018700C15EAE /* CollectorHeapIntrospector.h */; };
                5DBD18B00C5401A700C15EAE /* MallocZoneSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */; };
                652246A50C8D7A0E007BDAF7 /* HashIterators.h in Headers */ = {isa = PBXBuildFile; fileRef = 652246A40C8D7A0E007BDAF7 /* HashIterators.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51F0EC9705C88DC700E6DF1B /* objc_utility.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = objc_utility.mm; path = bindings/objc/objc_utility.mm; sourceTree = "<group>"; tabWidth = 8; };
                51F648D60BB4E2CA0033D760 /* RetainPtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RetainPtr.h; sourceTree = "<group>"; };
                5DA479650CFBCF56009328A0 /* TCPackedCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCPackedCache.h; sourceTree = "<group>"; };
+               5DAF21AF0D1B1ED60000B392 /* npruntime_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = npruntime_internal.h; path = bindings/npruntime_internal.h; sourceTree = "<group>"; };
                5DBD18A90C54018700C15EAE /* CollectorHeapIntrospector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CollectorHeapIntrospector.cpp; sourceTree = "<group>"; };
                5DBD18AA0C54018700C15EAE /* CollectorHeapIntrospector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectorHeapIntrospector.h; sourceTree = "<group>"; };
                5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MallocZoneSupport.h; sourceTree = "<group>"; };
                51856D950562EE9C008B9D83 /* bindings */ = {
                        isa = PBXGroup;
                        children = (
+                               5DAF21AF0D1B1ED60000B392 /* npruntime_internal.h */,
                                5182A53A06012C3000CBD2F2 /* c_class.cpp */,
                                5182A53B06012C3000CBD2F2 /* c_class.h */,
                                5182A45605FFCF4B00CBD2F2 /* c_instance.cpp */,
                                146AAB2B0B66A84900E55F16 /* JSStringRefCF.h in Headers */,
                                14ABB455099C2A0F00E2A24F /* JSType.h in Headers */,
                                1482B6EB0A4300B300517CFC /* JSValueRef.h in Headers */,
+                               14F252570D08DD8D004ECFFF /* JSVariableObject.h in Headers */,
                                65C7A1740A8EAACB00FA37EA /* JSWrapperObject.h in Headers */,
                                14BD5A360A3E91F600BAF59C /* JavaScriptCore.h in Headers */,
                                932F5B610822A1C700736975 /* JavaScriptCorePrefix.h in Headers */,
                                6580F796094070560082C219 /* PassRefPtr.h in Headers */,
                                65D6D87F09B5A32E0002E4D7 /* Platform.h in Headers */,
                                65400C120A69BAF200509887 /* PropertyNameArray.h in Headers */,
+                               1419D32D0CEA7CDE00FF507A /* RefCounted.h in Headers */,
                                65C647B4093EF8D60022C380 /* RefPtr.h in Headers */,
+                               148A1ECE0D10C23B0069A47C /* RefPtrHashMap.h in Headers */,
                                51F648D70BB4E2CA0033D760 /* RetainPtr.h in Headers */,
                                14BD534C0A3E0AEA00BAF59C /* SavedBuiltins.h in Headers */,
                                E11D51760B2E798D0056C188 /* StringExtras.h in Headers */,
                                14A396A70CD2933100B5B4FF /* SymbolTable.h in Headers */,
+                               5DA479660CFBCF56009328A0 /* TCPackedCache.h in Headers */,
                                6541BD7208E80A17002CBEE7 /* TCPageMap.h in Headers */,
                                6541BD7308E80A17002CBEE7 /* TCSpinLock.h in Headers */,
                                6541BD7508E80A17002CBEE7 /* TCSystemAlloc.h in Headers */,
+                               E1EF79AB0CE97BA60088D500 /* UTF8.h in Headers */,
                                E195679809E7CF1200B89D13 /* Unicode.h in Headers */,
                                E195679609E7CF1200B89D13 /* UnicodeIcu.h in Headers */,
                                935AF46E09E9D9DB00ACD1D8 /* UnusedParam.h in Headers */,
                                932F5B8C0822A1C700736975 /* npapi.h in Headers */,
                                932F5B850822A1C700736975 /* npruntime.h in Headers */,
                                932F5B8E0822A1C700736975 /* npruntime_impl.h in Headers */,
+                               5DAF21B00D1B1ED60000B392 /* npruntime_internal.h in Headers */,
                                932F5B8D0822A1C700736975 /* npruntime_priv.h in Headers */,
                                932F5B510822A1C700736975 /* number_object.h in Headers */,
                                65B174F609D100FA00820339 /* number_object.lut.h in Headers */,
                                93E26BFE08B151D400F85226 /* ucpinternal.h in Headers */,
                                932F5B5C0822A1C700736975 /* ustring.h in Headers */,
                                14ABB36F099C076400E2A24F /* value.h in Headers */,
-                               E1EF79AB0CE97BA60088D500 /* UTF8.h in Headers */,
-                               1419D32D0CEA7CDE00FF507A /* RefCounted.h in Headers */,
-                               5DA479660CFBCF56009328A0 /* TCPackedCache.h in Headers */,
-                               14F252570D08DD8D004ECFFF /* JSVariableObject.h in Headers */,
-                               148A1ECE0D10C23B0069A47C /* RefPtrHashMap.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                14ABDF600A437FEF00ECCA01 /* JSCallbackObject.cpp in Sources */,
                                1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */,
                                14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */,
+                               14DE0D690D02431400AACCA2 /* JSGlobalObject.cpp in Sources */,
                                1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */,
                                1482B74E0A43032800517CFC /* JSStringRef.cpp in Sources */,
                                146AAB380B66A94400E55F16 /* JSStringRefCF.cpp in Sources */,
                                14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */,
+                               14F252610D08DF2F004ECFFF /* JSVariableObject.cpp in Sources */,
                                932F5BC60822A1C700736975 /* NP_jsobject.cpp in Sources */,
+                               E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */,
                                932F5BCA0822A1C700736975 /* c_class.cpp in Sources */,
                                932F5BC70822A1C700736975 /* c_instance.cpp in Sources */,
                                932F5BC80822A1C700736975 /* c_runtime.cpp in Sources */,
                                932F5BBD0822A1C700736975 /* runtime_method.cpp in Sources */,
                                932F5BBA0822A1C700736975 /* runtime_object.cpp in Sources */,
                                932F5BC50822A1C700736975 /* runtime_root.cpp in Sources */,
-                               E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */,
-                               14DE0D690D02431400AACCA2 /* JSGlobalObject.cpp in Sources */,
-                               14F252610D08DF2F004ECFFF /* JSVariableObject.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 6e3d84174d1fe0a62e06ff5cebaa0ccddc372b39..dd9ccae1dc08bb17024b35d3b72847c7c6968952 100644 (file)
@@ -28,7 +28,7 @@
 
 #if !PLATFORM(DARWIN) || !defined(__LP64__)
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 #include <wtf/Forward.h>
 
 namespace KJS {
index 8b921cbe3251673cc7e70139043eb98a39867974..8134d5defac29e956b9bc55650dec03dd5b06ca0 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef BINDINGS_C_CLASS_H_
 #define BINDINGS_C_CLASS_H_
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 #include "runtime.h"
 #include <wtf/HashMap.h>
 
index 57213182dac4b7578fcb012f3afdcb03567758e3..469008a89b1b91ef5183d5bb3007499c9136a158 100644 (file)
@@ -28,7 +28,7 @@
 
 #if !PLATFORM(DARWIN) || !defined(__LP64__)
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 #include "runtime.h"
 
 namespace KJS {
index 05ffce096033ddee5699ebf8008da0f278d1645d..18bc0d499c69ecc26f6891fca2e2c24e3bb2b16b 100644 (file)
@@ -28,7 +28,7 @@
 
 #if !PLATFORM(DARWIN) || !defined(__LP64__)
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 
 namespace KJS {
 
index ddbd4ec23c3b413c8d69dc47cec099511d1f3eae..a172c97abee70585d7dc366b4700f217b6bf698c 100644 (file)
@@ -89,6 +89,7 @@
 #ifdef XP_UNIX
     #include <X11/Xlib.h>
     #include <X11/Xutil.h>
+    #include <stdio.h>
 #endif
 
 #ifdef XP_WIN
index 756eb13b1442b613c11aab3e54bdd7c7635bddcd..ea7ea63ca9ab4f75b409782c2f66f1dc6db96768 100644 (file)
@@ -27,7 +27,7 @@
 
 #if !PLATFORM(DARWIN) || !defined(__LP64__)
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 #include "npruntime_impl.h"
 #include "npruntime_priv.h"
 
index ac0eb7907d51cbf0d099f575193199de1836bfa3..84e63ced3e68aa6048ce3e25d1591265683d81ea 100644 (file)
@@ -28,7 +28,7 @@
 
 #if !PLATFORM(DARWIN) || !defined(__LP64__)
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/JavaScriptCore/bindings/npruntime_internal.h b/JavaScriptCore/bindings/npruntime_internal.h
new file mode 100644 (file)
index 0000000..f5357cd
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2007 Collabora, Ltd.  All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ * This is a internal include header for npapi.h
+ *
+ * Some of the #defines which are in X11 headers conflict with type and enum
+ * names in JavaScriptCore and WebCore
+ * This header #undefs those defines to fix the conflicts
+ * If you need to include npapi.h or npruntime.h when building on X11,
+ * include this file instead of the actual npapi.h or npruntime.h
+ */
+
+#include "npruntime.h"
+
+#ifdef XP_UNIX
+    #include <X11/Xresource.h>
+
+    #undef None
+    #undef Above
+    #undef Below
+    #undef Auto
+    #undef Complex
+    #undef Status
+#endif
index 20d637464fb61e5d90f6da6b0f9ea751096c7fef..b19b16a6fa241e6ff7405167794b630f15166909 100644 (file)
@@ -28,7 +28,7 @@
 
 #if !PLATFORM(DARWIN) || !defined(__LP64__)
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 
 /*
     NPN_InitializeVariantWithStringCopy() will copy string data.  The string data
index c2c2126c20d43d9380ed39c28afa2d5b4c17d182..25f1f99eeebe3f3b82238d82c73a2081f4e4b396 100644 (file)
@@ -29,7 +29,7 @@
 #include "types.h"
 #include "interpreter.h"
 
-#include "npruntime.h"
+#include "npruntime_internal.h"
 
 #include "runtime.h"
 #include "runtime_object.h"
index 44ac1841a2690d6dbe3a8442f72783d6e1eba1db..c3a8a759dde47cb26322e5ab1e76d39f34a43628 100644 (file)
@@ -1,3 +1,15 @@
+2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>
+
+        Reviewed by Darin Adler.
+
+        Define XP_UNIX when building with plugins on X11.
+        Use new npruntime_internal.h instead of npruntime.h.
+        http://bugs.webkit.org/show_bug.cgi?id=15669
+
+        * ForwardingHeaders/bindings/npruntime_internal.h
+        * WebCore.pro:
+        * html/HTMLPlugInElement.h:
+
 2007-12-19  johnnyding.webkit  <johnnyding.webkit@gmail.com>
 
         Reviewed by Alexey. Landed by Stephanie.
diff --git a/WebCore/ForwardingHeaders/bindings/npruntime_internal.h b/WebCore/ForwardingHeaders/bindings/npruntime_internal.h
new file mode 100644 (file)
index 0000000..7548ecf
--- /dev/null
@@ -0,0 +1 @@
+#include <JavaScriptCore/npruntime_internal.h>
index 5f12da38956d0950bef07b0e5e4ba3e49edc77a8..dee94de7067efc46695bed05ee4001cbe78a65a4 100644 (file)
@@ -134,6 +134,10 @@ DEPENDPATH += editing/qt history/qt loader/qt page/qt \
 }
 
 gtk-port {
+    x11:plugins {
+        DEFINES += XP_UNIX
+    }
+
     INCLUDEPATH += \
     $$PWD/platform/gtk \
     $$PWD/platform/graphics/gtk \
index c5017349524c62ced6d45238d9e3852661fe09f9..2b9ed5355bd82abb5b67931f940be91ec39ebc63 100644 (file)
@@ -32,7 +32,7 @@
 #endif
 
 #if USE(NPOBJECT)
-#include <bindings/npruntime.h>
+#include <bindings/npruntime_internal.h>
 #endif
 
 namespace WebCore {