From 072b4036bce010ac72ca3be4ca56f6900f4882d9 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 22 Feb 2001 03:01:34 +0000 Subject: [PATCH] Bug 43121. Move XUL content model code from RDF DLL to content DLL. r=jst,hyatt; sr=brendan. git-svn-id: svn://10.0.0.236/trunk@87623 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/Makefile.in | 2 +- mozilla/allmakefiles.sh | 13 +- .../mac/build_scripts/MozillaBuildList.pm | 14 +- .../chrome/src/nsChromeProtocolHandler.cpp | 2 +- mozilla/chrome/src/nsChromeRegistry.cpp | 4 +- mozilla/config/config.mak | 5 + mozilla/configure | 960 +- mozilla/configure.in | 13 + mozilla/content/base/public/nsContentCID.h | 42 + mozilla/content/base/src/Makefile.in | 1 + mozilla/content/base/src/makefile.win | 2 + mozilla/content/base/src/nsParserUtils.cpp | 147 + .../base/src/nsParserUtils.h} | 27 +- mozilla/content/build/Makefile.in | 3 + mozilla/content/build/makefile.win | 3 + mozilla/content/build/nsContentCID.h | 42 + mozilla/content/build/nsContentDLF.cpp | 3 +- mozilla/content/build/nsContentFactory.cpp | 92 + mozilla/content/build/nsContentModule.cpp | 37 +- .../html/content/src/nsHTMLInputElement.cpp | 2 +- .../content/src/nsHTMLTextAreaElement.cpp | 2 +- .../html/document/src/nsHTMLContentSink.cpp | 36 +- .../content/html/style/src/nsCSSLoader.cpp | 28 +- .../html/style/src/nsCSSStyleSheet.cpp | 4 +- mozilla/content/macbuild/content.mcp | Bin 154437 -> 154437 bytes mozilla/content/macbuild/contentIDL.mcp | Bin 82606 -> 82606 bytes .../content/macbuild/contentSharedPrefix.h | 1 + .../macbuild/contentSharedPrefix_debug.h | 1 + mozilla/content/xbl/src/nsXBLService.cpp | 49 +- .../xml/document/src/nsXMLContentSink.cpp | 132 +- mozilla/content/xul/Makefile.in | 2 +- mozilla/content/xul/content/Makefile.in | 2 +- mozilla/content/xul/content/makefile.win | 2 +- .../content/xul/content/public/Makefile.in | 2 +- mozilla/content/xul/content/src/Makefile.in | 13 +- mozilla/content/xul/content/src/makefile.win | 29 +- .../content/xul/content/src/nsXULAtomList.h | 41 + .../content/xul/content/src/nsXULElement.cpp | 192 +- .../content/xul/content/src/nsXULElement.h | 2 - .../xul/content/src/nsXULPopupListener.cpp | 2 +- mozilla/content/xul/document/Makefile.in | 2 +- mozilla/content/xul/document/public/MANIFEST | 5 - .../content/xul/document/public/MANIFEST_IDL | 4 + .../content/xul/document/public/Makefile.in | 15 +- .../content/xul/document/public/makefile.win | 2 +- .../xul/document/public/nsIXULDocument.h | 3 +- .../document/public/nsIXULPrototypeCache.h | 9 + mozilla/content/xul/document/src/Makefile.in | 20 +- .../xul/document/src/nsXULContentSink.cpp | 61 +- .../xul/document/src/nsXULDocument.cpp | 189 +- .../content/xul/document/src/nsXULDocument.h | 11 +- .../xul/document/src/nsXULPrototypeCache.cpp | 43 + mozilla/content/xul/makefile.win | 2 +- .../idl => content/xul/templates}/Makefile.in | 34 +- mozilla/content/xul/templates/public/MANIFEST | 4 +- .../content/xul/templates/public/MANIFEST_IDL | 2 + .../content/xul/templates/public/Makefile.in | 10 +- .../content/xul/templates/public/makefile.win | 2 +- .../public/nsIRDFContentModelBuilder.h | 1 - mozilla/content/xul/templates/src/Makefile.in | 13 +- .../xul/templates/src/nsXULContentUtils.cpp | 355 +- .../xul/templates/src/nsXULSortService.cpp | 26 +- .../templates/src/nsXULTemplateBuilder.cpp | 86 +- mozilla/dom/macbuild/dom.mcp | Bin 105740 -> 107340 bytes mozilla/dom/macbuild/domSharedPrefix.h | 1 + mozilla/dom/macbuild/domSharedPrefix_debug.h | 1 + mozilla/dom/public/Makefile.in | 2 +- mozilla/dom/public/idl/Makefile.in | 2 +- mozilla/dom/public/idl/makefile.win | 2 +- mozilla/dom/public/makefile.win | 5 + .../dom/public/nsIDOMScriptObjectFactory.h | 6 + mozilla/dom/public/xul/MANIFEST | 4 + .../public => dom/public/xul}/Makefile.in | 16 +- .../public/xul/nsIDOMXULCommandDispatcher.h | 2 +- mozilla/dom/public/xul/nsIDOMXULDocument.h | 2 +- mozilla/dom/public/xul/nsIDOMXULElement.h | 4 +- mozilla/dom/src/Makefile.in | 2 +- mozilla/dom/src/base/nsGlobalWindow.cpp | 2 +- mozilla/dom/src/build/Makefile.in | 1 + mozilla/dom/src/build/makefile.win | 3 + mozilla/dom/src/build/nsDOMFactory.cpp | 34 + mozilla/dom/src/makefile.win | 9 +- .../makefile.win => dom/src/xul/Makefile.in} | 40 +- mozilla/editor/base/nsEditorController.cpp | 4 +- .../libeditor/base/nsEditorController.cpp | 4 +- .../cview/resources/content/cview-handlers.js | 2 +- .../extensions/irc/xul/content/handlers.js | 2 +- mozilla/layout/base/public/nslayout.h | 2 - mozilla/layout/build/nsContentDLF.cpp | 3 +- mozilla/layout/build/nsLayoutDLF.cpp | 3 +- mozilla/layout/macbuild/layoutSharedPrefix.h | 1 + .../macbuild/layoutSharedPrefix_debug.h | 1 + mozilla/layout/style/nsCSSLoader.cpp | 28 +- mozilla/layout/style/nsCSSStyleSheet.cpp | 4 +- .../addrbook/resources/content/abCommon.js | 2 +- .../prefs/resources/content/AccountManager.js | 2 +- .../base/resources/content/commandglue.js | 2 +- mozilla/makefile.win | 2 +- mozilla/rdf/Makefile.in | 2 +- mozilla/rdf/base/idl/MANIFEST | 4 - mozilla/rdf/base/idl/Makefile.in | 6 - mozilla/rdf/base/idl/makefile.win | 6 - mozilla/rdf/base/idl/nsIController.idl | 33 - mozilla/rdf/base/idl/nsIControllerCommand.idl | 164 - mozilla/rdf/base/idl/nsIControllers.idl | 41 - mozilla/rdf/base/idl/nsIXULSortService.idl | 80 - .../rdf/base/idl/nsIXULTemplateBuilder.idl | 33 - .../rdf/base/src/nsContainerEnumerator.cpp | 108 +- mozilla/rdf/base/src/nsRDFParserUtils.cpp | 31 - mozilla/rdf/base/src/nsRDFParserUtils.h | 4 - mozilla/rdf/build/Makefile.in | 4 +- mozilla/rdf/build/makefile.win | 4 - mozilla/rdf/build/nsRDFCID.h | 46 - mozilla/rdf/build/nsRDFModule.cpp | 94 +- .../chrome/src/nsChromeProtocolHandler.cpp | 2 +- mozilla/rdf/chrome/src/nsChromeRegistry.cpp | 4 +- mozilla/rdf/content/public/MANIFEST | 15 - .../public/idl/XULCommandDispatcher.idl | 16 - .../rdf/content/public/idl/XULDocument.idl | 16 - mozilla/rdf/content/public/idl/XULElement.idl | 23 - .../rdf/content/public/idl/XULTreeElement.idl | 23 - mozilla/rdf/content/public/idl/makefile.win | 59 - .../public/nsIDOMXULCommandDispatcher.h | 91 - .../rdf/content/public/nsIDOMXULDocument.h | 91 - mozilla/rdf/content/public/nsIDOMXULElement.h | 128 - .../rdf/content/public/nsIDOMXULTreeElement.h | 110 - .../public/nsIStreamLoadableDocument.h | 46 - mozilla/rdf/content/public/nsIXULContent.h | 115 - .../rdf/content/public/nsIXULContentSink.h | 54 - .../rdf/content/public/nsIXULContentUtils.h | 122 - mozilla/rdf/content/public/nsIXULDocument.h | 144 - .../rdf/content/public/nsIXULPopupListener.h | 49 - .../rdf/content/public/nsIXULPrototypeCache.h | 74 - .../content/public/nsIXULPrototypeDocument.h | 82 - mozilla/rdf/content/src/Makefile.in | 73 - mozilla/rdf/content/src/makefile.win | 75 - .../src/nsControllerCommandManager.cpp | 210 - .../content/src/nsControllerCommandManager.h | 51 - mozilla/rdf/content/src/nsElementMap.cpp | 438 - mozilla/rdf/content/src/nsElementMap.h | 129 - mozilla/rdf/content/src/nsForwardReference.h | 93 - .../content/src/nsIRDFContentModelBuilder.h | 94 - mozilla/rdf/content/src/nsIXULTreeContent.h | 51 - .../content/src/nsJSXULCommandDispatcher.cpp | 587 -- mozilla/rdf/content/src/nsJSXULDocument.cpp | 496 - mozilla/rdf/content/src/nsJSXULElement.cpp | 741 -- .../rdf/content/src/nsJSXULTreeElement.cpp | 782 -- mozilla/rdf/content/src/nsRDFDOMNodeList.cpp | 248 - mozilla/rdf/content/src/nsRDFDOMNodeList.h | 66 - mozilla/rdf/content/src/nsRDFSort.h | 57 - mozilla/rdf/content/src/nsRuleNetwork.cpp | 963 -- mozilla/rdf/content/src/nsRuleNetwork.h | 1100 --- mozilla/rdf/content/src/nsXULAtoms.cpp | 79 - mozilla/rdf/content/src/nsXULAtoms.h | 62 - .../rdf/content/src/nsXULAttributeValue.cpp | 130 - mozilla/rdf/content/src/nsXULAttributeValue.h | 59 - mozilla/rdf/content/src/nsXULAttributes.cpp | 861 -- mozilla/rdf/content/src/nsXULAttributes.h | 212 - .../content/src/nsXULCommandDispatcher.cpp | 415 - .../rdf/content/src/nsXULCommandDispatcher.h | 101 - mozilla/rdf/content/src/nsXULContentSink.cpp | 1695 ---- mozilla/rdf/content/src/nsXULContentUtils.cpp | 1011 -- mozilla/rdf/content/src/nsXULControllers.cpp | 216 - mozilla/rdf/content/src/nsXULControllers.h | 63 - mozilla/rdf/content/src/nsXULDocument.cpp | 6713 -------------- mozilla/rdf/content/src/nsXULDocument.h | 805 -- mozilla/rdf/content/src/nsXULElement.cpp | 4617 ---------- mozilla/rdf/content/src/nsXULElement.h | 566 -- .../rdf/content/src/nsXULPopupListener.cpp | 897 -- .../rdf/content/src/nsXULPrototypeCache.cpp | 246 - .../content/src/nsXULPrototypeDocument.cpp | 580 -- mozilla/rdf/content/src/nsXULSortService.cpp | 2475 ----- .../rdf/content/src/nsXULTemplateBuilder.cpp | 8194 ----------------- mozilla/rdf/content/src/nsXULTreeElement.cpp | 505 - mozilla/rdf/content/src/nsXULTreeElement.h | 94 - mozilla/rdf/datasource/public/nsILocalStore.h | 10 +- mozilla/rdf/datasource/src/nsLocalStore.cpp | 39 +- mozilla/rdf/macbuild/RDFIDL.mcp | Bin 72674 -> 72674 bytes mozilla/rdf/macbuild/rdf.mcp | Bin 92954 -> 89610 bytes mozilla/rdf/makefile.win | 1 - mozilla/rdf/tests/Makefile.in | 2 +- mozilla/rdf/tests/makefile.win | 1 - .../xpfe/appshell/src/nsWebShellWindow.cpp | 1 + .../xpfe/components/directory/directory.js | 2 +- .../search/resources/search-editor.js | 2 +- .../components/search/resources/shared.js | 4 +- .../global/resources/content/nsTreeUtils.js | 4 +- mozilla/xpinstall/packager/packages-mac | 2 + mozilla/xpinstall/packager/packages-unix | 2 + mozilla/xpinstall/packager/packages-win | 2 + 190 files changed, 1721 insertions(+), 40178 deletions(-) create mode 100644 mozilla/content/base/src/nsParserUtils.cpp rename mozilla/{rdf/content/src/nsIRDFNodeList.h => content/base/src/nsParserUtils.h} (58%) create mode 100644 mozilla/content/xul/document/public/MANIFEST_IDL rename mozilla/{rdf/content/public/idl => content/xul/templates}/Makefile.in (53%) create mode 100644 mozilla/content/xul/templates/public/MANIFEST_IDL create mode 100644 mozilla/dom/public/xul/MANIFEST rename mozilla/{rdf/content/public => dom/public/xul}/Makefile.in (75%) rename mozilla/{rdf/content/public/makefile.win => dom/src/xul/Makefile.in} (56%) delete mode 100644 mozilla/rdf/base/idl/nsIController.idl delete mode 100644 mozilla/rdf/base/idl/nsIControllerCommand.idl delete mode 100644 mozilla/rdf/base/idl/nsIControllers.idl delete mode 100755 mozilla/rdf/base/idl/nsIXULSortService.idl delete mode 100644 mozilla/rdf/base/idl/nsIXULTemplateBuilder.idl delete mode 100644 mozilla/rdf/content/public/MANIFEST delete mode 100644 mozilla/rdf/content/public/idl/XULCommandDispatcher.idl delete mode 100644 mozilla/rdf/content/public/idl/XULDocument.idl delete mode 100644 mozilla/rdf/content/public/idl/XULElement.idl delete mode 100644 mozilla/rdf/content/public/idl/XULTreeElement.idl delete mode 100644 mozilla/rdf/content/public/idl/makefile.win delete mode 100644 mozilla/rdf/content/public/nsIDOMXULCommandDispatcher.h delete mode 100644 mozilla/rdf/content/public/nsIDOMXULDocument.h delete mode 100644 mozilla/rdf/content/public/nsIDOMXULElement.h delete mode 100644 mozilla/rdf/content/public/nsIDOMXULTreeElement.h delete mode 100644 mozilla/rdf/content/public/nsIStreamLoadableDocument.h delete mode 100644 mozilla/rdf/content/public/nsIXULContent.h delete mode 100644 mozilla/rdf/content/public/nsIXULContentSink.h delete mode 100644 mozilla/rdf/content/public/nsIXULContentUtils.h delete mode 100644 mozilla/rdf/content/public/nsIXULDocument.h delete mode 100644 mozilla/rdf/content/public/nsIXULPopupListener.h delete mode 100644 mozilla/rdf/content/public/nsIXULPrototypeCache.h delete mode 100644 mozilla/rdf/content/public/nsIXULPrototypeDocument.h delete mode 100644 mozilla/rdf/content/src/Makefile.in delete mode 100644 mozilla/rdf/content/src/makefile.win delete mode 100644 mozilla/rdf/content/src/nsControllerCommandManager.cpp delete mode 100644 mozilla/rdf/content/src/nsControllerCommandManager.h delete mode 100644 mozilla/rdf/content/src/nsElementMap.cpp delete mode 100644 mozilla/rdf/content/src/nsElementMap.h delete mode 100644 mozilla/rdf/content/src/nsForwardReference.h delete mode 100644 mozilla/rdf/content/src/nsIRDFContentModelBuilder.h delete mode 100644 mozilla/rdf/content/src/nsIXULTreeContent.h delete mode 100644 mozilla/rdf/content/src/nsJSXULCommandDispatcher.cpp delete mode 100644 mozilla/rdf/content/src/nsJSXULDocument.cpp delete mode 100644 mozilla/rdf/content/src/nsJSXULElement.cpp delete mode 100644 mozilla/rdf/content/src/nsJSXULTreeElement.cpp delete mode 100644 mozilla/rdf/content/src/nsRDFDOMNodeList.cpp delete mode 100644 mozilla/rdf/content/src/nsRDFDOMNodeList.h delete mode 100644 mozilla/rdf/content/src/nsRDFSort.h delete mode 100644 mozilla/rdf/content/src/nsRuleNetwork.cpp delete mode 100644 mozilla/rdf/content/src/nsRuleNetwork.h delete mode 100644 mozilla/rdf/content/src/nsXULAtoms.cpp delete mode 100644 mozilla/rdf/content/src/nsXULAtoms.h delete mode 100644 mozilla/rdf/content/src/nsXULAttributeValue.cpp delete mode 100644 mozilla/rdf/content/src/nsXULAttributeValue.h delete mode 100644 mozilla/rdf/content/src/nsXULAttributes.cpp delete mode 100644 mozilla/rdf/content/src/nsXULAttributes.h delete mode 100644 mozilla/rdf/content/src/nsXULCommandDispatcher.cpp delete mode 100644 mozilla/rdf/content/src/nsXULCommandDispatcher.h delete mode 100644 mozilla/rdf/content/src/nsXULContentSink.cpp delete mode 100644 mozilla/rdf/content/src/nsXULContentUtils.cpp delete mode 100644 mozilla/rdf/content/src/nsXULControllers.cpp delete mode 100644 mozilla/rdf/content/src/nsXULControllers.h delete mode 100644 mozilla/rdf/content/src/nsXULDocument.cpp delete mode 100644 mozilla/rdf/content/src/nsXULDocument.h delete mode 100644 mozilla/rdf/content/src/nsXULElement.cpp delete mode 100644 mozilla/rdf/content/src/nsXULElement.h delete mode 100644 mozilla/rdf/content/src/nsXULPopupListener.cpp delete mode 100644 mozilla/rdf/content/src/nsXULPrototypeCache.cpp delete mode 100644 mozilla/rdf/content/src/nsXULPrototypeDocument.cpp delete mode 100644 mozilla/rdf/content/src/nsXULSortService.cpp delete mode 100644 mozilla/rdf/content/src/nsXULTemplateBuilder.cpp delete mode 100644 mozilla/rdf/content/src/nsXULTreeElement.cpp delete mode 100644 mozilla/rdf/content/src/nsXULTreeElement.h diff --git a/mozilla/Makefile.in b/mozilla/Makefile.in index 0e4f2418c72..6a1528a9a19 100644 --- a/mozilla/Makefile.in +++ b/mozilla/Makefile.in @@ -95,6 +95,7 @@ DIRS += \ modules/oji \ modules/libjar \ caps \ + rdf \ expat \ htmlparser \ gfx \ @@ -105,7 +106,6 @@ DIRS += \ content \ layout \ db \ - rdf \ docshell \ webshell \ embedding \ diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh index e6cae44e32f..d1126ff27aa 100755 --- a/mozilla/allmakefiles.sh +++ b/mozilla/allmakefiles.sh @@ -83,6 +83,7 @@ dom/public/css/Makefile dom/public/events/Makefile dom/public/range/Makefile dom/public/html/Makefile +dom/public/xul/Makefile dom/public/idl/Makefile dom/public/idl/base/Makefile dom/public/idl/coreDom/Makefile @@ -90,6 +91,7 @@ dom/public/idl/css/Makefile dom/public/idl/events/Makefile dom/public/idl/html/Makefile dom/public/idl/range/Makefile +dom/public/idl/xul/Makefile dom/src/Makefile dom/src/base/Makefile dom/src/build/Makefile @@ -98,6 +100,7 @@ dom/src/css/Makefile dom/src/events/Makefile dom/src/range/Makefile dom/src/html/Makefile +dom/src/xul/Makefile dom/src/jsurl/Makefile dom/tools/Makefile " @@ -260,7 +263,13 @@ content/xml/document/public/Makefile content/xml/document/src/Makefile content/xul/Makefile content/xul/content/Makefile +content/xul/content/public/Makefile content/xul/content/src/Makefile +content/xul/document/Makefile +content/xul/document/public/Makefile +content/xul/document/src/Makefile +content/xul/templates/public/Makefile +content/xul/templates/src/Makefile content/xbl/Makefile content/xbl/public/Makefile content/xbl/src/Makefile @@ -463,10 +472,6 @@ rdf/util/public/Makefile rdf/util/src/Makefile rdf/resources/Makefile rdf/build/Makefile -rdf/content/Makefile -rdf/content/public/Makefile -rdf/content/public/idl/Makefile -rdf/content/src/Makefile rdf/datasource/Makefile rdf/datasource/public/Makefile rdf/datasource/src/Makefile diff --git a/mozilla/build/mac/build_scripts/MozillaBuildList.pm b/mozilla/build/mac/build_scripts/MozillaBuildList.pm index 033f02f8f8b..034e92618a4 100644 --- a/mozilla/build/mac/build_scripts/MozillaBuildList.pm +++ b/mozilla/build/mac/build_scripts/MozillaBuildList.pm @@ -211,9 +211,6 @@ sub InstallNonChromeResources() my($rdf_dir) = "$resource_dir" . "rdf:"; BuildFolderResourceAliases(":mozilla:rdf:resources:", "$rdf_dir"); - my($domds_dir) = "$samples_dir" . "rdf:"; - InstallResources(":mozilla:rdf:tests:domds:resources:MANIFEST", "$domds_dir"); - # Search - make copies (not aliases) of the various search files my($searchPlugins) = "${dist_dir}Search Plugins"; print("--- Starting Search Plugins copying: $searchPlugins\n"); @@ -302,7 +299,6 @@ sub ProcessJarManifests() CreateJarFromManifest(":mozilla:netwerk:resources:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:profile:pref-migrator:resources:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:profile:resources:jar.mn", $chrome_dir, \%jars); - CreateJarFromManifest(":mozilla:rdf:tests:domds:resources:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:themes:blue:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:themes:classic:communicator:mac:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:themes:classic:communicator:search:mac:jar.mn", $chrome_dir, \%jars); @@ -618,6 +614,11 @@ sub BuildClientDist() InstallFromManifest(":mozilla:content:xml:content:public:MANIFEST", "$distdirectory:content:"); InstallFromManifest(":mozilla:content:xml:document:public:MANIFEST", "$distdirectory:content:"); InstallFromManifest(":mozilla:content:xsl:document:src:MANIFEST_IDL", "$distdirectory:idl:"); + InstallFromManifest(":mozilla:content:xul:content:public:MANIFEST", "$distdirectory:content:"); + InstallFromManifest(":mozilla:content:xul:document:public:MANIFEST", "$distdirectory:content:"); + InstallFromManifest(":mozilla:content:xul:document:public:MANIFEST_IDL", "$distdirectory:idl:"); + InstallFromManifest(":mozilla:content:xul:templates:public:MANIFEST", "$distdirectory:content:"); + InstallFromManifest(":mozilla:content:xul:templates:public:MANIFEST_IDL", "$distdirectory:idl:"); #LAYOUT InstallFromManifest(":mozilla:layout:build:MANIFEST", "$distdirectory:layout:"); @@ -652,6 +653,7 @@ sub BuildClientDist() InstallFromManifest(":mozilla:dom:public:range:MANIFEST", "$distdirectory:dom:"); InstallFromManifest(":mozilla:dom:public:html:MANIFEST", "$distdirectory:dom:"); InstallFromManifest(":mozilla:dom:public:css:MANIFEST", "$distdirectory:dom:"); + InstallFromManifest(":mozilla:dom:public:xul:MANIFEST", "$distdirectory:dom:"); InstallFromManifest(":mozilla:dom:src:jsurl:MANIFEST", "$distdirectory:dom:"); InstallFromManifest(":mozilla:dom:src:base:MANIFEST", "$distdirectory:dom:"); @@ -955,7 +957,6 @@ sub BuildIDLProjects() BuildIDLProject(":mozilla:layout:macbuild:layoutIDL.mcp", "layout"); BuildIDLProject(":mozilla:rdf:macbuild:RDFIDL.mcp", "rdf"); - BuildIDLProject(":mozilla:rdf:tests:domds:macbuild:DOMDataSourceIDL.mcp", "domds"); BuildIDLProject(":mozilla:rdf:chrome:build:chromeIDL.mcp", "chrome"); @@ -1307,8 +1308,6 @@ sub BuildBrowserUtilsProjects() BuildOneProject(":mozilla:rdf:chrome:build:chrome.mcp", "ChomeRegistry$D.shlb", 1, $main::ALIAS_SYM_FILES, 1); - BuildOneProject(":mozilla:rdf:tests:domds:macbuild:DOMDataSource.mcp", "DOMDataSource$D.shlb", 1, $main::ALIAS_SYM_FILES, 1); - EndBuildModule("browserutils"); } @@ -1364,7 +1363,6 @@ sub BuildLayoutProjects() BuildOneProject(":mozilla:docshell:macbuild:docshell.mcp", "docshell$D.shlb", 1, $main::ALIAS_SYM_FILES, 1); BuildOneProject(":mozilla:webshell:embed:mac:RaptorShell.mcp", "RaptorShell$D.shlb", 1, $main::ALIAS_SYM_FILES, 0); - #// XXX this is here because of a very TEMPORARY dependency BuildOneProject(":mozilla:rdf:macbuild:rdf.mcp", "RDFLibrary$D.shlb", 1, $main::ALIAS_SYM_FILES, 1); BuildOneProject(":mozilla:xpinstall:macbuild:xpinstall.mcp", "xpinstall$D.shlb", 1, $main::ALIAS_SYM_FILES, 1); diff --git a/mozilla/chrome/src/nsChromeProtocolHandler.cpp b/mozilla/chrome/src/nsChromeProtocolHandler.cpp index 9d3566b0c6d..90096f5d7fd 100644 --- a/mozilla/chrome/src/nsChromeProtocolHandler.cpp +++ b/mozilla/chrome/src/nsChromeProtocolHandler.cpp @@ -44,7 +44,7 @@ #include "nsIXULDocument.h" #include "nsIXULPrototypeCache.h" #include "nsIXULPrototypeDocument.h" -#include "nsRDFCID.h" +#include "nsContentCID.h" #include "nsXPIDLString.h" #include "prlog.h" diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index b20478cb5b5..0c26eef79ab 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -1039,7 +1039,7 @@ NS_IMETHODIMP nsChromeRegistry::RefreshSkins() // Flush the style sheet cache completely. // XXX For now flush everything. need a better call that only flushes style sheets. - NS_WITH_SERVICE(nsIXULPrototypeCache, xulCache, "@mozilla.org/rdf/xul-prototype-cache;1", &rv); + NS_WITH_SERVICE(nsIXULPrototypeCache, xulCache, "@mozilla.org/xul/xul-prototype-cache;1", &rv); if (NS_SUCCEEDED(rv) && xulCache) { xulCache->Flush(); } @@ -2181,7 +2181,7 @@ nsChromeRegistry::ReloadChrome() // Flush the cache completely. nsCOMPtr xulCache = - do_GetService("@mozilla.org/rdf/xul-prototype-cache;1", &rv); + do_GetService("@mozilla.org/xul/xul-prototype-cache;1", &rv); if (NS_SUCCEEDED(rv) && xulCache) { rv = xulCache->Flush(); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/config/config.mak b/mozilla/config/config.mak index 44fc7c48607..fa1d1271ed7 100644 --- a/mozilla/config/config.mak +++ b/mozilla/config/config.mak @@ -262,6 +262,11 @@ CFLAGS=$(CFLAGS) -DSMOOTH_PROGRESS CFLAGS = $(CFLAGS) -DUSE_STRING2 !endif +#!ifdef MOZ_XUL +MOZ_XUL=1 +CFLAGS=$(CFLAGS) -DINCLUDE_XUL -DMOZ_XUL +#!endif + !ifdef MOZ_MATHML CFLAGS=$(CFLAGS) -DMOZ_MATHML !endif diff --git a/mozilla/configure b/mozilla/configure index 7cc68bb493f..03425dd51e1 100755 --- a/mozilla/configure +++ b/mozilla/configure @@ -193,6 +193,8 @@ ac_help="$ac_help --enable-xterm-updates Update XTERM titles with current command." ac_help="$ac_help --enable-ldap Enable LDAP (default=no)" +ac_help="$ac_help + --disable-xul Disable XUL " ac_help="$ac_help --enable-mathml Enable MathML " ac_help="$ac_help @@ -782,7 +784,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:786: checking host system type" >&5 +echo "configure:788: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -803,7 +805,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:807: checking target system type" >&5 +echo "configure:809: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -821,7 +823,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:825: checking build system type" >&5 +echo "configure:827: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -926,14 +928,14 @@ if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then _SAVE_LDFLAGS="$LDFLAGS" echo $ac_n "checking for host c compiler""... $ac_c" 1>&6 -echo "configure:930: checking for host c compiler" >&5 +echo "configure:932: checking for host c compiler" >&5 if test -z "$HOST_CC"; then for ac_prog in gcc cc /usr/ucb/cc icc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:937: checking for $ac_word" >&5 +echo "configure:939: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -969,14 +971,14 @@ test -n "$HOST_CC" || HOST_CC="""" fi echo "$ac_t""$HOST_CC" 1>&6 echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6 -echo "configure:973: checking for host c++ compiler" >&5 +echo "configure:975: checking for host c++ compiler" >&5 if test -z "$HOST_CXX"; then for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl icc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:980: checking for $ac_word" >&5 +echo "configure:982: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1025,7 +1027,7 @@ test -n "$HOST_CXX" || HOST_CXX="""" # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1029: checking for $ac_word" >&5 +echo "configure:1031: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1057,7 +1059,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1061: checking for $ac_word" >&5 +echo "configure:1063: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1090,16 +1092,16 @@ fi LDFLAGS="$HOST_LDFLAGS" echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1094: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1096: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6 else @@ -1114,16 +1116,16 @@ rm -f conftest* CFLAGS="$HOST_CXXFLAGS" echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1118: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 +echo "configure:1120: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6 else @@ -1144,7 +1146,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1148: checking for $ac_word" >&5 +echo "configure:1150: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1179,7 +1181,7 @@ test -n "$CC" || CC=":" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1183: checking for $ac_word" >&5 +echo "configure:1185: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1209,7 +1211,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1213: checking for $ac_word" >&5 +echo "configure:1215: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1260,7 +1262,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1264: checking for $ac_word" >&5 +echo "configure:1266: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1292,7 +1294,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1296: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1298: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1303,12 +1305,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1307 "configure" +#line 1309 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1334,12 +1336,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1338: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1340: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1343: checking whether we are using GNU C" >&5 +echo "configure:1345: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1348,7 +1350,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1367,7 +1369,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1371: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1373: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1404,7 +1406,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1408: checking for $ac_word" >&5 +echo "configure:1410: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1441,7 +1443,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1445: checking for $ac_word" >&5 +echo "configure:1447: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1473,7 +1475,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1477: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1479: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1484,12 +1486,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1488 "configure" +#line 1490 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1515,12 +1517,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1519: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1521: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1524: checking whether we are using GNU C++" >&5 +echo "configure:1526: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1529,7 +1531,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1548,7 +1550,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1552: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1554: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1585,7 +1587,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1589: checking for $ac_word" >&5 +echo "configure:1591: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1622,7 +1624,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1626: checking for $ac_word" >&5 +echo "configure:1628: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1659,7 +1661,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1663: checking for $ac_word" >&5 +echo "configure:1665: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1696,7 +1698,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1700: checking for $ac_word" >&5 +echo "configure:1702: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1733,7 +1735,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1737: checking for $ac_word" >&5 +echo "configure:1739: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1770,7 +1772,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1774: checking for $ac_word" >&5 +echo "configure:1776: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1807,7 +1809,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1811: checking for $ac_word" >&5 +echo "configure:1813: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1846,7 +1848,7 @@ else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1850: checking for $ac_word" >&5 +echo "configure:1852: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1876,7 +1878,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1880: checking for $ac_word" >&5 +echo "configure:1882: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1927,7 +1929,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1931: checking for $ac_word" >&5 +echo "configure:1933: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1959,7 +1961,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1965: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1970,12 +1972,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1974 "configure" +#line 1976 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2001,12 +2003,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2007: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2010: checking whether we are using GNU C" >&5 +echo "configure:2012: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2015,7 +2017,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2034,7 +2036,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2038: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2040: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2070,7 +2072,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2074: checking for $ac_word" >&5 +echo "configure:2076: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2102,7 +2104,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2106: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:2108: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2113,12 +2115,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 2117 "configure" +#line 2119 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2144,12 +2146,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2148: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2150: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:2153: checking whether we are using GNU C++" >&5 +echo "configure:2155: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2158,7 +2160,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -2177,7 +2179,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:2181: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:2183: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2211,7 +2213,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2215: checking for $ac_word" >&5 +echo "configure:2217: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2243,7 +2245,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2247: checking for $ac_word" >&5 +echo "configure:2249: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2284,7 +2286,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2288: checking for $ac_word" >&5 +echo "configure:2290: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2325,7 +2327,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2329: checking for $ac_word" >&5 +echo "configure:2331: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2366,7 +2368,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2370: checking for $ac_word" >&5 +echo "configure:2372: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2407,7 +2409,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2411: checking for $ac_word" >&5 +echo "configure:2413: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2469,10 +2471,10 @@ fi if test "$CC" != "icc"; then if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:2473: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:2475: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:2476: checking whether cc understands -c and -o together" >&5 +echo "configure:2478: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" @@ -2484,16 +2486,16 @@ else # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:2489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:2490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:2491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:2496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:2497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:2499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -2541,7 +2543,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2545: checking how to run the C preprocessor" >&5 +echo "configure:2547: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2556,13 +2558,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2573,13 +2575,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2590,13 +2592,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2621,7 +2623,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:2625: checking how to run the C++ preprocessor" >&5 +echo "configure:2627: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2634,12 +2636,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2675,7 +2677,7 @@ echo "$ac_t""$CXXCPP" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2679: checking for a BSD compatible install" >&5 +echo "configure:2681: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2728,7 +2730,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2732: checking whether ln -s works" >&5 +echo "configure:2734: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2753,7 +2755,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2757: checking for $ac_word" >&5 +echo "configure:2759: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2787,7 +2789,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2791: checking for $ac_word" >&5 +echo "configure:2793: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2828,7 +2830,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2832: checking for $ac_word" >&5 +echo "configure:2834: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2868,7 +2870,7 @@ if test -z "$PERL" || test "$PERL" = ":"; then fi echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6 -echo "configure:2872: checking for minimum required perl version >= $PERL_VERSION" >&5 +echo "configure:2874: checking for minimum required perl version >= $PERL_VERSION" >&5 _perl_version=`$PERL -e 'print "$]"; if ($] >= $PERL_VERSION) { exit(0); } else { exit(1); }' 2>&5` _perl_res=$? echo "$ac_t""$_perl_version" 1>&6 @@ -2878,7 +2880,7 @@ if test "$_perl_res" != 0; then fi echo $ac_n "checking for full perl installation""... $ac_c" 1>&6 -echo "configure:2882: checking for full perl installation" >&5 +echo "configure:2884: checking for full perl installation" >&5 _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5` _perl_res=$? if test "$_perl_res" != 0; then @@ -2891,7 +2893,7 @@ fi # Extract the first word of "whoami", so it can be a program name with args. set dummy whoami; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2895: checking for $ac_word" >&5 +echo "configure:2897: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2927,7 +2929,7 @@ fi # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2931: checking for $ac_word" >&5 +echo "configure:2933: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2963,7 +2965,7 @@ fi # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2967: checking for $ac_word" >&5 +echo "configure:2969: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3001,7 +3003,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3005: checking for $ac_word" >&5 +echo "configure:3007: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3043,7 +3045,7 @@ fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3047: checking for $ac_word" >&5 +echo "configure:3049: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3078,7 +3080,7 @@ fi # Extract the first word of "xargs", so it can be a program name with args. set dummy xargs; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3082: checking for $ac_word" >&5 +echo "configure:3084: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3116,7 +3118,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3120: checking for $ac_word" >&5 +echo "configure:3122: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3172,7 +3174,7 @@ then fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:3176: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:3178: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3204,7 +3206,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3208: checking for X" >&5 +echo "configure:3210: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3266,12 +3268,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3340,14 +3342,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -3453,17 +3455,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:3457: checking whether -R must be followed by a space" >&5 +echo "configure:3459: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3479,14 +3481,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3518,7 +3520,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:3522: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3524: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3526,7 +3528,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3559,7 +3561,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:3563: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3565: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3567,7 +3569,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3607,12 +3609,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3611: checking for gethostbyname" >&5 +echo "configure:3613: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -3656,7 +3658,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3660: checking for gethostbyname in -lnsl" >&5 +echo "configure:3662: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3664,7 +3666,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3705,12 +3707,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:3709: checking for connect" >&5 +echo "configure:3711: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -3754,7 +3756,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3758: checking for connect in -lsocket" >&5 +echo "configure:3760: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3762,7 +3764,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3797,12 +3799,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:3801: checking for remove" >&5 +echo "configure:3803: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -3846,7 +3848,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3850: checking for remove in -lposix" >&5 +echo "configure:3852: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3854,7 +3856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3889,12 +3891,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3893: checking for shmat" >&5 +echo "configure:3895: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -3938,7 +3940,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3942: checking for shmat in -lipc" >&5 +echo "configure:3944: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3946,7 +3948,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3990,7 +3992,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3994: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3996: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3998,7 +4000,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4137,7 +4139,7 @@ MKSHLIB_FORCE_ALL= MKSHLIB_UNFORCE_ALL= if test "$GNU_CC"; then echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6 -echo "configure:4141: checking whether ld has archive extraction flags" >&5 +echo "configure:4143: checking whether ld has archive extraction flags" >&5 if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4154,14 +4156,14 @@ LOOP_INPUT LDFLAGS=$force LIBS=$unforce cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_mkshlib_force_and_unforce=$line; break else @@ -4816,7 +4818,7 @@ then _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6 -echo "configure:4820: checking for XDrawLines in -lX11" >&5 +echo "configure:4822: checking for XDrawLines in -lX11" >&5 ac_lib_var=`echo X11'_'XDrawLines | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4824,7 +4826,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4857,7 +4859,7 @@ MISSING_X="$MISSING_X -lX11" fi echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6 -echo "configure:4861: checking for XextAddDisplay in -lXext" >&5 +echo "configure:4863: checking for XextAddDisplay in -lXext" >&5 ac_lib_var=`echo Xext'_'XextAddDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4865,7 +4867,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4898,7 +4900,7 @@ MISSING_X="$MISSING_X -lXext" fi echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6 -echo "configure:4902: checking for IceFlush in -lICE" >&5 +echo "configure:4904: checking for IceFlush in -lICE" >&5 ac_lib_var=`echo ICE'_'IceFlush | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4906,7 +4908,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4938,7 +4940,7 @@ else fi echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6 -echo "configure:4942: checking for SmcCloseConnection in -lSM" >&5 +echo "configure:4944: checking for SmcCloseConnection in -lSM" >&5 ac_lib_var=`echo SM'_'SmcCloseConnection | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4946,7 +4948,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lSM $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4978,7 +4980,7 @@ else fi echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6 -echo "configure:4982: checking for XtFree in -lXt" >&5 +echo "configure:4984: checking for XtFree in -lXt" >&5 ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4986,7 +4988,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5019,7 +5021,7 @@ MISSING_X="$MISSING_X -lXt" fi echo $ac_n "checking for XmuLookupString in -lXmu""... $ac_c" 1>&6 -echo "configure:5023: checking for XmuLookupString in -lXmu" >&5 +echo "configure:5025: checking for XmuLookupString in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuLookupString | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5027,7 +5029,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXmu $X_PRE_LIBS $XLIBS $XT_LIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5061,7 +5063,7 @@ fi echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6 -echo "configure:5065: checking for XineramaIsActive in -lXinerama" >&5 +echo "configure:5067: checking for XineramaIsActive in -lXinerama" >&5 ac_lib_var=`echo Xinerama'_'XineramaIsActive | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5069,7 +5071,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXinerama $XLIBS $XEXT_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5102,17 +5104,17 @@ fi ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6 -echo "configure:5106: checking for X11/extensions/Xinerama.h" >&5 +echo "configure:5108: checking for X11/extensions/Xinerama.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5330,7 +5332,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5334: checking for $ac_word" >&5 +echo "configure:5336: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5365,7 +5367,7 @@ fi min_gtk_version=$GTK_VERSION echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:5369: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:5371: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -5388,7 +5390,7 @@ echo "configure:5369: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5466,7 +5468,7 @@ main () } EOF -if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5501,7 +5503,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -5511,7 +5513,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -5663,12 +5665,12 @@ MISSING_XPRINT= if test "$MOZ_ENABLE_XPRINT" then echo $ac_n "checking for xprint insanity""... $ac_c" 1>&6 -echo "configure:5667: checking for xprint insanity" >&5 +echo "configure:5669: checking for xprint insanity" >&5 _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:5672: checking for XpGetPrinterList in -lXp" >&5 +echo "configure:5674: checking for XpGetPrinterList in -lXp" >&5 ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5676,7 +5678,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5737,7 +5739,7 @@ fi if test "$MOZ_ENABLE_MOTIF" then echo $ac_n "checking for motif insanity""... $ac_c" 1>&6 -echo "configure:5741: checking for motif insanity" >&5 +echo "configure:5743: checking for motif insanity" >&5 if test "$x_includes" then @@ -5763,7 +5765,7 @@ echo "configure:5741: checking for motif insanity" >&5 if test "$MOTIF_REQUIRES_XPM" = "True" then echo $ac_n "checking for XpmWriteFileFromImage in -lXpm""... $ac_c" 1>&6 -echo "configure:5767: checking for XpmWriteFileFromImage in -lXpm" >&5 +echo "configure:5769: checking for XpmWriteFileFromImage in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmWriteFileFromImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5771,7 +5773,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXpm $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5808,7 +5810,7 @@ fi if test "$MOTIF_VERSION" = "2.1" then echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:5812: checking for XpGetPrinterList in -lXp" >&5 +echo "configure:5814: checking for XpGetPrinterList in -lXp" >&5 ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5816,7 +5818,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5895,7 +5897,7 @@ fi _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$MOTIF_DYNAMIC_PATHS $XLDFLAGS $LDFLAGS" echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6 -echo "configure:5899: checking for XmStringCreate in -lXm" >&5 +echo "configure:5901: checking for XmStringCreate in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5903,7 +5905,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXm $MOTIF_DYNAMIC_PATHS $MOZ_MOTIF_LDFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5938,7 +5940,7 @@ fi LDFLAGS="$_SAVE_LDFLAGS" else echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6 -echo "configure:5942: checking for XmStringCreate in -lXm" >&5 +echo "configure:5944: checking for XmStringCreate in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5946,7 +5948,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXm $MOZ_MOTIF_LDFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6004,7 +6006,7 @@ fi if test "$MOZ_ENABLE_XLIB" then echo $ac_n "checking for xlib insanity""... $ac_c" 1>&6 -echo "configure:6008: checking for xlib insanity" >&5 +echo "configure:6010: checking for xlib insanity" >&5 echo "$ac_t""yes" 1>&6 MOZ_XLIB_CFLAGS="$X_CFLAGS" @@ -6042,7 +6044,7 @@ fi echo $ac_n "checking for Qt insanity""... $ac_c" 1>&6 -echo "configure:6046: checking for Qt insanity" >&5 +echo "configure:6048: checking for Qt insanity" >&5 QT_CFLAGS="-I${QTDIR}/include/qt" QT_LIBS="-L/usr/X11R6/lib -L${QTDIR}/lib -lqt -lXext -lX11" @@ -6158,7 +6160,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6162: checking for $ac_word" >&5 +echo "configure:6164: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6200,7 +6202,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6204: checking for $ac_word" >&5 +echo "configure:6206: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6342,7 +6344,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6346: checking for $ac_word" >&5 +echo "configure:6348: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6377,7 +6379,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:6381: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:6383: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -6400,7 +6402,7 @@ echo "configure:6381: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6476,7 +6478,7 @@ main () } EOF -if { (eval echo configure:6480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6510,7 +6512,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -6520,7 +6522,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -6564,7 +6566,7 @@ rm -f conftest* # Extract the first word of "libIDL-config", so it can be a program name with args. set dummy libIDL-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6568: checking for $ac_word" >&5 +echo "configure:6570: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6599,7 +6601,7 @@ fi min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:6603: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:6605: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -6626,7 +6628,7 @@ echo "configure:6603: checking for libIDL - version >= $min_libIDL_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6712,7 +6714,7 @@ main () } EOF -if { (eval echo configure:6716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6746,7 +6748,7 @@ fi CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -6757,7 +6759,7 @@ int main() { return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libIDL or finding the wrong" @@ -6867,7 +6869,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6871: checking for $ac_word" >&5 +echo "configure:6873: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6902,7 +6904,7 @@ fi min_glib_version=${GLIB_VERSION} echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:6906: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:6908: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -6925,7 +6927,7 @@ echo "configure:6906: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7001,7 +7003,7 @@ main () } EOF -if { (eval echo configure:7005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7035,7 +7037,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -7045,7 +7047,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:7049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -7098,12 +7100,12 @@ i386-*-netbsd*) esac echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:7102: checking for working const" >&5 +echo "configure:7104: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -7173,12 +7175,12 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7177: checking for ANSI C header files" >&5 +echo "configure:7179: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7186,7 +7188,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7203,7 +7205,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -7221,7 +7223,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -7242,7 +7244,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7253,7 +7255,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7277,12 +7279,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7281: checking for mode_t" >&5 +echo "configure:7283: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7310,12 +7312,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:7314: checking for off_t" >&5 +echo "configure:7316: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7343,12 +7345,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7347: checking for pid_t" >&5 +echo "configure:7349: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7376,12 +7378,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:7380: checking for size_t" >&5 +echo "configure:7382: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7409,12 +7411,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:7413: checking for uid_t in sys/types.h" >&5 +echo "configure:7415: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -7443,12 +7445,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:7447: checking for st_blksize in struct stat" >&5 +echo "configure:7449: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7456,7 +7458,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:7460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -7491,12 +7493,12 @@ EOF esac echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:7495: checking for int16_t" >&5 +echo "configure:7497: checking for int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7504,7 +7506,7 @@ int main() { int16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int16_t=true else @@ -7526,12 +7528,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:7530: checking for int32_t" >&5 +echo "configure:7532: checking for int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7539,7 +7541,7 @@ int main() { int32_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int32_t=true else @@ -7561,12 +7563,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64_t""... $ac_c" 1>&6 -echo "configure:7565: checking for int64_t" >&5 +echo "configure:7567: checking for int64_t" >&5 if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7574,7 +7576,7 @@ int main() { int64_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64_t=true else @@ -7596,12 +7598,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for int64""... $ac_c" 1>&6 -echo "configure:7600: checking for int64" >&5 +echo "configure:7602: checking for int64" >&5 if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7609,7 +7611,7 @@ int main() { int64 foo = 0; ; return 0; } EOF -if { (eval echo configure:7613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_int64=true else @@ -7631,12 +7633,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint""... $ac_c" 1>&6 -echo "configure:7635: checking for uint" >&5 +echo "configure:7637: checking for uint" >&5 if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7644,7 +7646,7 @@ int main() { uint foo = 0; ; return 0; } EOF -if { (eval echo configure:7648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint=true else @@ -7666,12 +7668,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint_t""... $ac_c" 1>&6 -echo "configure:7670: checking for uint_t" >&5 +echo "configure:7672: checking for uint_t" >&5 if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7679,7 +7681,7 @@ int main() { uint foo = 0; ; return 0; } EOF -if { (eval echo configure:7683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint_t=true else @@ -7701,12 +7703,12 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 -echo "configure:7705: checking for uint16_t" >&5 +echo "configure:7707: checking for uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7714,7 +7716,7 @@ int main() { uint16_t foo = 0; ; return 0; } EOF -if { (eval echo configure:7718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_uint16_t=true else @@ -7737,12 +7739,12 @@ else fi echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6 -echo "configure:7741: checking for uname.domainname" >&5 +echo "configure:7743: checking for uname.domainname" >&5 if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -7750,7 +7752,7 @@ int main() { (void)uname(res); if (res != 0) { domain = res->domainname; } ; return 0; } EOF -if { (eval echo configure:7754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_domainname_field=true else @@ -7774,12 +7776,12 @@ else fi echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6 -echo "configure:7778: checking for uname.__domainname" >&5 +echo "configure:7780: checking for uname.__domainname" >&5 if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -7787,7 +7789,7 @@ int main() { (void)uname(res); if (res != 0) { domain = res->__domainname; } ; return 0; } EOF -if { (eval echo configure:7791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uname_us_domainname_field=true else @@ -7811,17 +7813,17 @@ else fi echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6 -echo "configure:7815: checking for 64-bit OS" >&5 +echo "configure:7817: checking for 64-bit OS" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -7857,7 +7859,7 @@ fi echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6 -echo "configure:7861: checking for usable wchar_t (2 bytes, unsigned)" >&5 +echo "configure:7863: checking for usable wchar_t (2 bytes, unsigned)" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7865,14 +7867,14 @@ else ac_cv_have_usable_wchar="maybe" else cat > conftest.$ac_ext < int main () { return (sizeof(wchar_t) != 2) || (wchar_t)-1 < (wchar_t) 0 ; } EOF -if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_have_usable_wchar="yes" else @@ -7902,7 +7904,7 @@ else CFLAGS="$CFLAGS -fshort-wchar" echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6 -echo "configure:7906: checking for compiler -fshort-wchar option" >&5 +echo "configure:7908: checking for compiler -fshort-wchar option" >&5 if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7910,14 +7912,14 @@ else ac_cv_have_usable_wchar_option="maybe" else cat > conftest.$ac_ext < int main () { return (sizeof(wchar_t) != 2) || (wchar_t)-1 < (wchar_t) 0 ; } EOF -if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_have_usable_wchar_option="yes" else @@ -7952,12 +7954,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:7956: checking for $ac_hdr that defines DIR" >&5 +echo "configure:7958: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -7965,7 +7967,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:7969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -7990,7 +7992,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:7994: checking for opendir in -ldir" >&5 +echo "configure:7996: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7998,7 +8000,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8031,7 +8033,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8035: checking for opendir in -lx" >&5 +echo "configure:8037: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8039,7 +8041,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8081,17 +8083,17 @@ for ac_hdr in sys/byteorder.h compat.h getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8085: checking for $ac_hdr" >&5 +echo "configure:8087: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8121,17 +8123,17 @@ for ac_hdr in sys/bittypes.h memory.h unistd.h sys/filio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8125: checking for $ac_hdr" >&5 +echo "configure:8127: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8162,17 +8164,17 @@ for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8166: checking for $ac_hdr" >&5 +echo "configure:8168: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8207,17 +8209,17 @@ case $target in do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8211: checking for $ac_hdr" >&5 +echo "configure:8213: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8251,7 +8253,7 @@ case $target in ;; *) echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6 -echo "configure:8255: checking for gethostbyname_r in -lc_r" >&5 +echo "configure:8257: checking for gethostbyname_r in -lc_r" >&5 ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8259,7 +8261,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8300,7 +8302,7 @@ fi ;; esac echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6 -echo "configure:8304: checking for atan in -lm" >&5 +echo "configure:8306: checking for atan in -lm" >&5 ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8308,7 +8310,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8347,7 +8349,7 @@ else fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:8351: checking for dlopen in -ldl" >&5 +echo "configure:8353: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8355,7 +8357,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8402,7 +8404,7 @@ if test ! "$GNU_CXX"; then ;; *-aix*) echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6 -echo "configure:8406: checking for demangle in -lC_r" >&5 +echo "configure:8408: checking for demangle in -lC_r" >&5 ac_lib_var=`echo C_r'_'demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8410,7 +8412,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lC_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8451,7 +8453,7 @@ fi ;; *) echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6 -echo "configure:8455: checking for demangle in -lC" >&5 +echo "configure:8457: checking for demangle in -lC" >&5 ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8459,7 +8461,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lC $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8501,7 +8503,7 @@ fi esac fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:8505: checking for socket in -lsocket" >&5 +echo "configure:8507: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8509,7 +8511,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8548,7 +8550,7 @@ else fi echo $ac_n "checking for shm_open in -lposix4""... $ac_c" 1>&6 -echo "configure:8552: checking for shm_open in -lposix4" >&5 +echo "configure:8554: checking for shm_open in -lposix4" >&5 ac_lib_var=`echo posix4'_'shm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8556,7 +8558,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8599,7 +8601,7 @@ fi echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:8603: checking for pthread_create in -lpthreads" >&5 +echo "configure:8605: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -8621,7 +8623,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:8625: checking for pthread_create in -lpthread" >&5 +echo "configure:8627: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -8643,7 +8645,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:8647: checking for pthread_create in -lc_r" >&5 +echo "configure:8649: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -8665,7 +8667,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:8669: checking for pthread_create in -lc" >&5 +echo "configure:8671: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -8720,7 +8722,7 @@ then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:8724: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:8726: checking whether ${CC-cc} accepts -pthread" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -8736,7 +8738,7 @@ echo "configure:8724: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:8740: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:8742: checking whether ${CC-cc} accepts -pthreads" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -8835,13 +8837,13 @@ else fi echo $ac_n "checking "for PR_GetCurrentThread in -lnspr$NSPR_VERSION"""... $ac_c" 1>&6 -echo "configure:8839: checking "for PR_GetCurrentThread in -lnspr$NSPR_VERSION"" >&5 +echo "configure:8841: checking "for PR_GetCurrentThread in -lnspr$NSPR_VERSION"" >&5 LIBS="-lnspr$NSPR_VERSION $NSPR_LIBS $LIBS" if test "$cross_compiling" = yes; then NSPR_LIBS="-lnspr$NSPR_VERSION $NSPR_LIBS" result="yes" else cat > conftest.$ac_ext < #include @@ -8851,7 +8853,7 @@ else } EOF -if { (eval echo configure:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then NSPR_LIBS="-lnspr$NSPR_VERSION $NSPR_LIBS" result="yes" else @@ -8870,13 +8872,13 @@ if test "$_NSPR_NEEDS_THREAD_LIB" = 1; then LIBS=$_SAVE_LIBS echo $ac_n "checking "for PR_GetCurrentThread in -lnspr$NSPR_VERSION with thread lib"""... $ac_c" 1>&6 -echo "configure:8874: checking "for PR_GetCurrentThread in -lnspr$NSPR_VERSION with thread lib"" >&5 +echo "configure:8876: checking "for PR_GetCurrentThread in -lnspr$NSPR_VERSION with thread lib"" >&5 LIBS="-lnspr$NSPR_VERSION $NSPR_LIBS $LIBS" if test "$cross_compiling" = yes; then NSPR_LIBS="-lnspr$NSPR_VERSION $NSPR_LIBS" result="yes" else cat > conftest.$ac_ext < #include @@ -8886,7 +8888,7 @@ else } EOF -if { (eval echo configure:8890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then NSPR_LIBS="-lnspr$NSPR_VERSION $NSPR_LIBS" result="yes" else @@ -8903,7 +8905,7 @@ echo "$ac_t"""$result"" 1>&6 fi echo $ac_n "checking for PL_CreateOptState in -lplc$NSPR_VERSION""... $ac_c" 1>&6 -echo "configure:8907: checking for PL_CreateOptState in -lplc$NSPR_VERSION" >&5 +echo "configure:8909: checking for PL_CreateOptState in -lplc$NSPR_VERSION" >&5 ac_lib_var=`echo plc$NSPR_VERSION'_'PL_CreateOptState | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8911,7 +8913,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lplc$NSPR_VERSION $NSPR_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8944,7 +8946,7 @@ MISSING_NSPR="$MISSING_NSPR -lplc$NSPR_VERSION" fi echo $ac_n "checking for PL_NewHashTable in -lplds$NSPR_VERSION""... $ac_c" 1>&6 -echo "configure:8948: checking for PL_NewHashTable in -lplds$NSPR_VERSION" >&5 +echo "configure:8950: checking for PL_NewHashTable in -lplds$NSPR_VERSION" >&5 ac_lib_var=`echo plds$NSPR_VERSION'_'PL_NewHashTable | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8952,7 +8954,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lplds$NSPR_VERSION $NSPR_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9002,7 +9004,7 @@ if test "${NSPR_DIR}" -a -d "${NSPR_DIR}"; then fi echo $ac_n "checking whether have system NSPR""... $ac_c" 1>&6 -echo "configure:9006: checking whether have system NSPR" >&5 +echo "configure:9008: checking whether have system NSPR" >&5 if test "$MISSING_NSPR"; then echo "$ac_t""no (will build it from source)" 1>&6 NSPR_INCLUDE_DIR= @@ -9035,7 +9037,7 @@ EOF echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6 -echo "configure:9039: checking whether mmap() sees write()s" >&5 +echo "configure:9041: checking whether mmap() sees write()s" >&5 mmap_test_prog=' @@ -9074,11 +9076,11 @@ if test "$cross_compiling" = yes; then result="yes" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -9103,13 +9105,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:9107: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:9109: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -9127,7 +9129,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -9149,7 +9151,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:9153: checking for 8-bit clean memcmp" >&5 +echo "configure:9155: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9157,7 +9159,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -9187,12 +9189,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in random qsort strerror lchown fchmod snprintf localtime_r statvfs memmove usleep rint do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9191: checking for $ac_func" >&5 +echo "configure:9193: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9241,12 +9243,12 @@ done echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6 -echo "configure:9245: checking how to call gettimeofday" >&5 +echo "configure:9247: checking how to call gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9255,7 +9257,7 @@ struct timeval tv; struct timezone tzp; gettimeofday(&tv, &tzp); ; return 0; } EOF -if { (eval echo configure:9259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_gettimeofday_args=2 else @@ -9263,7 +9265,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < #include @@ -9271,7 +9273,7 @@ int main() { struct timeval tv; gettimeofday(&tv); ; return 0; } EOF -if { (eval echo configure:9275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_gettimeofday_args=1 else @@ -9307,7 +9309,7 @@ fi echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6 -echo "configure:9311: checking for /dev/zero" >&5 +echo "configure:9313: checking for /dev/zero" >&5 if test "$HAVE_DEV_ZERO"; then cat >> confdefs.h <<\EOF #define HAVE_DEV_ZERO 1 @@ -9324,19 +9326,19 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for valloc""... $ac_c" 1>&6 -echo "configure:9328: checking for valloc" >&5 +echo "configure:9330: checking for valloc" >&5 if eval "test \"`echo '$''{'ac_cv_valloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { void *ptr = valloc(1); ; return 0; } EOF -if { (eval echo configure:9340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_valloc=true else @@ -9362,7 +9364,7 @@ fi fi echo $ac_n "checking whether va_list assignments need array notation""... $ac_c" 1>&6 -echo "configure:9366: checking whether va_list assignments need array notation" >&5 +echo "configure:9368: checking whether va_list assignments need array notation" >&5 if eval "test \"`echo '$''{'ac_cv_valistisarray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9370,7 +9372,7 @@ else ac_cv_valistisarray=false else cat > conftest.$ac_ext < #include @@ -9383,7 +9385,7 @@ else } int main() { foo(0, 123); return(0); } EOF -if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_valistisarray=false else @@ -9459,12 +9461,12 @@ EOF esac echo $ac_n "checking for sys_errlist/sys_nerr""... $ac_c" 1>&6 -echo "configure:9463: checking for sys_errlist/sys_nerr" >&5 +echo "configure:9465: checking for sys_errlist/sys_nerr" >&5 if eval "test \"`echo '$''{'ac_cv_syserrlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9472,7 +9474,7 @@ int main() { char *foo = sys_errlist[sys_nerr-1]; ; return 0; } EOF -if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_syserrlist=true else @@ -9499,7 +9501,7 @@ if test "$GNU_CXX"; then _MOZ_RTTI_FLAGS=${_COMPILER_PREFIX}-fno-rtti echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6 -echo "configure:9503: checking for C++ exceptions flag" >&5 +echo "configure:9505: checking for C++ exceptions flag" >&5 if eval "test \"`echo '$''{'ac_cv_cxx_exceptions_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9531,12 +9533,12 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for ios::binary""... $ac_c" 1>&6 -echo "configure:9535: checking for ios::binary" >&5 +echo "configure:9537: checking for ios::binary" >&5 if eval "test \"`echo '$''{'ac_cv_ios_binary'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9545,7 +9547,7 @@ char *buffer = "config.log"; fstream *mFileStream=new fstream(buffer, ios::binary); ; return 0; } EOF -if { (eval echo configure:9549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_ios_binary=true else @@ -9569,12 +9571,12 @@ fi echo $ac_n "checking for ios::bin""... $ac_c" 1>&6 -echo "configure:9573: checking for ios::bin" >&5 +echo "configure:9575: checking for ios::bin" >&5 if eval "test \"`echo '$''{'ac_cv_ios_bin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9583,7 +9585,7 @@ char *buffer = "config.log"; fstream *mFileStream=new fstream(buffer, ios::bin); ; return 0; } EOF -if { (eval echo configure:9587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_ios_bin=true else @@ -9606,19 +9608,19 @@ else fi echo $ac_n "checking for ostreams""... $ac_c" 1>&6 -echo "configure:9610: checking for ostreams" >&5 +echo "configure:9612: checking for ostreams" >&5 if eval "test \"`echo '$''{'ac_cv_ostream'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { streambuf *xxx; ostream *foo=new ostream(xxx); ; return 0; } EOF -if { (eval echo configure:9622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_ostream=true else @@ -9644,19 +9646,19 @@ else LIBS='-lemxio -lsocket -lstdcpp' fi echo $ac_n "checking for ostreams in -lstdc++""... $ac_c" 1>&6 -echo "configure:9648: checking for ostreams in -lstdc++" >&5 +echo "configure:9650: checking for ostreams in -lstdc++" >&5 if eval "test \"`echo '$''{'ac_cv_lib_stdcpp_ostream'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ostream *foo=new ostream(); ; return 0; } EOF -if { (eval echo configure:9660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_stdcpp_ostream=true else @@ -9681,19 +9683,19 @@ EOF fi echo $ac_n "checking for C++ \"bool\" keyword""... $ac_c" 1>&6 -echo "configure:9685: checking for C++ \"bool\" keyword" >&5 +echo "configure:9687: checking for C++ \"bool\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_bool=yes else @@ -9715,12 +9717,12 @@ fi echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6 -echo "configure:9719: checking for C++ \"explicit\" keyword" >&5 +echo "configure:9721: checking for C++ \"explicit\" keyword" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_explicit=yes else @@ -9751,12 +9753,12 @@ EOF fi echo $ac_n "checking for C++ template specialization support""... $ac_c" 1>&6 -echo "configure:9755: checking for C++ template specialization support" >&5 +echo "configure:9757: checking for C++ template specialization support" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_template_specialization'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct X { int a; }; class Y {}; @@ -9766,7 +9768,7 @@ X int_x; X y_x; ; return 0; } EOF -if { (eval echo configure:9770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_template_specialization=yes else @@ -9796,12 +9798,12 @@ EOF fi echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6 -echo "configure:9800: checking for modern C++ template specialization syntax support" >&5 +echo "configure:9802: checking for modern C++ template specialization syntax support" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct X { int a; }; class Y {}; @@ -9811,7 +9813,7 @@ X int_x; X y_x; ; return 0; } EOF -if { (eval echo configure:9815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_modern_specialize_template_syntax=yes else @@ -9833,12 +9835,12 @@ fi echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6 -echo "configure:9837: checking whether partial template specialization works" >&5 +echo "configure:9839: checking whether partial template specialization works" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Foo {}; template class Foo {}; @@ -9846,7 +9848,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_partial_specialization=yes else @@ -9868,12 +9870,12 @@ fi echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6 -echo "configure:9872: checking whether operators must be re-defined for templates derived from templates" >&5 +echo "configure:9874: checking whether operators must be re-defined for templates derived from templates" >&5 if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Base { }; template @@ -9885,7 +9887,7 @@ Derived a, b; return 0; ; return 0; } EOF -if { (eval echo configure:9889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_derived_template_operators=no else @@ -9907,12 +9909,12 @@ fi echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6 -echo "configure:9911: checking whether we need to cast a derived template to pass as its base class" >&5 +echo "configure:9913: checking whether we need to cast a derived template to pass as its base class" >&5 if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class Base { }; template class Derived : public Base { }; @@ -9921,7 +9923,7 @@ int main() { Derived bar; return foo(bar); ; return 0; } EOF -if { (eval echo configure:9925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_need_cpp_template_cast_to_base=no else @@ -9942,12 +9944,12 @@ EOF fi echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6 -echo "configure:9946: checking whether the compiler can resolve const ambiguities for templates" >&5 +echo "configure:9948: checking whether the compiler can resolve const ambiguities for templates" >&5 if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < class ptrClass { @@ -9968,7 +9970,7 @@ int main() { a(&i); ; return 0; } EOF -if { (eval echo configure:9972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_can_resolve_const_ambiguity=yes else @@ -9990,12 +9992,12 @@ fi echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6 -echo "configure:9994: checking whether the C++ \"using\" keyword can change access" >&5 +echo "configure:9996: checking whether the C++ \"using\" keyword can change access" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_access_changing_using=yes else @@ -10027,12 +10029,12 @@ EOF fi echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6 -echo "configure:10031: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 +echo "configure:10033: checking whether the C++ \"using\" keyword resolves ambiguity" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_ambiguity_resolving_using=yes else @@ -10069,19 +10071,19 @@ EOF fi echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6 -echo "configure:10073: checking for \"std::\" namespace" >&5 +echo "configure:10075: checking for \"std::\" namespace" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return std::min(0, 1); ; return 0; } EOF -if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_namespace_std=yes else @@ -10102,12 +10104,12 @@ EOF fi echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6 -echo "configure:10106: checking whether standard template operator!=() is ambiguous" >&5 +echo "configure:10108: checking whether standard template operator!=() is ambiguous" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct T1 {}; @@ -10117,7 +10119,7 @@ int main() { T1 a,b; return a != b; ; return 0; } EOF -if { (eval echo configure:10121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_unambiguous_std_notequal=unambiguous else @@ -10139,12 +10141,12 @@ fi echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6 -echo "configure:10143: checking for C++ reinterpret_cast" >&5 +echo "configure:10145: checking for C++ reinterpret_cast" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <(z); ; return 0; } EOF -if { (eval echo configure:10156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cpp_reinterpret_cast=yes else @@ -10173,7 +10175,7 @@ EOF fi echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6 -echo "configure:10177: checking for C++ dynamic_cast to void*" >&5 +echo "configure:10179: checking for C++ dynamic_cast to void*" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10181,7 +10183,7 @@ else ac_cv_cpp_dynamic_cast_void_ptr=no else cat > conftest.$ac_ext <(suby)))); } EOF -if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_cpp_dynamic_cast_void_ptr=yes else @@ -10224,19 +10226,19 @@ fi echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6 -echo "configure:10228: checking whether C++ requires implementation of unused virtual methods" >&5 +echo "configure:10230: checking whether C++ requires implementation of unused virtual methods" >&5 if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_cpp_unused_required=no else @@ -10259,12 +10261,12 @@ fi echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6 -echo "configure:10263: checking for trouble comparing to zero near std::operator!=()" >&5 +echo "configure:10265: checking for trouble comparing to zero near std::operator!=()" >&5 if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < template class Foo {}; @@ -10275,7 +10277,7 @@ int main() { Foo f; return (0 != f); ; return 0; } EOF -if { (eval echo configure:10279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_trouble_comparing_to_zero=no else @@ -10307,19 +10309,19 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:10311: checking for LC_MESSAGES" >&5 +echo "configure:10313: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int category = LC_MESSAGES; ; return 0; } EOF -if { (eval echo configure:10323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_i18n_lc_messages=yes else @@ -10833,12 +10835,12 @@ cross_compiling=$ac_cv_prog_cxx_cross _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6 -echo "configure:10837: checking whether C++ compiler has -pedantic long long bug" >&5 +echo "configure:10839: checking whether C++ compiler has -pedantic long long bug" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="no" else @@ -10895,12 +10897,12 @@ _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" echo $ac_n "checking for bug where toplevel cv-qualifiers are used in overload resolution""... $ac_c" 1>&6 -echo "configure:10899: checking for bug where toplevel cv-qualifiers are used in overload resolution" >&5 +echo "configure:10901: checking for bug where toplevel cv-qualifiers are used in overload resolution" >&5 if eval "test \"`echo '$''{'ac_cv_quals_ambig_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_quals_ambig_bug="no" else @@ -10959,16 +10961,16 @@ if test "$_IGNORE_LONG_LONG_WARNINGS"; then _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6 -echo "configure:10963: checking whether compiler supports -Wno-long-long" >&5 +echo "configure:10965: checking whether compiler supports -Wno-long-long" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" @@ -11231,7 +11233,7 @@ fi echo $ac_n "checking webshell leaks option""... $ac_c" 1>&6 -echo "configure:11235: checking webshell leaks option" >&5 +echo "configure:11237: checking webshell leaks option" >&5 # Check whether --enable-detect-webshell-leaks or --disable-detect-webshell-leaks was given. if test "${enable_detect_webshell_leaks+set}" = set; then enableval="$enable_detect_webshell_leaks" @@ -11305,7 +11307,7 @@ if test "${enable_efence+set}" = set; then enableval="$enable_efence" if test "$enableval" = "yes"; then echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 -echo "configure:11309: checking for malloc in -lefence" >&5 +echo "configure:11311: checking for malloc in -lefence" >&5 ac_lib_var=`echo efence'_'malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11313,7 +11315,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lefence $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11360,7 +11362,7 @@ fi echo $ac_n "checking for cplus_demangle in -liberty""... $ac_c" 1>&6 -echo "configure:11364: checking for cplus_demangle in -liberty" >&5 +echo "configure:11366: checking for cplus_demangle in -liberty" >&5 ac_lib_var=`echo iberty'_'cplus_demangle | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11368,7 +11370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liberty "-liberty" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11514,6 +11516,32 @@ if test "${enable_ldap+set}" = set; then fi +MOZ_XUL=1 +# Check whether --enable-xul or --disable-xul was given. +if test "${enable_xul+set}" = set; then + enableval="$enable_xul" + if test "$enableval" = "no"; then + MOZ_XUL= + elif test "$enableval" = "yes"; then + : + else + { echo "configure: error: Option, xul, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +fi + +if test "$MOZ_XUL"; then + cat >> confdefs.h <<\EOF +#define MOZ_XUL 1 +EOF + + cat >> confdefs.h <<\EOF +#define INCLUDE_XUL 1 +EOF + +fi + + + # Check whether --enable-mathml or --disable-mathml was given. if test "${enable_mathml+set}" = set; then enableval="$enable_mathml" @@ -11655,7 +11683,7 @@ case "$target" in # Extract the first word of "makeC++SharedLib_r", so it can be a program name with args. set dummy makeC++SharedLib_r; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11659: checking for $ac_word" >&5 +echo "configure:11687: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AIX_SHLIB_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11797,7 +11825,7 @@ if test "$JPEG_DIR" = no; then SYSTEM_JPEG= else echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:11801: checking for jpeg_destroy_compress in -ljpeg" >&5 +echo "configure:11829: checking for jpeg_destroy_compress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11805,7 +11833,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $JPEG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11845,7 +11873,7 @@ if test "$SYSTEM_JPEG" = 1; then SYSTEM_JPEG= else cat > conftest.$ac_ext < #include @@ -11859,7 +11887,7 @@ else } EOF -if { (eval echo configure:11863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_JPEG=1 else @@ -11897,16 +11925,16 @@ if test "$ZLIB_DIR" = no; then SYSTEM_ZLIB= else echo $ac_n "checking "for zlib.h"""... $ac_c" 1>&6 -echo "configure:11901: checking "for zlib.h"" >&5 +echo "configure:11929: checking "for zlib.h"" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="yes" SYSTEM_ZLIB=1 else @@ -11920,7 +11948,7 @@ rm -f conftest* fi if test "$SYSTEM_ZLIB" = 1; then echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6 -echo "configure:11924: checking for gzread in -lz" >&5 +echo "configure:11952: checking for gzread in -lz" >&5 ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11928,7 +11956,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $ZLIB_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11985,7 +12013,7 @@ if test "$PNG_DIR" = no; then SYSTEM_PNG= else echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:11989: checking for png_get_valid in -lpng" >&5 +echo "configure:12017: checking for png_get_valid in -lpng" >&5 ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11993,7 +12021,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $PNG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12032,7 +12060,7 @@ if test "$SYSTEM_PNG" = 1; then SYSTEM_PNG= else cat > conftest.$ac_ext < #include @@ -12046,7 +12074,7 @@ else } EOF -if { (eval echo configure:12050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_PNG=1 else @@ -12085,7 +12113,7 @@ if test "$MNG_DIR" = no; then SYSTEM_MNG= else echo $ac_n "checking for mng_initialize in -lmng""... $ac_c" 1>&6 -echo "configure:12089: checking for mng_initialize in -lmng" >&5 +echo "configure:12117: checking for mng_initialize in -lmng" >&5 ac_lib_var=`echo mng'_'mng_initialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12093,7 +12121,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmng $MNG_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12132,7 +12160,7 @@ if test "$SYSTEM_MNG" = 1; then SYSTEM_MNG= else cat > conftest.$ac_ext < #include @@ -12146,7 +12174,7 @@ else } EOF -if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SYSTEM_MNG=1 else @@ -12212,9 +12240,9 @@ CFLAGS="$CFLAGS -I${FULLCIRCLE_DIR}" LDFLAGS="$LDFLAGS -L${FULLCIRCLE_DIR}" LIBS="-lfullsoft $LIBS" echo $ac_n "checking "for FCInitialize in -lfullsoft"""... $ac_c" 1>&6 -echo "configure:12216: checking "for FCInitialize in -lfullsoft"" >&5; +echo "configure:12244: checking "for FCInitialize in -lfullsoft"" >&5; cat > conftest.$ac_ext < #include "fullsoft.h" @@ -12222,7 +12250,7 @@ int main() { FCInitialize(); exit(0); ; return 0; } EOF -if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* FULLCIRCLE_LIBS="-I${FULLCIRCLE_DIR} -L${FULLCIRCLE_DIR} -lfullsoft" result="yes" else @@ -12835,6 +12863,8 @@ s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g s%@MDDEPDIR@%$MDDEPDIR%g s%@DETECT_WEBSHELL_LEAKS@%$DETECT_WEBSHELL_LEAKS%g s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g +s%@MOZ_XUL@%$MOZ_XUL%g +s%@INCLUDE_XUL@%$INCLUDE_XUL%g s%@AIX_SHLIB_BIN@%$AIX_SHLIB_BIN%g s%@MOZ_TRACK_MODULE_DEPS@%$MOZ_TRACK_MODULE_DEPS%g s%@AR_FLAGS@%$AR_FLAGS%g diff --git a/mozilla/configure.in b/mozilla/configure.in index a6a15d115a6..83336920c60 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -3713,6 +3713,19 @@ MOZ_ARG_ENABLE_BOOL(ldap, MOZ_LDAP_XPCOM=1 ) +dnl --disable-xul +dnl +MOZ_XUL=1 +MOZ_ARG_DISABLE_BOOL(xul, +[ --disable-xul Disable XUL ], + MOZ_XUL= ) +if test "$MOZ_XUL"; then + AC_DEFINE(MOZ_XUL) + AC_DEFINE(INCLUDE_XUL) +fi +AC_SUBST(MOZ_XUL) +AC_SUBST(INCLUDE_XUL) + dnl --enable mathml dnl TODO: handle include files here ? dnl diff --git a/mozilla/content/base/public/nsContentCID.h b/mozilla/content/base/public/nsContentCID.h index ddff94271f5..947301988f2 100644 --- a/mozilla/content/base/public/nsContentCID.h +++ b/mozilla/content/base/public/nsContentCID.h @@ -207,4 +207,46 @@ #define NS_PLAINTEXTSERIALIZER_CID \ { 0x6030f7ef, 0x32ed, 0x46a7, { 0x9a, 0x63, 0x6a, 0x5d, 0x3f, 0x90, 0x44, 0x5f } } +// {3986B301-097C-11d3-BF87-00105A1B0627} +#define NS_XULPOPUPLISTENER_CID \ +{ 0x3986b301, 0x97c, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + +// {1F5C1721-7DC3-11d3-BF87-00105A1B0627} +#define NS_XULCONTROLLERS_CID \ +{ 0x1f5c1721, 0x7dc3, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + + +// {daedcb43-1dd1-11b2-b1d2-caf06cb40387} +#define NS_DLGDEFAULTKEYS_CID \ +{ 0xdaedcb43, 0x1dd1, 0x11b2, { 0xb1, 0xd2, 0xca, 0xf0, 0x6c, 0xb4, 0x3, 0x87 } } + +// {76E92881-CDDB-11d3-BF87-00105A1B0627} +#define NS_XULELEMENTFACTORY_CID \ +{ 0x76e92881, 0xcddb, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + + +// {508f5601-e09b-11d3-9f7e-cf931f9f173c} +#define NS_CONTROLLERCOMMANDMANAGER_CID \ +{ 0x508f5601, 0xe09b, 0x11d3, { 0x9f, 0x7e, 0xcf, 0x93, 0x1f, 0x9f, 0x17, 0x3c } } + +// {BFD05264-834C-11d2-8EAC-00805F29F371} +#define NS_XULSORTSERVICE_CID \ +{ 0xbfd05264, 0x834c, 0x11d2, { 0x8e, 0xac, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x71 } } + +// {3D262D00-8B5A-11d2-8EB0-00805F29F370} +#define NS_XULTEMPLATEBUILDER_CID \ +{ 0x3d262d00, 0x8b5a, 0x11d2, { 0x8e, 0xb0, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } } + +// {CE058B21-BA9C-11d2-BF86-00105A1B0627} +#define NS_XULCONTENTSINK_CID \ +{ 0xce058b21, 0xba9c, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + +// {541AFCB2-A9A3-11d2-8EC5-00805F29F370} +#define NS_XULDOCUMENT_CID \ +{ 0x541afcb2, 0xa9a3, 0x11d2, { 0x8e, 0xc5, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } } + +// {3A0A0FC1-8349-11d3-BE47-00104BDE6048} +#define NS_XULPROTOTYPECACHE_CID \ +{ 0x3a0a0fc1, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } } + #endif /* nsContentCID_h__ */ diff --git a/mozilla/content/base/src/Makefile.in b/mozilla/content/base/src/Makefile.in index 609cf9959e7..1521635da5a 100644 --- a/mozilla/content/base/src/Makefile.in +++ b/mozilla/content/base/src/Makefile.in @@ -60,6 +60,7 @@ CPPSRCS = \ nsTextNode.cpp \ nsXMLContentSerializer.cpp \ nsHTMLContentSerializer.cpp \ + nsParserUtils.cpp \ nsPlainTextSerializer.cpp \ $(NULL) diff --git a/mozilla/content/base/src/makefile.win b/mozilla/content/base/src/makefile.win index a3355943ed6..1ba5fd31d8a 100644 --- a/mozilla/content/base/src/makefile.win +++ b/mozilla/content/base/src/makefile.win @@ -55,6 +55,7 @@ CPPSRCS = \ nsTextNode.cpp \ nsXMLContentSerializer.cpp \ nsHTMLContentSerializer.cpp \ + nsParserUtils.cpp \ nsPlainTextSerializer.cpp \ nsLayoutAtoms.cpp \ nsContentUtils.cpp \ @@ -90,6 +91,7 @@ CPP_OBJS= \ .\$(OBJDIR)\nsTextNode.obj \ .\$(OBJDIR)\nsXMLContentSerializer.obj \ .\$(OBJDIR)\nsHTMLContentSerializer.obj \ + .\$(OBJDIR)\nsParserUtils.obj \ .\$(OBJDIR)\nsPlainTextSerializer.obj \ .\$(OBJDIR)\nsLayoutAtoms.obj \ .\$(OBJDIR)\nsContentUtils.obj \ diff --git a/mozilla/content/base/src/nsParserUtils.cpp b/mozilla/content/base/src/nsParserUtils.cpp new file mode 100644 index 00000000000..8a6be8b54fa --- /dev/null +++ b/mozilla/content/base/src/nsParserUtils.cpp @@ -0,0 +1,147 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is Netscape Communications + * Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +#include "nsParserUtils.h" +#include "nsIParser.h" // for kQuote et. al. +#include "jsapi.h" + +// This method starts at aOffSet in aStr and tries to find aChar. It keeps +// skipping whitespace till it finds aChar or some other non-whitespace character. If +// it finds aChar, it returns aChar's offset. If it finds some other non-whitespace character +// or runs into the end of the string, it returns -1. +static PRInt32 +FindWhileSkippingWhitespace(nsString& aStr, PRUnichar aChar, PRInt32 aOffset) +{ + PRInt32 i = aOffset; + PRUnichar ch = aStr.CharAt(i); + PRInt32 index = -1; + + while (ch == '\n' || ch == '\t' || ch == '\r') { + ch = aStr.CharAt(++i); + } + + if (ch == aChar) + index = i; + + return index; +} + + +nsresult +nsParserUtils::GetQuotedAttributeValue(nsString& aSource, + const nsString& aAttribute, + nsString& aValue) +{ + PRInt32 startOfAttribute = 0; // Index into aSource where the attribute name starts + PRInt32 startOfValue = 0; // Index into aSource where the attribute value starts + PRInt32 posnOfValueDelimeter = 0; + nsresult result = NS_ERROR_FAILURE; + + // While there are more characters to look at + while (startOfAttribute != -1) { + // Find the attribute starting at offset + startOfAttribute = aSource.Find(aAttribute, PR_FALSE, startOfAttribute); + // If attribute found + if (startOfAttribute != -1) { + // Find the '=' character while skipping whitespace + startOfValue = FindWhileSkippingWhitespace(aSource, '=', startOfAttribute + aAttribute.Length()); + // If '=' found + if (startOfValue != -1) { + PRUnichar delimeter = kQuote; + // Find the quote or apostrophe while skipping whitespace + posnOfValueDelimeter = FindWhileSkippingWhitespace(aSource, kQuote, startOfValue + 1); + if (posnOfValueDelimeter == -1) { + posnOfValueDelimeter = FindWhileSkippingWhitespace(aSource, kApostrophe, startOfValue + 1); + delimeter = kApostrophe; + } + // If quote or apostrophe found + if (posnOfValueDelimeter != -1) { + startOfValue = posnOfValueDelimeter + 1; + // Find the ending quote or apostrophe + posnOfValueDelimeter = aSource.FindChar(delimeter, PR_FALSE, startOfValue); + // If found + if (posnOfValueDelimeter != -1) { + // Set the value of the attibute and exit the loop + // The attribute value starts at startOfValue and ends at (posnOfValueDelimeter - 1) + aSource.Mid(aValue, startOfValue, posnOfValueDelimeter - startOfValue); + result = NS_OK; + break; + } + else { + // Try to find the attribute in the remainder of the string + startOfAttribute++; + continue; + } // Endif found + } + else { + // Try to find the attribute in the remainder of the string + startOfAttribute++; + continue; + } // Endif quote or apostrophe found + } + else { + // Try to find the attribute in the remainder of the string + startOfAttribute++; + continue; + } // Endif '=' found + } // Endif attribute found + } // End while + + return result; +} + + +// XXX Stolen from nsHTMLContentSink. Needs to be shared. +// XXXbe share also with nsRDFParserUtils.cpp and nsHTMLContentSink.cpp +// Returns PR_TRUE if the language name is a version of JavaScript and +// PR_FALSE otherwise +PRBool +nsParserUtils::IsJavaScriptLanguage(const nsString& aName, const char* *aVersion) +{ + JSVersion version = JSVERSION_UNKNOWN; + + if (aName.EqualsIgnoreCase("JavaScript") || + aName.EqualsIgnoreCase("LiveScript") || + aName.EqualsIgnoreCase("Mocha")) { + version = JSVERSION_DEFAULT; + } + else if (aName.EqualsIgnoreCase("JavaScript1.1")) { + version = JSVERSION_1_1; + } + else if (aName.EqualsIgnoreCase("JavaScript1.2")) { + version = JSVERSION_1_2; + } + else if (aName.EqualsIgnoreCase("JavaScript1.3")) { + version = JSVERSION_1_3; + } + else if (aName.EqualsIgnoreCase("JavaScript1.4")) { + version = JSVERSION_1_4; + } + else if (aName.EqualsIgnoreCase("JavaScript1.5")) { + version = JSVERSION_1_5; + } + if (version == JSVERSION_UNKNOWN) + return PR_FALSE; + *aVersion = JS_VersionToString(version); + return PR_TRUE; +} + diff --git a/mozilla/rdf/content/src/nsIRDFNodeList.h b/mozilla/content/base/src/nsParserUtils.h similarity index 58% rename from mozilla/rdf/content/src/nsIRDFNodeList.h rename to mozilla/content/base/src/nsParserUtils.h index 9462178fae9..90f2c6f5848 100644 --- a/mozilla/rdf/content/src/nsIRDFNodeList.h +++ b/mozilla/content/base/src/nsParserUtils.h @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file @@ -20,24 +20,23 @@ * Contributor(s): */ -#ifndef nsIRDFNodeList_h__ -#define nsIRDFNodeList_h__ +#ifndef nsParserUtils_h__ +#define nsParserUtils_h__ -#include "nsISupports.h" +#include "nsString.h" -// {661D1971-5CD2-11d3-BE36-00104BDE6048} -#define NS_IRDFNODELIST_IID \ -{ 0x661d1971, 0x5cd2, 0x11d3, { 0xbe, 0x36, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } } - -class nsIRDFNodeList : public nsISupports -{ +class nsParserUtils { public: - static const nsIID& GetIID() { static nsIID iid = NS_IRDFNODELIST_IID; return iid; } + static nsresult + GetQuotedAttributeValue(nsString& aSource, + const nsString& aAttribute, + nsString& aValue); - NS_IMETHOD AppendNode(nsIDOMNode* aNode) = 0; - NS_IMETHOD RemoveNode(nsIDOMNode* aNode) = 0; + static PRBool + IsJavaScriptLanguage(const nsString& aName, const char* *aVersion); }; +#endif // nsParserUtils_h__ + -#endif // nsIRDFNodeList_h__ diff --git a/mozilla/content/build/Makefile.in b/mozilla/content/build/Makefile.in index 8b2a3df12e1..6399e706156 100644 --- a/mozilla/content/build/Makefile.in +++ b/mozilla/content/build/Makefile.in @@ -57,6 +57,8 @@ SHARED_LIBRARY_LIBS = \ $(DIST)/lib/libgkconxmldoc_s.$(LIB_SUFFIX) \ $(DIST)/lib/libgkconxsldoc_s.$(LIB_SUFFIX) \ $(DIST)/lib/libgkconxulcon_s.$(LIB_SUFFIX) \ + $(DIST)/lib/libgkconxuldoc_s.$(LIB_SUFFIX) \ + $(DIST)/lib/libgkconxultmpl_s.$(LIB_SUFFIX) \ $(DIST)/lib/libgkconxbl_s.$(LIB_SUFFIX) \ $(DIST)/lib/libgkconbase_s.$(LIB_SUFFIX) \ $(NULL) @@ -89,6 +91,7 @@ INCLUDES += -I$(srcdir)/../base/src \ -I$(srcdir)/../html/style/src \ -I$(srcdir)/../xul/content/src \ -I$(srcdir)/../xul/base/src \ + -I$(srcdir)/../xul/templates/src \ -I$(srcdir)/../events/src \ $(NULL) diff --git a/mozilla/content/build/makefile.win b/mozilla/content/build/makefile.win index 0b2148b60b6..2b61dff9bd6 100644 --- a/mozilla/content/build/makefile.win +++ b/mozilla/content/build/makefile.win @@ -54,6 +54,7 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\dom \ -I$(PUBLIC)\js -I..\html\base\src -I..\base\src \ -I..\html\style\src \ -I..\xul\content\src \ + -I..\xul\templates\src \ -I..\xul\base\src \ -I..\events\src \ -I$(PUBLIC)\rdf @@ -69,6 +70,8 @@ LLIBS= \ $(DIST)\lib\contentxmldoc_s.lib \ $(DIST)\lib\contentxsldoc_s.lib \ $(DIST)\lib\contentxulcontent_s.lib \ + $(DIST)\lib\contentxuldocument_s.lib \ + $(DIST)\lib\contentxultemplates_s.lib \ $(DIST)\lib\contentxbl_s.lib \ $(DIST)\lib\contentevents_s.lib \ $(DIST)\lib\xpcom.lib \ diff --git a/mozilla/content/build/nsContentCID.h b/mozilla/content/build/nsContentCID.h index ddff94271f5..947301988f2 100644 --- a/mozilla/content/build/nsContentCID.h +++ b/mozilla/content/build/nsContentCID.h @@ -207,4 +207,46 @@ #define NS_PLAINTEXTSERIALIZER_CID \ { 0x6030f7ef, 0x32ed, 0x46a7, { 0x9a, 0x63, 0x6a, 0x5d, 0x3f, 0x90, 0x44, 0x5f } } +// {3986B301-097C-11d3-BF87-00105A1B0627} +#define NS_XULPOPUPLISTENER_CID \ +{ 0x3986b301, 0x97c, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + +// {1F5C1721-7DC3-11d3-BF87-00105A1B0627} +#define NS_XULCONTROLLERS_CID \ +{ 0x1f5c1721, 0x7dc3, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + + +// {daedcb43-1dd1-11b2-b1d2-caf06cb40387} +#define NS_DLGDEFAULTKEYS_CID \ +{ 0xdaedcb43, 0x1dd1, 0x11b2, { 0xb1, 0xd2, 0xca, 0xf0, 0x6c, 0xb4, 0x3, 0x87 } } + +// {76E92881-CDDB-11d3-BF87-00105A1B0627} +#define NS_XULELEMENTFACTORY_CID \ +{ 0x76e92881, 0xcddb, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + + +// {508f5601-e09b-11d3-9f7e-cf931f9f173c} +#define NS_CONTROLLERCOMMANDMANAGER_CID \ +{ 0x508f5601, 0xe09b, 0x11d3, { 0x9f, 0x7e, 0xcf, 0x93, 0x1f, 0x9f, 0x17, 0x3c } } + +// {BFD05264-834C-11d2-8EAC-00805F29F371} +#define NS_XULSORTSERVICE_CID \ +{ 0xbfd05264, 0x834c, 0x11d2, { 0x8e, 0xac, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x71 } } + +// {3D262D00-8B5A-11d2-8EB0-00805F29F370} +#define NS_XULTEMPLATEBUILDER_CID \ +{ 0x3d262d00, 0x8b5a, 0x11d2, { 0x8e, 0xb0, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } } + +// {CE058B21-BA9C-11d2-BF86-00105A1B0627} +#define NS_XULCONTENTSINK_CID \ +{ 0xce058b21, 0xba9c, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } } + +// {541AFCB2-A9A3-11d2-8EC5-00805F29F370} +#define NS_XULDOCUMENT_CID \ +{ 0x541afcb2, 0xa9a3, 0x11d2, { 0x8e, 0xc5, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } } + +// {3A0A0FC1-8349-11d3-BE47-00104BDE6048} +#define NS_XULPROTOTYPECACHE_CID \ +{ 0x3a0a0fc1, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } } + #endif /* nsContentCID_h__ */ diff --git a/mozilla/content/build/nsContentDLF.cpp b/mozilla/content/build/nsContentDLF.cpp index f97822a1ee6..0b8fd22d109 100644 --- a/mozilla/content/build/nsContentDLF.cpp +++ b/mozilla/content/build/nsContentDLF.cpp @@ -37,7 +37,6 @@ #include "nsRDFCID.h" #include "nsIRDFResource.h" #include "nsIXULContentSink.h" -#include "nsIStreamLoadableDocument.h" #include "nsIDocStreamLoaderFactory.h" #define VIEW_SOURCE_HTML @@ -488,6 +487,7 @@ nsContentDLF::CreateXULDocumentFromStream(nsIInputStream& aXULStream, { nsresult status = NS_OK; +#if 0 // XXX dead code; remove do { nsCOMPtr doc; @@ -508,6 +508,7 @@ nsContentDLF::CreateXULDocumentFromStream(nsIInputStream& aXULStream, status = loader->LoadFromStream(aXULStream, aContainer, aCommand); } while (0); +#endif return status; } diff --git a/mozilla/content/build/nsContentFactory.cpp b/mozilla/content/build/nsContentFactory.cpp index c86c8d0ea63..7a6980ed1c3 100644 --- a/mozilla/content/build/nsContentFactory.cpp +++ b/mozilla/content/build/nsContentFactory.cpp @@ -131,6 +131,8 @@ static NS_DEFINE_CID(kNodeInfoManagerCID, NS_NODEINFOMANAGER_CID); static NS_DEFINE_CID(kContentPolicyCID, NS_CONTENTPOLICY_CID); static NS_DEFINE_CID(kComputedDOMStyleCID, NS_COMPUTEDDOMSTYLE_CID); +static NS_DEFINE_CID(kControllerCommandManagerCID, NS_CONTROLLERCOMMANDMANAGER_CID); + extern nsresult NS_NewAnonymousContent2(nsIContent** aInstancePtrResult); extern nsresult NS_NewSelection(nsIFrameSelection** aResult); @@ -158,6 +160,31 @@ extern nsresult NS_NewNodeInfoManager(nsINodeInfoManager** aResult); extern nsresult NS_NewContentPolicy(nsIContentPolicy** aResult); +#ifdef MOZ_XUL +#include "nsIXULSortService.h" +#include "nsIRDFContentModelBuilder.h" +#include "nsIXULContentSink.h" +#include "nsIXULDocument.h" +#include "nsIXULPopupListener.h" +#include "nsIXULPrototypeCache.h" +#include "nsIController.h" +#include "nsIControllers.h" +#include "nsIControllerCommand.h" + +static NS_DEFINE_CID(kXULSortServiceCID, NS_XULSORTSERVICE_CID); +static NS_DEFINE_CID(kXULTemplateBuilderCID, NS_XULTEMPLATEBUILDER_CID); +static NS_DEFINE_CID(kXULContentSinkCID, NS_XULCONTENTSINK_CID); +static NS_DEFINE_CID(kXULDocumentCID, NS_XULDOCUMENT_CID); +static NS_DEFINE_CID(kXULPopupListenerCID, NS_XULPOPUPLISTENER_CID); +static NS_DEFINE_CID(kXULElementFactoryCID, NS_XULELEMENTFACTORY_CID); +static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); +static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID); + +extern nsresult NS_NewXULElementFactory(nsIElementFactory** aResult); +extern NS_IMETHODIMP NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult); +#endif + + //---------------------------------------------------------------------- nsContentFactory::nsContentFactory(const nsCID &aClass) @@ -503,6 +530,71 @@ nsContentFactory::CreateInstance(nsISupports *aOuter, return res; } } +#if defined(MOZ_XUL) + else if (mClassID.Equals(kXULSortServiceCID)) { + res = NS_NewXULSortService((nsIXULSortService**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULSortService", res); + return res; + } + } + else if (mClassID.Equals(kXULTemplateBuilderCID)) { + res = NS_NewXULTemplateBuilder((nsIRDFContentModelBuilder**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULTemplateBuilder", res); + return res; + } + } + else if (mClassID.Equals(kXULContentSinkCID)) { + res = NS_NewXULContentSink((nsIXULContentSink**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULContentSink", res); + return res; + } + } + else if (mClassID.Equals(kXULDocumentCID)) { + res = NS_NewXULDocument((nsIXULDocument**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULDocument", res); + return res; + } + } + else if (mClassID.Equals(kXULPopupListenerCID)) { + res = NS_NewXULPopupListener((nsIXULPopupListener**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULPopupListener", res); + return res; + } + } + else if (mClassID.Equals(kXULElementFactoryCID)) { + res = NS_NewXULElementFactory((nsIElementFactory**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULElementFactory", res); + return res; + } + } + else if (mClassID.Equals(kXULPrototypeCacheCID)) { + res = NS_NewXULPrototypeCache(nsnull, NS_GET_IID(nsIXULPrototypeCache), (void**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULPrototypeCache", res); + return res; + } + } + else if (mClassID.Equals(kXULControllersCID)) { + res = NS_NewXULControllers(nsnull, NS_GET_IID(nsIControllers), (void**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewXULControllers", res); + return res; + } + } + else if (mClassID.Equals(kControllerCommandManagerCID)) { + res = NS_NewControllerCommandManager((nsIControllerCommandManager**) &inst); + if (NS_FAILED(res)) { + LOG_NEW_FAILURE("NS_NewControllerCommandManager", res); + return res; + } + } +#endif else { return NS_NOINTERFACE; } diff --git a/mozilla/content/build/nsContentModule.cpp b/mozilla/content/build/nsContentModule.cpp index d540dedb635..d6b63b25478 100644 --- a/mozilla/content/build/nsContentModule.cpp +++ b/mozilla/content/build/nsContentModule.cpp @@ -61,6 +61,11 @@ #include "nsContentPolicyUtils.h" #define PRODUCT_NAME "Gecko" +#ifdef MOZ_XUL +#include "nsXULAtoms.h" +#include "nsXULContentUtils.h" +#endif + static NS_DEFINE_CID(kHTTPHandlerCID, NS_IHTTPHANDLER_CID); static nsContentModule *gModule = NULL; @@ -195,6 +200,11 @@ nsContentModule::Initialize() nsHTMLAtoms::AddRefAtoms(); nsLayoutAtoms::AddRefAtoms(); +#ifdef MOZ_XUL + nsXULAtoms::AddRefAtoms(); + nsXULContentUtils::Init(); +#endif + // XXX Initialize the script name set thingy-ma-jigger if (!gRegistry) { rv = nsServiceManager::GetService(kCScriptNameSetRegistryCID, @@ -230,6 +240,10 @@ nsContentModule::Shutdown() nsHTMLAtoms::ReleaseAtoms(); nsLayoutAtoms::ReleaseAtoms(); +#ifdef MOZ_XUL + nsXULAtoms::ReleaseAtoms(); +#endif + NS_IF_RELEASE(gRegistry); NS_IF_RELEASE(gUAStyleSheet); } @@ -340,7 +354,28 @@ static Components gComponents[] = { { "Content policy service", NS_CONTENTPOLICY_CID, NS_CONTENTPOLICY_CONTRACTID }, { "NodeInfoManager", NS_NODEINFOMANAGER_CID, NS_NODEINFOMANAGER_CONTRACTID }, { "DOM CSS Computed Style Declaration", NS_COMPUTEDDOMSTYLE_CID, - "@mozilla.org/DOM/Level2/CSS/computedStyleDeclaration;1" } + "@mozilla.org/DOM/Level2/CSS/computedStyleDeclaration;1" }, + +#ifdef MOZ_XUL + { "XUL Sort Service", NS_XULSORTSERVICE_CID, + "@mozilla.org/xul/xul-sort-service;1", }, + { "XUL Template Builder", NS_XULTEMPLATEBUILDER_CID, + "@mozilla.org/xul/xul-template-builder;1", }, + { "XUL Content Sink", NS_XULCONTENTSINK_CID, + "@mozilla.org/xul/xul-content-sink;1", }, + { "XUL Document", NS_XULDOCUMENT_CID, + "@mozilla.org/xul/xul-document;1", }, + { "XUL PopupListener", NS_XULPOPUPLISTENER_CID, + "@mozilla.org/xul/xul-popup-listener;1", }, + { "XUL Controllers", NS_XULCONTROLLERS_CID, + "@mozilla.org/xul/xul-controllers;1", }, + { "XUL Prototype Cache", NS_XULPROTOTYPECACHE_CID, + "@mozilla.org/xul/xul-prototype-cache;1", }, + { "XUL Element Factory", NS_XULELEMENTFACTORY_CID, + NS_ELEMENT_FACTORY_CONTRACTID_PREFIX "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", }, +#endif + { "Controller Command Manager", NS_CONTROLLERCOMMANDMANAGER_CID, + "@mozilla.org/content/controller-command-manager;1", }, }; #define NUM_COMPONENTS (sizeof(gComponents) / sizeof(gComponents[0])) diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index 9c6cb775f4e..e27bc49ec63 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -26,7 +26,7 @@ #include "nsIControllers.h" #include "nsIEditorController.h" -#include "nsRDFCID.h" +#include "nsContentCID.h" #include "nsIComponentManager.h" #include "nsIDOMHTMLFormElement.h" #include "nsIScriptObjectOwner.h" diff --git a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp index 93852683c70..860f1e66d64 100644 --- a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -24,7 +24,7 @@ #include "nsIDOMNSHTMLTextAreaElement.h" #include "nsIControllers.h" #include "nsIEditorController.h" -#include "nsRDFCID.h" +#include "nsContentCID.h" #include "nsCOMPtr.h" #include "nsIComponentManager.h" #include "nsIDOMHTMLFormElement.h" diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 18d1c0a64d4..e274849a48d 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -25,6 +25,7 @@ #include "nsIHTMLContentSink.h" #include "nsIInterfaceRequestor.h" #include "nsIParser.h" +#include "nsParserUtils.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoader.h" #include "nsICSSLoaderObserver.h" @@ -4466,39 +4467,6 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) return rv; } -// Returns PR_TRUE if the language name is a version of JavaScript and -// PR_FALSE otherwise -static PRBool -IsJavaScriptLanguage(const nsString& aName, const char* *aVersion) -{ - JSVersion version = JSVERSION_UNKNOWN; - - if (aName.EqualsIgnoreCase("JavaScript") || - aName.EqualsIgnoreCase("LiveScript") || - aName.EqualsIgnoreCase("Mocha")) { - version = JSVERSION_DEFAULT; - } - else if (aName.EqualsIgnoreCase("JavaScript1.1")) { - version = JSVERSION_1_1; - } - else if (aName.EqualsIgnoreCase("JavaScript1.2")) { - version = JSVERSION_1_2; - } - else if (aName.EqualsIgnoreCase("JavaScript1.3")) { - version = JSVERSION_1_3; - } - else if (aName.EqualsIgnoreCase("JavaScript1.4")) { - version = JSVERSION_1_4; - } - else if (aName.EqualsIgnoreCase("JavaScript1.5")) { - version = JSVERSION_1_5; - } - if (version == JSVERSION_UNKNOWN) - return PR_FALSE; - *aVersion = JS_VersionToString(version); - return PR_TRUE; -} - #ifdef DEBUG void HTMLContentSink::ForceReflow() @@ -4884,7 +4852,7 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) nsAutoString lang; GetAttributeValueAt(aNode, i, lang); - isJavaScript = IsJavaScriptLanguage(lang, &jsVersionString); + isJavaScript = nsParserUtils::IsJavaScriptLanguage(lang, &jsVersionString); } else if (key.EqualsIgnoreCase("charset")) { //charset from script charset tag diff --git a/mozilla/content/html/style/src/nsCSSLoader.cpp b/mozilla/content/html/style/src/nsCSSLoader.cpp index 66812377177..6cc576063cc 100644 --- a/mozilla/content/html/style/src/nsCSSLoader.cpp +++ b/mozilla/content/html/style/src/nsCSSLoader.cpp @@ -53,7 +53,6 @@ #include "nsIScriptSecurityManager.h" #ifdef INCLUDE_XUL -#include "nsIXULContentUtils.h" #include "nsIXULPrototypeCache.h" #endif @@ -770,10 +769,11 @@ CSSLoaderImpl::SheetComplete(nsICSSStyleSheet* aSheet, SheetLoadData* aLoadData) { #ifdef INCLUDE_XUL if (IsChromeURI(aLoadData->mURL)) { - nsCOMPtr utils(do_GetService("@mozilla.org/rdf/xul-content-utils;1")); - if (utils && utils->UseXULCache()) { - nsCOMPtr cache(do_GetService("@mozilla.org/rdf/xul-prototype-cache;1")); - if (cache) { + nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); + if (cache) { + PRBool enabled; + cache->GetEnabled(&enabled); + if (enabled) { nsCOMPtr sheet; cache->GetStyleSheet(aLoadData->mURL, getter_AddRefs(sheet)); if (!sheet) { @@ -1344,10 +1344,11 @@ CSSLoaderImpl::LoadStyleLink(nsIContent* aElement, nsICSSStyleSheet* sheet = (nsICSSStyleSheet*)mLoadedSheets.Get(&key); #ifdef INCLUDE_XUL if (!sheet && IsChromeURI(aURL)) { - nsCOMPtr utils(do_GetService("@mozilla.org/rdf/xul-content-utils;1")); - if (utils && utils->UseXULCache()) { - nsCOMPtr cache(do_GetService("@mozilla.org/rdf/xul-prototype-cache;1")); - if (cache) { + nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); + if (cache) { + PRBool enabled; + cache->GetEnabled(&enabled); + if (enabled) { nsCOMPtr cachedSheet; cache->GetStyleSheet(aURL, getter_AddRefs(cachedSheet)); if (cachedSheet) @@ -1420,10 +1421,11 @@ CSSLoaderImpl::LoadChildSheet(nsICSSStyleSheet* aParentSheet, nsICSSStyleSheet* sheet = (nsICSSStyleSheet*)mLoadedSheets.Get(&key); #ifdef INCLUDE_XUL if (!sheet && IsChromeURI(aURL)) { - nsCOMPtr utils(do_GetService("@mozilla.org/rdf/xul-content-utils;1")); - if (utils && utils->UseXULCache()) { - nsCOMPtr cache(do_GetService("@mozilla.org/rdf/xul-prototype-cache;1")); - if (cache) { + nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); + if (cache) { + PRBool enabled; + cache->GetEnabled(&enabled); + if (enabled) { nsCOMPtr cachedSheet; cache->GetStyleSheet(aURL, getter_AddRefs(cachedSheet)); if (cachedSheet) diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index 81acbb7b33e..74d84555303 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -69,7 +69,7 @@ #include "nsIStyleSet.h" #include "nsISizeOfHandler.h" #include "nsStyleUtil.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsIXULContent.h" #endif @@ -2737,7 +2737,7 @@ SelectorMatchesData::SelectorMatchesData(nsIPresContext* aPresContext, nsIConten // check for HTMLContent and Link status // -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #ifndef DONT_OPTIMIZE_ISHTMLCONTENT_FOR_XUL // check for HTML content // NOTE: optimization to first check for XULContent since asking a XUL element to diff --git a/mozilla/content/macbuild/content.mcp b/mozilla/content/macbuild/content.mcp index 50a929f498c946877c4cd11a3d96a605fbc35a92..119b8b46e521ddeb93eb0de46aac3fb260bf0214 100644 GIT binary patch delta 2066 zcmZvdZD?Cn7{~8DH{CMm#`eW&!PYTn*A2VAq%TSOmL{#XO`9}rinC4Io8-2=?ad3x zjm`?DF#IBdix<55b=GeaJ1?{a6*tRNSg8GV2DUj1oji8&*v(^)d23mG)*6_4 zLOjOb#eT4sqvz}VsGBCJ8FD}^P%G31wL?zG1-YRPs1xdfx}hG(1NA~)$Y9To*z-JC<~$3Ia()$z-k`&E35*^o z@+w#nSSHt}n9T7Dx54wA?}O1mbhv2apjqf}9|fanihK%;#wv0bSmPW3CkmeX8^5Wd zGLcVay{V+0Noksr@um_9IT;_8lk&WhsgI@8LNeQ@DYWQ@>#>Es zy~RsO9oxs$*adcTq^H!_}46z-iT3FS0pMA2VPW&URk z4;0o_t?aO|R7M|DGB2sIy_3TJao%CQIaQ1EqfR8VcxnGVCn#sKN~V<2DEwMo2wvPM zd?Ef=RndfBZ_@O9C!VZm22L?_03!@rfYS_V8O|_l1I{vR2g(ecz$il(Fvidgj5EYX zLQ)uZ0_PagYMN)*4P0Q@15_D$fQt-!flCa%K#idfm@uzyiBDO<_uTle{=vq;wrEtD zZ`6vzc64C_HcXn=cVM#-IK_~fk1(X>rx{Z7GYqNuS%%cS%#fOoGNk5X45|4zLuy`O zNX^eNq~_-tQu7N8sd<$lHNVJ^nqOi_&1(#)`7)cvwM&1Qs-1*3-Y4YrNYxo3k=4mJa+}*h+zH{Bxl9D=CM)o7zy7r>qbfaf%E8e`-&MECEt>e&1?*jX7Qn^gvgod m?E!p)?j`gzZF2gR=Hty8WN$D(#GV7U>6h@~#t$K~VE-4xVD;Vr delta 680 zcmZuvUr3Wt6u;+gpVM-cVXlVG*|IjLE-A1mv`7a!b>D{O_{uU#NSG#U43ezc!OIGgAWvjgo+XwTi{Qk@LFtTS0YCTJER@UT?$yaq@)zJtPjQ*iRviuoyZ?3@aW|G|rQpEB z+PZXH@F?QN7+7#J+bGp52LMM_UGM{!Rx9z+08N#aB#J(f6gqz?YcnP(H zI{ZHAv(Az1Jb@mFrE#>`hFZe9=Y+qlqg7#iu1BRjV|aJq3^d_pwn^R@=<<-Z`%J5K9z<~cG0m0?tfjiR3DuJs@ddv+ebjV;-yzTFG_xbOQ|K=yG84WM)Fj={|%}z zZ^CwKr%4PI^05Adb9a~BJw6cm?fx=jd|EuGnt~at!S%H;zgGAM DVRyt0 diff --git a/mozilla/content/macbuild/contentIDL.mcp b/mozilla/content/macbuild/contentIDL.mcp index e86993728bc974f09de2683bbfff01625cd0c706..03309764929b0c9257bd0ad585d7e4be47d3b811 100644 GIT binary patch delta 1867 zcmZ`(e@t6d6u!4DrM$kDQXaE{K!p+5#3B=D3ykqYm#{1ulWhzVWiYyhStu#ROWxdUYxtn5u``M)RkxGCfcrm;L?uGl{e$+I=qXoy;dJY z2@%I54b16Sl@ur7l2Nht6DKs5m3YmB%12o!(>9i4tfChF=h}xTyO`X+O{g;x4h4gOa80PA zqouRW)7};&NNnG_aZ8}1E7%eVRQI$8+X7*>xz{~jF-qB6ua2>KrxtzrF{-iw`{QOQ z6RS!~XEmzE0vUtU#_neL3fI?ed>ThBipAnsEQv*LEc#;6@8G*LyHn$eAcB`&^<~Eu z12yWX1gKm`UZ4^k`GCrFq_>aH`W=+lov<2QMr4Gtdi->9xOs8$_mL#;S zv~*uju(U0-v!^4_8R5sb-J)#&4>sp=DiRa58@ZbzXQftts_DZVe)P~+w7<^Ib9jov zKYM+(iM^oZaqFA;HvY-^{5b9%QVjzYv%JocK-s0_BP{AnNMGbci*f@ z{+*}5i7yUpSAF!DpL$YS;}`z#&|6`4|5|u2SaHMSI31pSu;fO7iwTM33YLe+RCX z{O~q>d{oH?PJpYCy#4#=o^sk_BxmxXbLG^Np$;SA=!kT+BjUC!nZpTGG~roG=L`lr zk2)*qRPX2DEc&9#lLf%P$ZF?%h*D$auy}RnC4Uy$#57i3nFe=3@;5dtYpi^G2b>TB zcIP=l(htb>N7sP3sMF-o8Hf_!74Ah7l~Ww#Z+e2Jo+rfQkPpo60VfndZN`=5CMomB z!CcaL;+#UPko89zfEOfh{}0hF`5(m}y)1bRDw0;o7w#qXg!~~B=|3aN_9`PnT5KpR zNwh|`SJ^)fd{wYG)!!IoJCvz^fv*V`-F-fqRZR=4nBN8=ZVHTvhUCfr>;4*8Y(@SDW6-Wu delta 1616 zcmZ{ke@vBC7{||f?=Lv_<^JM@UGC)qf{ZKaMZg&l&_&CVHNDgvRw`E}wVVuwmaDZv z8QC07t`BvcHD}ZCE;rXWwrhV`ZP{`STU}N$Dj>2ShEN7hnBJcA9wb`xZ0CKx=kuH& z&-*;*eb08A&UTyLuTPCUv=h#x_QL(_75I$piiA{9f^MgU5R!sD6+6Rj1#hsyPKe-n z6d%~j;k-3lL#;yv1@?06%b+bctHy-j-&Tga42N5>hY2yOa(^5r|KA9KS~Uo6H5;z@ z9MG$#LfC2KarH8V8DFIj_YyH+Lq!PgMM$I2f`X z)tM9rE`9RzT8|l?n43A->!tjQBW?=oRSjBlj#3NU&Z#JkDLa&DWrrc4gwci#G20A` zo{>4|O(y3w$qvKU}Js7DZv}F2yRl?6a3tv=hmp_H6@5wfp3~u71%an z<(r4y3ct9e%t#d;nr901j9PhZ_|1a&R1VEE@Wg>nD8`W)3DxpKp27Hshl`E&jgLHt zC0MyZ+ErlA^>a_3FO4^zvMCVAVDaxu>8!#(I+SYQA%}&+RxQjwcyCvMT~t{{V#Y|U zOCzZ_|2GJefp3~~8WtjHJf$jluki>~Y;08G_Iz4w;6+!LtGwyf;bq+a6(-c1@WYcs zpYqj1Hx*blbRAX?`Eh!dK7BAVBfE9qo;HkO;pU+tsuumLf;Me@0kx;Sqva`Lj2%N= zAe@9e+JG5*P4bsw2$t)ZZ2JyB08R1}4Nutda&iU9E%|@}$4Oi9WyXr`o0H zcqKheN&HY1&84M%h!?i;K90ItpGH)16w{X*Zd^fKBe|_RI(#1uH2W&>CERlR=V#Ct zl>YQuv@ywxwxF()+!jF_ko@RxsMksU&RYEbRLNV8BU>-I!xi0KO`kQ;tl{W*H4Wrg z6Xa>0+gk%3;GUA(PVK5^pZc%lbuXuSsqUseXULCache()) { + PRBool useXULCache; + gXULCache->GetEnabled(&useXULCache); + if (useXULCache) { cached = PR_TRUE; gXULCache->PutXBLDocumentInfo(info); } @@ -493,7 +483,6 @@ NS_IMPL_ISUPPORTS(nsProxyStream, NS_GET_IID(nsIInputStream)); // Static member variable initialization PRUint32 nsXBLService::gRefCnt = 0; -nsIXULContentUtils* nsXBLService::gXULUtils = nsnull; nsIXULPrototypeCache* nsXBLService::gXULCache = nsnull; nsINameSpaceManager* nsXBLService::gNameSpaceManager = nsnull; @@ -558,12 +547,7 @@ nsXBLService::nsXBLService(void) gClassTable = new nsHashtable(); - rv = nsServiceManager::GetService("@mozilla.org/rdf/xul-content-utils;1", - NS_GET_IID(nsIXULContentUtils), - (nsISupports**) &gXULUtils); - if (NS_FAILED(rv)) return; - - rv = nsServiceManager::GetService("@mozilla.org/rdf/xul-prototype-cache;1", + rv = nsServiceManager::GetService("@mozilla.org/xul/xul-prototype-cache;1", NS_GET_IID(nsIXULPrototypeCache), (nsISupports**) &gXULCache); if (NS_FAILED(rv)) return; @@ -596,13 +580,8 @@ nsXBLService::~nsXBLService(void) delete gClassTable; gClassTable = nsnull; - if (gXULUtils) { - nsServiceManager::ReleaseService("@mozilla.org/rdf/xul-content-utils;1", gXULUtils); - gXULUtils = nsnull; - } - if (gXULCache) { - nsServiceManager::ReleaseService("@mozilla.org/rdf/xul-prototype-cache;1", gXULCache); + nsServiceManager::ReleaseService("@mozilla.org/xul/xul-prototype-cache;1", gXULCache); gXULCache = nsnull; } } @@ -761,7 +740,10 @@ NS_IMETHODIMP nsXBLService::GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult) { *aResult = nsnull; - if (gXULUtils && gXULUtils->UseXULCache()) { + + PRBool useXULCache; + gXULCache->GetEnabled(&useXULCache); + if (useXULCache) { // The first line of defense is the chrome cache. // This cache crosses the entire product, so any XBL bindings that are // part of chrome will be reused across all XUL documents. @@ -1072,8 +1054,11 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB *aResult = nsnull; // We've got a file. Check our XBL document cache. + PRBool useXULCache; + gXULCache->GetEnabled(&useXULCache); + nsCOMPtr info; - if (gXULUtils && gXULUtils->UseXULCache()) { + if (useXULCache) { // The first line of defense is the chrome cache. // This cache crosses the entire product, so that any XBL bindings that are // part of chrome will be reused across all XUL documents. @@ -1134,7 +1119,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB // If the doc is a chrome URI, then we put it into the XUL cache. PRBool cached = PR_FALSE; if (IsChromeOrResourceURI(uri)) { - if (gXULUtils && gXULUtils->UseXULCache()) { + if (useXULCache) { cached = PR_TRUE; gXULCache->PutXBLDocumentInfo(info); } diff --git a/mozilla/content/xml/document/src/nsXMLContentSink.cpp b/mozilla/content/xml/document/src/nsXMLContentSink.cpp index de51c6171c8..b23a04241f2 100644 --- a/mozilla/content/xml/document/src/nsXMLContentSink.cpp +++ b/mozilla/content/xml/document/src/nsXMLContentSink.cpp @@ -71,6 +71,7 @@ #include "prmem.h" #include "nsXSLContentSink.h" #include "nsParserCIID.h" +#include "nsParserUtils.h" #include "nsIDocumentViewer.h" // XXX misnamed header file, but oh well @@ -861,90 +862,6 @@ nsXMLContentSink::AddCDATASection(const nsIParserNode& aNode) return result; } -// This method starts at aOffSet in aStr and tries to find aChar. It keeps -// skipping whitespace till it finds aChar or some other non-whitespace character. If -// it finds aChar, it returns aChar's offset. If it finds some other non-whitespace character -// or runs into the end of the string, it returns -1. -static PRInt32 -FindWhileSkippingWhitespace(nsString& aStr, PRUnichar aChar, PRInt32 aOffset) -{ - PRInt32 i = aOffset; - PRUnichar ch = aStr.CharAt(i); - PRInt32 index = -1; - - while (ch == '\n' || ch == '\t' || ch == '\r') { - ch = aStr.CharAt(++i); - } - - if (ch == aChar) - index = i; - - return index; -} - -static nsresult -GetQuotedAttributeValue(nsString& aSource, - const nsString& aAttribute, - nsString& aValue) -{ - PRInt32 startOfAttribute = 0; // Index into aSource where the attribute name starts - PRInt32 startOfValue = 0; // Index into aSource where the attribute value starts - PRInt32 posnOfValueDelimeter = 0; - nsresult result = NS_ERROR_FAILURE; - - // While there are more characters to look at - while (startOfAttribute != -1) { - // Find the attribute starting at offset - startOfAttribute = aSource.Find(aAttribute, PR_FALSE, startOfAttribute); - // If attribute found - if (startOfAttribute != -1) { - // Find the '=' character while skipping whitespace - startOfValue = FindWhileSkippingWhitespace(aSource, '=', startOfAttribute + aAttribute.Length()); - // If '=' found - if (startOfValue != -1) { - PRUnichar delimeter = kQuote; - // Find the quote or apostrophe while skipping whitespace - posnOfValueDelimeter = FindWhileSkippingWhitespace(aSource, kQuote, startOfValue + 1); - if (posnOfValueDelimeter == -1) { - posnOfValueDelimeter = FindWhileSkippingWhitespace(aSource, kApostrophe, startOfValue + 1); - delimeter = kApostrophe; - } - // If quote or apostrophe found - if (posnOfValueDelimeter != -1) { - startOfValue = posnOfValueDelimeter + 1; - // Find the ending quote or apostrophe - posnOfValueDelimeter = aSource.FindChar(delimeter, PR_FALSE, startOfValue); - // If found - if (posnOfValueDelimeter != -1) { - // Set the value of the attibute and exit the loop - // The attribute value starts at startOfValue and ends at (posnOfValueDelimeter - 1) - aSource.Mid(aValue, startOfValue, posnOfValueDelimeter - startOfValue); - result = NS_OK; - break; - } - else { - // Try to find the attribute in the remainder of the string - startOfAttribute++; - continue; - } // Endif found - } - else { - // Try to find the attribute in the remainder of the string - startOfAttribute++; - continue; - } // Endif quote or apostrophe found - } - else { - // Try to find the attribute in the remainder of the string - startOfAttribute++; - continue; - } // Endif '=' found - } // Endif attribute found - } // End while - - return result; -} - static void ParseProcessingInstruction(const nsString& aText, nsString& aTarget, @@ -1165,25 +1082,25 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode) // If it's a stylesheet PI... if (target.EqualsWithConversion(kStyleSheetPI)) { - result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); + result = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); // If there was an error or there's no href, we can't do // anything with this PI if ((NS_OK != result) || (0 == href.Length())) { return result; } - result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); + result = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); if (NS_FAILED(result)) { type.AssignWithConversion("text/css"); // Default the type attribute to the mime type for CSS } - result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title); + result = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title); if (NS_SUCCEEDED(result)) { title.CompressWhitespace(); } - result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media); + result = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media); if (NS_SUCCEEDED(result)) { media.ToLowerCase(); } - result = GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate); + result = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate); result = ProcessStyleLink(node, href, alternate.EqualsWithConversion("yes"), title, type, media); } @@ -1616,41 +1533,6 @@ nsXMLContentSink::ProcessEndSCRIPTTag(const nsIParserNode& aNode) return result; } -// XXX Stolen from nsHTMLContentSink. Needs to be shared. -// XXXbe share also with nsRDFParserUtils.cpp and nsHTMLContentSink.cpp -// Returns PR_TRUE if the language name is a version of JavaScript and -// PR_FALSE otherwise -static PRBool -IsJavaScriptLanguage(const nsString& aName, const char* *aVersion) -{ - JSVersion version = JSVERSION_UNKNOWN; - - if (aName.EqualsIgnoreCase("JavaScript") || - aName.EqualsIgnoreCase("LiveScript") || - aName.EqualsIgnoreCase("Mocha")) { - version = JSVERSION_DEFAULT; - } - else if (aName.EqualsIgnoreCase("JavaScript1.1")) { - version = JSVERSION_1_1; - } - else if (aName.EqualsIgnoreCase("JavaScript1.2")) { - version = JSVERSION_1_2; - } - else if (aName.EqualsIgnoreCase("JavaScript1.3")) { - version = JSVERSION_1_3; - } - else if (aName.EqualsIgnoreCase("JavaScript1.4")) { - version = JSVERSION_1_4; - } - else if (aName.EqualsIgnoreCase("JavaScript1.5")) { - version = JSVERSION_1_5; - } - if (version == JSVERSION_UNKNOWN) - return PR_FALSE; - *aVersion = JS_VersionToString(version); - return PR_TRUE; -} - NS_IMETHODIMP nsXMLContentSink::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* context, @@ -1735,7 +1617,7 @@ nsXMLContentSink::ProcessStartSCRIPTTag(const nsIParserNode& aNode) } else if (key.EqualsIgnoreCase("language")) { const nsString& lang = aNode.GetValueAt(i); - isJavaScript = IsJavaScriptLanguage(lang, &jsVersionString); + isJavaScript = nsParserUtils::IsJavaScriptLanguage(lang, &jsVersionString); } } diff --git a/mozilla/content/xul/Makefile.in b/mozilla/content/xul/Makefile.in index a24884a04ff..bca53a580a4 100644 --- a/mozilla/content/xul/Makefile.in +++ b/mozilla/content/xul/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = content +DIRS = content document templates include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xul/content/Makefile.in b/mozilla/content/xul/content/Makefile.in index 0b4d2a90ab5..8e79579887a 100644 --- a/mozilla/content/xul/content/Makefile.in +++ b/mozilla/content/xul/content/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = src +DIRS = public src include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xul/content/makefile.win b/mozilla/content/xul/content/makefile.win index 841cfcbc222..09d593e23d0 100644 --- a/mozilla/content/xul/content/makefile.win +++ b/mozilla/content/xul/content/makefile.win @@ -21,6 +21,6 @@ DEPTH=..\..\.. -DIRS=src +DIRS=public src include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/content/xul/content/public/Makefile.in b/mozilla/content/xul/content/public/Makefile.in index ffe29dd5898..b430b6edb50 100644 --- a/mozilla/content/xul/content/public/Makefile.in +++ b/mozilla/content/xul/content/public/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = rdf +MODULE = xul EXPORTS = \ nsIXULPopupListener.h \ diff --git a/mozilla/content/xul/content/src/Makefile.in b/mozilla/content/xul/content/src/Makefile.in index 4ed27af4ef9..76fe08adad0 100644 --- a/mozilla/content/xul/content/src/Makefile.in +++ b/mozilla/content/xul/content/src/Makefile.in @@ -30,7 +30,16 @@ MODULE = layout LIBRARY_NAME = gkconxulcon_s REQUIRES = xpcom widget htmlparser necko dom webshell js -CPPSRCS = nsXULAtoms.cpp nsAnonymousElement.cpp +CPPSRCS = \ + nsAnonymousElement.cpp \ + nsRDFDOMNodeList.cpp \ + nsXULAtoms.cpp \ + nsXULAttributeValue.cpp \ + nsXULAttributes.cpp \ + nsXULElement.cpp \ + nsXULPopupListener.cpp \ + nsXULTreeElement.cpp \ + $(NULL) # we don't want the shared lib, but we want to force the creation of a static lib. override NO_SHARED_LIB=1 @@ -41,6 +50,8 @@ include $(topsrcdir)/config/rules.mk DEFINES += -D_IMPL_NS_HTML INCLUDES += \ + -I$(srcdir) \ + -I$(srcdir)/../../document/src \ -I$(srcdir)/../../../xml/content/src \ -I$(srcdir)/../../../base/src \ $(NULL) diff --git a/mozilla/content/xul/content/src/makefile.win b/mozilla/content/xul/content/src/makefile.win index 80912206fa8..214acf1e16f 100644 --- a/mozilla/content/xul/content/src/makefile.win +++ b/mozilla/content/xul/content/src/makefile.win @@ -27,23 +27,34 @@ MODULE=raptor DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN CPPSRCS= \ - nsXULAtoms.cpp \ - nsAnonymousElement.cpp \ + nsAnonymousElement.cpp \ + nsRDFDOMNodeList.cpp \ + nsXULAtoms.cpp \ + nsXULAttributeValue.cpp \ + nsXULAttributes.cpp \ + nsXULElement.cpp \ + nsXULPopupListener.cpp \ + nsXULTreeElement.cpp \ $(NULL) -CPP_OBJS= \ - .\$(OBJDIR)\nsXULAtoms.obj \ - .\$(OBJDIR)\nsAnonymousElement.obj \ +CPP_OBJS= \ + .\$(OBJDIR)\nsAnonymousElement.obj \ + .\$(OBJDIR)\nsRDFDOMNodeList.obj \ + .\$(OBJDIR)\nsXULAtoms.obj \ + .\$(OBJDIR)\nsXULAttributeValue.obj \ + .\$(OBJDIR)\nsXULAttributes.obj \ + .\$(OBJDIR)\nsXULElement.obj \ + .\$(OBJDIR)\nsXULPopupListener.obj \ + .\$(OBJDIR)\nsXULTreeElement.obj \ $(NULL) EXPORTS = \ $(NULL) LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\js \ - -I..\..\..\xml\content\src \ - -I..\..\..\base\src \ - -I..\..\..\base\public \ - -I$(PUBLIC)\dom -I$(PUBLIC)\netlib -I$(PUBLIC)\pref + -I$(PUBLIC)\dom -I$(PUBLIC)\netlib -I$(PUBLIC)\pref \ + -I..\..\document\src -I..\..\..\xml\content\src \ + -I..\..\..\base\src LCFLAGS = \ $(LCFLAGS) \ diff --git a/mozilla/content/xul/content/src/nsXULAtomList.h b/mozilla/content/xul/content/src/nsXULAtomList.h index 8ff6988039c..47f89597fb3 100644 --- a/mozilla/content/xul/content/src/nsXULAtomList.h +++ b/mozilla/content/xul/content/src/nsXULAtomList.h @@ -199,6 +199,47 @@ XUL_ATOM(menubutton, "menubutton") XUL_ATOM(textfield, "textfield") XUL_ATOM(textarea, "textarea") XUL_ATOM(listbox, "listbox") +XUL_ATOM(tooltip, "tooltip") +XUL_ATOM(context, "context") +XUL_ATOM(style, "style") +XUL_ATOM(selected, "selected") +XUL_ATOM(clazz, "class") +XUL_ATOM(id, "id") +XUL_ATOM(persist, "persist") +XUL_ATOM(ref, "ref") +XUL_ATOM(command, "command") +XUL_ATOM(value, "value") +XUL_ATOM(width, "width") +XUL_ATOM(height, "height") +XUL_ATOM(left, "left") +XUL_ATOM(top, "top") +XUL_ATOM(events, "events") +XUL_ATOM(targets, "targets") +XUL_ATOM(uri, "uri") +XUL_ATOM(empty, "empty") +XUL_ATOM(textnode, "textnode") +XUL_ATOM(rule, "rule") +XUL_ATOM(action, "action") +XUL_ATOM(containment, "containment") +XUL_ATOM(flags, "flags") +XUL_ATOM(Template, "template") +XUL_ATOM(member, "member") +XUL_ATOM(conditions, "conditions") +XUL_ATOM(property, "property") +XUL_ATOM(instanceOf, "instanceOf") +XUL_ATOM(xulcontentsgenerated, "xulcontentsgenerated") +XUL_ATOM(parent, "parent") +XUL_ATOM(iscontainer, "iscontainer") +XUL_ATOM(isempty, "isempty") +XUL_ATOM(bindings, "bindings") +XUL_ATOM(binding, "binding") +XUL_ATOM(triple, "triple") +XUL_ATOM(subject, "subject") +XUL_ATOM(predicate, "predicate") +XUL_ATOM(child, "child") +XUL_ATOM(object, "object") +XUL_ATOM(tag, "tag") +XUL_ATOM(content, "content") XUL_ATOM(blankrow, "blankrow") XUL_ATOM(titlebar, "titlebar") diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp index 479f0cebd1b..c7494c0b5f6 100644 --- a/mozilla/content/xul/content/src/nsXULElement.cpp +++ b/mozilla/content/xul/content/src/nsXULElement.cpp @@ -54,13 +54,22 @@ #include "nsDOMError.h" #include "nsIDOMEvent.h" #include "nsIPrivateDOMEvent.h" -#include "nsForwardReference.h" #include "nsHTMLValue.h" #include "nsHashtable.h" #include "nsIAtom.h" #include "nsIDOMAttr.h" #include "nsIDOMDocument.h" #include "nsIDOMElement.h" +#include "nsIDOMMouseListener.h" +#include "nsIDOMMouseMotionListener.h" +#include "nsIDOMLoadListener.h" +#include "nsIDOMFocusListener.h" +#include "nsIDOMPaintListener.h" +#include "nsIDOMKeyListener.h" +#include "nsIDOMFormListener.h" +#include "nsIDOMMenuListener.h" +#include "nsIDOMScrollListener.h" +#include "nsIDOMDragListener.h" #include "nsIDOMEventListener.h" #include "nsIDOMEventReceiver.h" #include "nsIDOMNodeList.h" @@ -79,7 +88,6 @@ #include "nsIPresShell.h" #include "nsIPrincipal.h" #include "nsIRDFCompositeDataSource.h" -#include "nsIRDFContentModelBuilder.h" #include "nsIRDFNode.h" #include "nsIRDFService.h" #include "nsIScriptContext.h" @@ -94,7 +102,6 @@ #include "nsISupportsArray.h" #include "nsIURL.h" #include "nsIXULContent.h" -#include "nsIXULContentUtils.h" #include "nsIXULDocument.h" #include "nsIXULPopupListener.h" #include "nsIXULPrototypeDocument.h" @@ -123,7 +130,6 @@ #include "prlog.h" #include "rdf.h" -#include "rdfutil.h" #include "nsIControllers.h" @@ -166,11 +172,12 @@ static NS_DEFINE_CID(kEventListenerManagerCID, NS_EVENTLISTENERMANAGER_CID); static NS_DEFINE_IID(kIDOMEventTargetIID, NS_IDOMEVENTTARGET_IID); static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID); static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); -static NS_DEFINE_CID(kXULContentUtilsCID, NS_XULCONTENTUTILS_CID); static NS_DEFINE_IID(kIXULPopupListenerIID, NS_IXULPOPUPLISTENER_IID); static NS_DEFINE_CID(kXULPopupListenerCID, NS_XULPOPUPLISTENER_CID); +static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); + //---------------------------------------------------------------------- #include "nsIJSRuntimeService.h" @@ -215,6 +222,105 @@ RemoveJSGCRoot(void* aScriptObjectRef) return NS_OK; } +//---------------------------------------------------------------------- + +struct EventHandlerMapEntry { + const char* mAttributeName; + nsIAtom* mAttributeAtom; + const nsIID* mHandlerIID; +}; + +static EventHandlerMapEntry kEventHandlerMap[] = { + { "onclick", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, + { "ondblclick", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, + { "onmousedown", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, + { "onmouseup", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, + { "onmouseover", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, + { "onmouseout", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, + + { "onmousemove", nsnull, &NS_GET_IID(nsIDOMMouseMotionListener) }, + + { "onkeydown", nsnull, &NS_GET_IID(nsIDOMKeyListener) }, + { "onkeyup", nsnull, &NS_GET_IID(nsIDOMKeyListener) }, + { "onkeypress", nsnull, &NS_GET_IID(nsIDOMKeyListener) }, + + { "onload", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, + { "onunload", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, + { "onabort", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, + { "onerror", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, + + { "oncreate", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, + { "onclose", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, + { "ondestroy", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, + { "oncommand", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, + { "onbroadcast", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, + { "oncommandupdate", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, + + { "onoverflow", nsnull, &NS_GET_IID(nsIDOMScrollListener) }, + { "onunderflow", nsnull, &NS_GET_IID(nsIDOMScrollListener) }, + { "onoverflowchanged",nsnull, &NS_GET_IID(nsIDOMScrollListener) }, + + { "onfocus", nsnull, &NS_GET_IID(nsIDOMFocusListener) }, + { "onblur", nsnull, &NS_GET_IID(nsIDOMFocusListener) }, + + { "onsubmit", nsnull, &NS_GET_IID(nsIDOMFormListener) }, + { "onreset", nsnull, &NS_GET_IID(nsIDOMFormListener) }, + { "onchange", nsnull, &NS_GET_IID(nsIDOMFormListener) }, + { "onselect", nsnull, &NS_GET_IID(nsIDOMFormListener) }, + { "oninput", nsnull, &NS_GET_IID(nsIDOMFormListener) }, + + { "onpaint", nsnull, &NS_GET_IID(nsIDOMPaintListener) }, + + { "ondragenter", nsnull, &NS_GET_IID(nsIDOMDragListener) }, + { "ondragover", nsnull, &NS_GET_IID(nsIDOMDragListener) }, + { "ondragexit", nsnull, &NS_GET_IID(nsIDOMDragListener) }, + { "ondragdrop", nsnull, &NS_GET_IID(nsIDOMDragListener) }, + { "ondraggesture", nsnull, &NS_GET_IID(nsIDOMDragListener) }, + + { nsnull, nsnull, nsnull } +}; + + +static nsresult +GetEventHandlerIID(nsIAtom* aName, nsIID* aIID, PRBool* aFound) +{ + *aFound = PR_FALSE; + + EventHandlerMapEntry* entry = kEventHandlerMap; + while (entry->mAttributeAtom) { + if (entry->mAttributeAtom == aName) { + *aIID = *entry->mHandlerIID; + *aFound = PR_TRUE; + break; + } + ++entry; + } + + return NS_OK; +} + +static void +InitEventHandlerMap() +{ + EventHandlerMapEntry* entry = kEventHandlerMap; + while (entry->mAttributeName) { + entry->mAttributeAtom = NS_NewAtom(entry->mAttributeName); + ++entry; + } +} + + +static void +FinishEventHandlerMap() +{ + EventHandlerMapEntry* entry = kEventHandlerMap; + while (entry->mAttributeName) { + NS_IF_RELEASE(entry->mAttributeAtom); + ++entry; + } +} + + //---------------------------------------------------------------------- struct XULBroadcastListener @@ -374,7 +480,6 @@ static PRBool HasMutationListeners(nsIContent* aContent, PRUint32 aType) nsrefcnt nsXULElement::gRefCnt; nsIRDFService* nsXULElement::gRDFService; nsINameSpaceManager* nsXULElement::gNameSpaceManager; -nsIXULContentUtils* nsXULElement::gXULUtils; PRInt32 nsXULElement::kNameSpaceID_RDF; PRInt32 nsXULElement::kNameSpaceID_XUL; @@ -434,13 +539,7 @@ nsXULElement::Init() gNameSpaceManager->RegisterNameSpace(NS_ConvertASCIItoUCS2(kXULNameSpaceURI), kNameSpaceID_XUL); } - rv = nsServiceManager::GetService(kXULContentUtilsCID, - NS_GET_IID(nsIXULContentUtils), - (nsISupports**) &gXULUtils); - NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get XUL content utils"); - if (NS_FAILED(rv)) return rv; - - nsXULAtoms::AddRef(); + InitEventHandlerMap(); } return NS_OK; @@ -463,20 +562,14 @@ nsXULElement::~nsXULElement() // Clean up shared statics if (--gRefCnt == 0) { + FinishEventHandlerMap(); + if (gRDFService) { nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService); gRDFService = nsnull; } - NS_IF_RELEASE(gNameSpaceManager); - - if (gXULUtils) { - nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); - gXULUtils = nsnull; - } - - nsXULAtoms::Release(); } } @@ -528,7 +621,7 @@ nsXULElement::Create(nsXULPrototypeElement* aPrototype, PRBool found; nsCOMPtr name; attr->mNodeInfo->GetNameAtom(*getter_AddRefs(name)); - rv = gXULUtils->GetEventHandlerIID(name, &iid, &found); + rv = GetEventHandlerIID(name, &iid, &found); if (NS_FAILED(rv)) return rv; if (found) { @@ -1932,32 +2025,57 @@ nsXULElement::GetScriptObject(nsIScriptContext* aContext, void** aScriptObject) nsresult rv = NS_OK; if (! mScriptObject) { - // The actual script object that we create will depend on our - // tag... - nsresult (*PR_CALLBACK fn)(nsIScriptContext* aContext, nsISupports* aSupports, nsISupports* aParent, void** aReturn); + // Use the XBL service to get the `base' tag, which'll be how + // we determine what kind of script object to cook up. + nsCOMPtr xblService = do_GetService("@mozilla.org/xbl;1", &rv); + NS_ASSERTION(xblService != nsnull, "couldn't get XBL service"); + if (! xblService) + return NS_ERROR_UNEXPECTED; nsCOMPtr tag; PRInt32 dummy; - NS_WITH_SERVICE(nsIXBLService, xblService, "@mozilla.org/xbl;1", &rv); xblService->ResolveTag(NS_STATIC_CAST(nsIStyledContent*, this), &dummy, getter_AddRefs(tag)); + // Use the DOM's script object factory to cough up a script + // object + nsAutoString tagStr; + tag->ToString(tagStr); + + nsCOMPtr factory + = do_GetService(kDOMScriptObjectFactoryCID, &rv); + + NS_ASSERTION(factory != nsnull, "couldn't get script object factory"); + if (! factory) + return NS_ERROR_UNEXPECTED; + + // We'll either be parented by the element that encloses us + // (if there is one), or the document. + nsISupports* parent = mParent + ? NS_STATIC_CAST(nsISupports*, mParent) + : NS_STATIC_CAST(nsISupports*, mDocument); + + rv = factory->NewScriptXULElement(tagStr, aContext, + NS_STATIC_CAST(nsIStyledContent*, this), + parent, + &mScriptObject); + + + // The actual script object that we created will depend on our + // tag's name const char* rootname; if (tag.get() == nsXULAtoms::tree) { - fn = NS_NewScriptXULTreeElement; rootname = "nsXULTreeElement::mScriptObject"; } else { - fn = NS_NewScriptXULElement; rootname = "nsXULElement::mScriptObject"; } - // Create the script object; N.B. that if |mDocument| is null, - // the script object's |parent| will refer to the class's - // ctor. This is distinctly different from an element that - // lives "in" the document when its script object is created. - rv = fn(aContext, (nsIDOMXULElement*) this, mDocument, (void**) &mScriptObject); - - // Ensure that a reference exists to this element + // Ensure that a reference exists to this element. + // + // XXX This is different from nsGenericElement, which doesn't + // root until the element is in the document; however, we're + // screwed, and GC will cause us to lose properties if we + // don't eagerly root. aContext->AddNamedReference((void*) &mScriptObject, mScriptObject, rootname); // See if we have a frame. @@ -2285,7 +2403,7 @@ nsXULElement::SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileE if (nameSpaceID == kNameSpaceID_None) { if (aCompileEventHandlers) { nsIID iid; - rv = gXULUtils->GetEventHandlerIID(attr, &iid, &reset); + rv = GetEventHandlerIID(attr, &iid, &reset); if (NS_FAILED(rv)) return rv; } @@ -2830,7 +2948,7 @@ nsXULElement::SetAttribute(nsINodeInfo* aNodeInfo, nsIID iid; PRBool found; - rv = gXULUtils->GetEventHandlerIID(attrName, &iid, &found); + rv = GetEventHandlerIID(attrName, &iid, &found); if (NS_FAILED(rv)) return rv; if (found) { diff --git a/mozilla/content/xul/content/src/nsXULElement.h b/mozilla/content/xul/content/src/nsXULElement.h index 222bec4a1d7..593ede4a210 100644 --- a/mozilla/content/xul/content/src/nsXULElement.h +++ b/mozilla/content/xul/content/src/nsXULElement.h @@ -37,7 +37,6 @@ #include "nslayout.h" #include "nsIDOMEvent.h" -#include "nsForwardReference.h" #include "nsHTMLValue.h" #include "nsIAtom.h" #include "nsINodeInfo.h" @@ -325,7 +324,6 @@ protected: static nsrefcnt gRefCnt; static nsIRDFService* gRDFService; static nsINameSpaceManager* gNameSpaceManager; - static nsIXULContentUtils* gXULUtils; static PRInt32 kNameSpaceID_RDF; static PRInt32 kNameSpaceID_XUL; diff --git a/mozilla/content/xul/content/src/nsXULPopupListener.cpp b/mozilla/content/xul/content/src/nsXULPopupListener.cpp index 97514f711bf..326a7522333 100644 --- a/mozilla/content/xul/content/src/nsXULPopupListener.cpp +++ b/mozilla/content/xul/content/src/nsXULPopupListener.cpp @@ -40,7 +40,7 @@ #include "nsIDOMMouseListener.h" #include "nsIDOMMouseMotionListener.h" #include "nsIDOMKeyListener.h" -#include "nsRDFCID.h" +#include "nsContentCID.h" #include "nsIScriptGlobalObject.h" #include "nsIDOMWindowInternal.h" diff --git a/mozilla/content/xul/document/Makefile.in b/mozilla/content/xul/document/Makefile.in index 0b4d2a90ab5..8e79579887a 100644 --- a/mozilla/content/xul/document/Makefile.in +++ b/mozilla/content/xul/document/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = src +DIRS = public src include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xul/document/public/MANIFEST b/mozilla/content/xul/document/public/MANIFEST index b45df4e71af..60cdc4fc707 100644 --- a/mozilla/content/xul/document/public/MANIFEST +++ b/mozilla/content/xul/document/public/MANIFEST @@ -1,11 +1,6 @@ -nsIStreamLoadableDocument.h nsIXULContentSink.h -nsIXULContentUtils.h nsIXULDocument.h -nsIXULPopupListener.h nsIXULPrototypeCache.h nsIXULPrototypeDocument.h -nsIXULContent.h - diff --git a/mozilla/content/xul/document/public/MANIFEST_IDL b/mozilla/content/xul/document/public/MANIFEST_IDL new file mode 100644 index 00000000000..bcdbd5dcdbf --- /dev/null +++ b/mozilla/content/xul/document/public/MANIFEST_IDL @@ -0,0 +1,4 @@ +nsIController.idl +nsIControllerCommand.idl +nsIControllers.idl +xulstubs.idl diff --git a/mozilla/content/xul/document/public/Makefile.in b/mozilla/content/xul/document/public/Makefile.in index ed8cf9d52f8..344c2a3f075 100644 --- a/mozilla/content/xul/document/public/Makefile.in +++ b/mozilla/content/xul/document/public/Makefile.in @@ -19,24 +19,27 @@ # Contributor(s): # -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = rdf +MODULE = xuldoc + +XPIDLSRCS = \ + nsIController.idl \ + nsIControllers.idl \ + nsIControllerCommand.idl \ + xulstubs.idl \ + $(NULL) EXPORTS = \ - nsIStreamLoadableDocument.h \ nsIXULContentSink.h \ - nsIXULContentUtils.h \ nsIXULDocument.h \ - nsIXULPopupListener.h \ nsIXULPrototypeCache.h \ nsIXULPrototypeDocument.h \ - nsIXULContent.h \ $(NULL) EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) diff --git a/mozilla/content/xul/document/public/makefile.win b/mozilla/content/xul/document/public/makefile.win index 1096949e04f..6669cc42e24 100644 --- a/mozilla/content/xul/document/public/makefile.win +++ b/mozilla/content/xul/document/public/makefile.win @@ -20,7 +20,7 @@ # Contributor(s): -MODULE=xul +MODULE=xuldoc DEPTH=..\..\..\.. diff --git a/mozilla/content/xul/document/public/nsIXULDocument.h b/mozilla/content/xul/document/public/nsIXULDocument.h index b79ce89aa3e..47740834f9c 100644 --- a/mozilla/content/xul/document/public/nsIXULDocument.h +++ b/mozilla/content/xul/document/public/nsIXULDocument.h @@ -33,6 +33,8 @@ #ifndef nsIXULDocument_h___ #define nsIXULDocument_h___ +class nsIContent; // XXX nsIXMLDocument.h is bad and doesn't declare this class... + #include "nsIXMLDocument.h" #include "nsString.h" @@ -46,7 +48,6 @@ class nsIRDFResource; class nsISupportsArray; class nsIXULPrototypeDocument; class nsIURI; -class nsIContent; // {954F0811-81DC-11d2-B52A-000000000000} #define NS_IRDFDOCUMENT_IID \ diff --git a/mozilla/content/xul/document/public/nsIXULPrototypeCache.h b/mozilla/content/xul/document/public/nsIXULPrototypeCache.h index e13bc88b62a..777ab30a210 100644 --- a/mozilla/content/xul/document/public/nsIXULPrototypeCache.h +++ b/mozilla/content/xul/document/public/nsIXULPrototypeCache.h @@ -37,6 +37,10 @@ class nsCString; class nsIDocument; class nsIXBLDocumentInfo; +// {3A0A0FC1-8349-11d3-BE47-00104BDE6048} +#define NS_XULPROTOTYPECACHE_CID \ +{ 0x3a0a0fc1, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } } + // {3A0A0FC0-8349-11d3-BE47-00104BDE6048} #define NS_IXULPROTOTYPECACHE_IID \ { 0x3a0a0fc0, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } } @@ -65,6 +69,11 @@ public: * sheets, and scripts. */ NS_IMETHOD Flush() = 0; + + /** + * Determine if the prototype cache is enabled + */ + NS_IMETHOD GetEnabled(PRBool* aIsEnabled) = 0; }; diff --git a/mozilla/content/xul/document/src/Makefile.in b/mozilla/content/xul/document/src/Makefile.in index a689333af3c..5db0d641409 100644 --- a/mozilla/content/xul/document/src/Makefile.in +++ b/mozilla/content/xul/document/src/Makefile.in @@ -27,10 +27,19 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = layout -LIBRARY_NAME = gkxulcon_s -REQUIRES = xpcom +LIBRARY_NAME = gkconxuldoc_s +REQUIRES = xpcom exthandler mime -CPPSRCS = nsXULAtoms.cpp +CPPSRCS = \ + nsControllerCommandManager.cpp \ + nsElementMap.cpp \ + nsXULCommandDispatcher.cpp \ + nsXULContentSink.cpp \ + nsXULControllers.cpp \ + nsXULDocument.cpp \ + nsXULPrototypeCache.cpp \ + nsXULPrototypeDocument.cpp \ + $(NULL) # we don't want the shared lib, but we want to force the creation of a static lib. override NO_SHARED_LIB=1 @@ -40,5 +49,8 @@ include $(topsrcdir)/config/rules.mk DEFINES += -D_IMPL_NS_HTML -INCLUDES += -I$(srcdir)/../../../base/src +INCLUDES += -I$(srcdir)/../../../base/src \ + -I$(srcdir)/../../content/src \ + -I$(srcdir)/../../templates/src \ + $(NULL) diff --git a/mozilla/content/xul/document/src/nsXULContentSink.cpp b/mozilla/content/xul/document/src/nsXULContentSink.cpp index 5c01d0e6e7c..26f2dcb01fa 100644 --- a/mozilla/content/xul/document/src/nsXULContentSink.cpp +++ b/mozilla/content/xul/document/src/nsXULContentSink.cpp @@ -59,7 +59,6 @@ #include "nsIParser.h" #include "nsIPresShell.h" #include "nsIRDFCompositeDataSource.h" -#include "nsIRDFContentModelBuilder.h" #include "nsIRDFService.h" #include "nsIScriptContext.h" #include "nsIServiceManager.h" @@ -68,21 +67,19 @@ #include "nsIViewManager.h" #include "nsIXMLContent.h" #include "nsIXULContentSink.h" -#include "nsIXULContentUtils.h" #include "nsIXULDocument.h" #include "nsIXULPrototypeDocument.h" #include "nsIXULPrototypeCache.h" #include "nsLayoutCID.h" #include "nsNetUtil.h" #include "nsRDFCID.h" -#include "nsRDFParserUtils.h" +#include "nsParserUtils.h" #include "nsVoidArray.h" #include "nsWeakPtr.h" #include "nsXPIDLString.h" #include "nsXULElement.h" #include "prlog.h" #include "prmem.h" -#include "rdfutil.h" #include "jsapi.h" // for JSVERSION_*, JS_VersionToString, etc. #include "nsHTMLTokens.h" // XXX so we can use nsIParserNode::GetTokenType() @@ -103,7 +100,6 @@ static const char kXULNameSpaceURI[] = XUL_NAMESPACE_URI; static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID); static NS_DEFINE_CID(kCSSParserCID, NS_CSSPARSER_CID); static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID); -static NS_DEFINE_CID(kXULContentUtilsCID, NS_XULCONTENTUTILS_CID); static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); //---------------------------------------------------------------------- @@ -146,7 +142,6 @@ protected: // pseudo-constants static nsrefcnt gRefCnt; static nsINameSpaceManager* gNameSpaceManager; - static nsIXULContentUtils* gXULUtils; static nsIXULPrototypeCache* gXULCache; static nsIAtom* kClassAtom; @@ -246,7 +241,6 @@ protected: nsrefcnt XULContentSinkImpl::gRefCnt; nsINameSpaceManager* XULContentSinkImpl::gNameSpaceManager; -nsIXULContentUtils* XULContentSinkImpl::gXULUtils; nsIXULPrototypeCache* XULContentSinkImpl::gXULCache; nsIAtom* XULContentSinkImpl::kClassAtom; @@ -360,11 +354,6 @@ XULContentSinkImpl::XULContentSinkImpl(nsresult& rv) kStyleAtom = NS_NewAtom("style"); kTemplateAtom = NS_NewAtom("template"); - rv = nsServiceManager::GetService(kXULContentUtilsCID, - NS_GET_IID(nsIXULContentUtils), - (nsISupports**) &gXULUtils); - if (NS_FAILED(rv)) return; - rv = nsServiceManager::GetService(kXULPrototypeCacheCID, NS_GET_IID(nsIXULPrototypeCache), (nsISupports**) &gXULCache); @@ -462,11 +451,6 @@ XULContentSinkImpl::~XULContentSinkImpl() NS_IF_RELEASE(kStyleAtom); NS_IF_RELEASE(kTemplateAtom); - if (gXULUtils) { - nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); - gXULUtils = nsnull; - } - if (gXULCache) { nsServiceManager::ReleaseService(kXULPrototypeCacheCID, gXULCache); gXULCache = nsnull; @@ -522,6 +506,7 @@ XULContentSinkImpl::DidBuildModel(PRInt32 aQualityLevel) nsCOMPtr doc = do_QueryReferent(mDocument); if (doc) { doc->EndLoad(); + mDocument = nsnull; } // Drop our reference to the parser to get rid of a circular @@ -902,7 +887,7 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode) if (text.Find(kOverlayPI) == 0) { // Load a XUL overlay. nsAutoString href; - rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); + rv = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); if (NS_FAILED(rv)) return rv; // If there was an error or there's no href, we can't do @@ -923,7 +908,7 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode) // If it's a stylesheet PI... else if (text.Find(kStyleSheetPI) == 0) { nsAutoString href; - rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); + rv = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); if (NS_FAILED(rv)) return rv; // If there was an error or there's no href, we can't do @@ -932,30 +917,24 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode) return NS_OK; nsAutoString type; - rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); - if (NS_FAILED(rv)) return rv; + nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("type"), type); nsAutoString title; - rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title); - if (NS_FAILED(rv)) return rv; + nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("title"), title); title.CompressWhitespace(); nsAutoString media; - rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media); - if (NS_FAILED(rv)) return rv; + nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("media"), media); media.ToLowerCase(); nsAutoString alternate; - rv = nsRDFParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate); - if (NS_FAILED(rv)) return rv; + nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("alternate"), alternate); - rv = ProcessStyleLink(nsnull /* XXX need a node here */, - href, alternate.EqualsWithConversion("yes"), /* XXX ignore case? */ - title, type, media); - - if (NS_FAILED(rv)) return rv; + ProcessStyleLink(nsnull /* XXX need a node here */, + href, alternate.EqualsWithConversion("yes"), /* XXX ignore case? */ + title, type, media); } return NS_OK; @@ -977,10 +956,12 @@ XULContentSinkImpl::AddCharacterData(const nsIParserNode& aNode) nsAutoString text(aNode.GetText()); if (aNode.GetTokenType() == eToken_entity) { - char buf[12]; - text.ToCString(buf, sizeof(buf)); - text.Truncate(); - text.Append(nsRDFParserUtils::EntityToUnicode(buf)); + nsAutoString tmp; + PRInt32 unicode = aNode.TranslateToUnicodeStr(tmp); + if (unicode < 0) { + text.Append(aNode.GetText()); + } + else text.Append(tmp); } PRInt32 addLen = text.Length(); @@ -1180,7 +1161,6 @@ XULContentSinkImpl::GetXULIDAttribute(const nsIParserNode& aNode, nsString& aID) for (PRInt32 i = aNode.GetAttributeCount(); i >= 0; --i) { if (aNode.GetKeyAt(i).Equals(NS_LITERAL_STRING("id"))) { aID = aNode.GetValueAt(i); - nsRDFParserUtils::StripAndConvert(aID); return NS_OK; } } @@ -1232,7 +1212,6 @@ XULContentSinkImpl::AddAttributes(const nsIParserNode& aNode, nsXULPrototypeElem nsAutoString valueStr; valueStr = aNode.GetValueAt(i); - nsRDFParserUtils::StripAndConvert( valueStr ); attrs->mValue.SetValue( valueStr ); #ifdef PR_LOGGING @@ -1509,11 +1488,9 @@ XULContentSinkImpl::OpenScript(const nsIParserNode& aNode) nsAutoString key(aNode.GetKeyAt(i)); if (key.EqualsIgnoreCase("src")) { src.Assign(aNode.GetValueAt(i)); - nsRDFParserUtils::StripAndConvert(src); } else if (key.EqualsIgnoreCase("type")) { nsAutoString type(aNode.GetValueAt(i)); - nsRDFParserUtils::StripAndConvert(type); nsAutoString mimeType; nsAutoString params; SplitMimeType(type, mimeType, params); @@ -1539,8 +1516,7 @@ XULContentSinkImpl::OpenScript(const nsIParserNode& aNode) } else if (key.EqualsIgnoreCase("language")) { nsAutoString lang(aNode.GetValueAt(i)); - nsRDFParserUtils::StripAndConvert(lang); - isJavaScript = nsRDFParserUtils::IsJavaScriptLanguage(lang, &jsVersionString); + isJavaScript = nsParserUtils::IsJavaScriptLanguage(lang, &jsVersionString); } } @@ -1625,7 +1601,6 @@ XULContentSinkImpl::PushNameSpacesFrom(const nsIParserNode& aNode) // Get the attribute value (the URI for the namespace) nsAutoString uri(aNode.GetValueAt(i)); - nsRDFParserUtils::StripAndConvert(uri); // Open a local namespace nsIAtom* prefixAtom = ((0 < prefix.Length()) ? NS_NewAtom(prefix) : nsnull); diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index 197914cc9d5..b301c688902 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -102,7 +102,7 @@ #include "nsIXMLContent.h" #include "nsIXULContent.h" #include "nsIXULContentSink.h" -#include "nsIXULContentUtils.h" +#include "nsXULContentUtils.h" #include "nsIXULPrototypeCache.h" #include "nsLWBrkCIID.h" #include "nsLayoutCID.h" @@ -111,6 +111,7 @@ #include "nsParserCIID.h" #include "nsPIBoxObject.h" #include "nsRDFCID.h" +#include "nsILocalStore.h" #include "nsRDFDOMNodeList.h" #include "nsXPIDLString.h" #include "nsIDOMWindowInternal.h" @@ -120,7 +121,6 @@ #include "plstr.h" #include "prlog.h" #include "rdf.h" -#include "rdfutil.h" #include "nsIFrame.h" #include "nsIPrivateDOMImplementation.h" #include "nsIDOMDOMImplementation.h" @@ -128,6 +128,10 @@ #include "nsIDOMDocumentType.h" #include "nsIXBLService.h" #include "nsReadableUtils.h" +#include "nsCExternalHandlerService.h" +#include "nsIMIMEService.h" +#include "nsNetUtil.h" +#include "nsMimeTypes.h" //---------------------------------------------------------------------- @@ -158,7 +162,6 @@ static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); static NS_DEFINE_CID(kWellFormedDTDCID, NS_WELLFORMEDDTD_CID); static NS_DEFINE_CID(kXMLElementFactoryCID, NS_XML_ELEMENT_FACTORY_CID); static NS_DEFINE_CID(kXULContentSinkCID, NS_XULCONTENTSINK_CID); -static NS_DEFINE_CID(kXULContentUtilsCID, NS_XULCONTENTUTILS_CID); static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); static NS_DEFINE_CID(kXULTemplateBuilderCID, NS_XULTEMPLATEBUILDER_CID); static NS_DEFINE_CID(kDOMImplementationCID, NS_DOM_IMPLEMENTATION_CID); @@ -232,7 +235,6 @@ nsIElementFactory* nsXULDocument::gXMLElementFactory; nsINameSpaceManager* nsXULDocument::gNameSpaceManager; PRInt32 nsXULDocument::kNameSpaceID_XUL; -nsIXULContentUtils* nsXULDocument::gXULUtils; nsIXULPrototypeCache* nsXULDocument::gXULCache; nsIScriptSecurityManager* nsXULDocument::gScriptSecurityManager; nsIPrincipal* nsXULDocument::gSystemPrincipal; @@ -314,19 +316,19 @@ NS_IMPL_ISUPPORTS1(nsProxyLoadStream, nsIInputStream); //---------------------------------------------------------------------- // -// PlaceholderChannel +// PlaceholderRequest // -// This is a dummy channel implementation that we add to the load +// This is a dummy request implementation that we add to the load // group. It ensures that EndDocumentLoad() in the docshell doesn't // fire before we've finished building the complete document content // model. // -class PlaceholderChannel : public nsIChannel +class PlaceHolderRequest : public nsIChannel { protected: - PlaceholderChannel(); - virtual ~PlaceholderChannel(); + PlaceHolderRequest(); + virtual ~PlaceHolderRequest(); static PRInt32 gRefCnt; static nsIURI* gURI; @@ -335,13 +337,12 @@ protected: public: static nsresult - Create(nsIChannel** aResult); + Create(nsIRequest** aResult); NS_DECL_ISUPPORTS // nsIRequest NS_IMETHOD GetName(PRUnichar* *result) { - NS_NOTREACHED("PlaceholderChannel::GetName"); return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHOD IsPending(PRBool *_retval) { *_retval = PR_TRUE; return NS_OK; } @@ -350,63 +351,50 @@ public: NS_IMETHOD Suspend(void) { return NS_OK; } NS_IMETHOD Resume(void) { return NS_OK; } - // nsIChannel + // nsIChannel NS_IMETHOD GetOriginalURI(nsIURI* *aOriginalURI) { *aOriginalURI = gURI; NS_ADDREF(*aOriginalURI); return NS_OK; } NS_IMETHOD SetOriginalURI(nsIURI* aOriginalURI) { gURI = aOriginalURI; NS_ADDREF(gURI); return NS_OK; } NS_IMETHOD GetURI(nsIURI* *aURI) { *aURI = gURI; NS_ADDREF(*aURI); return NS_OK; } NS_IMETHOD SetURI(nsIURI* aURI) { gURI = aURI; NS_ADDREF(gURI); return NS_OK; } - NS_IMETHOD OpenInputStream(nsIInputStream **_retval) { *_retval = nsnull; return NS_OK; } - NS_IMETHOD OpenOutputStream(nsIOutputStream **_retval) { *_retval = nsnull; return NS_OK; } - NS_IMETHOD AsyncOpen(nsIStreamObserver *observer, nsISupports *ctxt) { return NS_OK; } - NS_IMETHOD AsyncRead(nsIStreamListener *listener, nsISupports *ctxt) { return NS_OK; } - NS_IMETHOD AsyncWrite(nsIStreamProvider *provider, nsISupports *ctxt) { return NS_OK; } - NS_IMETHOD GetLoadAttributes(nsLoadFlags *aLoadAttributes) { *aLoadAttributes = nsIChannel::LOAD_NORMAL; return NS_OK; } - NS_IMETHOD SetLoadAttributes(nsLoadFlags aLoadAttributes) { return NS_OK; } - NS_IMETHOD GetContentType(char * *aContentType) { *aContentType = nsnull; return NS_OK; } - NS_IMETHOD SetContentType(const char *aContentType) { return NS_OK; } - NS_IMETHOD GetContentLength(PRInt32 *aContentLength) { *aContentLength = 0; return NS_OK; } - NS_IMETHOD SetContentLength(PRInt32 aContentLength) { NS_NOTREACHED("SetContentLength"); NS_NOTREACHED("NOTREACHED"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetTransferOffset(PRUint32 *aTransferOffset) { NS_NOTREACHED("GetTransferOffset"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD SetTransferOffset(PRUint32 aTransferOffset) { NS_NOTREACHED("SetTransferOffset"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetTransferCount(PRInt32 *aTransferCount) { NS_NOTREACHED("GetTransferCount"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD SetTransferCount(PRInt32 aTransferCount) { NS_NOTREACHED("SetTransferCount"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetBufferSegmentSize(PRUint32 *aBufferSegmentSize) { NS_NOTREACHED("GetBufferSegmentSize"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD SetBufferSegmentSize(PRUint32 aBufferSegmentSize) { NS_NOTREACHED("SetBufferSegmentSize"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetBufferMaxSize(PRUint32 *aBufferMaxSize) { NS_NOTREACHED("GetBufferMaxSize"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD SetBufferMaxSize(PRUint32 aBufferMaxSize) { NS_NOTREACHED("SetBufferMaxSize"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetLocalFile(nsIFile* *result) { NS_NOTREACHED("GetLocalFile"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetPipeliningAllowed(PRBool *aPipeliningAllowed) { *aPipeliningAllowed = PR_FALSE; return NS_OK; } - NS_IMETHOD SetPipeliningAllowed(PRBool aPipeliningAllowed) { NS_NOTREACHED("SetPipeliningAllowed"); return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHOD GetOwner(nsISupports * *aOwner) { *aOwner = nsnull; return NS_OK; } - NS_IMETHOD SetOwner(nsISupports * aOwner) { return NS_OK; } - NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup) { *aLoadGroup = mLoadGroup; NS_IF_ADDREF(*aLoadGroup); return NS_OK; } - NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) { mLoadGroup = aLoadGroup; return NS_OK; } - NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { *aNotificationCallbacks = nsnull; return NS_OK; } - NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return NS_OK; } - NS_IMETHOD GetSecurityInfo(nsISupports **info) {*info = nsnull; return NS_OK;} + NS_IMETHOD Open(nsIInputStream **_retval) { *_retval = nsnull; return NS_OK; } + NS_IMETHOD AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt) { return NS_OK; } + NS_IMETHOD GetLoadAttributes(nsLoadFlags *aLoadAttributes) { *aLoadAttributes = nsIChannel::LOAD_NORMAL; return NS_OK; } + NS_IMETHOD SetLoadAttributes(nsLoadFlags aLoadAttributes) { return NS_OK; } + NS_IMETHOD GetOwner(nsISupports * *aOwner) { *aOwner = nsnull; return NS_OK; } + NS_IMETHOD SetOwner(nsISupports * aOwner) { return NS_OK; } + NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup) { *aLoadGroup = mLoadGroup; NS_IF_ADDREF(*aLoadGroup); return NS_OK; } + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) { mLoadGroup = aLoadGroup; return NS_OK; } + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { *aNotificationCallbacks = nsnull; return NS_OK; } + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return NS_OK; } + NS_IMETHOD GetSecurityInfo(nsISupports * *aSecurityInfo) { *aSecurityInfo = nsnull; return NS_OK; } + NS_IMETHOD GetContentType(char * *aContentType) { *aContentType = nsnull; return NS_OK; } + NS_IMETHOD SetContentType(const char * aContentType) { return NS_OK; } + NS_IMETHOD GetContentLength(PRInt32 *aContentLength) { return NS_OK; } + NS_IMETHOD SetContentLength(PRInt32 aContentLength) { return NS_OK; } + }; -PRInt32 PlaceholderChannel::gRefCnt; -nsIURI* PlaceholderChannel::gURI; +PRInt32 PlaceHolderRequest::gRefCnt; +nsIURI* PlaceHolderRequest::gURI; -NS_IMPL_ADDREF(PlaceholderChannel); -NS_IMPL_RELEASE(PlaceholderChannel); -NS_IMPL_QUERY_INTERFACE2(PlaceholderChannel, nsIRequest, nsIChannel); +NS_IMPL_ADDREF(PlaceHolderRequest); +NS_IMPL_RELEASE(PlaceHolderRequest); +NS_IMPL_QUERY_INTERFACE2(PlaceHolderRequest, nsIRequest, nsIChannel); nsresult -PlaceholderChannel::Create(nsIChannel** aResult) +PlaceHolderRequest::Create(nsIRequest** aResult) { - PlaceholderChannel* channel = new PlaceholderChannel(); - if (! channel) + PlaceHolderRequest* request = new PlaceHolderRequest(); + if (! request) return NS_ERROR_OUT_OF_MEMORY; - *aResult = channel; + *aResult = request; NS_ADDREF(*aResult); return NS_OK; } -PlaceholderChannel::PlaceholderChannel() +PlaceHolderRequest::PlaceHolderRequest() { NS_INIT_REFCNT(); @@ -418,7 +406,7 @@ PlaceholderChannel::PlaceholderChannel() } -PlaceholderChannel::~PlaceholderChannel() +PlaceHolderRequest::~PlaceHolderRequest() { if (--gRefCnt == 0) { NS_IF_RELEASE(gURI); @@ -549,11 +537,6 @@ nsXULDocument::~nsXULDocument() gNameSpaceManager = nsnull; } - if (gXULUtils) { - nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); - gXULUtils = nsnull; - } - if (gXULCache) { nsServiceManager::ReleaseService(kXULPrototypeCacheCID, gXULCache); gXULCache = nsnull; @@ -648,9 +631,6 @@ nsXULDocument::QueryInterface(REFNSIID iid, void** result) else if (iid.Equals(NS_GET_IID(nsIDOMEventCapturer))) { *result = NS_STATIC_CAST(nsIDOMEventCapturer*, this); } - else if (iid.Equals(NS_GET_IID(nsIStreamLoadableDocument))) { - *result = NS_STATIC_CAST(nsIStreamLoadableDocument*, this); - } else if (iid.Equals(NS_GET_IID(nsISupportsWeakReference))) { *result = NS_STATIC_CAST(nsISupportsWeakReference*, this); } @@ -774,8 +754,9 @@ nsXULDocument::StartDocumentLoad(const char* aCommand, // certain hacks (cough, the directory viewer) need to be able to // StartDocumentLoad() before the channel's content type has been // detected. + nsXPIDLCString contentType; - (void) aChannel->GetContentType(getter_Copies(contentType)); + aChannel->GetContentType(getter_Copies(contentType)); if (contentType && PL_strcmp(contentType, "text/cached-xul") == 0) { // Look in the chrome cache: we've got this puppy loaded @@ -1543,6 +1524,10 @@ nsXULDocument::EndLoad() rv = mCurrentPrototype->GetURI(getter_AddRefs(uri)); if (NS_FAILED(rv)) return rv; + // Remember if the XUL cache is on + PRBool useXULCache; + gXULCache->GetEnabled(&useXULCache); + NS_WITH_SERVICE(nsIChromeRegistry, reg, kChromeRegistryCID, &rv); if (NS_FAILED(rv)) return rv; nsCOMPtr sheets; @@ -1558,14 +1543,16 @@ nsXULDocument::EndLoad() if (sheet) { nsCOMPtr sheetURL; sheet->GetURL(*getter_AddRefs(sheetURL)); - if (gXULUtils->UseXULCache() && IsChromeURI(sheetURL)) - mCurrentPrototype->AddStyleSheetReference(sheetURL); + + if (useXULCache && IsChromeURI(sheetURL)) { + mCurrentPrototype->AddStyleSheetReference(sheetURL); + } AddStyleSheet(sheet); } } } - if (gXULUtils->UseXULCache() && IsChromeURI(mDocumentURL)) { + if (useXULCache && IsChromeURI(mDocumentURL)) { // If it's a 'chrome:' prototype document, then put it into // the prototype cache; other XUL documents will be reloaded // each time. @@ -2237,28 +2224,6 @@ nsXULDocument::SetCurrentPrototype(nsIXULPrototypeDocument* aDocument) return NS_OK; } -//---------------------------------------------------------------------- -// -// nsIStreamLoadableDocument interface -// - -NS_IMETHODIMP -nsXULDocument::LoadFromStream(nsIInputStream& xulStream, - nsISupports* aContainer, - const char* aCommand) -{ - nsresult rv; - - // XXXbe this is dead code, eliminate - nsCOMPtr parser; - rv = PrepareToLoad(aContainer, aCommand, nsnull, nsnull, getter_AddRefs(parser)); - if (NS_FAILED(rv)) return rv; - - parser->Parse(xulStream,NS_ConvertASCIItoUCS2(kXULTextContentType)); - return NS_OK; -} - - //---------------------------------------------------------------------- // // nsIDOMDocument interface @@ -2536,7 +2501,7 @@ nsXULDocument::Persist(nsIContent* aElement, PRInt32 aNameSpaceID, nsresult rv; nsCOMPtr element; - rv = gXULUtils->GetElementResource(aElement, getter_AddRefs(element)); + rv = nsXULContentUtils::GetElementResource(aElement, getter_AddRefs(element)); if (NS_FAILED(rv)) return rv; // No ID, so nothing to persist. @@ -3159,7 +3124,7 @@ nsXULDocument::AddElementToDocumentPre(nsIContent* aElement) nsAutoString value; rv = aElement->GetAttribute(kNameSpaceID_None, kCommandUpdaterAtom, value); if ((rv == NS_CONTENT_ATTR_HAS_VALUE) && value == NS_LITERAL_STRING("true")) { - rv = gXULUtils->SetCommandUpdater(this, aElement); + rv = nsXULContentUtils::SetCommandUpdater(this, aElement); if (NS_FAILED(rv)) return rv; } @@ -3952,11 +3917,6 @@ static const char kXULNameSpaceURI[] = XUL_NAMESPACE_URI; gNameSpaceManager->RegisterNameSpace(NS_ConvertASCIItoUCS2(kXULNameSpaceURI), kNameSpaceID_XUL); - rv = nsServiceManager::GetService(kXULContentUtilsCID, - NS_GET_IID(nsIXULContentUtils), - (nsISupports**) &gXULUtils); - if (NS_FAILED(rv)) return rv; - rv = nsServiceManager::GetService(kXULPrototypeCacheCID, NS_GET_IID(nsIXULPrototypeCache), (nsISupports**) &gXULCache); @@ -4683,7 +4643,7 @@ nsXULDocument::ApplyPersistentAttributes() if (NS_FAILED(rv)) return rv; nsAutoString id; - rv = gXULUtils->MakeElementID(this, NS_ConvertASCIItoUCS2(uri), id); + rv = nsXULContentUtils::MakeElementID(this, NS_ConvertASCIItoUCS2(uri), id); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to compute element ID"); if (NS_FAILED(rv)) return rv; @@ -4964,16 +4924,16 @@ nsXULDocument::PrepareToWalk() // Add a dummy channel to the load group as a placeholder for the document // load - rv = PlaceholderChannel::Create(getter_AddRefs(mPlaceholderChannel)); + rv = PlaceHolderRequest::Create(getter_AddRefs(mPlaceHolderRequest)); if (NS_FAILED(rv)) return rv; nsCOMPtr group = do_QueryReferent(mDocumentLoadGroup); if (group) { - rv = mPlaceholderChannel->SetLoadGroup(group); + nsCOMPtr channel = do_QueryInterface(mPlaceHolderRequest); + rv = channel->SetLoadGroup(group); if (NS_FAILED(rv)) return rv; - - rv = group->AddChannel(mPlaceholderChannel, nsnull); + rv = group->AddRequest(mPlaceHolderRequest, nsnull); if (NS_FAILED(rv)) return rv; } } @@ -5236,7 +5196,10 @@ nsXULDocument::ResumeWalk() rv = gXULCache->GetPrototype(uri, getter_AddRefs(mCurrentPrototype)); if (NS_FAILED(rv)) return rv; - if (gXULUtils->UseXULCache() && mCurrentPrototype) { + PRBool cache; + gXULCache->GetEnabled(&cache); + + if (cache && mCurrentPrototype) { // Found the overlay's prototype in the cache. rv = AddPrototypeSheets(); if (NS_FAILED(rv)) return rv; @@ -5308,10 +5271,10 @@ nsXULDocument::ResumeWalk() // docshell, and run the onload handlers, etc. nsCOMPtr group = do_QueryReferent(mDocumentLoadGroup); if (group) { - rv = group->RemoveChannel(mPlaceholderChannel, nsnull, NS_OK, nsnull); + rv = group->RemoveRequest(mPlaceHolderRequest, nsnull, NS_OK, nsnull); if (NS_FAILED(rv)) return rv; - mPlaceholderChannel = nsnull; + mPlaceHolderRequest = nsnull; } return rv; } @@ -5373,8 +5336,11 @@ nsXULDocument::OnStreamComplete(nsIStreamLoader* aLoader, { if (aLoader) { + nsCOMPtr request; nsCOMPtr channel; - aLoader->GetChannel(getter_AddRefs(channel)); + aLoader->GetRequest(getter_AddRefs(request)); + if (request) + channel = do_QueryInterface(request); if (channel) { nsCOMPtr uri; @@ -5730,8 +5696,9 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement) if (uriStr == NS_LITERAL_STRING("rdf:null")) continue; - rv = rdf_MakeAbsoluteURI(docurl, uriStr); - if (NS_FAILED(rv)) return rv; + // N.B. that `failure' (e.g., because it's an unknown + // protocol) leaves uriStr unaltered. + NS_MakeAbsoluteURI(uriStr, uriStr, docurl); if (docPrincipal.get() != gSystemPrincipal) { // Our document is untrusted, so check to see if we can @@ -6534,14 +6501,14 @@ nsXULDocument::CachedChromeStreamListener::~CachedChromeStreamListener() NS_IMPL_ISUPPORTS2(nsXULDocument::CachedChromeStreamListener, nsIStreamObserver, nsIStreamListener); NS_IMETHODIMP -nsXULDocument::CachedChromeStreamListener::OnStartRequest(nsIChannel* aChannel, nsISupports* acontext) +nsXULDocument::CachedChromeStreamListener::OnStartRequest(nsIRequest *request, nsISupports* acontext) { return NS_OK; } NS_IMETHODIMP -nsXULDocument::CachedChromeStreamListener::OnStopRequest(nsIChannel* aChannel, +nsXULDocument::CachedChromeStreamListener::OnStopRequest(nsIRequest *request, nsISupports* aContext, nsresult aStatus, const PRUnichar* aErrorMsg) @@ -6556,7 +6523,7 @@ nsXULDocument::CachedChromeStreamListener::OnStopRequest(nsIChannel* aChannel, NS_IMETHODIMP -nsXULDocument::CachedChromeStreamListener::OnDataAvailable(nsIChannel* aChannel, +nsXULDocument::CachedChromeStreamListener::OnDataAvailable(nsIRequest *request, nsISupports* aContext, nsIInputStream* aInStr, PRUint32 aSourceOffset, @@ -6586,14 +6553,14 @@ nsXULDocument::ParserObserver::~ParserObserver() NS_IMPL_ISUPPORTS1(nsXULDocument::ParserObserver, nsIStreamObserver); NS_IMETHODIMP -nsXULDocument::ParserObserver::OnStartRequest(nsIChannel* aChannel, +nsXULDocument::ParserObserver::OnStartRequest(nsIRequest *request, nsISupports* aContext) { return NS_OK; } NS_IMETHODIMP -nsXULDocument::ParserObserver::OnStopRequest(nsIChannel* aChannel, +nsXULDocument::ParserObserver::OnStopRequest(nsIRequest *request, nsISupports* aContext, nsresult aStatus, const PRUnichar* aErrorMsg) @@ -6605,6 +6572,10 @@ nsXULDocument::ParserObserver::OnStopRequest(nsIChannel* aChannel, // walk along. #define YELL_IF_MISSING_OVERLAY 1 #if defined(DEBUG) || defined(YELL_IF_MISSING_OVERLAY) + + nsCOMPtr aChannel = do_QueryInterface(request); + if (!aChannel) return NS_ERROR_FAILURE; + nsCOMPtr uri; aChannel->GetOriginalURI(getter_AddRefs(uri)); diff --git a/mozilla/content/xul/document/src/nsXULDocument.h b/mozilla/content/xul/document/src/nsXULDocument.h index 0b0f120fe65..7eaec2ec748 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.h +++ b/mozilla/content/xul/document/src/nsXULDocument.h @@ -54,7 +54,6 @@ #include "nsIScriptObjectOwner.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptSecurityManager.h" -#include "nsIStreamLoadableDocument.h" #include "nsISupportsArray.h" #include "nsIURI.h" #include "nsIWordBreakerFactory.h" @@ -93,7 +92,6 @@ struct PRLogModuleInfo; */ class nsXULDocument : public nsIDocument, public nsIXULDocument, - public nsIStreamLoadableDocument, public nsIDOMXULDocument, public nsIDOMDocumentEvent, public nsIDOMDocumentView, @@ -119,7 +117,7 @@ public: NS_IMETHOD GetContentType(nsAWritableString& aContentType) const; NS_IMETHOD StartDocumentLoad(const char* aCommand, - nsIChannel* aChannel, + nsIChannel *channel, nsILoadGroup* aLoadGroup, nsISupports* aContainer, nsIStreamListener **aDocListener, @@ -302,11 +300,6 @@ public: NS_IMETHOD AddSubtreeToDocument(nsIContent* aElement); NS_IMETHOD RemoveSubtreeFromDocument(nsIContent* aElement); - // nsIStreamLoadableDocument interface - NS_IMETHOD LoadFromStream(nsIInputStream& xulStream, - nsISupports* aContainer, - const char* aCommand ); - // nsIDOMEventCapturer interface NS_IMETHOD CaptureEvent(const nsAReadableString& aType); NS_IMETHOD ReleaseEvent(const nsAReadableString& aType); @@ -644,7 +637,7 @@ protected: * A "dummy" channel that is used as a placeholder to signal document load * completion. */ - nsCOMPtr mPlaceholderChannel; + nsCOMPtr mPlaceHolderRequest; /** * Create a XUL template builder on the specified node if a 'datasources' diff --git a/mozilla/content/xul/document/src/nsXULPrototypeCache.cpp b/mozilla/content/xul/document/src/nsXULPrototypeCache.cpp index f4aa5ed07ff..cee367a0b90 100644 --- a/mozilla/content/xul/document/src/nsXULPrototypeCache.cpp +++ b/mozilla/content/xul/document/src/nsXULPrototypeCache.cpp @@ -39,6 +39,7 @@ #include "plstr.h" #include "nsIDocument.h" #include "nsIXBLDocumentInfo.h" +#include "nsIPref.h" class nsXULPrototypeCache : public nsIXULPrototypeCache { @@ -61,6 +62,8 @@ public: NS_IMETHOD Flush(); + NS_IMETHOD GetEnabled(PRBool* aIsEnabled); + protected: friend NS_IMETHODIMP NS_NewXULPrototypeCache(nsISupports* aOuter, REFNSIID aIID, void** aResult); @@ -98,6 +101,32 @@ protected: }; }; +static PRBool gDisableXULCache = PR_FALSE; // enabled by default +static const char kDisableXULCachePref[] = "nglayout.debug.disable_xul_cache"; + +//---------------------------------------------------------------------- + +static int +DisableXULCacheChangedCallback(const char* aPref, void* aClosure) +{ + nsresult rv; + + nsCOMPtr prefs = do_GetService(NS_PREF_CONTRACTID, &rv); + if (prefs) + prefs->GetBoolPref(kDisableXULCachePref, &gDisableXULCache); + + // Flush the cache, regardless + static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); + nsCOMPtr cache = + do_GetService(kXULPrototypeCacheCID, &rv); + + if (cache) + cache->Flush(); + + return 0; +} + +//---------------------------------------------------------------------- nsXULPrototypeCache::nsXULPrototypeCache() @@ -127,6 +156,13 @@ NS_NewXULPrototypeCache(nsISupports* aOuter, REFNSIID aIID, void** aResult) nsresult rv; + NS_WITH_SERVICE(nsIPref, prefs, NS_PREF_CONTRACTID, &rv); + if (NS_SUCCEEDED(rv)) { + // XXX Ignore return values. + prefs->GetBoolPref(kDisableXULCachePref, &gDisableXULCache); + prefs->RegisterCallback(kDisableXULCachePref, DisableXULCacheChangedCallback, nsnull); + } + NS_ADDREF(result); rv = result->QueryInterface(aIID, aResult); NS_RELEASE(result); @@ -244,3 +280,10 @@ nsXULPrototypeCache::Flush() return NS_OK; } +NS_IMETHODIMP +nsXULPrototypeCache::GetEnabled(PRBool* aIsEnabled) +{ + *aIsEnabled = !gDisableXULCache; + return NS_OK; +} + diff --git a/mozilla/content/xul/makefile.win b/mozilla/content/xul/makefile.win index c8be6610aad..171ff2ae9ec 100644 --- a/mozilla/content/xul/makefile.win +++ b/mozilla/content/xul/makefile.win @@ -21,6 +21,6 @@ DEPTH=..\.. -DIRS = content +DIRS = content document templates include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/rdf/content/public/idl/Makefile.in b/mozilla/content/xul/templates/Makefile.in similarity index 53% rename from mozilla/rdf/content/public/idl/Makefile.in rename to mozilla/content/xul/templates/Makefile.in index 8d7dc146fa0..8e79579887a 100644 --- a/mozilla/rdf/content/public/idl/Makefile.in +++ b/mozilla/content/xul/templates/Makefile.in @@ -19,44 +19,14 @@ # Contributor(s): # -DEPTH = ../../../.. +DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = rdf - -GLOBALIDLSRCS = \ - $(NULL) - -IDLSRCS = \ - XULCommandDispatcher.idl \ - XULDocument.idl \ - XULElement.idl \ - XULTreeElement.idl \ - $(NULL) - -IDLSRCS := $(addprefix $(srcdir)/, $(IDLSRCS)) -GLOBALIDLSRCS := $(addprefix $(srcdir)/, $(GLOBALIDLSRCS)) +DIRS = public src include $(topsrcdir)/config/rules.mk -GARBAGE += genx genjs - -genx genjs: - -mkdir $@ - -export:: genx genjs $(IDLSRCS) - @echo +++ make: generating xpcom headers - $(DIST)/bin/idlc -d genx -x $(IDLSRCS) - $(DIST)/bin/idlc -g -d genx -x $(GLOBALIDLSRCS) - @echo +++ make: generating JavaScript stubs - $(DIST)/bin/idlc -d genjs -j $(IDLSRCS) - $(DIST)/bin/idlc -g -d genjs -j $(GLOBALIDLSRCS) - -install:: - $(NSINSTALL) -m 644 genx/nsIDOM*.h $(topsrcdir)/rdf/content/public - $(NSINSTALL) -m 644 genjs/nsJS*.cpp $(topsrcdir)/rdf/content/src - diff --git a/mozilla/content/xul/templates/public/MANIFEST b/mozilla/content/xul/templates/public/MANIFEST index fba84559208..ffa6f545b16 100644 --- a/mozilla/content/xul/templates/public/MANIFEST +++ b/mozilla/content/xul/templates/public/MANIFEST @@ -1,5 +1,3 @@ -nsIXULPopupListener.h -nsIXULContent.h - +nsIRDFContentModelBuilder.h diff --git a/mozilla/content/xul/templates/public/MANIFEST_IDL b/mozilla/content/xul/templates/public/MANIFEST_IDL new file mode 100644 index 00000000000..14e6445dbe2 --- /dev/null +++ b/mozilla/content/xul/templates/public/MANIFEST_IDL @@ -0,0 +1,2 @@ +nsIXULSortService.idl +nsIXULTemplateBuilder.idl diff --git a/mozilla/content/xul/templates/public/Makefile.in b/mozilla/content/xul/templates/public/Makefile.in index ffe29dd5898..a9e0500950d 100644 --- a/mozilla/content/xul/templates/public/Makefile.in +++ b/mozilla/content/xul/templates/public/Makefile.in @@ -26,11 +26,15 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = rdf +MODULE = xultmpl + +XPIDLSRCS = \ + nsIXULSortService.idl \ + nsIXULTemplateBuilder.idl \ + $(NULL) EXPORTS = \ - nsIXULPopupListener.h \ - nsIXULContent.h \ + nsIRDFContentModelBuilder.h \ $(NULL) EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) diff --git a/mozilla/content/xul/templates/public/makefile.win b/mozilla/content/xul/templates/public/makefile.win index c848b264087..8a0961b3a76 100644 --- a/mozilla/content/xul/templates/public/makefile.win +++ b/mozilla/content/xul/templates/public/makefile.win @@ -20,7 +20,7 @@ # Contributor(s): -MODULE=xul +MODULE=xultmpl DEPTH=..\..\..\.. diff --git a/mozilla/content/xul/templates/public/nsIRDFContentModelBuilder.h b/mozilla/content/xul/templates/public/nsIRDFContentModelBuilder.h index 3bb62be6aec..30a86109e13 100644 --- a/mozilla/content/xul/templates/public/nsIRDFContentModelBuilder.h +++ b/mozilla/content/xul/templates/public/nsIRDFContentModelBuilder.h @@ -89,6 +89,5 @@ public: }; extern nsresult NS_NewXULTemplateBuilder(nsIRDFContentModelBuilder** aResult); -extern nsresult NS_NewRDFXULBuilder(nsIRDFContentModelBuilder** aResult); #endif // nsIRDFContentModelBuilder_h__ diff --git a/mozilla/content/xul/templates/src/Makefile.in b/mozilla/content/xul/templates/src/Makefile.in index a689333af3c..69ac2e96fb6 100644 --- a/mozilla/content/xul/templates/src/Makefile.in +++ b/mozilla/content/xul/templates/src/Makefile.in @@ -27,10 +27,15 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = layout -LIBRARY_NAME = gkxulcon_s +LIBRARY_NAME = gkconxultmpl_s REQUIRES = xpcom -CPPSRCS = nsXULAtoms.cpp +CPPSRCS = \ + nsRuleNetwork.cpp \ + nsXULContentUtils.cpp \ + nsXULSortService.cpp \ + nsXULTemplateBuilder.cpp \ + $(NULL) # we don't want the shared lib, but we want to force the creation of a static lib. override NO_SHARED_LIB=1 @@ -40,5 +45,7 @@ include $(topsrcdir)/config/rules.mk DEFINES += -D_IMPL_NS_HTML -INCLUDES += -I$(srcdir)/../../../base/src +INCLUDES += -I$(srcdir)/../../../base/src \ + -I$(srcdir)/../../content/src \ + $(NULL) diff --git a/mozilla/content/xul/templates/src/nsXULContentUtils.cpp b/mozilla/content/xul/templates/src/nsXULContentUtils.cpp index bf71b532802..50f754e5310 100644 --- a/mozilla/content/xul/templates/src/nsXULContentUtils.cpp +++ b/mozilla/content/xul/templates/src/nsXULContentUtils.cpp @@ -47,26 +47,15 @@ #include "nsIDOMElement.h" #include "nsIDOMXULCommandDispatcher.h" #include "nsIDOMXULDocument.h" -#include "nsIDOMMouseListener.h" -#include "nsIDOMMouseMotionListener.h" -#include "nsIDOMLoadListener.h" -#include "nsIDOMFocusListener.h" -#include "nsIDOMPaintListener.h" -#include "nsIDOMKeyListener.h" -#include "nsIDOMFormListener.h" -#include "nsIDOMMenuListener.h" -#include "nsIDOMScrollListener.h" -#include "nsIDOMDragListener.h" #include "nsIRDFNode.h" #include "nsINameSpace.h" #include "nsINameSpaceManager.h" -#include "nsIPref.h" #include "nsIRDFService.h" #include "nsIServiceManager.h" #include "nsITextContent.h" #include "nsIURL.h" #include "nsIXMLContent.h" -#include "nsIXULContentUtils.h" +#include "nsXULContentUtils.h" #include "nsIXULPrototypeCache.h" #include "nsLayoutCID.h" #include "nsNetUtil.h" @@ -77,7 +66,6 @@ #include "prlog.h" #include "prtime.h" #include "rdf.h" -#include "rdfutil.h" #include "nsIDateTimeFormat.h" #include "nsDateTimeFormatCID.h" @@ -89,172 +77,18 @@ static NS_DEFINE_CID(kDateTimeFormatIID, NS_IDATETIMEFORMAT_IID); static NS_DEFINE_CID(kNameSpaceManagerCID, NS_NAMESPACEMANAGER_CID); static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); -static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); //------------------------------------------------------------------------ -class nsXULContentUtils : public nsIXULContentUtils -{ -protected: - nsXULContentUtils(); - nsresult Init(); - virtual ~nsXULContentUtils(); - - friend NS_IMETHODIMP - NS_NewXULContentUtils(nsISupports* aOuter, const nsIID& aIID, void** aResult); - - static nsrefcnt gRefCnt; - static nsIRDFService* gRDF; - static nsINameSpaceManager* gNameSpaceManager; - static nsIDateTimeFormat* gFormat; - - struct EventHandlerMapEntry { - const char* mAttributeName; - nsIAtom* mAttributeAtom; - const nsIID* mHandlerIID; - }; - - static EventHandlerMapEntry kEventHandlerMap[]; - - static PRBool gDisableXULCache; - - static int PR_CALLBACK - DisableXULCacheChangedCallback(const char* aPrefName, void* aClosure); - -public: - // nsISupports methods - NS_DECL_ISUPPORTS - - // nsIXULContentUtils methods - NS_IMETHOD - AttachTextNode(nsIContent* parent, nsIRDFNode* value); - - NS_IMETHOD - FindChildByTag(nsIContent *aElement, - PRInt32 aNameSpaceID, - nsIAtom* aTag, - nsIContent **aResult); - - NS_IMETHOD - FindChildByResource(nsIContent* aElement, - nsIRDFResource* aResource, - nsIContent** aResult); - - NS_IMETHOD - GetElementResource(nsIContent* aElement, nsIRDFResource** aResult); - - NS_IMETHOD - GetElementRefResource(nsIContent* aElement, nsIRDFResource** aResult); - - NS_IMETHOD - GetTextForNode(nsIRDFNode* aNode, nsAWritableString& aResult); - - NS_IMETHOD - GetElementLogString(nsIContent* aElement, nsAWritableString& aResult); - - NS_IMETHOD - GetAttributeLogString(nsIContent* aElement, PRInt32 aNameSpaceID, nsIAtom* aTag, nsAWritableString& aResult); - - NS_IMETHOD - MakeElementURI(nsIDocument* aDocument, const nsAReadableString& aElementID, nsCString& aURI); - - NS_IMETHOD - MakeElementResource(nsIDocument* aDocument, const nsAReadableString& aElementID, nsIRDFResource** aResult); - - NS_IMETHOD - MakeElementID(nsIDocument* aDocument, const nsAReadableString& aURI, nsAWritableString& aElementID); - - NS_IMETHOD_(PRBool) - IsContainedBy(nsIContent* aElement, nsIContent* aContainer); - - NS_IMETHOD - GetResource(PRInt32 aNameSpaceID, nsIAtom* aAttribute, nsIRDFResource** aResult); - - NS_IMETHOD - GetResource(PRInt32 aNameSpaceID, const nsAReadableString& aAttribute, nsIRDFResource** aResult); - - NS_IMETHOD - SetCommandUpdater(nsIDocument* aDocument, nsIContent* aElement); - - NS_IMETHOD - GetEventHandlerIID(nsIAtom* aName, nsIID* aIID, PRBool* aFound); - - NS_IMETHOD_(PRBool) - UseXULCache(); -}; - nsrefcnt nsXULContentUtils::gRefCnt; nsIRDFService* nsXULContentUtils::gRDF; nsINameSpaceManager* nsXULContentUtils::gNameSpaceManager; nsIDateTimeFormat* nsXULContentUtils::gFormat; -nsXULContentUtils::EventHandlerMapEntry -nsXULContentUtils::kEventHandlerMap[] = { - { "onclick", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, - { "ondblclick", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, - { "onmousedown", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, - { "onmouseup", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, - { "onmouseover", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, - { "onmouseout", nsnull, &NS_GET_IID(nsIDOMMouseListener) }, - - { "onmousemove", nsnull, &NS_GET_IID(nsIDOMMouseMotionListener) }, - - { "onkeydown", nsnull, &NS_GET_IID(nsIDOMKeyListener) }, - { "onkeyup", nsnull, &NS_GET_IID(nsIDOMKeyListener) }, - { "onkeypress", nsnull, &NS_GET_IID(nsIDOMKeyListener) }, - - { "onload", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, - { "onunload", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, - { "onabort", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, - { "onerror", nsnull, &NS_GET_IID(nsIDOMLoadListener) }, - - { "oncreate", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, - { "onclose", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, - { "ondestroy", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, - { "oncommand", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, - { "onbroadcast", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, - { "oncommandupdate", nsnull, &NS_GET_IID(nsIDOMMenuListener) }, - - { "onoverflow", nsnull, &NS_GET_IID(nsIDOMScrollListener) }, - { "onunderflow", nsnull, &NS_GET_IID(nsIDOMScrollListener) }, - { "onoverflowchanged",nsnull, &NS_GET_IID(nsIDOMScrollListener) }, - - { "onfocus", nsnull, &NS_GET_IID(nsIDOMFocusListener) }, - { "onblur", nsnull, &NS_GET_IID(nsIDOMFocusListener) }, - - { "onsubmit", nsnull, &NS_GET_IID(nsIDOMFormListener) }, - { "onreset", nsnull, &NS_GET_IID(nsIDOMFormListener) }, - { "onchange", nsnull, &NS_GET_IID(nsIDOMFormListener) }, - { "onselect", nsnull, &NS_GET_IID(nsIDOMFormListener) }, - { "oninput", nsnull, &NS_GET_IID(nsIDOMFormListener) }, - - { "onpaint", nsnull, &NS_GET_IID(nsIDOMPaintListener) }, - - { "ondragenter", nsnull, &NS_GET_IID(nsIDOMDragListener) }, - { "ondragover", nsnull, &NS_GET_IID(nsIDOMDragListener) }, - { "ondragexit", nsnull, &NS_GET_IID(nsIDOMDragListener) }, - { "ondragdrop", nsnull, &NS_GET_IID(nsIDOMDragListener) }, - { "ondraggesture", nsnull, &NS_GET_IID(nsIDOMDragListener) }, - - { nsnull, nsnull, nsnull } -}; - - -// Enabled by default. Must be over-ridden to disable -PRBool nsXULContentUtils::gDisableXULCache = PR_FALSE; - - -static const char kDisableXULCachePref[] = "nglayout.debug.disable_xul_cache"; - //------------------------------------------------------------------------ // Constructors n' stuff // -nsXULContentUtils::nsXULContentUtils() -{ - NS_INIT_REFCNT(); -} - nsresult nsXULContentUtils::Init() { @@ -277,33 +111,15 @@ nsXULContentUtils::Init() (void**) &gFormat); if (NS_FAILED(rv)) return rv; - - EventHandlerMapEntry* entry = kEventHandlerMap; - while (entry->mAttributeName) { - entry->mAttributeAtom = NS_NewAtom(entry->mAttributeName); - ++entry; - } - - NS_WITH_SERVICE(nsIPref, prefs, NS_PREF_CONTRACTID, &rv); - if (NS_SUCCEEDED(rv)) { - // XXX Ignore return values. - prefs->GetBoolPref(kDisableXULCachePref, &gDisableXULCache); - prefs->RegisterCallback(kDisableXULCachePref, DisableXULCacheChangedCallback, nsnull); - } - - nsXULAtoms::AddRef(); } - return NS_OK; + + return gRefCnt; } -nsXULContentUtils::~nsXULContentUtils() +nsresult +nsXULContentUtils::Finish() { -#ifdef DEBUG_REFS - --gInstanceCount; - fprintf(stdout, "%d - RDF: nsXULContentUtils\n", gInstanceCount); -#endif - if (--gRefCnt == 0) { if (gRDF) { nsServiceManager::ReleaseService(kRDFServiceCID, gRDF); @@ -312,57 +128,16 @@ nsXULContentUtils::~nsXULContentUtils() NS_IF_RELEASE(gNameSpaceManager); NS_IF_RELEASE(gFormat); - - EventHandlerMapEntry* entry = kEventHandlerMap; - while (entry->mAttributeName) { - NS_IF_RELEASE(entry->mAttributeAtom); - ++entry; - } - - nsXULAtoms::Release(); - } -} - -NS_IMETHODIMP -NS_NewXULContentUtils(nsISupports* aOuter, const nsIID& aIID, void** aResult) -{ - NS_PRECONDITION(aResult != nsnull, "null ptr"); - if (! aResult) - return NS_ERROR_NULL_POINTER; - - NS_PRECONDITION(aOuter == nsnull, "no aggregation"); - if (aOuter) - return NS_ERROR_NO_AGGREGATION; - - nsXULContentUtils* result = new nsXULContentUtils(); - if (! result) - return NS_ERROR_OUT_OF_MEMORY; - - nsresult rv; - rv = result->Init(); - if (NS_FAILED(rv)) { - delete result; - return rv; } - NS_ADDREF(result); - rv = result->QueryInterface(aIID, aResult); - NS_RELEASE(result); - - return rv; + return gRefCnt; } - -//------------------------------------------------------------------------ -// nsISupports methods - -NS_IMPL_ISUPPORTS1(nsXULContentUtils, nsIXULContentUtils) - //------------------------------------------------------------------------ // nsIXULContentUtils methods -NS_IMETHODIMP +nsresult nsXULContentUtils::AttachTextNode(nsIContent* parent, nsIRDFNode* value) { nsresult rv; @@ -390,7 +165,7 @@ nsXULContentUtils::AttachTextNode(nsIContent* parent, nsIRDFNode* value) } -NS_IMETHODIMP +nsresult nsXULContentUtils::FindChildByTag(nsIContent* aElement, PRInt32 aNameSpaceID, nsIAtom* aTag, @@ -431,43 +206,7 @@ nsXULContentUtils::FindChildByTag(nsIContent* aElement, } -NS_IMETHODIMP -nsXULContentUtils::FindChildByResource(nsIContent* aElement, - nsIRDFResource* aResource, - nsIContent** aResult) -{ - nsresult rv; - - PRInt32 count; - if (NS_FAILED(rv = aElement->ChildCount(count))) - return rv; - - for (PRInt32 i = 0; i < count; ++i) { - nsCOMPtr kid; - if (NS_FAILED(rv = aElement->ChildAt(i, *getter_AddRefs(kid)))) - return rv; // XXX fatal - - // Now get the resource ID from the RDF:ID attribute. We do it - // via the content model, because you're never sure who - // might've added this stuff in... - nsCOMPtr resource; - rv = GetElementResource(kid, getter_AddRefs(resource)); - if (NS_FAILED(rv)) continue; - - if (resource.get() != aResource) - continue; // not the resource we want - - // Fount it! - *aResult = kid; - NS_ADDREF(*aResult); - return NS_OK; - } - - return NS_RDF_NO_VALUE; // not found -} - - -NS_IMETHODIMP +nsresult nsXULContentUtils::GetElementResource(nsIContent* aElement, nsIRDFResource** aResult) { // Perform a reverse mapping from an element in the content model @@ -501,7 +240,7 @@ nsXULContentUtils::GetElementResource(nsIContent* aElement, nsIRDFResource** aRe } -NS_IMETHODIMP +nsresult nsXULContentUtils::GetElementRefResource(nsIContent* aElement, nsIRDFResource** aResult) { // Perform a reverse mapping from an element in the content model @@ -526,12 +265,11 @@ nsXULContentUtils::GetElementRefResource(nsIContent* aElement, nsIRDFResource** if (! url) return NS_ERROR_UNEXPECTED; - nsCAutoString uriStr; - uriStr.Assign(NS_ConvertUCS2toUTF8(uri)); - rv = rdf_MakeAbsoluteURI(url, uriStr); - if (NS_FAILED(rv)) return rv; + // N.B. that if this fails (e.g., because necko doesn't grok + // the protocol), uriStr will be untouched. + NS_MakeAbsoluteURI(uri, uri, url); - rv = gRDF->GetResource(uriStr.GetBuffer(), aResult); + rv = gRDF->GetUnicodeResource(uri.GetUnicode(), aResult); } else { rv = GetElementResource(aElement, aResult); @@ -546,7 +284,7 @@ nsXULContentUtils::GetElementRefResource(nsIContent* aElement, nsIRDFResource** Note: this routine is similiar, yet distinctly different from, nsBookmarksService::GetTextForNode */ -NS_IMETHODIMP +nsresult nsXULContentUtils::GetTextForNode(nsIRDFNode* aNode, nsAWritableString& aResult) { if (! aNode) { @@ -613,7 +351,7 @@ nsXULContentUtils::GetTextForNode(nsIRDFNode* aNode, nsAWritableString& aResult) return NS_ERROR_UNEXPECTED; } -NS_IMETHODIMP +nsresult nsXULContentUtils::GetElementLogString(nsIContent* aElement, nsAWritableString& aResult) { nsresult rv; @@ -690,7 +428,7 @@ nsXULContentUtils::GetElementLogString(nsIContent* aElement, nsAWritableString& } -NS_IMETHODIMP +nsresult nsXULContentUtils::GetAttributeLogString(nsIContent* aElement, PRInt32 aNameSpaceID, nsIAtom* aTag, nsAWritableString& aResult) { nsresult rv; @@ -734,7 +472,7 @@ nsXULContentUtils::GetAttributeLogString(nsIContent* aElement, PRInt32 aNameSpac } -NS_IMETHODIMP +nsresult nsXULContentUtils::MakeElementURI(nsIDocument* aDocument, const nsAReadableString& aElementID, nsCString& aURI) { // Convert an element's ID to a URI that can be used to refer to @@ -785,7 +523,7 @@ nsXULContentUtils::MakeElementURI(nsIDocument* aDocument, const nsAReadableStrin } -NS_IMETHODIMP +nsresult nsXULContentUtils::MakeElementResource(nsIDocument* aDocument, const nsAReadableString& aID, nsIRDFResource** aResult) { nsresult rv; @@ -804,7 +542,7 @@ nsXULContentUtils::MakeElementResource(nsIDocument* aDocument, const nsAReadable -NS_IMETHODIMP +nsresult nsXULContentUtils::MakeElementID(nsIDocument* aDocument, const nsAReadableString& aURI, nsAWritableString& aElementID) { // Convert a URI into an element ID that can be accessed from the @@ -838,7 +576,7 @@ nsXULContentUtils::MakeElementID(nsIDocument* aDocument, const nsAReadableString return NS_OK; } -NS_IMETHODIMP_(PRBool) +PRBool nsXULContentUtils::IsContainedBy(nsIContent* aElement, nsIContent* aContainer) { nsCOMPtr element( dont_QueryInterface(aElement) ); @@ -859,7 +597,7 @@ nsXULContentUtils::IsContainedBy(nsIContent* aElement, nsIContent* aContainer) } -NS_IMETHODIMP +nsresult nsXULContentUtils::GetResource(PRInt32 aNameSpaceID, nsIAtom* aAttribute, nsIRDFResource** aResult) { // construct a fully-qualified URI from the namespace/tag pair. @@ -877,7 +615,7 @@ nsXULContentUtils::GetResource(PRInt32 aNameSpaceID, nsIAtom* aAttribute, nsIRDF } -NS_IMETHODIMP +nsresult nsXULContentUtils::GetResource(PRInt32 aNameSpaceID, const nsAReadableString& aAttribute, nsIRDFResource** aResult) { // construct a fully-qualified URI from the namespace/tag pair. @@ -910,7 +648,7 @@ nsXULContentUtils::GetResource(PRInt32 aNameSpaceID, const nsAReadableString& aA } -NS_IMETHODIMP +nsresult nsXULContentUtils::SetCommandUpdater(nsIDocument* aDocument, nsIContent* aElement) { // Deal with setting up a 'commandupdater'. Pulls the 'events' and @@ -963,49 +701,4 @@ nsXULContentUtils::SetCommandUpdater(nsIDocument* aDocument, nsIContent* aElemen return NS_OK; } -NS_IMETHODIMP -nsXULContentUtils::GetEventHandlerIID(nsIAtom* aName, nsIID* aIID, PRBool* aFound) -{ - *aFound = PR_FALSE; - EventHandlerMapEntry* entry = kEventHandlerMap; - while (entry->mAttributeAtom) { - if (entry->mAttributeAtom == aName) { - *aIID = *entry->mHandlerIID; - *aFound = PR_TRUE; - break; - } - ++entry; - } - - return NS_OK; -} - - -NS_IMETHODIMP_(PRBool) -nsXULContentUtils::UseXULCache() -{ - return !gDisableXULCache; -} - - -//---------------------------------------------------------------------- - -int -nsXULContentUtils::DisableXULCacheChangedCallback(const char* aPref, void* aClosure) -{ - nsresult rv; - - NS_WITH_SERVICE(nsIPref, prefs, NS_PREF_CONTRACTID, &rv); - if (NS_SUCCEEDED(rv)) { - prefs->GetBoolPref(kDisableXULCachePref, &gDisableXULCache); - } - - // Flush the cache, regardless - NS_WITH_SERVICE(nsIXULPrototypeCache, cache, kXULPrototypeCacheCID, &rv); - if (NS_SUCCEEDED(rv)) { - cache->Flush(); - } - - return 0; -} diff --git a/mozilla/content/xul/templates/src/nsXULSortService.cpp b/mozilla/content/xul/templates/src/nsXULSortService.cpp index 1ae50128f5b..b15c171f5f7 100644 --- a/mozilla/content/xul/templates/src/nsXULSortService.cpp +++ b/mozilla/content/xul/templates/src/nsXULSortService.cpp @@ -61,13 +61,12 @@ #include "nsIServiceManager.h" #include "nsISupportsArray.h" #include "nsIURL.h" -#include "nsLayoutCID.h" +#include "nsContentCID.h" #include "nsRDFCID.h" -#include "nsIXULContentUtils.h" +#include "nsXULContentUtils.h" #include "nsString.h" #include "nsXPIDLString.h" #include "rdf.h" -#include "rdfutil.h" #include "nsRDFSort.h" #include "nsVoidArray.h" #include "nsQuickSort.h" @@ -130,7 +129,6 @@ static NS_DEFINE_IID(kIRDFServiceIID, NS_IRDFSERVICE_IID); static NS_DEFINE_IID(kIRDFResourceIID, NS_IRDFRESOURCE_IID); static NS_DEFINE_IID(kIRDFLiteralIID, NS_IRDFLITERAL_IID); -static NS_DEFINE_CID(kXULContentUtilsCID, NS_XULCONTENTUTILS_CID); static NS_DEFINE_IID(kIDomXulElementIID, NS_IDOMXULELEMENT_IID); static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID); @@ -246,7 +244,6 @@ private: static PRInt32 kNameSpaceID_RDF; static nsIRDFService *gRDFService; - static nsIXULContentUtils *gXULUtils; PRBool IsTreeElement(nsIContent *element); nsresult FindTreeElement(nsIContent *root, nsIContent* aElement,nsIContent** aTreeElement); @@ -289,8 +286,6 @@ nsICollation *XULSortServiceImpl::collationService = nsnull; nsIRDFService *XULSortServiceImpl::gRDFService = nsnull; nsrefcnt XULSortServiceImpl::gRefCnt = 0; -nsIXULContentUtils *XULSortServiceImpl::gXULUtils = nsnull; - nsIAtom* XULSortServiceImpl::kTemplateAtom; nsIAtom* XULSortServiceImpl::kStaticHintAtom; nsIAtom* XULSortServiceImpl::kStaticsSortLastHintAtom; @@ -367,11 +362,6 @@ XULSortServiceImpl::XULSortServiceImpl(void) NS_ERROR("couldn't create rdf service"); } - rv = nsServiceManager::GetService(kXULContentUtilsCID, - NS_GET_IID(nsIXULContentUtils), - (nsISupports**) &gXULUtils); - NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get XUL content utils"); - // get a locale service nsCOMPtr localeService = do_GetService(NS_LOCALESERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) @@ -483,12 +473,6 @@ XULSortServiceImpl::~XULSortServiceImpl(void) nsServiceManager::ReleaseService(kRDFServiceCID, gRDFService); gRDFService = nsnull; } - - if (gXULUtils) - { - nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); - gXULUtils = nsnull; - } } } @@ -1815,8 +1799,8 @@ XULSortServiceImpl::SortTreeChildren(nsIContent *container, sortPtr sortInfo, PR { --currentElement; - nsCOMPtr resource; - gXULUtils->GetElementResource(child, getter_AddRefs(resource)); + nsCOMPtr resource; + nsXULContentUtils::GetElementResource(child, getter_AddRefs(resource)); contentSortInfo *contentInfo = CreateContentSortInfo(child, resource); if(contentInfo) contentSortInfoArray[currentElement] = contentInfo; @@ -2146,7 +2130,7 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort if (id.Length() > 0) { nsCOMPtr containerRes; - rv = gXULUtils->MakeElementResource(doc, id, getter_AddRefs(containerRes)); + rv = nsXULContentUtils::MakeElementResource(doc, id, getter_AddRefs(containerRes)); if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp index f3348a243d5..1565ae075ef 100644 --- a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp +++ b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp @@ -90,10 +90,10 @@ #include "nsIXPConnect.h" #include "nsIXULSortService.h" #include "nsINodeInfo.h" -#include "nsLayoutCID.h" +#include "nsContentCID.h" #include "nsRDFCID.h" #include "nsIXULContent.h" -#include "nsIXULContentUtils.h" +#include "nsXULContentUtils.h" #include "nsRDFSort.h" #include "nsRuleNetwork.h" #include "nsString.h" @@ -106,7 +106,6 @@ #include "jscntxt.h" #include "prlog.h" #include "rdf.h" -#include "rdfutil.h" #include "nsIFormControl.h" #include "nsIDOMHTMLFormElement.h" #include "pldhash.h" @@ -129,7 +128,6 @@ static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID); static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); static NS_DEFINE_CID(kXMLElementFactoryCID, NS_XML_ELEMENT_FACTORY_CID); -static NS_DEFINE_CID(kXULContentUtilsCID, NS_XULCONTENTUTILS_CID); static NS_DEFINE_CID(kXULSortServiceCID, NS_XULSORTSERVICE_CID); //---------------------------------------------------------------------- @@ -2740,6 +2738,9 @@ public: nsresult SetContainerAttrs(nsIContent *aElement, const Match* aMatch); + static nsresult + NewRDFContainer(nsIRDFContainer** aResult); + #ifdef PR_LOGGING nsresult Log(const char* aOperation, @@ -2789,7 +2790,6 @@ protected: static nsINameSpaceManager* gNameSpaceManager; static nsIElementFactory* gHTMLElementFactory; static nsIElementFactory* gXMLElementFactory; - static nsIXULContentUtils* gXULUtils; static PRInt32 kNameSpaceID_RDF; static PRInt32 kNameSpaceID_XUL; @@ -2985,7 +2985,6 @@ nsIRDFService* nsXULTemplateBuilder::gRDFService; nsINameSpaceManager* nsXULTemplateBuilder::gNameSpaceManager; nsIElementFactory* nsXULTemplateBuilder::gHTMLElementFactory; nsIElementFactory* nsXULTemplateBuilder::gXMLElementFactory; -nsIXULContentUtils* nsXULTemplateBuilder::gXULUtils; nsIRDFResource* nsXULTemplateBuilder::kNC_Title; nsIRDFResource* nsXULTemplateBuilder::kNC_child; @@ -3427,7 +3426,7 @@ RDFContainerMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiatio if (NS_FAILED(rv)) return rv; if (isRDFContainer) { - rv = NS_NewRDFContainer(getter_AddRefs(rdfcontainer)); + rv = nsXULTemplateBuilder::NewRDFContainer(getter_AddRefs(rdfcontainer)); if (NS_FAILED(rv)) return rv; rv = rdfcontainer->Init(mDataSource, VALUE_TO_IRDFRESOURCE(containerValue)); @@ -3903,7 +3902,7 @@ RDFContainerInstanceTestNode::FilterInstantiations(InstantiationSet& aInstantiat if (isRDFContainer) { // It's an RDF container. Use the container utilities // to deduce what's in it. - rv = NS_NewRDFContainer(getter_AddRefs(rdfcontainer)); + rv = nsXULTemplateBuilder::NewRDFContainer(getter_AddRefs(rdfcontainer)); if (NS_FAILED(rv)) return rv; rv = rdfcontainer->Init(mDataSource, VALUE_TO_IRDFRESOURCE(value)); @@ -4191,13 +4190,6 @@ nsXULTemplateBuilder::~nsXULTemplateBuilder(void) NS_RELEASE(gNameSpaceManager); NS_IF_RELEASE(gHTMLElementFactory); NS_IF_RELEASE(gXMLElementFactory); - - if (gXULUtils) { - nsServiceManager::ReleaseService(kXULContentUtilsCID, gXULUtils); - gXULUtils = nsnull; - } - - nsXULAtoms::Release(); } } @@ -4206,8 +4198,6 @@ nsresult nsXULTemplateBuilder::Init() { if (gRefCnt++ == 0) { - nsXULAtoms::AddRef(); - kTrueStr = new nsString(NS_LITERAL_STRING("true")); if (!kTrueStr) return NS_ERROR_OUT_OF_MEMORY; kFalseStr = new nsString(NS_LITERAL_STRING("false")); @@ -4275,11 +4265,6 @@ nsXULTemplateBuilder::Init() NS_GET_IID(nsIElementFactory), (void**) &gXMLElementFactory); if (NS_FAILED(rv)) return rv; - - rv = nsServiceManager::GetService(kXULContentUtilsCID, - NS_GET_IID(nsIXULContentUtils), - (nsISupports**) &gXULUtils); - if (NS_FAILED(rv)) return rv; } #ifdef PR_LOGGING @@ -4422,7 +4407,7 @@ nsXULTemplateBuilder::OpenContainer(nsIContent* aElement) return NS_OK; nsCOMPtr resource; - rv = gXULUtils->GetElementRefResource(aElement, getter_AddRefs(resource)); + rv = nsXULContentUtils::GetElementRefResource(aElement, getter_AddRefs(resource)); // If it has no resource, there's nothing that we need to be // concerned about here. @@ -4488,7 +4473,7 @@ nsXULTemplateBuilder::CloseContainer(nsIContent* aElement) // Find the beneath the ... nsCOMPtr insertionpoint; - rv = gXULUtils->FindChildByTag(aElement, kNameSpaceID_XUL, nsXULAtoms::treechildren, getter_AddRefs(insertionpoint)); + rv = nsXULContentUtils::FindChildByTag(aElement, kNameSpaceID_XUL, nsXULAtoms::treechildren, getter_AddRefs(insertionpoint)); if (NS_FAILED(rv)) return rv; if (insertionpoint) { @@ -5223,7 +5208,7 @@ nsXULTemplateBuilder::SubstituteTextReplaceVariable(nsXULTemplateBuilder* aThis, // substring which is the end of the string, // turning this into an in-place append. nsAutoString temp; - gXULUtils->GetTextForNode(node, temp); + nsXULContentUtils::GetTextForNode(node, temp); c->result += temp; } } @@ -5799,7 +5784,7 @@ nsXULTemplateBuilder::AddPersistentAttributes(nsIContent* aTemplateNode, ni->GetNamespaceID(nameSpaceID); nsCOMPtr property; - rv = gXULUtils->GetResource(nameSpaceID, tag, getter_AddRefs(property)); + rv = nsXULContentUtils::GetResource(nameSpaceID, tag, getter_AddRefs(property)); if (NS_FAILED(rv)) return rv; nsCOMPtr target; @@ -5933,6 +5918,7 @@ nsXULTemplateBuilder::SynchronizeAll(nsIRDFResource* aSource, nsCOMPtr templateNode; mTemplateMap.GetTemplateFor(element, getter_AddRefs(templateNode)); + if (! templateNode) return NS_ERROR_UNEXPECTED; @@ -6095,7 +6081,7 @@ nsXULTemplateBuilder::IsDirectlyContainedBy(nsIContent* aChild, nsIContent* aPar //