diff --git a/mozilla/caps/include/nsScriptSecurityManager.h b/mozilla/caps/include/nsScriptSecurityManager.h index a1424c6905d..8fc9d44719c 100644 --- a/mozilla/caps/include/nsScriptSecurityManager.h +++ b/mozilla/caps/include/nsScriptSecurityManager.h @@ -52,6 +52,7 @@ #include "nsIJSContextStack.h" #include "nsIObserver.h" #include "pldhash.h" +#include "plstr.h" class nsIDocShell; class nsString; diff --git a/mozilla/caps/src/nsBasePrincipal.cpp b/mozilla/caps/src/nsBasePrincipal.cpp index 0ff27444070..3101ad3f12a 100644 --- a/mozilla/caps/src/nsBasePrincipal.cpp +++ b/mozilla/caps/src/nsBasePrincipal.cpp @@ -27,6 +27,7 @@ #include "nsReadableUtils.h" #include "plstr.h" #include "nsIPref.h" +#include "nsCRT.h" ////////////////////////// diff --git a/mozilla/caps/src/nsCertificatePrincipal.cpp b/mozilla/caps/src/nsCertificatePrincipal.cpp index 9528dc8f755..5674aafa0c0 100644 --- a/mozilla/caps/src/nsCertificatePrincipal.cpp +++ b/mozilla/caps/src/nsCertificatePrincipal.cpp @@ -42,6 +42,7 @@ #include "prmem.h" #include "nsCOMPtr.h" #include "nsReadableUtils.h" +#include "nsCRT.h" static NS_DEFINE_IID(kICertificatePrincipalIID, NS_ICERTIFICATEPRINCIPAL_IID); diff --git a/mozilla/caps/src/nsCodebasePrincipal.cpp b/mozilla/caps/src/nsCodebasePrincipal.cpp index 58b072c035c..2e06cae3720 100644 --- a/mozilla/caps/src/nsCodebasePrincipal.cpp +++ b/mozilla/caps/src/nsCodebasePrincipal.cpp @@ -48,6 +48,7 @@ #include "nsIPref.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" NS_IMPL_QUERY_INTERFACE3_CI(nsCodebasePrincipal, nsICodebasePrincipal, diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp index 41d8596fc74..fd25b77c7a3 100644 --- a/mozilla/caps/src/nsScriptSecurityManager.cpp +++ b/mozilla/caps/src/nsScriptSecurityManager.cpp @@ -51,6 +51,7 @@ #include "nsCertificatePrincipal.h" #include "nsAggregatePrincipal.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include "nsIJSContextStack.h" #include "nsDOMError.h" #include "nsDOMCID.h" diff --git a/mozilla/caps/src/nsSystemPrincipal.cpp b/mozilla/caps/src/nsSystemPrincipal.cpp index 1e9933e4e36..6384085cebc 100644 --- a/mozilla/caps/src/nsSystemPrincipal.cpp +++ b/mozilla/caps/src/nsSystemPrincipal.cpp @@ -46,6 +46,7 @@ #include "nsCOMPtr.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" NS_IMPL_QUERY_INTERFACE2_CI(nsSystemPrincipal, nsIPrincipal, nsISerializable) diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.cpp b/mozilla/content/base/src/nsHTMLContentSerializer.cpp index 0eb9b35621e..491abd381b3 100644 --- a/mozilla/content/base/src/nsHTMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsHTMLContentSerializer.cpp @@ -54,6 +54,7 @@ #include "nsNetUtil.h" #include "nsEscape.h" #include "nsITextToSubURI.h" +#include "nsCRT.h" static NS_DEFINE_CID(kParserServiceCID, NS_PARSERSERVICE_CID); diff --git a/mozilla/content/base/src/nsNodeInfo.cpp b/mozilla/content/base/src/nsNodeInfo.cpp index aa3330b579b..46961142352 100644 --- a/mozilla/content/base/src/nsNodeInfo.cpp +++ b/mozilla/content/base/src/nsNodeInfo.cpp @@ -44,6 +44,7 @@ #include "nsIAtom.h" #include "nsINameSpaceManager.h" #include "domstubs.h" // for SetDOMStringToNull(); +#include "nsCRT.h" nsNodeInfo::nsNodeInfo() diff --git a/mozilla/content/base/src/nsParserUtils.cpp b/mozilla/content/base/src/nsParserUtils.cpp index 21472bbd2c6..7999da57b90 100644 --- a/mozilla/content/base/src/nsParserUtils.cpp +++ b/mozilla/content/base/src/nsParserUtils.cpp @@ -40,6 +40,7 @@ #include "nsIParser.h" // for kQuote et. al. #include "jsapi.h" #include "nsReadableUtils.h" +#include "nsCRT.h" PRBool nsParserUtils::GetQuotedAttributeValue(const nsAString& aSource, diff --git a/mozilla/content/base/src/nsRange.cpp b/mozilla/content/base/src/nsRange.cpp index 2ec04493d88..7c42c14776d 100644 --- a/mozilla/content/base/src/nsRange.cpp +++ b/mozilla/content/base/src/nsRange.cpp @@ -65,6 +65,7 @@ #include "nsIScriptGlobalObject.h" #include "nsIScriptContext.h" #include "nsIHTMLDocument.h" +#include "nsCRT.h" #include "nsIJSContextStack.h" // XXX Temporary inclusion to deal with fragment parsing diff --git a/mozilla/content/base/src/nsStyleLinkElement.cpp b/mozilla/content/base/src/nsStyleLinkElement.cpp index a187bdb463e..78d62ba62eb 100644 --- a/mozilla/content/base/src/nsStyleLinkElement.cpp +++ b/mozilla/content/base/src/nsStyleLinkElement.cpp @@ -37,6 +37,7 @@ #include "nsNetUtil.h" #include "nsUnicharUtils.h" #include "nsVoidArray.h" +#include "nsCRT.h" nsStyleLinkElement::nsStyleLinkElement() : mDontLoadStyle(PR_FALSE), diff --git a/mozilla/content/base/src/nsXMLContentSerializer.cpp b/mozilla/content/base/src/nsXMLContentSerializer.cpp index 5e9c8c1b995..9c83c3f89dc 100644 --- a/mozilla/content/base/src/nsXMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsXMLContentSerializer.cpp @@ -52,6 +52,7 @@ #include "nsString.h" #include "prprf.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" typedef struct { nsString mPrefix; diff --git a/mozilla/content/build/nsContentDLF.cpp b/mozilla/content/build/nsContentDLF.cpp index 98026f58e1d..e8479a98cd3 100644 --- a/mozilla/content/build/nsContentDLF.cpp +++ b/mozilla/content/build/nsContentDLF.cpp @@ -56,6 +56,7 @@ #include "prprf.h" #include "nsNetUtil.h" #include "nsICSSLoader.h" +#include "nsCRT.h" #include "nsRDFCID.h" #include "nsIRDFResource.h" diff --git a/mozilla/content/build/nsContentHTTPStartup.cpp b/mozilla/content/build/nsContentHTTPStartup.cpp index 1849ca68e52..49317b30983 100644 --- a/mozilla/content/build/nsContentHTTPStartup.cpp +++ b/mozilla/content/build/nsContentHTTPStartup.cpp @@ -43,6 +43,7 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include "nsContentHTTPStartup.h" #include "nsIHttpProtocolHandler.h" diff --git a/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp b/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp index 99a3285fe75..a5f0e71b9b6 100644 --- a/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp @@ -57,6 +57,7 @@ #include "nsIEventStateManager.h" #include "nsIDOMEvent.h" #include "nsNetUtil.h" +#include "nsCRT.h" // For GetText(). #include "nsIContentIterator.h" diff --git a/mozilla/content/html/style/src/nsCSSValue.h b/mozilla/content/html/style/src/nsCSSValue.h index 2eb8b5dc5ba..6fdc75521cd 100644 --- a/mozilla/content/html/style/src/nsCSSValue.h +++ b/mozilla/content/html/style/src/nsCSSValue.h @@ -40,6 +40,7 @@ #include "nsColor.h" #include "nsString.h" +#include "nsCRT.h" #include "nsCoord.h" #include "nsCSSProps.h" #include "nsUnitConversion.h" diff --git a/mozilla/content/html/style/src/nsROCSSPrimitiveValue.cpp b/mozilla/content/html/style/src/nsROCSSPrimitiveValue.cpp index 49393378098..ec6f289d06f 100644 --- a/mozilla/content/html/style/src/nsROCSSPrimitiveValue.cpp +++ b/mozilla/content/html/style/src/nsROCSSPrimitiveValue.cpp @@ -43,6 +43,7 @@ #include "prprf.h" #include "nsContentUtils.h" #include "nsXPIDLString.h" +#include "nsCRT.h" nsROCSSPrimitiveValue::nsROCSSPrimitiveValue(nsISupports *aOwner, float aT2P) : mType(CSS_PX), mOwner(aOwner), mT2P(aT2P) diff --git a/mozilla/content/xbl/src/nsXBLBinding.cpp b/mozilla/content/xbl/src/nsXBLBinding.cpp index f507db79154..f26e2f0bfec 100644 --- a/mozilla/content/xbl/src/nsXBLBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLBinding.cpp @@ -73,6 +73,7 @@ #include "nsIXPConnect.h" #include "nsIScriptGlobalObjectOwner.h" #include "nsIScriptContext.h" +#include "nsCRT.h" // Event listeners #include "nsIEventListenerManager.h" diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp index 46b197a310b..6a7c0cad63b 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -77,6 +77,7 @@ #include "nsXULAtoms.h" #include "nsXBLAtoms.h" #include "nsXBLProtoImpl.h" +#include "nsCRT.h" #include "nsIScriptContext.h" diff --git a/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp b/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp index 1db28f7eb9d..2537c7da237 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -78,6 +78,7 @@ #include "nsDOMCID.h" #include "nsUnicharUtils.h" #include "nsReadableUtils.h" +#include "nsCRT.h" static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); diff --git a/mozilla/content/xbl/src/nsXBLService.cpp b/mozilla/content/xbl/src/nsXBLService.cpp index c77889d3383..8e2b8a1beec 100644 --- a/mozilla/content/xbl/src/nsXBLService.cpp +++ b/mozilla/content/xbl/src/nsXBLService.cpp @@ -76,6 +76,7 @@ #include "nsIXBLDocumentInfo.h" #include "nsXBLAtoms.h" #include "nsXULAtoms.h" +#include "nsCRT.h" #include "nsIXBLPrototypeHandler.h" diff --git a/mozilla/content/xml/document/src/nsFIXptr.cpp b/mozilla/content/xml/document/src/nsFIXptr.cpp index 1fb07ffb0cd..88e186d2e82 100644 --- a/mozilla/content/xml/document/src/nsFIXptr.cpp +++ b/mozilla/content/xml/document/src/nsFIXptr.cpp @@ -53,6 +53,7 @@ #include "nsCOMPtr.h" #include "nsIServiceManager.h" #include "nsFIXptr.h" +#include "nsCRT.h" #include "nsContentCID.h" static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID); diff --git a/mozilla/content/xml/document/src/nsXMLDocument.cpp b/mozilla/content/xml/document/src/nsXMLDocument.cpp index 3d14fae9cb5..6f6b86b50c1 100644 --- a/mozilla/content/xml/document/src/nsXMLDocument.cpp +++ b/mozilla/content/xml/document/src/nsXMLDocument.cpp @@ -99,6 +99,7 @@ #include "nsIEventListenerManager.h" #include "nsContentUtils.h" #include "nsIElementFactory.h" +#include "nsCRT.h" static NS_DEFINE_CID(kHTMLStyleSheetCID,NS_HTMLSTYLESHEET_CID); diff --git a/mozilla/content/xul/content/src/nsXULAttributes.cpp b/mozilla/content/xul/content/src/nsXULAttributes.cpp index f237e8a77fb..0072a6eebcb 100644 --- a/mozilla/content/xul/content/src/nsXULAttributes.cpp +++ b/mozilla/content/xul/content/src/nsXULAttributes.cpp @@ -69,6 +69,7 @@ #include "nsReadableUtils.h" #include "nsContentUtils.h" #include "nsXULAtoms.h" +#include "nsCRT.h" static NS_DEFINE_CID(kCSSParserCID, NS_CSSPARSER_CID); diff --git a/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp b/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp index b94e9ec5a7b..24ea304bdf9 100644 --- a/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp +++ b/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp @@ -67,6 +67,7 @@ #include "nsGUIEvent.h" #include "nsContentUtils.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #ifdef PR_LOGGING static PRLogModuleInfo* gLog; diff --git a/mozilla/content/xul/document/src/nsXULContentSink.cpp b/mozilla/content/xul/document/src/nsXULContentSink.cpp index c7fa8e7293e..4efbab66fa3 100644 --- a/mozilla/content/xul/document/src/nsXULContentSink.cpp +++ b/mozilla/content/xul/document/src/nsXULContentSink.cpp @@ -95,6 +95,7 @@ #include "prlog.h" #include "prmem.h" #include "jsapi.h" // for JSVERSION_*, JS_VersionToString, etc. +#include "nsCRT.h" #include "nsIFastLoadService.h" // XXXbe temporary #include "nsIObjectInputStream.h" // XXXbe temporary diff --git a/mozilla/directory/xpcom/base/src/nsLDAPURL.cpp b/mozilla/directory/xpcom/base/src/nsLDAPURL.cpp index a8ff3bc9a4d..dff8bd8f5b7 100644 --- a/mozilla/directory/xpcom/base/src/nsLDAPURL.cpp +++ b/mozilla/directory/xpcom/base/src/nsLDAPURL.cpp @@ -36,6 +36,7 @@ #include "nsLDAPURL.h" #include "nsReadableUtils.h" #include "netCore.h" +#include "plstr.h" // The two schemes we support, LDAP and LDAPS // diff --git a/mozilla/docshell/base/nsWebShell.h b/mozilla/docshell/base/nsWebShell.h index 9018ad736c8..137509cc9e5 100644 --- a/mozilla/docshell/base/nsWebShell.h +++ b/mozilla/docshell/base/nsWebShell.h @@ -29,6 +29,7 @@ #include "nsIClipboardCommands.h" #include "nsDocShell.h" #include "nsICommandManager.h" +#include "nsCRT.h" class nsIEventQueue; class nsIController; diff --git a/mozilla/dom/src/base/nsLocation.cpp b/mozilla/dom/src/base/nsLocation.cpp index 91a8d52eeb8..814d94fc33b 100644 --- a/mozilla/dom/src/base/nsLocation.cpp +++ b/mozilla/dom/src/base/nsLocation.cpp @@ -64,6 +64,7 @@ #include "nsDOMClassInfo.h" #include "nsICharsetConverterManager.h" #include "nsICharsetConverterManager2.h" +#include "nsCRT.h" static nsresult EscapeNonAsciiInURI(const nsAString& aHref, nsACString& aEscapedHref) diff --git a/mozilla/dom/src/base/nsScriptNameSpaceManager.cpp b/mozilla/dom/src/base/nsScriptNameSpaceManager.cpp index 92e0b1f7e86..f291117b7f1 100644 --- a/mozilla/dom/src/base/nsScriptNameSpaceManager.cpp +++ b/mozilla/dom/src/base/nsScriptNameSpaceManager.cpp @@ -51,6 +51,7 @@ #include "nsXPIDLString.h" #include "nsReadableUtils.h" #include "nsDOMClassInfo.h" +#include "nsCRT.h" #define NS_INTERFACE_PREFIX "nsI" #define NS_DOM_INTERFACE_PREFIX "nsIDOM" diff --git a/mozilla/dom/src/build/nsDOMFactory.cpp b/mozilla/dom/src/build/nsDOMFactory.cpp index d0867e9159e..67448b863e7 100644 --- a/mozilla/dom/src/build/nsDOMFactory.cpp +++ b/mozilla/dom/src/build/nsDOMFactory.cpp @@ -47,6 +47,8 @@ #include "nsIObserverService.h" #include "nsIJSContextStack.h" #include "nsIExceptionService.h" +#include "nsCRT.h" + #include "nsScriptNameSpaceManager.h" #include "nsDOMException.h" diff --git a/mozilla/dom/src/build/nsScriptNameSpaceManager.cpp b/mozilla/dom/src/build/nsScriptNameSpaceManager.cpp index 92e0b1f7e86..f291117b7f1 100644 --- a/mozilla/dom/src/build/nsScriptNameSpaceManager.cpp +++ b/mozilla/dom/src/build/nsScriptNameSpaceManager.cpp @@ -51,6 +51,7 @@ #include "nsXPIDLString.h" #include "nsReadableUtils.h" #include "nsDOMClassInfo.h" +#include "nsCRT.h" #define NS_INTERFACE_PREFIX "nsI" #define NS_DOM_INTERFACE_PREFIX "nsIDOM" diff --git a/mozilla/editor/composer/src/nsComposerCommands.cpp b/mozilla/editor/composer/src/nsComposerCommands.cpp index cded162c93e..675b10d2a98 100644 --- a/mozilla/editor/composer/src/nsComposerCommands.cpp +++ b/mozilla/editor/composer/src/nsComposerCommands.cpp @@ -57,6 +57,7 @@ #include "nsReadableUtils.h" #include "nsICommandParams.h" #include "nsComponentManagerUtils.h" +#include "nsCRT.h" //prototype nsresult GetListState(nsIEditor *aEditor, PRBool *aMixed, PRUnichar **tagStr); nsresult PasteAsQuotation(nsIEditor *aEditor, PRInt32 aSelectionType); diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 465eb35c88b..a8bfc84219d 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -67,6 +67,7 @@ #include "nsXPIDLString.h" #include "nsReadableUtils.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" #include "nsIDocumentViewer.h" #include "nsIPresShell.h" diff --git a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp index a4e09bd165d..0952af99ec0 100644 --- a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp +++ b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp @@ -47,6 +47,7 @@ #include "nsIParser.h" #include "nsReadableUtils.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" void ChangeCSSInlineStyleTxn::AppendDeclaration(nsAString & aOutputString, diff --git a/mozilla/editor/libeditor/base/DeleteElementTxn.cpp b/mozilla/editor/libeditor/base/DeleteElementTxn.cpp index f87a03882fe..91eecd03736 100644 --- a/mozilla/editor/libeditor/base/DeleteElementTxn.cpp +++ b/mozilla/editor/libeditor/base/DeleteElementTxn.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsReadableUtils.h" +#include "nsCRT.h" #include "DeleteElementTxn.h" #ifdef NS_DEBUG diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp b/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp index c344d8b8887..f635fe549fc 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp @@ -48,6 +48,7 @@ #include "nsIDOMRange.h" #include "nsHTMLEditorLog.h" #include "nsCOMPtr.h" +#include "nsCRT.h" #include "nsEditorTxnLog.h" diff --git a/mozilla/editor/libeditor/html/nsWSRunObject.cpp b/mozilla/editor/libeditor/html/nsWSRunObject.cpp index 89a1501bce0..ded507a1bd4 100644 --- a/mozilla/editor/libeditor/html/nsWSRunObject.cpp +++ b/mozilla/editor/libeditor/html/nsWSRunObject.cpp @@ -55,6 +55,7 @@ #include "nsLayoutCID.h" #include "nsIDOMCharacterData.h" #include "nsEditorUtils.h" +#include "nsCRT.h" const PRUnichar nbsp = 160; diff --git a/mozilla/editor/libeditor/text/nsAOLCiter.cpp b/mozilla/editor/libeditor/text/nsAOLCiter.cpp index dadb4fe70ea..8607fecebf0 100644 --- a/mozilla/editor/libeditor/text/nsAOLCiter.cpp +++ b/mozilla/editor/libeditor/text/nsAOLCiter.cpp @@ -41,6 +41,7 @@ #include "nsWrapUtils.h" #include "nsReadableUtils.h" +#include "nsCRT.h" /** Mail citations using the AOL style >> This is a citation << */ diff --git a/mozilla/editor/libeditor/text/nsInternetCiter.cpp b/mozilla/editor/libeditor/text/nsInternetCiter.cpp index cb8605fad72..38af999e663 100644 --- a/mozilla/editor/libeditor/text/nsInternetCiter.cpp +++ b/mozilla/editor/libeditor/text/nsInternetCiter.cpp @@ -41,6 +41,7 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsInternetCiter.h" +#include "nsCRT.h" #include "nsCOMPtr.h" diff --git a/mozilla/editor/libeditor/text/nsTextEditRules.cpp b/mozilla/editor/libeditor/text/nsTextEditRules.cpp index ff3a6b5795b..d3085b1496d 100644 --- a/mozilla/editor/libeditor/text/nsTextEditRules.cpp +++ b/mozilla/editor/libeditor/text/nsTextEditRules.cpp @@ -40,6 +40,7 @@ #include "nsEditor.h" #include "nsTextEditUtils.h" +#include "nsCRT.h" #include "nsCOMPtr.h" #include "nsIServiceManager.h" diff --git a/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp b/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp index 184fbe6df87..667049454c1 100644 --- a/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp +++ b/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp @@ -39,6 +39,7 @@ #include "nsFindAndReplace.h" #include "nsString.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" NS_IMPL_ISUPPORTS1(nsFindAndReplace, nsIFindAndReplace) diff --git a/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp b/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp index 081590d6377..39d2d3ff0e6 100644 --- a/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp +++ b/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp @@ -22,6 +22,7 @@ #include #include #include "nsIWidget.h" +#include "nsCRT.h" // for NS_APPSHELL_CID #include diff --git a/mozilla/embedding/browser/gtk/src/EmbedProgress.cpp b/mozilla/embedding/browser/gtk/src/EmbedProgress.cpp index 6130ed81c4b..75bc4810dac 100644 --- a/mozilla/embedding/browser/gtk/src/EmbedProgress.cpp +++ b/mozilla/embedding/browser/gtk/src/EmbedProgress.cpp @@ -25,6 +25,7 @@ #include #include "nsIURI.h" +#include "nsCRT.h" EmbedProgress::EmbedProgress(void) { diff --git a/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp b/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp index 46cd878fe28..3ac91797d6c 100755 --- a/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp +++ b/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp @@ -29,6 +29,7 @@ #include "nsILocalFile.h" #include "nsString.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include #include diff --git a/mozilla/embedding/browser/powerplant/source/CBrowserApp.cp b/mozilla/embedding/browser/powerplant/source/CBrowserApp.cp index b0c0fb3819c..5fd062a155a 100644 --- a/mozilla/embedding/browser/powerplant/source/CBrowserApp.cp +++ b/mozilla/embedding/browser/powerplant/source/CBrowserApp.cp @@ -77,6 +77,7 @@ #include "nsIWindowWatcher.h" #include "nsIDOMWindow.h" #include "nsIDownload.h" +#include "nsCRT.h" #include diff --git a/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp b/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp index 81342102165..3502e23b5f1 100644 --- a/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp +++ b/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp @@ -61,6 +61,7 @@ #include "nsIWidget.h" #include "nsIWebBrowserPrint.h" #include "nsIMacTextInputEventSink.h" +#include "nsCRT.h" // Local #include "ApplIDs.h" diff --git a/mozilla/embedding/browser/powerplant/source/CProfileManager.cpp b/mozilla/embedding/browser/powerplant/source/CProfileManager.cpp index 0c24466d892..50367d3335d 100755 --- a/mozilla/embedding/browser/powerplant/source/CProfileManager.cpp +++ b/mozilla/embedding/browser/powerplant/source/CProfileManager.cpp @@ -43,6 +43,7 @@ #include "nsIObserverService.h" #include "nsXPIDLString.h" #include "nsIRegistry.h" +#include "nsCRT.h" // ANSI #include diff --git a/mozilla/embedding/browser/powerplant/source/CTextInputEventHandling.cpp b/mozilla/embedding/browser/powerplant/source/CTextInputEventHandling.cpp index a7275068c94..b8eece68c64 100644 --- a/mozilla/embedding/browser/powerplant/source/CTextInputEventHandling.cpp +++ b/mozilla/embedding/browser/powerplant/source/CTextInputEventHandling.cpp @@ -28,6 +28,7 @@ */ #include "CTextInputEventHandler.h" +#include "nsCRT.h" #pragma mark - diff --git a/mozilla/embedding/components/find/src/nsFind.cpp b/mozilla/embedding/components/find/src/nsFind.cpp index 4df28725b27..b0353af33fa 100644 --- a/mozilla/embedding/components/find/src/nsFind.cpp +++ b/mozilla/embedding/components/find/src/nsFind.cpp @@ -56,6 +56,7 @@ #include "nsIServiceManagerUtils.h" #include "nsUnicharUtils.h" #include "nsIDOMElement.h" +#include "nsCRT.h" // Yikes! Casting a char to unichar can fill with ones! #define CHAR_TO_UNICHAR(c) ((PRUnichar)(const unsigned char)c) diff --git a/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 608361e3c20..832bc792bb7 100644 --- a/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -41,6 +41,7 @@ #include "nsIUploadChannel.h" #include "nsEscape.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" #include "nsCExternalHandlerService.h" diff --git a/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp b/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp index 7bf1367952b..9d13fa7651d 100644 --- a/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp +++ b/mozilla/embedding/tests/mfcembed/MfcEmbed.cpp @@ -63,6 +63,7 @@ #include "nsIWindowWatcher.h" #include "plstr.h" #include "Preferences.h" +#include "nsCRT.h" #include #include diff --git a/mozilla/embedding/tests/mfcembed/ProfilesDlg.cpp b/mozilla/embedding/tests/mfcembed/ProfilesDlg.cpp index 720d76114c6..5a5220a6ada 100644 --- a/mozilla/embedding/tests/mfcembed/ProfilesDlg.cpp +++ b/mozilla/embedding/tests/mfcembed/ProfilesDlg.cpp @@ -9,6 +9,7 @@ // Mozilla #include "nsIProfile.h" #include "nsIServiceManager.h" +#include "nsCRT.h" #ifdef _DEBUG #define new DEBUG_NEW diff --git a/mozilla/embedding/tests/mfcembed/winEmbedFileLocProvider.cpp b/mozilla/embedding/tests/mfcembed/winEmbedFileLocProvider.cpp index 89743e95549..f4b5e1fd859 100644 --- a/mozilla/embedding/tests/mfcembed/winEmbedFileLocProvider.cpp +++ b/mozilla/embedding/tests/mfcembed/winEmbedFileLocProvider.cpp @@ -28,6 +28,7 @@ #include "nsILocalFile.h" #include "nsString.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include diff --git a/mozilla/embedding/tests/winEmbed/WebBrowserChrome.cpp b/mozilla/embedding/tests/winEmbed/WebBrowserChrome.cpp index a930cdc4c9b..dfe59dc5c0f 100644 --- a/mozilla/embedding/tests/winEmbed/WebBrowserChrome.cpp +++ b/mozilla/embedding/tests/winEmbed/WebBrowserChrome.cpp @@ -36,6 +36,7 @@ #include "nsCWebBrowser.h" #include "nsWidgetsCID.h" #include "nsIProfileChangeStatus.h" +#include "nsCRT.h" // Local includes #include "resource.h" diff --git a/mozilla/embedding/tests/winEmbed/winEmbed.cpp b/mozilla/embedding/tests/winEmbed/winEmbed.cpp index 1d79727bebe..b638f2554fc 100644 --- a/mozilla/embedding/tests/winEmbed/winEmbed.cpp +++ b/mozilla/embedding/tests/winEmbed/winEmbed.cpp @@ -62,6 +62,7 @@ #include "nsIURI.h" #include "plstr.h" #include "nsIInterfaceRequestor.h" +#include "nsCRT.h" // Local header files #include "winEmbed.h" diff --git a/mozilla/extensions/cookie/nsCookie.cpp b/mozilla/extensions/cookie/nsCookie.cpp index 30d4bc56b91..f8048a7d7ba 100644 --- a/mozilla/extensions/cookie/nsCookie.cpp +++ b/mozilla/extensions/cookie/nsCookie.cpp @@ -38,6 +38,7 @@ #include "nsCookie.h" #include "nsString.h" +#include "nsCRT.h" #include "prmem.h" // nsCookie Implementation diff --git a/mozilla/extensions/cookie/nsImages.cpp b/mozilla/extensions/cookie/nsImages.cpp index 706baec97ac..d3a6d7e2736 100644 --- a/mozilla/extensions/cookie/nsImages.cpp +++ b/mozilla/extensions/cookie/nsImages.cpp @@ -38,6 +38,7 @@ #include "nsPermissions.h" #include "nsUtils.h" +#include "plstr.h" #include "nsVoidArray.h" #include "prmem.h" diff --git a/mozilla/extensions/cookie/nsPermission.cpp b/mozilla/extensions/cookie/nsPermission.cpp index 76143fd9118..292aa9c8f8a 100644 --- a/mozilla/extensions/cookie/nsPermission.cpp +++ b/mozilla/extensions/cookie/nsPermission.cpp @@ -37,7 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsPermission.h" -#include "nsString.h" +#include "nsCRT.h" #include "prmem.h" // nsPermission Implementation diff --git a/mozilla/extensions/cookie/tests/TestCookie.cpp b/mozilla/extensions/cookie/tests/TestCookie.cpp index 9c4e054c495..c475703140b 100644 --- a/mozilla/extensions/cookie/tests/TestCookie.cpp +++ b/mozilla/extensions/cookie/tests/TestCookie.cpp @@ -43,6 +43,7 @@ #include "nsXPIDLString.h" #include "nsIEventQueueService.h" #include "nsIStringBundle.h" +#include "nsCRT.h" static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID); diff --git a/mozilla/extensions/finger/nsFingerChannel.cpp b/mozilla/extensions/finger/nsFingerChannel.cpp index b80242261e0..9c90298f5bc 100644 --- a/mozilla/extensions/finger/nsFingerChannel.cpp +++ b/mozilla/extensions/finger/nsFingerChannel.cpp @@ -35,6 +35,7 @@ #include "nsITXTToHTMLConv.h" #include "nsIProgressEventSink.h" #include "nsNetUtil.h" +#include "nsCRT.h" static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID); static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID); diff --git a/mozilla/extensions/interfaceinfo/src/iixprivate.h b/mozilla/extensions/interfaceinfo/src/iixprivate.h index f9834bbb758..c7081415530 100644 --- a/mozilla/extensions/interfaceinfo/src/iixprivate.h +++ b/mozilla/extensions/interfaceinfo/src/iixprivate.h @@ -46,6 +46,7 @@ #include "nsVoidArray.h" #include "nsSupportsArray.h" #include "nsString.h" +#include "nsCRT.h" #include "nsReadableUtils.h" #include "nsWeakReference.h" #include "nsIGenericFactory.h" diff --git a/mozilla/extensions/p3p/src/nsP3PService.cpp b/mozilla/extensions/p3p/src/nsP3PService.cpp index 36e0f6fc9b2..5ff5ce25c8f 100644 --- a/mozilla/extensions/p3p/src/nsP3PService.cpp +++ b/mozilla/extensions/p3p/src/nsP3PService.cpp @@ -42,6 +42,7 @@ #include "nsIServiceManager.h" #include "nsIURI.h" #include "nsString.h" +#include "nsCRT.h" #include "nsIPrefService.h" #include "nsIPrefBranchInternal.h" diff --git a/mozilla/extensions/pref/autoconfig/src/nsAutoConfig.cpp b/mozilla/extensions/pref/autoconfig/src/nsAutoConfig.cpp index cc437f12d66..d1def878d1f 100644 --- a/mozilla/extensions/pref/autoconfig/src/nsAutoConfig.cpp +++ b/mozilla/extensions/pref/autoconfig/src/nsAutoConfig.cpp @@ -46,6 +46,7 @@ #include "nsIObserverService.h" #include "nsIEventQueueService.h" #include "nsLiteralString.h" +#include "nsCRT.h" extern nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length, const char *filename, diff --git a/mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp b/mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp index 75c6461ef24..31ac83c3f21 100644 --- a/mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp +++ b/mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp @@ -51,6 +51,7 @@ #include "nsXPIDLString.h" #include "prmem.h" #include "nsString.h" +#include "nsCRT.h" diff --git a/mozilla/extensions/transformiix/build/XSLTProcessorModule.cpp b/mozilla/extensions/transformiix/build/XSLTProcessorModule.cpp index db753e308d4..93bb25e3893 100755 --- a/mozilla/extensions/transformiix/build/XSLTProcessorModule.cpp +++ b/mozilla/extensions/transformiix/build/XSLTProcessorModule.cpp @@ -39,6 +39,7 @@ #include "txAtoms.h" #include "XSLTProcessor.h" #include "TxLog.h" +#include "nsCRT.h" /* 1c1a3c01-14f6-11d6-a7f2-ea502af815dc */ #define TRANSFORMIIX_DOMCI_EXTENSION_CID \ diff --git a/mozilla/extensions/transformiix/source/base/Double.cpp b/mozilla/extensions/transformiix/source/base/Double.cpp index c78b513598f..be41d957f6a 100644 --- a/mozilla/extensions/transformiix/source/base/Double.cpp +++ b/mozilla/extensions/transformiix/source/base/Double.cpp @@ -35,7 +35,8 @@ */ #include "primitives.h" -#include +#include +#include #ifdef WIN32 #include #endif @@ -46,7 +47,6 @@ #ifndef TX_EXE #include "prdtoa.h" #else -#include #include #endif diff --git a/mozilla/extensions/wallet/src/nsBasicStreamGenerator.cpp b/mozilla/extensions/wallet/src/nsBasicStreamGenerator.cpp index f31f5ee8a1b..110873d5369 100644 --- a/mozilla/extensions/wallet/src/nsBasicStreamGenerator.cpp +++ b/mozilla/extensions/wallet/src/nsBasicStreamGenerator.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsBasicStreamGenerator.h" +#include "nsCRT.h" const char * nsBasicStreamGenerator::mSignature = "Basic Keyed Stream Generator"; diff --git a/mozilla/extensions/wallet/src/nsPassword.cpp b/mozilla/extensions/wallet/src/nsPassword.cpp index 72e9d9ebf68..e0a412a223f 100644 --- a/mozilla/extensions/wallet/src/nsPassword.cpp +++ b/mozilla/extensions/wallet/src/nsPassword.cpp @@ -38,6 +38,7 @@ #include "nsPassword.h" #include "nsString.h" +#include "nsCRT.h" #include "prmem.h" // nsPassword Implementation diff --git a/mozilla/extensions/webservices/interfaceinfo/src/iixprivate.h b/mozilla/extensions/webservices/interfaceinfo/src/iixprivate.h index f9834bbb758..c7081415530 100644 --- a/mozilla/extensions/webservices/interfaceinfo/src/iixprivate.h +++ b/mozilla/extensions/webservices/interfaceinfo/src/iixprivate.h @@ -46,6 +46,7 @@ #include "nsVoidArray.h" #include "nsSupportsArray.h" #include "nsString.h" +#include "nsCRT.h" #include "nsReadableUtils.h" #include "nsWeakReference.h" #include "nsIGenericFactory.h" diff --git a/mozilla/extensions/xmlextras/base/src/nsDOMParser.cpp b/mozilla/extensions/xmlextras/base/src/nsDOMParser.cpp index 9a60c82d264..2b630a4d775 100644 --- a/mozilla/extensions/xmlextras/base/src/nsDOMParser.cpp +++ b/mozilla/extensions/xmlextras/base/src/nsDOMParser.cpp @@ -57,6 +57,7 @@ #include "nsICodebasePrincipal.h" #include "nsIDOMClassInfo.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #ifdef IMPLEMENT_SYNC_LOAD #include "nsIScriptContext.h" diff --git a/mozilla/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp b/mozilla/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp index 4408013fbdd..23666584a01 100644 --- a/mozilla/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp +++ b/mozilla/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp @@ -49,6 +49,7 @@ #include "nsXPIDLString.h" #include "nsReadableUtils.h" #include "nsPrintfCString.h" +#include "nsCRT.h" #include "nsIURI.h" #include "nsILoadGroup.h" #include "nsNetUtil.h" diff --git a/mozilla/extensions/xmlextras/build/src/nsXMLExtrasModule.cpp b/mozilla/extensions/xmlextras/build/src/nsXMLExtrasModule.cpp index 3e71a793dd6..7d12f7f1a50 100644 --- a/mozilla/extensions/xmlextras/build/src/nsXMLExtrasModule.cpp +++ b/mozilla/extensions/xmlextras/build/src/nsXMLExtrasModule.cpp @@ -50,6 +50,7 @@ #include "nsDOMCID.h" #include "prprf.h" #include "nsIDOMClassInfo.h" +#include "nsCRT.h" #include "nsSOAPHeaderBlock.h" #include "nsSOAPParameter.h" diff --git a/mozilla/extensions/xmlextras/interfaceinfo/src/iixprivate.h b/mozilla/extensions/xmlextras/interfaceinfo/src/iixprivate.h index f9834bbb758..c7081415530 100644 --- a/mozilla/extensions/xmlextras/interfaceinfo/src/iixprivate.h +++ b/mozilla/extensions/xmlextras/interfaceinfo/src/iixprivate.h @@ -46,6 +46,7 @@ #include "nsVoidArray.h" #include "nsSupportsArray.h" #include "nsString.h" +#include "nsCRT.h" #include "nsReadableUtils.h" #include "nsWeakReference.h" #include "nsIGenericFactory.h" diff --git a/mozilla/extensions/xmlextras/pointers/src/nsFIXptr.cpp b/mozilla/extensions/xmlextras/pointers/src/nsFIXptr.cpp index 1fb07ffb0cd..88e186d2e82 100644 --- a/mozilla/extensions/xmlextras/pointers/src/nsFIXptr.cpp +++ b/mozilla/extensions/xmlextras/pointers/src/nsFIXptr.cpp @@ -53,6 +53,7 @@ #include "nsCOMPtr.h" #include "nsIServiceManager.h" #include "nsFIXptr.h" +#include "nsCRT.h" #include "nsContentCID.h" static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID); diff --git a/mozilla/extensions/xmlextras/tests/TestXMLExtras.cpp b/mozilla/extensions/xmlextras/tests/TestXMLExtras.cpp index 31b197121a7..90dfd597508 100644 --- a/mozilla/extensions/xmlextras/tests/TestXMLExtras.cpp +++ b/mozilla/extensions/xmlextras/tests/TestXMLExtras.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp b/mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp index 17b823f61ae..af795dbad60 100644 --- a/mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp +++ b/mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp @@ -45,6 +45,7 @@ #define FORCE_PR_LOG /* Allow logging in the release build */ #define PR_LOGGING 1 #include "prlog.h" +#include "plstr.h" #include "nsDeviceContextSpecG.h" diff --git a/mozilla/gfx/src/gtk/nsDeviceContextSpecG.h b/mozilla/gfx/src/gtk/nsDeviceContextSpecG.h index 03f13dd47d8..7119a70c721 100644 --- a/mozilla/gfx/src/gtk/nsDeviceContextSpecG.h +++ b/mozilla/gfx/src/gtk/nsDeviceContextSpecG.h @@ -50,6 +50,7 @@ #ifdef USE_XPRINT #include "nsIDeviceContextSpecXPrint.h" #endif /* USE_XPRINT */ +#include "nsCRT.h" /* should be ? */ #define NS_PORTRAIT 0 #define NS_LANDSCAPE 1 diff --git a/mozilla/gfx/src/mac/nsPrintOptionsX.cpp b/mozilla/gfx/src/mac/nsPrintOptionsX.cpp index 2dbfd672846..83799b3aea6 100644 --- a/mozilla/gfx/src/mac/nsPrintOptionsX.cpp +++ b/mozilla/gfx/src/mac/nsPrintOptionsX.cpp @@ -47,6 +47,7 @@ #include "nsIPref.h" #include "nsGfxUtils.h" +#include "nsCRT.h" #include "plbase64.h" #include "prmem.h" diff --git a/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp b/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp index 62f7680e103..574211fdd93 100644 --- a/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp +++ b/mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp @@ -42,6 +42,7 @@ #include "nsUnicodeMappingUtil.h" #include "nsDeviceContextMac.h" #include "nsReadableUtils.h" +#include "nsCRT.h" static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); #define BAD_FONT_NUM -1 diff --git a/mozilla/gfx/src/nsDeviceContext.cpp b/mozilla/gfx/src/nsDeviceContext.cpp index 09c85b3f698..4ed830482bc 100644 --- a/mozilla/gfx/src/nsDeviceContext.cpp +++ b/mozilla/gfx/src/nsDeviceContext.cpp @@ -32,6 +32,7 @@ #include "nsILanguageAtomService.h" #include "nsIServiceManager.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" NS_IMPL_ISUPPORTS3(DeviceContextImpl, nsIDeviceContext, nsIObserver, nsISupportsWeakReference) diff --git a/mozilla/gfx/src/nsFont.cpp b/mozilla/gfx/src/nsFont.cpp index 3f35eeb2a6c..f1eba39754b 100644 --- a/mozilla/gfx/src/nsFont.cpp +++ b/mozilla/gfx/src/nsFont.cpp @@ -39,6 +39,7 @@ #include "nsFont.h" #include "nsString.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" nsFont::nsFont(const char* aName, PRUint8 aStyle, PRUint8 aVariant, PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize, diff --git a/mozilla/gfx/src/windows/nsDeviceContextSpecWin.cpp b/mozilla/gfx/src/windows/nsDeviceContextSpecWin.cpp index 356db615d66..6b2a2a4c447 100644 --- a/mozilla/gfx/src/windows/nsDeviceContextSpecWin.cpp +++ b/mozilla/gfx/src/windows/nsDeviceContextSpecWin.cpp @@ -57,6 +57,7 @@ #include "nsIPrintSettingsWin.h" #include "nsString.h" +#include "nsCRT.h" #include "nsIServiceManager.h" #include "nsReadableUtils.h" #include "nsGfxCIID.h" diff --git a/mozilla/htmlparser/src/nsHTMLEntities.cpp b/mozilla/htmlparser/src/nsHTMLEntities.cpp index e79b335409f..329c2bce27c 100644 --- a/mozilla/htmlparser/src/nsHTMLEntities.cpp +++ b/mozilla/htmlparser/src/nsHTMLEntities.cpp @@ -41,6 +41,7 @@ #include "nsString.h" +#include "nsCRT.h" #include "nsAVLTree.h" MOZ_DECL_CTOR_COUNTER(EntityNode) diff --git a/mozilla/htmlparser/tests/outsinks/Convert.cpp b/mozilla/htmlparser/tests/outsinks/Convert.cpp index 425b81d382d..74781150a60 100644 --- a/mozilla/htmlparser/tests/outsinks/Convert.cpp +++ b/mozilla/htmlparser/tests/outsinks/Convert.cpp @@ -33,6 +33,7 @@ #include "nsIServiceManager.h" #include "nsIComponentRegistrar.h" #include "nsReadableUtils.h" +#include "nsCRT.h" static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID); static NS_DEFINE_CID(kParserCID, NS_PARSER_CID); diff --git a/mozilla/intl/locale/src/nsLanguageAtomService.h b/mozilla/intl/locale/src/nsLanguageAtomService.h index 6d7432545ae..a1aa5be8763 100644 --- a/mozilla/intl/locale/src/nsLanguageAtomService.h +++ b/mozilla/intl/locale/src/nsLanguageAtomService.h @@ -41,6 +41,7 @@ #include "nsILanguageAtomService.h" #include "nsIPersistentProperties2.h" #include "nsISupportsArray.h" +#include "nsCRT.h" class nsLanguageAtomService : public nsILanguageAtomService { diff --git a/mozilla/intl/locale/src/nsLocaleService.cpp b/mozilla/intl/locale/src/nsLocaleService.cpp index 0e35e79ae17..a3577cb681c 100644 --- a/mozilla/intl/locale/src/nsLocaleService.cpp +++ b/mozilla/intl/locale/src/nsLocaleService.cpp @@ -43,6 +43,7 @@ #include "nsLocaleCID.h" #include "nsIComponentManager.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include diff --git a/mozilla/intl/locale/src/unix/nsCollationUnix.cpp b/mozilla/intl/locale/src/unix/nsCollationUnix.cpp index ac7d2d51e4a..c89b3c89f53 100644 --- a/mozilla/intl/locale/src/unix/nsCollationUnix.cpp +++ b/mozilla/intl/locale/src/unix/nsCollationUnix.cpp @@ -49,6 +49,7 @@ #include "nsCOMPtr.h" #include "nsIPref.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" //#define DEBUG_UNIX_COLLATION inline void nsCollationUnix::DoSetLocale() diff --git a/mozilla/intl/locale/src/windows/nsIWin32LocaleImpl.cpp b/mozilla/intl/locale/src/windows/nsIWin32LocaleImpl.cpp index 22d9bb46338..98663be2d6a 100644 --- a/mozilla/intl/locale/src/windows/nsIWin32LocaleImpl.cpp +++ b/mozilla/intl/locale/src/windows/nsIWin32LocaleImpl.cpp @@ -45,6 +45,7 @@ #include "nsLocaleCID.h" #include "prprf.h" #include +#include "nsCRT.h" NS_DEFINE_IID(kIWin32LocaleImplCID, NS_WIN32LOCALE_CID); diff --git a/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp b/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp index 434fb08c061..07774aec0e2 100644 --- a/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp +++ b/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp @@ -50,6 +50,7 @@ #include "nsILocaleService.h" #include "nsUConvDll.h" #include "prmem.h" +#include "nsCRT.h" // just for CIDs #include "nsIUnicodeDecodeHelper.h" diff --git a/mozilla/intl/uconv/src/nsScriptableUConv.cpp b/mozilla/intl/uconv/src/nsScriptableUConv.cpp index dd17da0de35..1cb3f24a1c3 100644 --- a/mozilla/intl/uconv/src/nsScriptableUConv.cpp +++ b/mozilla/intl/uconv/src/nsScriptableUConv.cpp @@ -46,6 +46,7 @@ #include "nsICharsetConverterManager2.h" #include "nsIScriptableUConv.h" #include "nsScriptableUConv.h" +#include "nsCRT.h" #include "nsIPlatformCharset.h" diff --git a/mozilla/intl/uconv/src/nsTextToSubURI.cpp b/mozilla/intl/uconv/src/nsTextToSubURI.cpp index c6970d43b72..ae0b4466da0 100644 --- a/mozilla/intl/uconv/src/nsTextToSubURI.cpp +++ b/mozilla/intl/uconv/src/nsTextToSubURI.cpp @@ -45,6 +45,7 @@ #include "nsEscape.h" #include "prmem.h" #include "nsTextToSubURI.h" +#include "nsCRT.h" static NS_DEFINE_CID(kITextToSubURIIID, NS_ITEXTTOSUBURI_IID); static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID); diff --git a/mozilla/intl/uconv/ucvcn/nsUCvCnModule.cpp b/mozilla/intl/uconv/ucvcn/nsUCvCnModule.cpp index 970a501407d..f542ad876ef 100644 --- a/mozilla/intl/uconv/ucvcn/nsUCvCnModule.cpp +++ b/mozilla/intl/uconv/ucvcn/nsUCvCnModule.cpp @@ -49,6 +49,7 @@ #include "nsIModule.h" #include "nsUCvCnCID.h" #include "nsUCvCnDll.h" +#include "nsCRT.h" #include "nsHZToUnicode.h" #include "nsUnicodeToHZ.h" diff --git a/mozilla/intl/uconv/ucvibm/nsUCvIBMModule.cpp b/mozilla/intl/uconv/ucvibm/nsUCvIBMModule.cpp index 9839eb994d0..09c7331e999 100644 --- a/mozilla/intl/uconv/ucvibm/nsUCvIBMModule.cpp +++ b/mozilla/intl/uconv/ucvibm/nsUCvIBMModule.cpp @@ -46,6 +46,7 @@ #include "nsIModule.h" #include "nsUCvIBMCID.h" #include "nsUCvIBMDll.h" +#include "nsCRT.h" #include "nsCP850ToUnicode.h" #include "nsCP852ToUnicode.h" diff --git a/mozilla/intl/uconv/ucvja/nsUCvJaModule.cpp b/mozilla/intl/uconv/ucvja/nsUCvJaModule.cpp index df0780afba1..14abd0587c5 100644 --- a/mozilla/intl/uconv/ucvja/nsUCvJaModule.cpp +++ b/mozilla/intl/uconv/ucvja/nsUCvJaModule.cpp @@ -49,6 +49,7 @@ #include "nsUCVJACID.h" #include "nsUCVJA2CID.h" #include "nsUCVJADll.h" +#include "nsCRT.h" #include "nsJapaneseToUnicode.h" #include "nsUnicodeToSJIS.h" diff --git a/mozilla/intl/uconv/ucvko/nsUCvKoModule.cpp b/mozilla/intl/uconv/ucvko/nsUCvKoModule.cpp index 8888ed0b29f..cedfb1661b2 100644 --- a/mozilla/intl/uconv/ucvko/nsUCvKoModule.cpp +++ b/mozilla/intl/uconv/ucvko/nsUCvKoModule.cpp @@ -50,6 +50,7 @@ #include "nsIModule.h" #include "nsUCvKOCID.h" #include "nsUCvKODll.h" +#include "nsCRT.h" #include "nsEUCKRToUnicode.h" #include "nsUnicodeToEUCKR.h" diff --git a/mozilla/intl/uconv/ucvlatin/nsUCvLatinModule.cpp b/mozilla/intl/uconv/ucvlatin/nsUCvLatinModule.cpp index fb5a4b0017b..e4e7308c15c 100644 --- a/mozilla/intl/uconv/ucvlatin/nsUCvLatinModule.cpp +++ b/mozilla/intl/uconv/ucvlatin/nsUCvLatinModule.cpp @@ -49,6 +49,7 @@ #include "nsIModule.h" #include "nsUCvLatinCID.h" #include "nsUCvLatinDll.h" +#include "nsCRT.h" #include "nsUEscapeToUnicode.h" #include "nsUnicodeToUEscape.h" diff --git a/mozilla/intl/uconv/ucvmath/nsUCvMathModule.cpp b/mozilla/intl/uconv/ucvmath/nsUCvMathModule.cpp index f941f4294ad..0014625f436 100644 --- a/mozilla/intl/uconv/ucvmath/nsUCvMathModule.cpp +++ b/mozilla/intl/uconv/ucvmath/nsUCvMathModule.cpp @@ -49,6 +49,7 @@ #include "nsIModule.h" #include "nsUCvMathCID.h" #include "nsUCvMathDll.h" +#include "nsCRT.h" #include "nsUnicodeToTeXCMRttf.h" #include "nsUnicodeToTeXCMMIttf.h" diff --git a/mozilla/intl/uconv/ucvtw/nsUCvTwModule.cpp b/mozilla/intl/uconv/ucvtw/nsUCvTwModule.cpp index 8b59e697288..0b97c2570ef 100644 --- a/mozilla/intl/uconv/ucvtw/nsUCvTwModule.cpp +++ b/mozilla/intl/uconv/ucvtw/nsUCvTwModule.cpp @@ -48,6 +48,7 @@ #include "nsIModule.h" #include "nsUCvTWCID.h" #include "nsUCvTWDll.h" +#include "nsCRT.h" #include "nsBIG5ToUnicode.h" #include "nsUnicodeToBIG5.h" diff --git a/mozilla/intl/uconv/ucvtw2/nsUCvTw2Module.cpp b/mozilla/intl/uconv/ucvtw2/nsUCvTw2Module.cpp index b6664bd76fc..43d6efd9965 100644 --- a/mozilla/intl/uconv/ucvtw2/nsUCvTw2Module.cpp +++ b/mozilla/intl/uconv/ucvtw2/nsUCvTw2Module.cpp @@ -40,6 +40,7 @@ #include "nspr.h" #include "nsString.h" +#include "nsCRT.h" #include "pratom.h" #include "nsCOMPtr.h" #include "nsIFactory.h" diff --git a/mozilla/intl/unicharutil/src/nsEntityConverter.cpp b/mozilla/intl/unicharutil/src/nsEntityConverter.cpp index 95bb86002b1..2957770d78a 100644 --- a/mozilla/intl/unicharutil/src/nsEntityConverter.cpp +++ b/mozilla/intl/unicharutil/src/nsEntityConverter.cpp @@ -43,6 +43,7 @@ #include "nsReadableUtils.h" #include "nsIURL.h" #include "nsNetUtil.h" +#include "nsCRT.h" // // guids diff --git a/mozilla/intl/unicharutil/src/nsSaveAsCharset.cpp b/mozilla/intl/unicharutil/src/nsSaveAsCharset.cpp index cdc4526f041..e1a81e3207d 100644 --- a/mozilla/intl/unicharutil/src/nsSaveAsCharset.cpp +++ b/mozilla/intl/unicharutil/src/nsSaveAsCharset.cpp @@ -44,6 +44,7 @@ #include "nsIComponentManager.h" #include "nsICharsetConverterManager2.h" #include "nsSaveAsCharset.h" +#include "nsCRT.h" // diff --git a/mozilla/intl/unicharutil/tests/UnicharSelfTest.cpp b/mozilla/intl/unicharutil/tests/UnicharSelfTest.cpp index 60721103e1e..d4d9c88cd2d 100644 --- a/mozilla/intl/unicharutil/tests/UnicharSelfTest.cpp +++ b/mozilla/intl/unicharutil/tests/UnicharSelfTest.cpp @@ -51,6 +51,7 @@ #include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsReadableUtils.h" +#include "nsCRT.h" NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID); NS_DEFINE_IID(kCaseConversionIID, NS_ICASECONVERSION_IID); diff --git a/mozilla/intl/unicharutil/util/nsUnicharUtils.cpp b/mozilla/intl/unicharutil/util/nsUnicharUtils.cpp index 35d97011cda..37fb5cf091d 100644 --- a/mozilla/intl/unicharutil/util/nsUnicharUtils.cpp +++ b/mozilla/intl/unicharutil/util/nsUnicharUtils.cpp @@ -42,6 +42,7 @@ #include "nsUnicharUtilCIID.h" #include "nsICaseConversion.h" #include "nsIServiceManager.h" +#include "nsCRT.h" #include "nsIObserver.h" #include "nsIObserverService.h" diff --git a/mozilla/js/jsd/jsd_xpc.cpp b/mozilla/js/jsd/jsd_xpc.cpp index bb72ff6235a..f37d7812575 100644 --- a/mozilla/js/jsd/jsd_xpc.cpp +++ b/mozilla/js/jsd/jsd_xpc.cpp @@ -50,6 +50,7 @@ #include "nsMemory.h" #include "jsdebug.h" #include "nsReadableUtils.h" +#include "nsCRT.h" /* XXX this stuff is used by NestEventLoop, a temporary hack to be refactored * later */ diff --git a/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp b/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp index d223f2527aa..057debd15f7 100644 --- a/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp +++ b/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp @@ -36,6 +36,7 @@ /* Wrapper object for reflecting native xpcom objects into JavaScript. */ #include "xpcprivate.h" +#include "nsCRT.h" /***************************************************************************/ diff --git a/mozilla/layout/base/nsBidi.cpp b/mozilla/layout/base/nsBidi.cpp index 1be38d2bf98..0d0ae4a1a68 100644 --- a/mozilla/layout/base/nsBidi.cpp +++ b/mozilla/layout/base/nsBidi.cpp @@ -31,6 +31,7 @@ #include "nsBidiUtils.h" #include "bidicattable.h" #include "symmtable.h" +#include "nsCRT.h" static nsCharType ebc2ucd[15] = { eCharType_OtherNeutral, /* Placeholder -- there will never be a 0 index value */ diff --git a/mozilla/layout/base/src/nsBidi.cpp b/mozilla/layout/base/src/nsBidi.cpp index 1be38d2bf98..0d0ae4a1a68 100644 --- a/mozilla/layout/base/src/nsBidi.cpp +++ b/mozilla/layout/base/src/nsBidi.cpp @@ -31,6 +31,7 @@ #include "nsBidiUtils.h" #include "bidicattable.h" #include "symmtable.h" +#include "nsCRT.h" static nsCharType ebc2ucd[15] = { eCharType_OtherNeutral, /* Placeholder -- there will never be a 0 index value */ diff --git a/mozilla/layout/build/nsContentDLF.cpp b/mozilla/layout/build/nsContentDLF.cpp index 98026f58e1d..e8479a98cd3 100644 --- a/mozilla/layout/build/nsContentDLF.cpp +++ b/mozilla/layout/build/nsContentDLF.cpp @@ -56,6 +56,7 @@ #include "prprf.h" #include "nsNetUtil.h" #include "nsICSSLoader.h" +#include "nsCRT.h" #include "nsRDFCID.h" #include "nsIRDFResource.h" diff --git a/mozilla/layout/build/nsContentHTTPStartup.cpp b/mozilla/layout/build/nsContentHTTPStartup.cpp index 1849ca68e52..49317b30983 100644 --- a/mozilla/layout/build/nsContentHTTPStartup.cpp +++ b/mozilla/layout/build/nsContentHTTPStartup.cpp @@ -43,6 +43,7 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include "nsContentHTTPStartup.h" #include "nsIHttpProtocolHandler.h" diff --git a/mozilla/layout/mathml/content/src/nsMathMLOperators.cpp b/mozilla/layout/mathml/content/src/nsMathMLOperators.cpp index 0f5c4983631..287bdd766be 100644 --- a/mozilla/layout/mathml/content/src/nsMathMLOperators.cpp +++ b/mozilla/layout/mathml/content/src/nsMathMLOperators.cpp @@ -28,6 +28,7 @@ #include "nsIPersistentProperties2.h" #include "nsNetUtil.h" #include "nsIURI.h" +#include "nsCRT.h" #include "nsMathMLOperators.h" diff --git a/mozilla/layout/style/nsCSSValue.h b/mozilla/layout/style/nsCSSValue.h index 2eb8b5dc5ba..6fdc75521cd 100644 --- a/mozilla/layout/style/nsCSSValue.h +++ b/mozilla/layout/style/nsCSSValue.h @@ -40,6 +40,7 @@ #include "nsColor.h" #include "nsString.h" +#include "nsCRT.h" #include "nsCoord.h" #include "nsCSSProps.h" #include "nsUnitConversion.h" diff --git a/mozilla/layout/style/nsROCSSPrimitiveValue.cpp b/mozilla/layout/style/nsROCSSPrimitiveValue.cpp index 49393378098..ec6f289d06f 100644 --- a/mozilla/layout/style/nsROCSSPrimitiveValue.cpp +++ b/mozilla/layout/style/nsROCSSPrimitiveValue.cpp @@ -43,6 +43,7 @@ #include "prprf.h" #include "nsContentUtils.h" #include "nsXPIDLString.h" +#include "nsCRT.h" nsROCSSPrimitiveValue::nsROCSSPrimitiveValue(nsISupports *aOwner, float aT2P) : mType(CSS_PX), mOwner(aOwner), mT2P(aT2P) diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeContentView.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeContentView.cpp index 44ad805b1fa..d5e103bad6e 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeContentView.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeContentView.cpp @@ -51,6 +51,7 @@ #include "nsIDOMHTMLOptionElement.h" #include "nsIDOMHTMLOptGroupElement.h" #include "nsIDOMClassInfo.h" +#include "nsCRT.h" #include "nsIEventStateManager.h" diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeUtils.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeUtils.cpp index d1dda39771e..2d064cd5f49 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeUtils.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeUtils.cpp @@ -39,6 +39,7 @@ #include "nsReadableUtils.h" #include "nsTreeUtils.h" #include "nsChildIterator.h" +#include "nsCRT.h" nsresult nsTreeUtils::TokenizeProperties(const nsAString& aProperties, nsISupportsArray* aPropertiesArray) diff --git a/mozilla/mailnews/absync/src/nsABSyncDriver.cpp b/mozilla/mailnews/absync/src/nsABSyncDriver.cpp index c0ef01a57e2..f16db504193 100644 --- a/mozilla/mailnews/absync/src/nsABSyncDriver.cpp +++ b/mozilla/mailnews/absync/src/nsABSyncDriver.cpp @@ -42,6 +42,7 @@ #include "nsIStringBundle.h" #include "prmem.h" #include "nsString.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver) //NS_IMPL_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver) diff --git a/mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp b/mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp index bf390ab3c6a..f68bc7ac7aa 100644 --- a/mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp +++ b/mozilla/mailnews/addrbook/src/nsAbDirSearchListener.cpp @@ -41,6 +41,7 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsXPIDLString.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbDirSearchListener, nsIAbDirectoryQueryResultListener) diff --git a/mozilla/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp b/mozilla/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp index d195f5c0c26..e559b9e6dec 100644 --- a/mozilla/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp +++ b/mozilla/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp @@ -47,6 +47,7 @@ #include "nsITextToSubURI.h" #include "nsAbBooleanExpression.h" #include "nsAbBaseCID.h" +#include "nsCRT.h" nsresult nsAbQueryStringToExpression::Convert ( const char* queryString, diff --git a/mozilla/mailnews/addrbook/src/nsAbWinHelper.cpp b/mozilla/mailnews/addrbook/src/nsAbWinHelper.cpp index ae040c107ba..889be618ace 100644 --- a/mozilla/mailnews/addrbook/src/nsAbWinHelper.cpp +++ b/mozilla/mailnews/addrbook/src/nsAbWinHelper.cpp @@ -46,6 +46,7 @@ #include "nsAbUtils.h" #include "nsMapiAddressBook.h" #include "nsWabAddressBook.h" +#include "nsCRT.h" #include diff --git a/mozilla/mailnews/compose/src/nsSmtpDataSource.cpp b/mozilla/mailnews/compose/src/nsSmtpDataSource.cpp index 4222e7f3e0a..6df41df82e6 100644 --- a/mozilla/mailnews/compose/src/nsSmtpDataSource.cpp +++ b/mozilla/mailnews/compose/src/nsSmtpDataSource.cpp @@ -40,6 +40,7 @@ #include "nsEnumeratorUtils.h" #include "nsRDFCID.h" #include "nsIServiceManager.h" +#include "nsCRT.h" #include "nsISmtpService.h" #include "nsISmtpServer.h" diff --git a/mozilla/mailnews/compose/src/nsSmtpServer.cpp b/mozilla/mailnews/compose/src/nsSmtpServer.cpp index 4e8a9b3c65b..a5063beb04a 100644 --- a/mozilla/mailnews/compose/src/nsSmtpServer.cpp +++ b/mozilla/mailnews/compose/src/nsSmtpServer.cpp @@ -45,6 +45,7 @@ #include "nsXPIDLString.h" #include "nsReadableUtils.h" #include "nsISmtpUrl.h" +#include "nsCRT.h" NS_IMPL_ADDREF(nsSmtpServer) NS_IMPL_RELEASE(nsSmtpServer) diff --git a/mozilla/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp b/mozilla/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp index a415d8d65cf..3e636266139 100644 --- a/mozilla/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp +++ b/mozilla/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp @@ -38,6 +38,7 @@ #include "nsIServiceManager.h" #include "nsIMsgIdentity.h" #include "nsIMsgCompFields.h" +#include "nsCRT.h" #include "nsReadableUtils.h" // String bundle for smime. Class static. diff --git a/mozilla/mailnews/extensions/smime/src/nsSMimeJSHelper.cpp b/mozilla/mailnews/extensions/smime/src/nsSMimeJSHelper.cpp index a74d4612b53..2633b686143 100644 --- a/mozilla/mailnews/extensions/smime/src/nsSMimeJSHelper.cpp +++ b/mozilla/mailnews/extensions/smime/src/nsSMimeJSHelper.cpp @@ -45,6 +45,7 @@ #include "nsIX509CertDB.h" #include "nsIServiceManager.h" #include "nsPromiseFlatString.h" +#include "nsCRT.h" NS_IMPL_ISUPPORTS1(nsSMimeJSHelper, nsISMimeJSHelper) diff --git a/mozilla/mailnews/mapi/mapihook/src/msgMapiSupport.cpp b/mozilla/mailnews/mapi/mapihook/src/msgMapiSupport.cpp index f61de730b38..648d1d6a890 100644 --- a/mozilla/mailnews/mapi/mapihook/src/msgMapiSupport.cpp +++ b/mozilla/mailnews/mapi/mapihook/src/msgMapiSupport.cpp @@ -44,6 +44,7 @@ #include "nsIServiceManager.h" #include "nsIComponentManager.h" #include "nsICategoryManager.h" +#include "nsCRT.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" diff --git a/mozilla/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.cpp b/mozilla/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.cpp index 8ddc3c19cee..ac429fb7586 100644 --- a/mozilla/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.cpp +++ b/mozilla/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.cpp @@ -41,6 +41,7 @@ #include "prtypes.h" //#include "mimecth.h" #include "nsMimeContentTypeHandler.h" +#include "nsCRT.h" /* * The following macros actually implement addref, release and diff --git a/mozilla/mailnews/mime/src/mimemalt.cpp b/mozilla/mailnews/mime/src/mimemalt.cpp index d40c5aa1cc7..bc777f78bb0 100644 --- a/mozilla/mailnews/mime/src/mimemalt.cpp +++ b/mozilla/mailnews/mime/src/mimemalt.cpp @@ -44,6 +44,7 @@ #include "nsMimeStringResources.h" #include "nsIPref.h" #include "mimemoz2.h" // for prefs +#include "nsCRT.h" static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); diff --git a/mozilla/modules/libjar/nsJAR.cpp b/mozilla/modules/libjar/nsJAR.cpp index db71eec883d..8458de49812 100644 --- a/mozilla/modules/libjar/nsJAR.cpp +++ b/mozilla/modules/libjar/nsJAR.cpp @@ -34,6 +34,7 @@ #include "plbase64.h" #include "nsIConsoleService.h" #include "nscore.h" +#include "nsCRT.h" #ifdef XP_UNIX #include diff --git a/mozilla/modules/libpr0n/src/imgLoader.cpp b/mozilla/modules/libpr0n/src/imgLoader.cpp index 6093e15cce3..384a3b4b819 100644 --- a/mozilla/modules/libpr0n/src/imgLoader.cpp +++ b/mozilla/modules/libpr0n/src/imgLoader.cpp @@ -36,6 +36,7 @@ #include "nsIStreamListener.h" #include "nsIURI.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include "netCore.h" diff --git a/mozilla/modules/libpr0n/src/imgRequestProxy.cpp b/mozilla/modules/libpr0n/src/imgRequestProxy.cpp index 55c77546241..cb4287e3ff6 100644 --- a/mozilla/modules/libpr0n/src/imgRequestProxy.cpp +++ b/mozilla/modules/libpr0n/src/imgRequestProxy.cpp @@ -31,6 +31,7 @@ #include "nsString.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include "ImageLogging.h" diff --git a/mozilla/modules/libpref/src/nsPrefService.cpp b/mozilla/modules/libpref/src/nsPrefService.cpp index cd5a4f9a520..3e465c37556 100644 --- a/mozilla/modules/libpref/src/nsPrefService.cpp +++ b/mozilla/modules/libpref/src/nsPrefService.cpp @@ -47,6 +47,7 @@ #include "nsIObserverService.h" #include "nsPrefBranch.h" #include "nsXPIDLString.h" +#include "nsCRT.h" #include "nsQuickSort.h" #include "prmem.h" diff --git a/mozilla/modules/libpref/src/prefapi.cpp b/mozilla/modules/libpref/src/prefapi.cpp index 548cee7d8f6..64dcfb181ac 100644 --- a/mozilla/modules/libpref/src/prefapi.cpp +++ b/mozilla/modules/libpref/src/prefapi.cpp @@ -39,6 +39,7 @@ #include "prefapi_private_data.h" #include "nsReadableUtils.h" #include "jsapi.h" +#include "nsCRT.h" #if defined(XP_MAC) #include diff --git a/mozilla/modules/oji/src/nsCSecurityContext.cpp b/mozilla/modules/oji/src/nsCSecurityContext.cpp index 51e5f8c1b75..d12d1bbe937 100644 --- a/mozilla/modules/oji/src/nsCSecurityContext.cpp +++ b/mozilla/modules/oji/src/nsCSecurityContext.cpp @@ -62,6 +62,7 @@ #include "nsIScriptGlobalObject.h" #include "nsIServiceManager.h" #include "nsIScriptObjectPrincipal.h" +#include "nsCRT.h" #include "nsTraceRefcnt.h" diff --git a/mozilla/netwerk/base/src/nsDirectoryIndexStream.cpp b/mozilla/netwerk/base/src/nsDirectoryIndexStream.cpp index 361d992a55f..657100b9cbc 100644 --- a/mozilla/netwerk/base/src/nsDirectoryIndexStream.cpp +++ b/mozilla/netwerk/base/src/nsDirectoryIndexStream.cpp @@ -63,6 +63,7 @@ static PRLogModuleInfo* gLog; #include "nsIPlatformCharset.h" #include "nsReadableUtils.h" #include "nsNetUtil.h" +#include "nsCRT.h" static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID); diff --git a/mozilla/netwerk/base/src/nsNetModuleMgr.cpp b/mozilla/netwerk/base/src/nsNetModuleMgr.cpp index cb1c9f149dd..9f305f70e7c 100644 --- a/mozilla/netwerk/base/src/nsNetModuleMgr.cpp +++ b/mozilla/netwerk/base/src/nsNetModuleMgr.cpp @@ -42,6 +42,7 @@ #include "nsString.h" #include "nsXPIDLString.h" #include "nsIEventQueue.h" +#include "nsCRT.h" nsNetModuleMgr* nsNetModuleMgr::gManager; diff --git a/mozilla/netwerk/base/src/nsProtocolProxyService.cpp b/mozilla/netwerk/base/src/nsProtocolProxyService.cpp index e67263a86c5..90f463b6ea8 100644 --- a/mozilla/netwerk/base/src/nsProtocolProxyService.cpp +++ b/mozilla/netwerk/base/src/nsProtocolProxyService.cpp @@ -44,6 +44,7 @@ #include "nsIIOService.h" #include "nsIEventQueueService.h" #include "nsIProtocolHandler.h" +#include "nsCRT.h" static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID); static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); diff --git a/mozilla/netwerk/cache/src/nsCacheEntry.cpp b/mozilla/netwerk/cache/src/nsCacheEntry.cpp index 31ac1042def..5e8bd22c8bc 100644 --- a/mozilla/netwerk/cache/src/nsCacheEntry.cpp +++ b/mozilla/netwerk/cache/src/nsCacheEntry.cpp @@ -32,6 +32,7 @@ #include "nsCache.h" #include "nsCacheService.h" #include "nsCacheDevice.h" +#include "nsCRT.h" nsCacheEntry::nsCacheEntry(nsCString * key, diff --git a/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp b/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp index 83a1d9e4143..cefd4d2b433 100644 --- a/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp +++ b/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp @@ -28,6 +28,7 @@ #include "nsCacheEntry.h" #include "nsReadableUtils.h" #include "nsIOutputStream.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS2(nsCacheEntryDescriptor, nsICacheEntryDescriptor, diff --git a/mozilla/netwerk/cache/src/nsCacheService.cpp b/mozilla/netwerk/cache/src/nsCacheService.cpp index 1d735ca9493..0a2062cb94e 100644 --- a/mozilla/netwerk/cache/src/nsCacheService.cpp +++ b/mozilla/netwerk/cache/src/nsCacheService.cpp @@ -31,6 +31,7 @@ #include "nsDiskCacheDevice.h" #include "nsMemoryCacheDevice.h" #include "nsICacheVisitor.h" +#include "nsCRT.h" #include "nsAutoLock.h" #include "nsIEventQueue.h" diff --git a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp index 2dff6f16956..b8254d60eed 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp @@ -39,6 +39,7 @@ #include "nsReadableUtils.h" #include "nsIInputStream.h" #include "nsIOutputStream.h" +#include "nsCRT.h" static const char DISK_CACHE_DEVICE_ID[] = { "disk" }; diff --git a/mozilla/netwerk/cache/src/nsDiskCacheEntry.cpp b/mozilla/netwerk/cache/src/nsDiskCacheEntry.cpp index 5a87aec06eb..69c9b0ad147 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheEntry.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheEntry.cpp @@ -26,6 +26,7 @@ #include "nsDiskCacheEntry.h" #include "nsDiskCacheBinding.h" #include "nsDiskCacheMap.h" +#include "nsCRT.h" #include "nsCache.h" diff --git a/mozilla/netwerk/cache/src/nsMemoryCacheDevice.cpp b/mozilla/netwerk/cache/src/nsMemoryCacheDevice.cpp index 0e0c8cf7a16..9907c7bfc61 100644 --- a/mozilla/netwerk/cache/src/nsMemoryCacheDevice.cpp +++ b/mozilla/netwerk/cache/src/nsMemoryCacheDevice.cpp @@ -32,6 +32,7 @@ #include "nsIPref.h" #include "nsICacheVisitor.h" #include "nsITransport.h" +#include "nsCRT.h" #include diff --git a/mozilla/netwerk/dns/src/nsDnsService.cpp b/mozilla/netwerk/dns/src/nsDnsService.cpp index e4b573bc343..f10c088fe38 100644 --- a/mozilla/netwerk/dns/src/nsDnsService.cpp +++ b/mozilla/netwerk/dns/src/nsDnsService.cpp @@ -55,6 +55,7 @@ #include "nsIServiceManager.h" #include "nsXPIDLString.h" #include "nsTime.h" +#include "nsCRT.h" #include "nsError.h" #include "prnetdb.h" diff --git a/mozilla/netwerk/mime/src/nsMIMEService.cpp b/mozilla/netwerk/mime/src/nsMIMEService.cpp index b6b798e1678..68b88a66137 100644 --- a/mozilla/netwerk/mime/src/nsMIMEService.cpp +++ b/mozilla/netwerk/mime/src/nsMIMEService.cpp @@ -43,6 +43,7 @@ #include "nsCOMPtr.h" #include "nsXPIDLString.h" #include "nsMimeTypes.h" +#include "nsCRT.h" #ifdef XP_MAC diff --git a/mozilla/netwerk/protocol/data/src/nsDataChannel.cpp b/mozilla/netwerk/protocol/data/src/nsDataChannel.cpp index d0ddbf856f1..4214f915a33 100644 --- a/mozilla/netwerk/protocol/data/src/nsDataChannel.cpp +++ b/mozilla/netwerk/protocol/data/src/nsDataChannel.cpp @@ -48,6 +48,7 @@ #include "nsIOutputStream.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include "nsEscape.h" static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); diff --git a/mozilla/netwerk/protocol/finger/src/nsFingerChannel.cpp b/mozilla/netwerk/protocol/finger/src/nsFingerChannel.cpp index b80242261e0..9c90298f5bc 100644 --- a/mozilla/netwerk/protocol/finger/src/nsFingerChannel.cpp +++ b/mozilla/netwerk/protocol/finger/src/nsFingerChannel.cpp @@ -35,6 +35,7 @@ #include "nsITXTToHTMLConv.h" #include "nsIProgressEventSink.h" #include "nsNetUtil.h" +#include "nsCRT.h" static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID); static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID); diff --git a/mozilla/netwerk/protocol/ftp/src/nsFtpControlConnection.cpp b/mozilla/netwerk/protocol/ftp/src/nsFtpControlConnection.cpp index 79d9d708c13..80a3e3758ae 100644 --- a/mozilla/netwerk/protocol/ftp/src/nsFtpControlConnection.cpp +++ b/mozilla/netwerk/protocol/ftp/src/nsFtpControlConnection.cpp @@ -44,6 +44,7 @@ #include "nsIStreamProvider.h" #include "nsISocketTransportService.h" #include "nsISocketTransport.h" +#include "nsCRT.h" #if defined(PR_LOGGING) extern PRLogModuleInfo* gFTPLog; diff --git a/mozilla/netwerk/protocol/gopher/src/nsGopherChannel.cpp b/mozilla/netwerk/protocol/gopher/src/nsGopherChannel.cpp index f16ddcb64f2..74ad5bcc41c 100644 --- a/mozilla/netwerk/protocol/gopher/src/nsGopherChannel.cpp +++ b/mozilla/netwerk/protocol/gopher/src/nsGopherChannel.cpp @@ -40,6 +40,7 @@ #include "nsNetUtil.h" #include "prlog.h" #include "nsIPref.h" +#include "nsCRT.h" static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID); static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID); diff --git a/mozilla/netwerk/protocol/http/src/nsHttpAuthCache.h b/mozilla/netwerk/protocol/http/src/nsHttpAuthCache.h index ba820748bd9..542b65c74de 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpAuthCache.h +++ b/mozilla/netwerk/protocol/http/src/nsHttpAuthCache.h @@ -47,6 +47,7 @@ #include "nsString.h" #include "nsCOMPtr.h" #include "plhash.h" +#include "nsCRT.h" //----------------------------------------------------------------------------- // nsHttpAuthEntry diff --git a/mozilla/netwerk/protocol/http/src/nsHttpDigestAuth.cpp b/mozilla/netwerk/protocol/http/src/nsHttpDigestAuth.cpp index b6c338d7513..30a814faeb9 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpDigestAuth.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpDigestAuth.cpp @@ -36,6 +36,7 @@ #include "plstr.h" #include "prprf.h" #include "prmem.h" +#include "nsCRT.h" //----------------------------------------------------------------------------- // nsHttpDigestAuth diff --git a/mozilla/netwerk/protocol/http/src/nsHttpRequestHead.h b/mozilla/netwerk/protocol/http/src/nsHttpRequestHead.h index 1eebe82ed69..5993414b306 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpRequestHead.h +++ b/mozilla/netwerk/protocol/http/src/nsHttpRequestHead.h @@ -27,6 +27,7 @@ #include "nsHttpHeaderArray.h" #include "nsHttp.h" #include "nsString.h" +#include "nsCRT.h" //----------------------------------------------------------------------------- // nsHttpRequestHead represents the request line and headers from an HTTP diff --git a/mozilla/netwerk/protocol/http/src/nsHttpResponseHead.cpp b/mozilla/netwerk/protocol/http/src/nsHttpResponseHead.cpp index 46b20b8decc..27208d0f44d 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpResponseHead.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpResponseHead.cpp @@ -27,6 +27,7 @@ #include "nsPrintfCString.h" #include "prprf.h" #include "prtime.h" +#include "nsCRT.h" //----------------------------------------------------------------------------- // nsHttpResponseHead diff --git a/mozilla/netwerk/socket/base/Makefile.in b/mozilla/netwerk/socket/base/Makefile.in index 565a2324359..42e8721f7a6 100755 --- a/mozilla/netwerk/socket/base/Makefile.in +++ b/mozilla/netwerk/socket/base/Makefile.in @@ -33,7 +33,7 @@ REQUIRES = xpcom \ string \ $(NULL) -CPPSRCS = nsSocketProviderService.cpp nsSOCKSSocketProvider.cpp nsSOCKS4SocketProvider.cpp nsSOCKSIOLayer.cpp +CPPSRCS = nsSocketProviderService.cpp nsSOCKSSocketProvider.cpp nsSOCKS4SocketProvider.cpp nsSOCKSIOLayer.cpp nsUDPSocketProvider.cpp XPIDLSRCS = \ nsISocketProvider.idl \ diff --git a/mozilla/netwerk/socket/base/nsSOCKSIOLayer.cpp b/mozilla/netwerk/socket/base/nsSOCKSIOLayer.cpp index 1132a02bdca..ff1072d8252 100644 --- a/mozilla/netwerk/socket/base/nsSOCKSIOLayer.cpp +++ b/mozilla/netwerk/socket/base/nsSOCKSIOLayer.cpp @@ -23,6 +23,7 @@ #include "nspr.h" #include "nsString.h" +#include "nsCRT.h" #include "nsIServiceManager.h" #include "nsSOCKSIOLayer.h" diff --git a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp index c02226a8102..e0233e209b9 100644 --- a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp +++ b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp @@ -38,6 +38,7 @@ #include "nsNetCID.h" #include "nsReadableUtils.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); diff --git a/mozilla/netwerk/streamconv/converters/nsDirIndex.cpp b/mozilla/netwerk/streamconv/converters/nsDirIndex.cpp index f7f3c806339..5280e1ba635 100644 --- a/mozilla/netwerk/streamconv/converters/nsDirIndex.cpp +++ b/mozilla/netwerk/streamconv/converters/nsDirIndex.cpp @@ -37,6 +37,7 @@ #include "nsDirIndex.h" #include "nsReadableUtils.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS1(nsDirIndex, nsIDirIndex); diff --git a/mozilla/netwerk/streamconv/converters/nsDirIndexParser.cpp b/mozilla/netwerk/streamconv/converters/nsDirIndexParser.cpp index 899babde565..36938c588dd 100644 --- a/mozilla/netwerk/streamconv/converters/nsDirIndexParser.cpp +++ b/mozilla/netwerk/streamconv/converters/nsDirIndexParser.cpp @@ -50,6 +50,7 @@ #include "nsIInputStream.h" #include "nsIChannel.h" #include "nsIURI.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS3(nsDirIndexParser, nsIRequestObserver, diff --git a/mozilla/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/mozilla/netwerk/streamconv/converters/nsIndexedToHTML.cpp index 09d71d3ed1f..2ef61f6d08c 100644 --- a/mozilla/netwerk/streamconv/converters/nsIndexedToHTML.cpp +++ b/mozilla/netwerk/streamconv/converters/nsIndexedToHTML.cpp @@ -44,6 +44,7 @@ #include "nsIDirIndex.h" #include "prtime.h" #include "nsDateTimeFormatCID.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS4(nsIndexedToHTML, nsIDirIndexListener, diff --git a/mozilla/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/mozilla/netwerk/streamconv/converters/nsMultiMixedConv.cpp index f18f971caf7..02c067000bc 100644 --- a/mozilla/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/mozilla/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -45,6 +45,7 @@ #include "nsIByteArrayInputStream.h" #include "nsReadableUtils.h" #include "nsIMultiPartChannel.h" +#include "nsCRT.h" // diff --git a/mozilla/netwerk/test/TestPerf.cpp b/mozilla/netwerk/test/TestPerf.cpp index e0c68bb727e..67b2e63f770 100644 --- a/mozilla/netwerk/test/TestPerf.cpp +++ b/mozilla/netwerk/test/TestPerf.cpp @@ -1,4 +1,5 @@ #include +#include "nsCRT.h" /* should be "plstr.h"? */ #include "nsNetUtil.h" #include "nsIEventQueueService.h" #include "nsIServiceManager.h" diff --git a/mozilla/netwerk/test/urltest.cpp b/mozilla/netwerk/test/urltest.cpp index 851d67c8c51..1a73a54cf87 100644 --- a/mozilla/netwerk/test/urltest.cpp +++ b/mozilla/netwerk/test/urltest.cpp @@ -54,6 +54,7 @@ #include "nsXPIDLString.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include "nsNetCID.h" #include "nsIComponentRegistrar.h" diff --git a/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp b/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp index e79b335409f..329c2bce27c 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp @@ -41,6 +41,7 @@ #include "nsString.h" +#include "nsCRT.h" #include "nsAVLTree.h" MOZ_DECL_CTOR_COUNTER(EntityNode) diff --git a/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp b/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp index 425b81d382d..74781150a60 100644 --- a/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp +++ b/mozilla/parser/htmlparser/tests/outsinks/Convert.cpp @@ -33,6 +33,7 @@ #include "nsIServiceManager.h" #include "nsIComponentRegistrar.h" #include "nsReadableUtils.h" +#include "nsCRT.h" static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID); static NS_DEFINE_CID(kParserCID, NS_PARSER_CID); diff --git a/mozilla/rdf/base/src/nsInMemoryDataSource.cpp b/mozilla/rdf/base/src/nsInMemoryDataSource.cpp index bb73f730326..28ee306c72b 100644 --- a/mozilla/rdf/base/src/nsInMemoryDataSource.cpp +++ b/mozilla/rdf/base/src/nsInMemoryDataSource.cpp @@ -69,6 +69,7 @@ #include "nsAutoLock.h" #include "nsEnumeratorUtils.h" #include "nsVoidArray.h" // XXX introduces dependency on raptorbase +#include "nsCRT.h" #include "nsRDFCID.h" #include "nsRDFBaseDataSources.h" #include "nsString.h" diff --git a/mozilla/rdf/base/src/nsRDFContentSink.cpp b/mozilla/rdf/base/src/nsRDFContentSink.cpp index ede5daf04e7..f7d7d492de5 100644 --- a/mozilla/rdf/base/src/nsRDFContentSink.cpp +++ b/mozilla/rdf/base/src/nsRDFContentSink.cpp @@ -92,6 +92,7 @@ #include "rdfutil.h" #include "nsReadableUtils.h" #include "nsIExpatSink.h" +#include "nsCRT.h" //////////////////////////////////////////////////////////////////////// diff --git a/mozilla/rdf/base/src/nsRDFService.cpp b/mozilla/rdf/base/src/nsRDFService.cpp index a3e51cccf5d..4b52f26ed4b 100644 --- a/mozilla/rdf/base/src/nsRDFService.cpp +++ b/mozilla/rdf/base/src/nsRDFService.cpp @@ -68,6 +68,7 @@ #include "prprf.h" #include "prmem.h" #include "rdf.h" +#include "nsCRT.h" //////////////////////////////////////////////////////////////////////// diff --git a/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp b/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp index a16fa5d83d1..5c48c97f226 100644 --- a/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp +++ b/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp @@ -122,6 +122,7 @@ #include "rdfutil.h" #include "prlog.h" #include "nsNameSpaceMap.h" +#include "nsCRT.h" //---------------------------------------------------------------------- diff --git a/mozilla/rdf/datasource/src/nsLocalStore.cpp b/mozilla/rdf/datasource/src/nsLocalStore.cpp index dab1d821fe4..63d1918a8aa 100644 --- a/mozilla/rdf/datasource/src/nsLocalStore.cpp +++ b/mozilla/rdf/datasource/src/nsLocalStore.cpp @@ -62,6 +62,7 @@ #include "nsIObserver.h" #include "nsIObserverService.h" #include "nsWeakReference.h" +#include "nsCRT.h" //////////////////////////////////////////////////////////////////////// diff --git a/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp b/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp index d2a82a90da3..cdf73a92f8e 100644 --- a/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp +++ b/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp @@ -70,6 +70,7 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsNetCID.h" +#include "nsCRT.h" //////////////////////////////////////////////////////////////////////// // CIDs diff --git a/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp b/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp index c06f713e0b6..8a3d4e01441 100644 --- a/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp +++ b/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp @@ -67,6 +67,7 @@ #include "nsISecurityWarningDialogs.h" #include "nsIProxyObjectManager.h" #include "nsINSSDialogs.h" +#include "nsCRT.h" #define SECURITY_STRING_BUNDLE_URL "chrome://communicator/locale/security.properties" diff --git a/mozilla/security/manager/pki/src/nsASN1Tree.cpp b/mozilla/security/manager/pki/src/nsASN1Tree.cpp index 573e0d630e8..eab14c1187e 100644 --- a/mozilla/security/manager/pki/src/nsASN1Tree.cpp +++ b/mozilla/security/manager/pki/src/nsASN1Tree.cpp @@ -34,6 +34,7 @@ #include "nsASN1Tree.h" #include "nsIComponentManager.h" #include "nsString.h" +#include "nsCRT.h" NS_IMPL_THREADSAFE_ISUPPORTS2(nsNSSASN1Tree, nsIASN1Tree, nsITreeView); diff --git a/mozilla/security/manager/ssl/src/nsCMSSecureMessage.cpp b/mozilla/security/manager/ssl/src/nsCMSSecureMessage.cpp index 8bb42241cd6..3afd7c35c06 100644 --- a/mozilla/security/manager/ssl/src/nsCMSSecureMessage.cpp +++ b/mozilla/security/manager/ssl/src/nsCMSSecureMessage.cpp @@ -40,6 +40,7 @@ #include "nsCOMPtr.h" #include "nsISupports.h" #include "nsIInterfaceRequestor.h" +#include "nsCRT.h" #include "nsICMSSecureMessage.h" diff --git a/mozilla/security/manager/ssl/src/nsKeygenHandler.cpp b/mozilla/security/manager/ssl/src/nsKeygenHandler.cpp index 89406a0866d..690c03cb9d0 100644 --- a/mozilla/security/manager/ssl/src/nsKeygenHandler.cpp +++ b/mozilla/security/manager/ssl/src/nsKeygenHandler.cpp @@ -48,6 +48,7 @@ extern "C" { #include "nsKeygenThread.h" #include "nsReadableUtils.h" #include "nsUnicharUtils.h" +#include "nsCRT.h" //These defines are taken from the PKCS#11 spec #define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000 diff --git a/mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp b/mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp index 9f56f1fd0de..c278451bb60 100644 --- a/mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp +++ b/mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp @@ -36,6 +36,7 @@ #include "nsProxiedService.h" #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" +#include "nsCRT.h" #include "ssl.h" #include "cert.h" diff --git a/mozilla/security/manager/ssl/src/nsNSSCertificate.cpp b/mozilla/security/manager/ssl/src/nsNSSCertificate.cpp index ca9e35b3e0f..d346c0bd0ce 100644 --- a/mozilla/security/manager/ssl/src/nsNSSCertificate.cpp +++ b/mozilla/security/manager/ssl/src/nsNSSCertificate.cpp @@ -59,6 +59,7 @@ #include "nsIPrompt.h" #include "nsTime.h" #include "nsIProxyObjectManager.h" +#include "nsCRT.h" #include "nspr.h" extern "C" { diff --git a/mozilla/security/manager/ssl/src/nsNSSComponent.cpp b/mozilla/security/manager/ssl/src/nsNSSComponent.cpp index 2a7c7cf360a..31473dd5b54 100644 --- a/mozilla/security/manager/ssl/src/nsNSSComponent.cpp +++ b/mozilla/security/manager/ssl/src/nsNSSComponent.cpp @@ -53,6 +53,7 @@ #include "nsIEventQueue.h" #include "nsIRunnable.h" #include "plevent.h" +#include "nsCRT.h" #include "nsIWindowWatcher.h" #include "nsIPrompt.h" diff --git a/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp b/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp index 295e5940b74..e19282defff 100644 --- a/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp +++ b/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp @@ -58,6 +58,7 @@ #include "nsReadableUtils.h" #include "nsVoidArray.h" #include "nsHashtable.h" +#include "nsCRT.h" #include "ssl.h" #include "secerr.h" diff --git a/mozilla/security/manager/ssl/src/nsPKCS11Slot.cpp b/mozilla/security/manager/ssl/src/nsPKCS11Slot.cpp index 89c153df7c3..41a6b2ab7fd 100644 --- a/mozilla/security/manager/ssl/src/nsPKCS11Slot.cpp +++ b/mozilla/security/manager/ssl/src/nsPKCS11Slot.cpp @@ -40,6 +40,7 @@ #include "nsISupportsArray.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include "secmod.h" diff --git a/mozilla/string/obsolete/bufferRoutines.h b/mozilla/string/obsolete/bufferRoutines.h index c72221a1d4f..6e0f15256c6 100644 --- a/mozilla/string/obsolete/bufferRoutines.h +++ b/mozilla/string/obsolete/bufferRoutines.h @@ -47,6 +47,13 @@ #include "nsStringDefines.h" #endif +#ifndef nsCharTraits_h___ +#include "nsCharTraits.h" +#endif + +#include "nspr.h" +#include "plstr.h" +#include /****************************************************************************************** MODULE NOTES: @@ -57,10 +64,6 @@ Not so, today though. *******************************************************************************************/ - -#include "nsCRT.h" - - #define KSHIFTLEFT (0) #define KSHIFTRIGHT (1) @@ -406,11 +409,11 @@ inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset if(aIgnoreCase) { // safe because aChar < 256 - char theChar=nsCRT::ToUpper(char(aChar)); + char theChar=toupper(char(aChar)); while(left::compare(aStr1,aStr2,aCount); + + // alien comparisons may return out-of-bound answers + // instead of the -1, 0, 1 expected by most clients + if ( result < -1 ) + result = -1; + else if ( result > 1 ) + result = 1; return result; } @@ -607,7 +618,28 @@ PRInt32 Compare1To1(const char* aStr1,const char* aStr2,PRUint32 aCount,PRBool a */ PRInt32 Compare2To2(const PRUnichar* aStr1,const PRUnichar* aStr2,PRUint32 aCount); PRInt32 Compare2To2(const PRUnichar* aStr1,const PRUnichar* aStr2,PRUint32 aCount){ - return nsCRT::strncmp(aStr1, aStr2, aCount); + PRInt32 result; + + if ( aStr1 && aStr2 ) + result = nsCharTraits::compare(aStr1, aStr2, aCount); + + // The following cases are rare and survivable caller errors. + // Two null pointers are equal, but any string, even 0 length + // is greater than a null pointer. It might not really matter, + // but we pick something reasonable anyway. + else if ( !aStr1 && !aStr2 ) + result = 0; + else if ( aStr1 ) + result = 1; + else + result = -1; + + // alien comparisons may give answers outside the -1, 0, 1 expected by callers + if ( result < -1 ) + result = -1; + else if ( result > 1 ) + result = 1; + return result; } @@ -645,8 +677,8 @@ PRInt32 Compare2To1(const PRUnichar* aStr1,const char* aStr2,PRUint32 aCount,PRB // can't do case conversion on characters out of our range if (aIgnoreCase && c1<128 && c2<128) { - c1 = nsCRT::ToLower(char(c1)); - c2 = nsCRT::ToLower(char(c2)); + c1 = tolower(char(c1)); + c2 = tolower(char(c2)); if (c1 == c2) continue; } diff --git a/mozilla/string/obsolete/nsStr.cpp b/mozilla/string/obsolete/nsStr.cpp index 8d7a4ffa2e9..104f65516c3 100644 --- a/mozilla/string/obsolete/nsStr.cpp +++ b/mozilla/string/obsolete/nsStr.cpp @@ -36,14 +36,16 @@ * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ - + +#ifndef nsCharTraits_h___ +#include "nsCharTraits.h" +#endif + #include "nsStrPrivate.h" #include "nsStr.h" #include "bufferRoutines.h" #include //only used for printf -#include "nsCRT.h" -#include "nsDeque.h" - + /****************************************************************************************** MODULE NOTES: @@ -1147,7 +1149,7 @@ CBufDescriptor::CBufDescriptor(char* aString,PRBool aStackBased,PRUint32 aCapaci mLength=mCapacity=0; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1161,7 +1163,7 @@ CBufDescriptor::CBufDescriptor(const char* aString,PRBool aStackBased,PRUint32 a mLength=mCapacity=0; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1176,7 +1178,7 @@ CBufDescriptor::CBufDescriptor(PRUnichar* aString,PRBool aStackBased,PRUint32 aC mIsConst=PR_FALSE; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? nsCRT::strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1190,7 +1192,7 @@ CBufDescriptor::CBufDescriptor(const PRUnichar* aString,PRBool aStackBased,PRUin mIsConst=PR_TRUE; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? nsCRT::strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1201,10 +1203,26 @@ CBufDescriptor::CBufDescriptor(const PRUnichar* aString,PRBool aStackBased,PRUin PRUint32 nsStrPrivate::HashCode(const nsStr& aDest) { - if (aDest.GetCharSize() == eTwoByte) - return nsCRT::HashCode(aDest.mUStr); - else - return nsCRT::HashCode(aDest.mStr); + PRUint32 h = 0; + if (aDest.GetCharSize() == eTwoByte) { + const PRUnichar* s = aDest.mUStr; + + if (!s) return h; + + PRUnichar c; + while ( (c = *s++) ) + h = (h>>28) ^ (h<<4) ^ c; + return h; + } else { + const char* s = aDest.mStr; + + if (!s) return h; + + unsigned char c; + while ( (c = *s++) ) + h = (h>>28) ^ (h<<4) ^ c; + return h; + } } #ifdef NS_STR_STATS diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index 57241895a91..89c2985f41d 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -45,8 +45,10 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsDebug.h" -#include "nsCRT.h" -#include "nsDeque.h" + +#ifndef nsCharTraits_h___ +#include "nsCharTratis.h" +#endif #ifndef RICKG_TESTBED #include "prdtoa.h" @@ -317,12 +319,12 @@ void nsCString::ReplaceSubstring(const char* aTarget,const char* aNewValue){ if(aTarget && aNewValue) { - PRInt32 len=strlen(aTarget); + PRInt32 len=nsCharTraits::length(aTarget); if(0::length(aNewValue); if(0::length(aString); if(0::length(aCString); temp.mStr=(char*)aCString; result=nsStrPrivate::FindSubstr1in1(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -863,7 +865,7 @@ PRInt32 nsCString::FindCharInSet(const char* aCStringSet,PRInt32 anOffset) const if(aCStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCStringSet); + temp.mLength=nsCharTraits::length(aCStringSet); temp.mStr=(char*)aCStringSet; result=nsStrPrivate::FindCharInSet1(*this,temp,PR_FALSE,anOffset); } @@ -908,7 +910,7 @@ PRInt32 nsCString::RFind(const char* aString,PRBool aIgnoreCase,PRInt32 anOffset if(aString) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aString); + temp.mLength=nsCharTraits::length(aString); temp.mStr=(char*)aString; result=nsStrPrivate::RFindSubstr1in1(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -945,7 +947,7 @@ PRInt32 nsCString::RFindCharInSet(const char* aCStringSet,PRInt32 anOffset) cons if(aCStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCStringSet); + temp.mLength=nsCharTraits::length(aCStringSet); temp.mStr=(char*)aCStringSet; result=nsStrPrivate::RFindCharInSet1(*this,temp,PR_FALSE,anOffset); } @@ -975,7 +977,7 @@ PRInt32 nsCString::Compare(const char *aCString,PRBool aIgnoreCase,PRInt32 aCoun if(aCString) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCString); + temp.mLength=nsCharTraits::length(aCString); temp.mStr=(char*)aCString; return nsStrPrivate::StrCompare1To1(*this,temp,aCount,aIgnoreCase); } diff --git a/mozilla/string/obsolete/nsString2.cpp b/mozilla/string/obsolete/nsString2.cpp index 7570173d081..bd8189fd7a3 100644 --- a/mozilla/string/obsolete/nsString2.cpp +++ b/mozilla/string/obsolete/nsString2.cpp @@ -44,13 +44,15 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsDebug.h" -#include "nsDeque.h" + +#ifndef nsCharTraits_h___ +#include "nsCharTraits.h" +#endif #ifndef RICKG_TESTBED #include "prdtoa.h" #include "nsISizeOfHandler.h" -#endif - +#endif static const char* kPossibleNull = "Error: possible unintended null in string"; static const char* kNullPointerError = "Error: unexpected null ptr"; @@ -372,12 +374,12 @@ void nsString::ReplaceSubstring(const PRUnichar* aTarget,const PRUnichar* aNewValue){ if(aTarget && aNewValue) { - PRInt32 len=nsCRT::strlen(aTarget); + PRInt32 len=nsCharTraits::length(aTarget); if(0::length(aNewValue); if(0::length(aCString); if(0::length(aCString); if(0::length(aCString); temp.mStr = NS_CONST_CAST(char*, aCString); result=nsStrPrivate::FindSubstr1in2(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -887,7 +889,7 @@ PRInt32 nsString::Find(const PRUnichar* aString,PRInt32 anOffset,PRInt32 aCount) if(aString) { nsStr temp; nsStrPrivate::Initialize(temp,eTwoByte); - temp.mLength = nsCRT::strlen(aString); + temp.mLength = nsCharTraits::length(aString); temp.mUStr = NS_CONST_CAST(PRUnichar*, aString); result=nsStrPrivate::FindSubstr2in2(*this,temp,anOffset,aCount); } @@ -931,7 +933,7 @@ PRInt32 nsString::FindCharInSet(const char* aCStringSet,PRInt32 anOffset) const{ if(aCStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCStringSet); + temp.mLength=nsCharTraits::length(aCStringSet); temp.mStr = NS_CONST_CAST(char*, aCStringSet); result=nsStrPrivate::FindCharInSet1(*this,temp,PR_FALSE,anOffset); } @@ -954,7 +956,7 @@ PRInt32 nsString::FindCharInSet(const PRUnichar* aStringSet,PRInt32 anOffset) co if(aStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eTwoByte); - temp.mLength=nsCRT::strlen(aStringSet); + temp.mLength=nsCharTraits::length(aStringSet); temp.mUStr=NS_CONST_CAST(PRUnichar*, aStringSet); result=nsStrPrivate::FindCharInSet2(*this,temp,anOffset); } @@ -987,7 +989,7 @@ PRInt32 nsString::RFind(const PRUnichar* aString, PRInt32 anOffset, PRInt32 aCou if (aString) { nsStr temp; nsStrPrivate::Initialize(temp, eTwoByte); - temp.mLength = nsCRT::strlen(aString); + temp.mLength = nsCharTraits::length(aString); temp.mUStr = NS_CONST_CAST(PRUnichar*, aString); result=nsStrPrivate::RFindSubstr2in2(*this,temp,anOffset,aCount); } @@ -1011,7 +1013,7 @@ PRInt32 nsString::RFind(const char* aString,PRBool aIgnoreCase,PRInt32 anOffset, if(aString) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aString); + temp.mLength=nsCharTraits::length(aString); temp.mStr = NS_CONST_CAST(char*, aString); result=nsStrPrivate::RFindSubstr1in2(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -1049,7 +1051,7 @@ PRInt32 nsString::RFindCharInSet(const PRUnichar* aStringSet,PRInt32 anOffset) c if(aStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eTwoByte); - temp.mLength = nsCRT::strlen(aStringSet); + temp.mLength = nsCharTraits::length(aStringSet); temp.mUStr = NS_CONST_CAST(PRUnichar*, aStringSet); result=nsStrPrivate::RFindCharInSet2(*this,temp,anOffset); } @@ -1076,7 +1078,7 @@ PRInt32 nsString::CompareWithConversion(const char *aCString,PRBool aIgnoreCase, nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength= (0::length(aCString); temp.mStr = NS_CONST_CAST(char*, aCString); return nsStrPrivate::StrCompare2To1(*this,temp,aCount,aIgnoreCase); @@ -1123,7 +1125,7 @@ PRBool nsString::EqualsAtom(nsIAtom* aAtom) const{ const PRUnichar* unicode; if (aAtom->GetUnicode(&unicode) != NS_OK || unicode == nsnull) return PR_FALSE; - cmp=Compare2To2(mUStr,unicode, nsCRT::strlen(mUStr)); + cmp=Compare2To2(mUStr,unicode, nsCharTraits::length(mUStr)); result=PRBool(0==cmp); } diff --git a/mozilla/string/obsolete/nsString2.h b/mozilla/string/obsolete/nsString2.h index b171645e56a..354662d6614 100644 --- a/mozilla/string/obsolete/nsString2.h +++ b/mozilla/string/obsolete/nsString2.h @@ -76,8 +76,6 @@ #include "nsIAtom.h" #include "nsStr.h" -#include "nsCRT.h" - class UTF8traits { diff --git a/mozilla/string/public/nsCharTraits.h b/mozilla/string/public/nsCharTraits.h index 12d5533de47..4f6b25f6100 100644 --- a/mozilla/string/public/nsCharTraits.h +++ b/mozilla/string/public/nsCharTraits.h @@ -174,7 +174,19 @@ struct nsCharTraits int compare( const char_type* s1, const char_type* s2, size_t n ) { - return memcmp(s1, s2, n * sizeof(char_type)); +#ifdef USE_CPP_WCHAR_FUNCS + return wmemcmp(s1, s2, n); +#else + for ( ; n--; ++s1, ++s2 ) + { + if ( lt(*s1, *s2) ) + return -1; + if ( lt(*s2, *s1) ) + return 1; + } + + return 0; +#endif } static diff --git a/mozilla/string/src/nsAString.cpp b/mozilla/string/src/nsAString.cpp index 0d56b9f2443..23f3c98c256 100644 --- a/mozilla/string/src/nsAString.cpp +++ b/mozilla/string/src/nsAString.cpp @@ -532,8 +532,8 @@ nsCaseInsensitiveCStringComparator::operator()( char lhs, char rhs ) const { if (lhs == rhs) return 0; - lhs = nsCRT::ToLower(lhs); - rhs = nsCRT::ToLower(rhs); + lhs = tolower(lhs); + rhs = tolower(rhs); return lhs - rhs; } diff --git a/mozilla/uriloader/base/nsURILoader.cpp b/mozilla/uriloader/base/nsURILoader.cpp index 2fb16e41f95..e76605fb836 100644 --- a/mozilla/uriloader/base/nsURILoader.cpp +++ b/mozilla/uriloader/base/nsURILoader.cpp @@ -55,6 +55,7 @@ #include "nsWeakReference.h" #include "nsIHttpChannel.h" #include "netCore.h" +#include "nsCRT.h" #include "nsIDocShell.h" #include "nsIDocShellTreeItem.h" diff --git a/mozilla/uriloader/exthandler/mac/nsMacMIMEDataSource.cpp b/mozilla/uriloader/exthandler/mac/nsMacMIMEDataSource.cpp index 7ef42b634e4..aed09dac09a 100644 --- a/mozilla/uriloader/exthandler/mac/nsMacMIMEDataSource.cpp +++ b/mozilla/uriloader/exthandler/mac/nsMacMIMEDataSource.cpp @@ -37,6 +37,7 @@ #include "nsMacMIMEDataSource.h" #include "nsString.h" +#include "nsCRT.h" #include "nsIComponentManager.h" #include "nsIMIMEInfo.h" diff --git a/mozilla/widget/src/gtk/nsDragService.cpp b/mozilla/widget/src/gtk/nsDragService.cpp index 7bec982f5bd..689808d573c 100644 --- a/mozilla/widget/src/gtk/nsDragService.cpp +++ b/mozilla/widget/src/gtk/nsDragService.cpp @@ -31,6 +31,7 @@ #include "nsWidget.h" #include #include +#include "nsCRT.h" static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID); diff --git a/mozilla/widget/src/gtk/nsGtkIMEHelper.cpp b/mozilla/widget/src/gtk/nsGtkIMEHelper.cpp index 35a535df71f..7f9acccc896 100644 --- a/mozilla/widget/src/gtk/nsGtkIMEHelper.cpp +++ b/mozilla/widget/src/gtk/nsGtkIMEHelper.cpp @@ -45,6 +45,7 @@ #include "nsIServiceManager.h" #include "nsIPref.h" #include +#include "nsCRT.h" #include "nsWindow.h" diff --git a/mozilla/widget/src/gtk/nsGtkMozRemoteHelper.cpp b/mozilla/widget/src/gtk/nsGtkMozRemoteHelper.cpp index 8b002e728de..d033b91ba9a 100644 --- a/mozilla/widget/src/gtk/nsGtkMozRemoteHelper.cpp +++ b/mozilla/widget/src/gtk/nsGtkMozRemoteHelper.cpp @@ -28,6 +28,7 @@ #include #include #include "nsGtkMozRemoteHelper.h" +#include "nsCRT.h" #define MOZILLA_VERSION_PROP "_MOZILLA_VERSION" #define MOZILLA_LOCK_PROP "_MOZILLA_LOCK" diff --git a/mozilla/widget/src/mac/nsClipboard.cpp b/mozilla/widget/src/mac/nsClipboard.cpp index 58eca466d05..433e53f42d9 100644 --- a/mozilla/widget/src/mac/nsClipboard.cpp +++ b/mozilla/widget/src/mac/nsClipboard.cpp @@ -60,6 +60,7 @@ #include "nsPrimitiveHelpers.h" #include "nsIImageMac.h" #include "nsMemory.h" +#include "nsCRT.h" #include diff --git a/mozilla/widget/src/mac/nsMacEventHandler.cpp b/mozilla/widget/src/mac/nsMacEventHandler.cpp index bad6f949690..adc64c3dccb 100644 --- a/mozilla/widget/src/mac/nsMacEventHandler.cpp +++ b/mozilla/widget/src/mac/nsMacEventHandler.cpp @@ -39,6 +39,7 @@ #include "nsWindow.h" #include "nsMacWindow.h" +#include "nsCRT.h" #include "prinrval.h" #include diff --git a/mozilla/widget/src/mac/nsMacWindow.cpp b/mozilla/widget/src/mac/nsMacWindow.cpp index 8c30b89a9f8..9fb273107d7 100644 --- a/mozilla/widget/src/mac/nsMacWindow.cpp +++ b/mozilla/widget/src/mac/nsMacWindow.cpp @@ -52,6 +52,7 @@ #include "nsMacResources.h" #include "nsRegionMac.h" #include "nsIRollupListener.h" +#include "nsCRT.h" #if TARGET_CARBON #include diff --git a/mozilla/widget/src/mac/nsMenuX.cpp b/mozilla/widget/src/mac/nsMenuX.cpp index aa96a8df232..acb87513939 100644 --- a/mozilla/widget/src/mac/nsMenuX.cpp +++ b/mozilla/widget/src/mac/nsMenuX.cpp @@ -71,6 +71,7 @@ #include "nsGUIEvent.h" #include "nsDynamicMDEF.h" +#include "nsCRT.h" static OSStatus InstallMyMenuEventHandler(MenuRef menuRef, void* userData, EventHandlerRef* outHandler) ; diff --git a/mozilla/widget/src/mac/nsMimeMapper.cpp b/mozilla/widget/src/mac/nsMimeMapper.cpp index 5a225eefb40..c41addac1fc 100644 --- a/mozilla/widget/src/mac/nsMimeMapper.cpp +++ b/mozilla/widget/src/mac/nsMimeMapper.cpp @@ -46,6 +46,7 @@ #include "nsITransferable.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include #include diff --git a/mozilla/widget/src/mac/nsSound.cpp b/mozilla/widget/src/mac/nsSound.cpp index 3fa1f72fd80..05545f415aa 100644 --- a/mozilla/widget/src/mac/nsSound.cpp +++ b/mozilla/widget/src/mac/nsSound.cpp @@ -57,6 +57,7 @@ #include "nsITimer.h" #include "nsITimerCallback.h" +#include "nsCRT.h" #include #include diff --git a/mozilla/widget/src/mac/nsTextWidget.cpp b/mozilla/widget/src/mac/nsTextWidget.cpp index d22d5ee022c..f6ad08d4b3d 100644 --- a/mozilla/widget/src/mac/nsTextWidget.cpp +++ b/mozilla/widget/src/mac/nsTextWidget.cpp @@ -37,6 +37,8 @@ #include "nsTextWidget.h" #include "nsIRenderingContext.h" +#include "nsCRT.h" + #include #include #include diff --git a/mozilla/widget/src/windows/nsClipboard.cpp b/mozilla/widget/src/windows/nsClipboard.cpp index eaa40e39619..87976bd7787 100644 --- a/mozilla/widget/src/windows/nsClipboard.cpp +++ b/mozilla/widget/src/windows/nsClipboard.cpp @@ -57,6 +57,7 @@ #include "nsIWidget.h" #include "nsIComponentManager.h" #include "nsWidgetsCID.h" +#include "nsCRT.h" #include "nsVoidArray.h" #include "nsNetUtil.h" diff --git a/mozilla/widget/src/windows/nsDataObj.cpp b/mozilla/widget/src/windows/nsDataObj.cpp index 4dc07896a33..1c3840a1426 100644 --- a/mozilla/widget/src/windows/nsDataObj.cpp +++ b/mozilla/widget/src/windows/nsDataObj.cpp @@ -52,6 +52,7 @@ #include "nsIImage.h" #include "nsImageClipboard.h" #include "prprf.h" +#include "nsCRT.h" #include "OLE2.h" #include "URLMON.h" diff --git a/mozilla/widget/src/windows/nsFilePicker.cpp b/mozilla/widget/src/windows/nsFilePicker.cpp index 6aa6e130685..858b7853c74 100644 --- a/mozilla/widget/src/windows/nsFilePicker.cpp +++ b/mozilla/widget/src/windows/nsFilePicker.cpp @@ -36,6 +36,7 @@ #include "nsIURL.h" #include "nsIFileURL.h" #include "nsIStringBundle.h" +#include "nsCRT.h" #include #include diff --git a/mozilla/widget/src/windows/nsSound.cpp b/mozilla/widget/src/windows/nsSound.cpp index 5693ca7748b..0aa9bd70059 100644 --- a/mozilla/widget/src/windows/nsSound.cpp +++ b/mozilla/widget/src/windows/nsSound.cpp @@ -30,6 +30,7 @@ #include "nsSound.h" #include "nsIURL.h" #include "nsNetUtil.h" +#include "nsCRT.h" NS_IMPL_ISUPPORTS2(nsSound, nsISound, nsIStreamLoaderObserver) diff --git a/mozilla/widget/src/xpwidgets/nsHTMLFormatConverter.cpp b/mozilla/widget/src/xpwidgets/nsHTMLFormatConverter.cpp index 784e920a207..3b4c79044a9 100644 --- a/mozilla/widget/src/xpwidgets/nsHTMLFormatConverter.cpp +++ b/mozilla/widget/src/xpwidgets/nsHTMLFormatConverter.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsString.h" +#include "nsCRT.h" #include "nsISupportsArray.h" #include "nsIComponentManager.h" #include "nsCOMPtr.h" diff --git a/mozilla/widget/src/xpwidgets/nsXPLookAndFeel.cpp b/mozilla/widget/src/xpwidgets/nsXPLookAndFeel.cpp index 5b6df20b380..65516756598 100644 --- a/mozilla/widget/src/xpwidgets/nsXPLookAndFeel.cpp +++ b/mozilla/widget/src/xpwidgets/nsXPLookAndFeel.cpp @@ -42,6 +42,7 @@ static int PR_CALLBACK colorPrefChanged(const char* aPref, void* aData); #include "nsXPLookAndFeel.h" #include "nsIServiceManager.h" #include "nsIPref.h" +#include "nsCRT.h" #ifdef DEBUG #include "nsSize.h" diff --git a/mozilla/xpcom/ds/nsHashtable.cpp b/mozilla/xpcom/ds/nsHashtable.cpp index 6b1a79b1680..08816f0a1c1 100644 --- a/mozilla/xpcom/ds/nsHashtable.cpp +++ b/mozilla/xpcom/ds/nsHashtable.cpp @@ -37,6 +37,7 @@ #include "nsReadableUtils.h" #include "nsIObjectInputStream.h" #include "nsIObjectOutputStream.h" +#include "nsCRT.h" //////////////////////////////////////////////////////////////////////////////// // These functions really should be part of nspr, and have internal knowledge diff --git a/mozilla/xpcom/ds/nsVariant.cpp b/mozilla/xpcom/ds/nsVariant.cpp index 1b3e94ac31e..560f88ac825 100644 --- a/mozilla/xpcom/ds/nsVariant.cpp +++ b/mozilla/xpcom/ds/nsVariant.cpp @@ -28,6 +28,7 @@ #include "prprf.h" #include "prdtoa.h" #include +#include "nsCRT.h" /***************************************************************************/ // Helpers for static convert functions... diff --git a/mozilla/xpcom/io/nsAppFileLocationProvider.cpp b/mozilla/xpcom/io/nsAppFileLocationProvider.cpp index 2a8d72ed630..8fab4ecbfc2 100755 --- a/mozilla/xpcom/io/nsAppFileLocationProvider.cpp +++ b/mozilla/xpcom/io/nsAppFileLocationProvider.cpp @@ -31,6 +31,7 @@ #include "nsXPIDLString.h" #include "nsISimpleEnumerator.h" #include "prenv.h" +#include "nsCRT.h" #if defined(XP_MAC) /* || defined(XP_MACOSX) REMIND HACKING FOR MACOS X!!! */ #include diff --git a/mozilla/xpcom/io/nsLocalFileCommon.cpp b/mozilla/xpcom/io/nsLocalFileCommon.cpp index 602ecd49e6c..bb1668688b3 100644 --- a/mozilla/xpcom/io/nsLocalFileCommon.cpp +++ b/mozilla/xpcom/io/nsLocalFileCommon.cpp @@ -43,6 +43,7 @@ #include "nsCOMPtr.h" #include "nsReadableUtils.h" #include "nsPrintfCString.h" +#include "nsCRT.h" void NS_StartupLocalFile() diff --git a/mozilla/xpcom/proxy/public/nsProxyRelease.h b/mozilla/xpcom/proxy/public/nsProxyRelease.h new file mode 100644 index 00000000000..0fa97f0ab6b --- /dev/null +++ b/mozilla/xpcom/proxy/public/nsProxyRelease.h @@ -0,0 +1,110 @@ +/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * 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.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsProxyRelease_h_ +#define nsProxyRelease_h__ + +#include "nsIEventQueueService.h" +#include "pratom.h" +#include "prmem.h" + +// Ensures that the delete of a nsISupports object occurs on the main thread. + +static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); + +static void* PR_CALLBACK +ReleaseDestructorEventHandler(PLEvent *self) +{ + nsISupports* owner = (nsISupports*) PL_GetEventOwner(self); + NS_DELETEXPCOM(owner); + return nsnull; +} + +static void PR_CALLBACK +ReleaseDestructorDestroyHandler(PLEvent *self) +{ + PR_DELETE(self); +} + +#define NS_IMPL_PROXY_RELEASE(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + NS_PRECONDITION(0 != mRefCnt, "dup release"); \ + nsrefcnt count = PR_AtomicDecrement((PRInt32 *)&mRefCnt); \ + NS_LOG_RELEASE(this, count, #_class); \ + \ + if (count == 0) \ + { \ + mRefCnt = 1; /* stabilize */ \ + PRBool callDirectly = PR_TRUE; \ + nsCOMPtr eventQService \ + = do_GetService(kEventQueueServiceCID); \ + NS_ASSERTION(eventQService, "event queue service is unavailable"); \ + \ + nsCOMPtr eventQ; \ + if (eventQService) { \ + eventQService->GetThreadEventQueue(NS_UI_THREAD, getter_AddRefs(eventQ)); \ + if (eventQ) \ + eventQ->IsQueueOnCurrentThread(&callDirectly); \ + } \ + \ + if (callDirectly) \ + { \ + NS_DELETEXPCOM(this); \ + return 0; \ + } \ + PLEvent *event = PR_NEW(PLEvent); \ + if (event == nsnull) \ + { \ + NS_ASSERTION(0, "Could not create a plevent. Deleting on wrong thread!"); \ + NS_DELETEXPCOM(this); \ + return 0; \ + } \ + \ + PL_InitEvent(event, \ + NS_STATIC_CAST(nsISupports*, this), \ + ReleaseDestructorEventHandler, \ + ReleaseDestructorDestroyHandler); \ + \ + eventQ->PostEvent(event); \ + return 0; \ + } \ + return count; \ +} \ + + +#endif diff --git a/mozilla/xpcom/proxy/src/nsProxyEvent.cpp b/mozilla/xpcom/proxy/src/nsProxyEvent.cpp index e1ea6c7e117..f3405d08986 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEvent.cpp +++ b/mozilla/xpcom/proxy/src/nsProxyEvent.cpp @@ -35,6 +35,7 @@ #include "nsProxyEvent.h" #include "nsProxyEventPrivate.h" #include "nsIProxyObjectManager.h" +#include "nsCRT.h" #include "pratom.h" #include "prmem.h" diff --git a/mozilla/xpcom/string/obsolete/bufferRoutines.h b/mozilla/xpcom/string/obsolete/bufferRoutines.h index c72221a1d4f..6e0f15256c6 100644 --- a/mozilla/xpcom/string/obsolete/bufferRoutines.h +++ b/mozilla/xpcom/string/obsolete/bufferRoutines.h @@ -47,6 +47,13 @@ #include "nsStringDefines.h" #endif +#ifndef nsCharTraits_h___ +#include "nsCharTraits.h" +#endif + +#include "nspr.h" +#include "plstr.h" +#include /****************************************************************************************** MODULE NOTES: @@ -57,10 +64,6 @@ Not so, today though. *******************************************************************************************/ - -#include "nsCRT.h" - - #define KSHIFTLEFT (0) #define KSHIFTRIGHT (1) @@ -406,11 +409,11 @@ inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset if(aIgnoreCase) { // safe because aChar < 256 - char theChar=nsCRT::ToUpper(char(aChar)); + char theChar=toupper(char(aChar)); while(left::compare(aStr1,aStr2,aCount); + + // alien comparisons may return out-of-bound answers + // instead of the -1, 0, 1 expected by most clients + if ( result < -1 ) + result = -1; + else if ( result > 1 ) + result = 1; return result; } @@ -607,7 +618,28 @@ PRInt32 Compare1To1(const char* aStr1,const char* aStr2,PRUint32 aCount,PRBool a */ PRInt32 Compare2To2(const PRUnichar* aStr1,const PRUnichar* aStr2,PRUint32 aCount); PRInt32 Compare2To2(const PRUnichar* aStr1,const PRUnichar* aStr2,PRUint32 aCount){ - return nsCRT::strncmp(aStr1, aStr2, aCount); + PRInt32 result; + + if ( aStr1 && aStr2 ) + result = nsCharTraits::compare(aStr1, aStr2, aCount); + + // The following cases are rare and survivable caller errors. + // Two null pointers are equal, but any string, even 0 length + // is greater than a null pointer. It might not really matter, + // but we pick something reasonable anyway. + else if ( !aStr1 && !aStr2 ) + result = 0; + else if ( aStr1 ) + result = 1; + else + result = -1; + + // alien comparisons may give answers outside the -1, 0, 1 expected by callers + if ( result < -1 ) + result = -1; + else if ( result > 1 ) + result = 1; + return result; } @@ -645,8 +677,8 @@ PRInt32 Compare2To1(const PRUnichar* aStr1,const char* aStr2,PRUint32 aCount,PRB // can't do case conversion on characters out of our range if (aIgnoreCase && c1<128 && c2<128) { - c1 = nsCRT::ToLower(char(c1)); - c2 = nsCRT::ToLower(char(c2)); + c1 = tolower(char(c1)); + c2 = tolower(char(c2)); if (c1 == c2) continue; } diff --git a/mozilla/xpcom/string/obsolete/nsStr.cpp b/mozilla/xpcom/string/obsolete/nsStr.cpp index 8d7a4ffa2e9..104f65516c3 100644 --- a/mozilla/xpcom/string/obsolete/nsStr.cpp +++ b/mozilla/xpcom/string/obsolete/nsStr.cpp @@ -36,14 +36,16 @@ * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ - + +#ifndef nsCharTraits_h___ +#include "nsCharTraits.h" +#endif + #include "nsStrPrivate.h" #include "nsStr.h" #include "bufferRoutines.h" #include //only used for printf -#include "nsCRT.h" -#include "nsDeque.h" - + /****************************************************************************************** MODULE NOTES: @@ -1147,7 +1149,7 @@ CBufDescriptor::CBufDescriptor(char* aString,PRBool aStackBased,PRUint32 aCapaci mLength=mCapacity=0; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1161,7 +1163,7 @@ CBufDescriptor::CBufDescriptor(const char* aString,PRBool aStackBased,PRUint32 a mLength=mCapacity=0; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1176,7 +1178,7 @@ CBufDescriptor::CBufDescriptor(PRUnichar* aString,PRBool aStackBased,PRUint32 aC mIsConst=PR_FALSE; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? nsCRT::strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1190,7 +1192,7 @@ CBufDescriptor::CBufDescriptor(const PRUnichar* aString,PRBool aStackBased,PRUin mIsConst=PR_TRUE; if(aString && aCapacity>1) { mCapacity=aCapacity-1; - mLength=(-1==aLength) ? nsCRT::strlen(aString) : aLength; + mLength=(-1==aLength) ? nsCharTraits::length(aString) : aLength; if(mLength>PRInt32(mCapacity)) mLength=mCapacity; } @@ -1201,10 +1203,26 @@ CBufDescriptor::CBufDescriptor(const PRUnichar* aString,PRBool aStackBased,PRUin PRUint32 nsStrPrivate::HashCode(const nsStr& aDest) { - if (aDest.GetCharSize() == eTwoByte) - return nsCRT::HashCode(aDest.mUStr); - else - return nsCRT::HashCode(aDest.mStr); + PRUint32 h = 0; + if (aDest.GetCharSize() == eTwoByte) { + const PRUnichar* s = aDest.mUStr; + + if (!s) return h; + + PRUnichar c; + while ( (c = *s++) ) + h = (h>>28) ^ (h<<4) ^ c; + return h; + } else { + const char* s = aDest.mStr; + + if (!s) return h; + + unsigned char c; + while ( (c = *s++) ) + h = (h>>28) ^ (h<<4) ^ c; + return h; + } } #ifdef NS_STR_STATS diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp index 57241895a91..89c2985f41d 100644 --- a/mozilla/xpcom/string/obsolete/nsString.cpp +++ b/mozilla/xpcom/string/obsolete/nsString.cpp @@ -45,8 +45,10 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsDebug.h" -#include "nsCRT.h" -#include "nsDeque.h" + +#ifndef nsCharTraits_h___ +#include "nsCharTratis.h" +#endif #ifndef RICKG_TESTBED #include "prdtoa.h" @@ -317,12 +319,12 @@ void nsCString::ReplaceSubstring(const char* aTarget,const char* aNewValue){ if(aTarget && aNewValue) { - PRInt32 len=strlen(aTarget); + PRInt32 len=nsCharTraits::length(aTarget); if(0::length(aNewValue); if(0::length(aString); if(0::length(aCString); temp.mStr=(char*)aCString; result=nsStrPrivate::FindSubstr1in1(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -863,7 +865,7 @@ PRInt32 nsCString::FindCharInSet(const char* aCStringSet,PRInt32 anOffset) const if(aCStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCStringSet); + temp.mLength=nsCharTraits::length(aCStringSet); temp.mStr=(char*)aCStringSet; result=nsStrPrivate::FindCharInSet1(*this,temp,PR_FALSE,anOffset); } @@ -908,7 +910,7 @@ PRInt32 nsCString::RFind(const char* aString,PRBool aIgnoreCase,PRInt32 anOffset if(aString) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aString); + temp.mLength=nsCharTraits::length(aString); temp.mStr=(char*)aString; result=nsStrPrivate::RFindSubstr1in1(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -945,7 +947,7 @@ PRInt32 nsCString::RFindCharInSet(const char* aCStringSet,PRInt32 anOffset) cons if(aCStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCStringSet); + temp.mLength=nsCharTraits::length(aCStringSet); temp.mStr=(char*)aCStringSet; result=nsStrPrivate::RFindCharInSet1(*this,temp,PR_FALSE,anOffset); } @@ -975,7 +977,7 @@ PRInt32 nsCString::Compare(const char *aCString,PRBool aIgnoreCase,PRInt32 aCoun if(aCString) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCString); + temp.mLength=nsCharTraits::length(aCString); temp.mStr=(char*)aCString; return nsStrPrivate::StrCompare1To1(*this,temp,aCount,aIgnoreCase); } diff --git a/mozilla/xpcom/string/obsolete/nsString2.cpp b/mozilla/xpcom/string/obsolete/nsString2.cpp index 7570173d081..bd8189fd7a3 100644 --- a/mozilla/xpcom/string/obsolete/nsString2.cpp +++ b/mozilla/xpcom/string/obsolete/nsString2.cpp @@ -44,13 +44,15 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsDebug.h" -#include "nsDeque.h" + +#ifndef nsCharTraits_h___ +#include "nsCharTraits.h" +#endif #ifndef RICKG_TESTBED #include "prdtoa.h" #include "nsISizeOfHandler.h" -#endif - +#endif static const char* kPossibleNull = "Error: possible unintended null in string"; static const char* kNullPointerError = "Error: unexpected null ptr"; @@ -372,12 +374,12 @@ void nsString::ReplaceSubstring(const PRUnichar* aTarget,const PRUnichar* aNewValue){ if(aTarget && aNewValue) { - PRInt32 len=nsCRT::strlen(aTarget); + PRInt32 len=nsCharTraits::length(aTarget); if(0::length(aNewValue); if(0::length(aCString); if(0::length(aCString); if(0::length(aCString); temp.mStr = NS_CONST_CAST(char*, aCString); result=nsStrPrivate::FindSubstr1in2(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -887,7 +889,7 @@ PRInt32 nsString::Find(const PRUnichar* aString,PRInt32 anOffset,PRInt32 aCount) if(aString) { nsStr temp; nsStrPrivate::Initialize(temp,eTwoByte); - temp.mLength = nsCRT::strlen(aString); + temp.mLength = nsCharTraits::length(aString); temp.mUStr = NS_CONST_CAST(PRUnichar*, aString); result=nsStrPrivate::FindSubstr2in2(*this,temp,anOffset,aCount); } @@ -931,7 +933,7 @@ PRInt32 nsString::FindCharInSet(const char* aCStringSet,PRInt32 anOffset) const{ if(aCStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aCStringSet); + temp.mLength=nsCharTraits::length(aCStringSet); temp.mStr = NS_CONST_CAST(char*, aCStringSet); result=nsStrPrivate::FindCharInSet1(*this,temp,PR_FALSE,anOffset); } @@ -954,7 +956,7 @@ PRInt32 nsString::FindCharInSet(const PRUnichar* aStringSet,PRInt32 anOffset) co if(aStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eTwoByte); - temp.mLength=nsCRT::strlen(aStringSet); + temp.mLength=nsCharTraits::length(aStringSet); temp.mUStr=NS_CONST_CAST(PRUnichar*, aStringSet); result=nsStrPrivate::FindCharInSet2(*this,temp,anOffset); } @@ -987,7 +989,7 @@ PRInt32 nsString::RFind(const PRUnichar* aString, PRInt32 anOffset, PRInt32 aCou if (aString) { nsStr temp; nsStrPrivate::Initialize(temp, eTwoByte); - temp.mLength = nsCRT::strlen(aString); + temp.mLength = nsCharTraits::length(aString); temp.mUStr = NS_CONST_CAST(PRUnichar*, aString); result=nsStrPrivate::RFindSubstr2in2(*this,temp,anOffset,aCount); } @@ -1011,7 +1013,7 @@ PRInt32 nsString::RFind(const char* aString,PRBool aIgnoreCase,PRInt32 anOffset, if(aString) { nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength=strlen(aString); + temp.mLength=nsCharTraits::length(aString); temp.mStr = NS_CONST_CAST(char*, aString); result=nsStrPrivate::RFindSubstr1in2(*this,temp,aIgnoreCase,anOffset,aCount); } @@ -1049,7 +1051,7 @@ PRInt32 nsString::RFindCharInSet(const PRUnichar* aStringSet,PRInt32 anOffset) c if(aStringSet) { nsStr temp; nsStrPrivate::Initialize(temp,eTwoByte); - temp.mLength = nsCRT::strlen(aStringSet); + temp.mLength = nsCharTraits::length(aStringSet); temp.mUStr = NS_CONST_CAST(PRUnichar*, aStringSet); result=nsStrPrivate::RFindCharInSet2(*this,temp,anOffset); } @@ -1076,7 +1078,7 @@ PRInt32 nsString::CompareWithConversion(const char *aCString,PRBool aIgnoreCase, nsStr temp; nsStrPrivate::Initialize(temp,eOneByte); - temp.mLength= (0::length(aCString); temp.mStr = NS_CONST_CAST(char*, aCString); return nsStrPrivate::StrCompare2To1(*this,temp,aCount,aIgnoreCase); @@ -1123,7 +1125,7 @@ PRBool nsString::EqualsAtom(nsIAtom* aAtom) const{ const PRUnichar* unicode; if (aAtom->GetUnicode(&unicode) != NS_OK || unicode == nsnull) return PR_FALSE; - cmp=Compare2To2(mUStr,unicode, nsCRT::strlen(mUStr)); + cmp=Compare2To2(mUStr,unicode, nsCharTraits::length(mUStr)); result=PRBool(0==cmp); } diff --git a/mozilla/xpcom/string/obsolete/nsString2.h b/mozilla/xpcom/string/obsolete/nsString2.h index b171645e56a..354662d6614 100644 --- a/mozilla/xpcom/string/obsolete/nsString2.h +++ b/mozilla/xpcom/string/obsolete/nsString2.h @@ -76,8 +76,6 @@ #include "nsIAtom.h" #include "nsStr.h" -#include "nsCRT.h" - class UTF8traits { diff --git a/mozilla/xpcom/string/public/nsCharTraits.h b/mozilla/xpcom/string/public/nsCharTraits.h index 12d5533de47..4f6b25f6100 100644 --- a/mozilla/xpcom/string/public/nsCharTraits.h +++ b/mozilla/xpcom/string/public/nsCharTraits.h @@ -174,7 +174,19 @@ struct nsCharTraits int compare( const char_type* s1, const char_type* s2, size_t n ) { - return memcmp(s1, s2, n * sizeof(char_type)); +#ifdef USE_CPP_WCHAR_FUNCS + return wmemcmp(s1, s2, n); +#else + for ( ; n--; ++s1, ++s2 ) + { + if ( lt(*s1, *s2) ) + return -1; + if ( lt(*s2, *s1) ) + return 1; + } + + return 0; +#endif } static diff --git a/mozilla/xpcom/string/src/nsAString.cpp b/mozilla/xpcom/string/src/nsAString.cpp index 0d56b9f2443..23f3c98c256 100644 --- a/mozilla/xpcom/string/src/nsAString.cpp +++ b/mozilla/xpcom/string/src/nsAString.cpp @@ -532,8 +532,8 @@ nsCaseInsensitiveCStringComparator::operator()( char lhs, char rhs ) const { if (lhs == rhs) return 0; - lhs = nsCRT::ToLower(lhs); - rhs = nsCRT::ToLower(rhs); + lhs = tolower(lhs); + rhs = tolower(rhs); return lhs - rhs; } diff --git a/mozilla/xpfe/appshell/src/nsMacMIMEDataSource.cpp b/mozilla/xpfe/appshell/src/nsMacMIMEDataSource.cpp index 7ef42b634e4..aed09dac09a 100644 --- a/mozilla/xpfe/appshell/src/nsMacMIMEDataSource.cpp +++ b/mozilla/xpfe/appshell/src/nsMacMIMEDataSource.cpp @@ -37,6 +37,7 @@ #include "nsMacMIMEDataSource.h" #include "nsString.h" +#include "nsCRT.h" #include "nsIComponentManager.h" #include "nsIMIMEInfo.h" diff --git a/mozilla/xpfe/appshell/src/nsXULWindow.cpp b/mozilla/xpfe/appshell/src/nsXULWindow.cpp index 73cdd847f3e..6259fd7f727 100644 --- a/mozilla/xpfe/appshell/src/nsXULWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsXULWindow.cpp @@ -30,6 +30,7 @@ #include "nsString.h" #include "nsWidgetsCID.h" #include "prprf.h" +#include "nsCRT.h" //Interfaces needed to be included #include "nsIAppShell.h" diff --git a/mozilla/xpfe/components/autocomplete/src/nsLDAPAutoCompleteSession.cpp b/mozilla/xpfe/components/autocomplete/src/nsLDAPAutoCompleteSession.cpp index e77081a3571..d68f0f6cc08 100644 --- a/mozilla/xpfe/components/autocomplete/src/nsLDAPAutoCompleteSession.cpp +++ b/mozilla/xpfe/components/autocomplete/src/nsLDAPAutoCompleteSession.cpp @@ -41,6 +41,7 @@ #include "nsReadableUtils.h" #include "nspr.h" #include "nsLDAP.h" +#include "nsCRT.h" #ifdef PR_LOGGING static PRLogModuleInfo *sLDAPAutoCompleteLogModule = 0; diff --git a/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp b/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp index 0ad44866b3f..61d34b4ee6a 100644 --- a/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp +++ b/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp @@ -54,6 +54,7 @@ #include "nsIWebBrowserPersist.h" #include "nsIWindowWatcher.h" #include "nsIStringBundle.h" +#include "nsCRT.h" #include "nsIWindowMediator.h" /* Outstanding issues/todo: diff --git a/mozilla/xpfe/components/filepicker/src/nsFileView.cpp b/mozilla/xpfe/components/filepicker/src/nsFileView.cpp index 3efaf1bfaad..6727e30527f 100644 --- a/mozilla/xpfe/components/filepicker/src/nsFileView.cpp +++ b/mozilla/xpfe/components/filepicker/src/nsFileView.cpp @@ -44,6 +44,7 @@ #include "nsIFile.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsCRT.h" #include "prmem.h" #include "nsPrintfCString.h" #include "nsVoidArray.h" diff --git a/mozilla/xpfe/components/intl/nsCharsetMenu.cpp b/mozilla/xpfe/components/intl/nsCharsetMenu.cpp index 80219a4d323..768171fff60 100644 --- a/mozilla/xpfe/components/intl/nsCharsetMenu.cpp +++ b/mozilla/xpfe/components/intl/nsCharsetMenu.cpp @@ -63,6 +63,7 @@ #include "nsIObserverService.h" #include "nsIRequestObserver.h" #include "nsITimelineService.h" +#include "nsCRT.h" //---------------------------------------------------------------------------- // Global functions and data [declaration] diff --git a/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp b/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp index e975f4eddb4..5f84c24b4fd 100755 --- a/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp +++ b/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp @@ -59,6 +59,7 @@ #include "nsIRDFObserver.h" #include "nsRDFCID.h" #include "rdf.h" +#include "nsCRT.h" static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kTextToSubURICID, NS_TEXTTOSUBURI_CID); diff --git a/mozilla/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp b/mozilla/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp index be8b922a8d2..299b35c44ae 100644 --- a/mozilla/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp +++ b/mozilla/xpfe/components/urlbarhistory/src/nsUrlbarHistory.cpp @@ -41,6 +41,7 @@ #include "nsIURL.h" #include "nsNetCID.h" #include "nsNetUtil.h" +#include "nsCRT.h" static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID); diff --git a/mozilla/xpfe/components/xremote/src/XRemoteService.cpp b/mozilla/xpfe/components/xremote/src/XRemoteService.cpp index 739843ea326..eeb4b0293f5 100644 --- a/mozilla/xpfe/components/xremote/src/XRemoteService.cpp +++ b/mozilla/xpfe/components/xremote/src/XRemoteService.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include