From 5921049139d0b8d1af2e752963233c640e8e75d2 Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Wed, 2 Apr 2003 22:45:08 +0000 Subject: [PATCH] Purge XP_PC. Bug #56767 r=mkaply sr=alecf git-svn-id: svn://10.0.0.236/trunk@140602 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsPrintEngine.cpp | 10 +++---- .../html/content/src/nsHTMLAppletElement.cpp | 2 +- .../html/document/src/nsHTMLDocument.cpp | 2 +- .../xul/content/src/nsXULPopupListener.cpp | 2 +- mozilla/docshell/base/nsDefaultURIFixup.cpp | 4 +-- mozilla/editor/libeditor/base/nsEditor.cpp | 12 +------- .../pluginhostctrl/pluginsdk_include/jri_md.h | 2 +- .../pluginhostctrl/pluginsdk_include/npapi.h | 6 ++-- .../embedding/lite/nsEmbedGlobalHistory.cpp | 2 +- .../source/xpath/MultiplicativeExpr.cpp | 4 +-- .../source/xpath/RelationalExpr.cpp | 12 ++++---- .../tests/UniversalChardetTest.cpp | 2 +- mozilla/gfx/src/ps/nsRenderingContextPS.cpp | 4 +-- mozilla/gfx/src/shared/gfxImageFrame.cpp | 8 +++--- mozilla/gfx/tests/TestRect.cpp | 2 +- mozilla/gfx/tests/coverage/main.cpp | 2 +- mozilla/gfx/tests/coverage/nsCoverage.cpp | 2 +- mozilla/htmlparser/src/CNavDTD.h | 4 +-- mozilla/htmlparser/src/COtherDTD.h | 4 +-- mozilla/htmlparser/src/nsHTMLTokenizer.h | 2 +- mozilla/intl/chardet/tests/DetectCharset.cpp | 2 +- .../intl/chardet/tools/GenCyrillicClass.cpp | 2 +- mozilla/intl/locale/tests/LocaleSelfTest.cpp | 8 +++--- mozilla/intl/locale/tests/nsLocaleTest.cpp | 8 +++--- mozilla/layout/generic/nsFrame.cpp | 2 +- mozilla/layout/generic/nsHTMLReflowState.cpp | 2 +- mozilla/layout/generic/nsObjectFrame.cpp | 2 +- mozilla/layout/generic/nsTextFrame.cpp | 2 +- mozilla/layout/html/base/src/nsFrame.cpp | 2 +- .../html/base/src/nsHTMLReflowState.cpp | 2 +- .../layout/html/base/src/nsObjectFrame.cpp | 2 +- mozilla/layout/html/base/src/nsTextFrame.cpp | 2 +- mozilla/layout/printing/nsPrintEngine.cpp | 10 +++---- mozilla/layout/xul/base/src/nsMenuFrame.cpp | 2 +- .../mailnews/addrbook/src/nsAddrDatabase.cpp | 6 ++-- .../mailnews/addrbook/src/nsAddrDatabase.h | 2 +- .../mailnews/base/src/nsMessengerMigrator.h | 4 +-- .../mailnews/base/src/nsMsgFolderCache.cpp | 2 +- .../mailnews/db/msgdb/public/nsMsgDatabase.h | 2 +- .../db/msgdb/src/nsImapMailDatabase.cpp | 2 +- .../mailnews/db/msgdb/src/nsMsgDatabase.cpp | 6 ++-- .../import/comm4x/src/nsComm4xProfile.cpp | 2 +- .../import/eudora/src/nsEudoraImport.cpp | 6 ++-- .../import/eudora/src/nsEudoraSettings.cpp | 8 +++--- mozilla/modules/libjar/nsJAR.cpp | 2 +- mozilla/modules/libjar/nsZipArchive.cpp | 2 +- .../libpr0n/decoders/bmp/nsBMPDecoder.h | 2 +- .../libpr0n/decoders/bmp/nsICODecoder.h | 2 +- .../libpr0n/decoders/gif/nsGIFDecoder2.cpp | 4 +-- .../libpr0n/decoders/jpeg/nsJPEGDecoder.cpp | 6 ++-- .../libpr0n/decoders/mng/imgContainerMNG.cpp | 8 +++--- .../libpr0n/decoders/png/nsPNGDecoder.cpp | 4 +-- .../libpr0n/decoders/xbm/nsXBMDecoder.cpp | 2 +- mozilla/modules/libreg/include/NSReg.h | 2 +- mozilla/modules/libreg/src/VerReg.c | 2 +- mozilla/modules/libreg/src/vr_stubs.c | 2 +- mozilla/modules/libreg/src/vr_stubs.h | 9 ++---- mozilla/modules/oji/src/scd.cpp | 4 +-- mozilla/modules/oji/tests/build/compile.mak | 4 +-- mozilla/modules/plugin/base/public/npapi.h | 6 ++-- .../modules/plugin/base/public/nsplugindefs.h | 6 ++-- .../modules/plugin/base/src/ns4xPlugin.cpp | 2 +- .../plugin/base/src/nsPluginInstancePeer.cpp | 6 ++-- .../modules/plugin/base/src/nsPluginSafety.h | 2 +- .../plugin/samples/simple/npsimple.cpp | 8 +++--- mozilla/netwerk/base/src/nsURLParsers.cpp | 4 +-- mozilla/netwerk/base/src/nsURLParsers.h | 2 +- mozilla/netwerk/base/tests/urltest.cpp | 2 +- .../protocol/http/src/nsHttpHandler.cpp | 4 +-- mozilla/parser/htmlparser/src/CNavDTD.h | 4 +-- mozilla/parser/htmlparser/src/COtherDTD.h | 4 +-- .../parser/htmlparser/src/nsHTMLTokenizer.h | 2 +- .../pref-migrator/public/nsIPrefMigration.idl | 2 +- .../pref-migrator/src/nsPrefMigration.cpp | 2 +- mozilla/profile/public/nsIAccount.h | 2 +- mozilla/profile/src/nsProfile.cpp | 12 ++++---- mozilla/profile/src/nsProfileAccess.cpp | 2 +- mozilla/sun-java/stubs/include/jni_md.h | 4 +-- mozilla/sun-java/stubs/include/jri_md.h | 2 +- mozilla/sun-java/stubs/include/sysmacros_md.h | 4 +-- mozilla/sun-java/stubs/include/typedefs_md.h | 2 +- .../webshell/tests/viewer/nsEditorMode.cpp | 11 -------- mozilla/webshell/tests/viewer/nsViewerApp.cpp | 16 +++++------ mozilla/xpcom/ds/nsCRT.h | 4 +-- .../xpcom/io/nsAppFileLocationProvider.cpp | 6 ++-- mozilla/xpcom/tests/nsIFileTest.cpp | 4 +-- mozilla/xpcom/threads/plevent.h | 4 +-- .../appshell/src/nsCommandLineService.cpp | 2 +- mozilla/xpfe/appshell/src/nsXULWindow.cpp | 2 +- mozilla/xpfe/bootstrap/nsAppRunner.cpp | 28 +++++++++---------- .../startup/src/nsCommandLineService.cpp | 2 +- mozilla/xpinstall/stub/xpistub.cpp | 4 +-- 92 files changed, 187 insertions(+), 211 deletions(-) diff --git a/mozilla/content/base/src/nsPrintEngine.cpp b/mozilla/content/base/src/nsPrintEngine.cpp index 1d5bfbc6e98..f09c8040c0a 100644 --- a/mozilla/content/base/src/nsPrintEngine.cpp +++ b/mozilla/content/base/src/nsPrintEngine.cpp @@ -573,11 +573,11 @@ nsPrintEngine::Print(nsIPrintSettings* aPrintSettings, // need for capturing result on each doc and sub-doc that is printed gDumpFileNameCnt = 0; gDumpLOFileNameCnt = 0; -#if defined(XP_PC) +#if defined(XP_WIN) || defined(XP_OS2) if (kPrintingLogMod && kPrintingLogMod->level == DUMP_LAYOUT_LEVEL) { RemoveFilesInDir(".\\"); } -#endif // XP_PC +#endif // XP_WIN || XP_OS2 #endif // EXTENDED_DEBUG_PRINTING nsresult rv = NS_ERROR_FAILURE; @@ -1043,7 +1043,7 @@ nsPrintEngine::PrintPreview(nsIPrintSettings* aPrintSettings, return NS_ERROR_FAILURE; } -#if defined(XP_PC) && defined(EXTENDED_DEBUG_PRINTING) +#if (defined(XP_WIN) || defined(XP_OS2)) && defined(EXTENDED_DEBUG_PRINTING) if (!mIsDoingPrintPreview) { if (kPrintingLogMod && kPrintingLogMod->level == DUMP_LAYOUT_LEVEL) { RemoveFilesInDir(".\\"); @@ -2427,7 +2427,7 @@ nsPrintEngine::SetupToPrintContent(nsIDeviceContext* aDContext, po->DestroyPresentation(); } -#if defined(XP_PC) && defined(EXTENDED_DEBUG_PRINTING) +#if (defined(XP_WIN) || defined(XP_OS2)) && defined(EXTENDED_DEBUG_PRINTING) // We need to clear all the output files here // because they will be re-created with second reflow of the docs if (kPrintingLogMod && kPrintingLogMod->level == DUMP_LAYOUT_LEVEL) { @@ -4694,7 +4694,7 @@ nsPrintEngine::FirePrintCompletionEvent() //-- Debug helper routines //--------------------------------------------------------------- //--------------------------------------------------------------- -#if defined(XP_PC) && defined(EXTENDED_DEBUG_PRINTING) +#if (defined(XP_WIN) || defined(XP_OS2)) && defined(EXTENDED_DEBUG_PRINTING) #include "windows.h" #include "process.h" #include "direct.h" diff --git a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp index c7302660b97..2c499abd4e5 100644 --- a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp @@ -48,7 +48,7 @@ // XXX this is to get around conflicts with windows.h defines // introduced through jni.h -#ifdef XP_PC +#ifdef XP_WIN #undef GetClassName #undef GetObject #endif diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index f8bd1ba0808..4d85902aeb7 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -797,7 +797,7 @@ nsHTMLDocument::RetrieveRelevantHeaders(nsIChannel *aChannel) // non-y2k with msvc; '%#c' requests that a full year be used in the // result string. Other OSes just use "%c". PR_FormatTime(buf, sizeof buf, -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN "%#c", #else "%c", diff --git a/mozilla/content/xul/content/src/nsXULPopupListener.cpp b/mozilla/content/xul/content/src/nsXULPopupListener.cpp index 9d01ab46391..943ba5e30d8 100644 --- a/mozilla/content/xul/content/src/nsXULPopupListener.cpp +++ b/mozilla/content/xul/content/src/nsXULPopupListener.cpp @@ -80,7 +80,7 @@ // on win32 and os/2, context menus come up on mouse up. On other platforms, // they appear on mouse down. Certain bits of code care about this difference. -#ifndef XP_PC +#if !defined(XP_WIN) && !defined(XP_OS2) #define NS_CONTEXT_MENU_IS_MOUSEUP 1 #endif diff --git a/mozilla/docshell/base/nsDefaultURIFixup.cpp b/mozilla/docshell/base/nsDefaultURIFixup.cpp index 95899bc98c2..e715941f123 100644 --- a/mozilla/docshell/base/nsDefaultURIFixup.cpp +++ b/mozilla/docshell/base/nsDefaultURIFixup.cpp @@ -138,7 +138,7 @@ nsDefaultURIFixup::CreateFixupURI(const nsAString& aStringURI, PRUint32 aFixupFl if(*aURI) return NS_OK; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // Not a file URL, so translate '\' to '/' for convenience in the common protocols // e.g. catch // @@ -414,7 +414,7 @@ nsresult nsDefaultURIFixup::ConvertFileToStringURI(const nsAString& aIn, { PRBool attemptFixup = PR_FALSE; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // Check for \ in the url-string or just a drive (PC) if(kNotFound != aIn.FindChar(PRUnichar('\\')) || ((aIn.Length() == 2 ) && (aIn.Last() == PRUnichar(':') || aIn.Last() == PRUnichar('|')))) { diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index e92dfd3ba63..71d8d6112dc 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -113,16 +113,6 @@ static NS_DEFINE_CID(kCDOMRangeCID, NS_RANGE_CID); // transaction manager static NS_DEFINE_CID(kCTransactionManagerCID, NS_TRANSACTIONMANAGER_CID); -#ifdef XP_PC -#define TRANSACTION_MANAGER_DLL "txmgr.dll" -#else -#ifdef XP_MAC -#define TRANSACTION_MANAGER_DLL "TRANSACTION_MANAGER_DLL" -#else // XP_UNIX || XP_BEOS -#define TRANSACTION_MANAGER_DLL "libtxmgr"MOZ_DLL_SUFFIX -#endif -#endif - #define NS_ERROR_EDITOR_NO_SELECTION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR,1) #define NS_ERROR_EDITOR_NO_TEXTNODE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR,2) @@ -2068,7 +2058,7 @@ nsEditor::ForceCompositionEnd() // flag for Unix. // We should use nsILookAndFeel to resolve this -#if defined(XP_MAC) || defined(XP_PC) +#if defined(XP_MAC) || defined(XP_WIN) || defined(XP_OS2) if(! mInIMEMode) return NS_OK; #endif diff --git a/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jri_md.h b/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jri_md.h index 89487102f85..9fd61b4a63f 100644 --- a/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jri_md.h +++ b/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/jri_md.h @@ -33,7 +33,7 @@ extern "C" { /* DLL Entry modifiers... */ /* PC */ -#if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +#if defined(XP_WIN) || defined(XP_OS2) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) # include # if defined(_MSC_VER) # if defined(WIN32) || defined(_WIN32) diff --git a/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/npapi.h b/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/npapi.h index 81bf729d111..ab73effa79e 100644 --- a/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/npapi.h +++ b/mozilla/embedding/browser/activex/src/pluginhostctrl/pluginsdk_include/npapi.h @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 4; -*- */ /* - * npapi.h $Revision: 1.1 $ + * npapi.h $Revision: 1.2 $ * Netscape client plug-in API spec */ @@ -26,8 +26,8 @@ # undef NULL # ifndef XP_WIN # define XP_WIN 1 -# endif /* __INTEL__ */ -# endif /* XP_PC */ +# endif /* XP_WIN */ +# endif /* __INTELL__ */ #endif /* __MWERKS__ */ #ifdef XP_MAC diff --git a/mozilla/embedding/lite/nsEmbedGlobalHistory.cpp b/mozilla/embedding/lite/nsEmbedGlobalHistory.cpp index f5316bf260e..bd18ba71bdd 100644 --- a/mozilla/embedding/lite/nsEmbedGlobalHistory.cpp +++ b/mozilla/embedding/lite/nsEmbedGlobalHistory.cpp @@ -493,7 +493,7 @@ nsresult writeEntry(FILE *outStm, nsCStringKey *url, HistoryEntry *entry) fputs(url->GetString(), outStm); entry->SetIsWritten(); -#if defined (XP_PC) +#if defined (XP_WIN) || defined(XP_OS2) fputc('\r', outStm); fputc('\n', outStm); #elif defined(XP_UNIX) diff --git a/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp b/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp index ed3fa74aeb4..bfca5c19ca9 100644 --- a/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp +++ b/mozilla/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp @@ -84,7 +84,7 @@ ExprResult* MultiplicativeExpr::evaluate(txIEvalContext* aContext) switch ( op ) { case DIVIDE: if (rightDbl == 0) { -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) /* XXX MSVC miscompiles such that (NaN == 0) */ if (Double::isNaN(rightDbl)) result = Double::NaN; @@ -105,7 +105,7 @@ ExprResult* MultiplicativeExpr::evaluate(txIEvalContext* aContext) result = Double::NaN; } else { -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) /* Workaround MS fmod bug where 42 % (1/0) => NaN, not 42. */ if (!Double::isInfinite(leftDbl) && Double::isInfinite(rightDbl)) result = leftDbl; diff --git a/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp b/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp index 2d3e9a05032..0e88ea0dd2f 100644 --- a/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp +++ b/mozilla/extensions/transformiix/source/xpath/RelationalExpr.cpp @@ -103,7 +103,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) { (rtype == ExprResult::NUMBER)) { double lval = left->numberValue(); double rval = right->numberValue(); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (Double::isNaN(lval) || Double::isNaN(rval)) result = MB_TRUE; else @@ -130,7 +130,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) { (rtype == ExprResult::NUMBER)) { double lval = left->numberValue(); double rval = right->numberValue(); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (Double::isNaN(lval) || Double::isNaN(rval)) result = MB_FALSE; else @@ -153,7 +153,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) { double rightDbl = right->numberValue(); switch( op ) { case LESS_THAN: -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (Double::isNaN(leftDbl) || Double::isNaN(rightDbl)) result = MB_FALSE; else @@ -163,7 +163,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) { #endif break; case LESS_OR_EQUAL: -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (Double::isNaN(leftDbl) || Double::isNaN(rightDbl)) result = MB_FALSE; else @@ -173,7 +173,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) { #endif break; case GREATER_THAN : -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (Double::isNaN(leftDbl) || Double::isNaN(rightDbl)) result = MB_FALSE; else @@ -183,7 +183,7 @@ MBool RelationalExpr::compareResults(ExprResult* left, ExprResult* right) { #endif break; case GREATER_OR_EQUAL: -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (Double::isNaN(leftDbl) || Double::isNaN(rightDbl)) result = MB_FALSE; else diff --git a/mozilla/extensions/universalchardet/tests/UniversalChardetTest.cpp b/mozilla/extensions/universalchardet/tests/UniversalChardetTest.cpp index b07f38b7087..bb881a14d7a 100644 --- a/mozilla/extensions/universalchardet/tests/UniversalChardetTest.cpp +++ b/mozilla/extensions/universalchardet/tests/UniversalChardetTest.cpp @@ -43,7 +43,7 @@ #include "nsICharsetDetectionObserver.h" #include #include -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include #endif #if defined(XP_UNIX) || defined(XP_BEOS) diff --git a/mozilla/gfx/src/ps/nsRenderingContextPS.cpp b/mozilla/gfx/src/ps/nsRenderingContextPS.cpp index 8f7b70c02ff..3c978ad47b4 100644 --- a/mozilla/gfx/src/ps/nsRenderingContextPS.cpp +++ b/mozilla/gfx/src/ps/nsRenderingContextPS.cpp @@ -361,7 +361,7 @@ NS_IMETHODIMP nsRenderingContextPS :: IsVisibleRect(const nsRect& aRect, PRBool NS_IMETHODIMP nsRenderingContextPS :: SetClipRect(const nsRect& aRect, nsClipCombine aCombine, PRBool &aClipEmpty) { nsRect trect = aRect; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) PRInt32 cliptype; #endif @@ -400,7 +400,7 @@ PRInt32 cliptype; NS_ASSERTION(PR_FALSE, "illegal clip combination"); } -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN if (cliptype == NULLREGION) aClipEmpty = PR_TRUE; else diff --git a/mozilla/gfx/src/shared/gfxImageFrame.cpp b/mozilla/gfx/src/shared/gfxImageFrame.cpp index 85f64d721cc..069a08cc4cf 100644 --- a/mozilla/gfx/src/shared/gfxImageFrame.cpp +++ b/mozilla/gfx/src/shared/gfxImageFrame.cpp @@ -267,9 +267,9 @@ NS_IMETHODIMP gfxImageFrame::SetImageData(const PRUint8 *aData, PRUint32 aLength PRInt32 imgLen = row_stride * mSize.height; PRInt32 newOffset; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // Adjust: We need offset to be top-down rows & LTR within each row - // On XP_PC, it's passed in as bottom-up rows & LTR within each row + // On win32 & os/2, it's passed in as bottom-up rows & LTR within each row PRUint32 yOffset = ((PRUint32)(aOffset / row_stride)) * row_stride; newOffset = ((mSize.height - 1) * row_stride) - yOffset + (aOffset % row_stride); #else @@ -363,9 +363,9 @@ NS_IMETHODIMP gfxImageFrame::SetAlphaData(const PRUint8 *aData, PRUint32 aLength PRInt32 alphaLen = row_stride * mSize.height; PRInt32 offset; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // Adjust: We need offset to be top-down rows & LTR within each row - // On XP_PC, it's passed in as bottom-up rows & LTR within each row + // On win32 & os/2, it's passed in as bottom-up rows & LTR within each row PRUint32 yOffset = ((PRUint32)(aOffset / row_stride)) * row_stride; offset = ((mSize.height - 1) * row_stride) - yOffset + (aOffset % row_stride); #else diff --git a/mozilla/gfx/tests/TestRect.cpp b/mozilla/gfx/tests/TestRect.cpp index b9706d2832a..9a8c44c1a64 100644 --- a/mozilla/gfx/tests/TestRect.cpp +++ b/mozilla/gfx/tests/TestRect.cpp @@ -38,7 +38,7 @@ #include "nsRect.h" #include -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN #include #endif diff --git a/mozilla/gfx/tests/coverage/main.cpp b/mozilla/gfx/tests/coverage/main.cpp index 3dd7d2c3ba4..029f71273b2 100644 --- a/mozilla/gfx/tests/coverage/main.cpp +++ b/mozilla/gfx/tests/coverage/main.cpp @@ -39,7 +39,7 @@ extern nsresult CoverageTest(int * argc, char **argv); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include diff --git a/mozilla/gfx/tests/coverage/nsCoverage.cpp b/mozilla/gfx/tests/coverage/nsCoverage.cpp index d7db2b559ef..4fbeac81e08 100644 --- a/mozilla/gfx/tests/coverage/nsCoverage.cpp +++ b/mozilla/gfx/tests/coverage/nsCoverage.cpp @@ -61,7 +61,7 @@ nsIWidget *gWindow = NULL; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #define TEXT_HEIGHT 25 #endif diff --git a/mozilla/htmlparser/src/CNavDTD.h b/mozilla/htmlparser/src/CNavDTD.h index dcdaf7d8a46..d7780e95810 100644 --- a/mozilla/htmlparser/src/CNavDTD.h +++ b/mozilla/htmlparser/src/CNavDTD.h @@ -113,14 +113,14 @@ class nsTokenAllocator; an nsParser. ***************************************************************/ -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( disable : 4275 ) #endif class CNavDTD : public nsIDTD { -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( default : 4275 ) #endif diff --git a/mozilla/htmlparser/src/COtherDTD.h b/mozilla/htmlparser/src/COtherDTD.h index 00e2e800fd0..fc1d224c85f 100644 --- a/mozilla/htmlparser/src/COtherDTD.h +++ b/mozilla/htmlparser/src/COtherDTD.h @@ -111,14 +111,14 @@ class nsNodeAllocator; an nsParser. ***************************************************************/ -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( disable : 4275 ) #endif class COtherDTD : public nsIDTD { -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( default : 4275 ) #endif diff --git a/mozilla/htmlparser/src/nsHTMLTokenizer.h b/mozilla/htmlparser/src/nsHTMLTokenizer.h index 532773cacb2..031bf41c873 100644 --- a/mozilla/htmlparser/src/nsHTMLTokenizer.h +++ b/mozilla/htmlparser/src/nsHTMLTokenizer.h @@ -64,7 +64,7 @@ Notes: ***************************************************************/ -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( disable : 4275 ) #endif diff --git a/mozilla/intl/chardet/tests/DetectCharset.cpp b/mozilla/intl/chardet/tests/DetectCharset.cpp index cba50d8238f..297a1eb2529 100644 --- a/mozilla/intl/chardet/tests/DetectCharset.cpp +++ b/mozilla/intl/chardet/tests/DetectCharset.cpp @@ -43,7 +43,7 @@ #include "nsICharsetDetectionObserver.h" #include #include -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include #endif #ifdef XP_UNIX diff --git a/mozilla/intl/chardet/tools/GenCyrillicClass.cpp b/mozilla/intl/chardet/tools/GenCyrillicClass.cpp index 070319c1ed2..25b9bdae018 100644 --- a/mozilla/intl/chardet/tools/GenCyrillicClass.cpp +++ b/mozilla/intl/chardet/tools/GenCyrillicClass.cpp @@ -46,7 +46,7 @@ #include "nsCRT.h" #include #include -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include #endif #ifdef XP_UNIX diff --git a/mozilla/intl/locale/tests/LocaleSelfTest.cpp b/mozilla/intl/locale/tests/LocaleSelfTest.cpp index 0a35e3fba43..b87b36fff8d 100644 --- a/mozilla/intl/locale/tests/LocaleSelfTest.cpp +++ b/mozilla/intl/locale/tests/LocaleSelfTest.cpp @@ -47,7 +47,7 @@ #if defined(XP_MAC) || defined(XP_MACOSX) #include "nsIMacLocale.h" #include -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) #include "nsIWin32Locale.h" #else #include "nsIPosixLocale.h" @@ -63,7 +63,7 @@ #define UCONV_DLL "UCONV_DLL" #define UCVLATIN_DLL "UCVLATIN_DLL" #define UNICHARUTIL_DLL_NAME "UNICHARUTIL_DLL" -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) #define LOCALE_DLL_NAME "NSLOCALE.DLL" #define UCONV_DLL "uconv.dll" #define UCVLATIN_DLL "ucvlatin.dll" @@ -92,7 +92,7 @@ static NS_DEFINE_CID(kLocaleFactoryCID, NS_LOCALEFACTORY_CID); #if defined(XP_MAC) || defined(XP_MACOSX) static NS_DEFINE_IID(kMacLocaleFactoryCID, NS_MACLOCALEFACTORY_CID); static NS_DEFINE_IID(kIMacLocaleIID, NS_MACLOCALE_CID); -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) static NS_DEFINE_CID(kWin32LocaleFactoryCID, NS_WIN32LOCALEFACTORY_CID); static NS_DEFINE_IID(kIWin32LocaleIID, NS_IWIN32LOCALE_IID); #else @@ -895,7 +895,7 @@ static void Test_nsLocale() macLocale->Release(); } -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) nsString localeName; nsIWin32Locale* win32Locale; LCID lcid; diff --git a/mozilla/intl/locale/tests/nsLocaleTest.cpp b/mozilla/intl/locale/tests/nsLocaleTest.cpp index d262bac1e52..1da4036d88f 100644 --- a/mozilla/intl/locale/tests/nsLocaleTest.cpp +++ b/mozilla/intl/locale/tests/nsLocaleTest.cpp @@ -42,7 +42,7 @@ #include "nsIComponentManager.h" #include "nsILocaleService.h" -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include "nsIWin32Locale.h" #include #endif @@ -62,7 +62,7 @@ NS_DEFINE_IID(kILocaleIID, NS_ILOCALE_IID); NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) NS_DEFINE_CID(kWin32LocaleFactoryCID, NS_WIN32LOCALEFACTORY_CID); NS_DEFINE_IID(kIWin32LocaleIID, NS_IWIN32LOCALE_IID); @@ -358,7 +358,7 @@ factory_get_locale(void) } -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) void win32factory_create_interface(void) @@ -1090,7 +1090,7 @@ main(int argc, char** argv) factory_get_locale(); factory_new_locale(); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // // run the nsIWin32LocaleFactory tests diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 02dd5bcbbee..012f94646cd 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -352,7 +352,7 @@ SelectionImageService::CreateImage(nscolor aImageColor, imgIContainer *aContaine PRInt16 i; for (i = 0; i < SEL_IMAGE_WIDTH; i++) { -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) *data++ = NS_GET_B(aImageColor); *data++ = NS_GET_G(aImageColor); *data++ = NS_GET_R(aImageColor); diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 35b5cbf03c5..5f864675fc6 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -2260,7 +2260,7 @@ nsHTMLReflowState::UseComputedHeight() { static PRBool useComputedHeight = PR_FALSE; -#if defined(XP_UNIX) || defined(XP_PC) || defined(XP_BEOS) +#if defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) static PRBool firstTime = 1; if (firstTime) { if (getenv("GECKO_USE_COMPUTED_HEIGHT")) { diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 9c732f1ce7b..a9851eaddb1 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -1828,7 +1828,7 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext, // delegate all painting to the plugin instance. if ((NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) && mInstanceOwner) mInstanceOwner->Paint(aDirtyRect); -#elif defined (XP_PC) +#elif defined (XP_WIN) || defined(XP_OS2) if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) { nsIPluginInstance * inst; if (NS_OK == GetPluginInstance(inst)) { diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 85f0b13f799..9d9d1c30b7f 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -1764,7 +1764,7 @@ RenderSelectionCursor(nsIRenderingContext& aRenderingContext, // XXX letter-spacing // XXX word-spacing -#if defined(XP_PC) || defined(XP_UNIX) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_UNIX) || defined(XP_MAC) #define USE_INVERT_FOR_SELECTION #endif diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index 02dd5bcbbee..012f94646cd 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -352,7 +352,7 @@ SelectionImageService::CreateImage(nscolor aImageColor, imgIContainer *aContaine PRInt16 i; for (i = 0; i < SEL_IMAGE_WIDTH; i++) { -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) *data++ = NS_GET_B(aImageColor); *data++ = NS_GET_G(aImageColor); *data++ = NS_GET_R(aImageColor); diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index 35b5cbf03c5..5f864675fc6 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -2260,7 +2260,7 @@ nsHTMLReflowState::UseComputedHeight() { static PRBool useComputedHeight = PR_FALSE; -#if defined(XP_UNIX) || defined(XP_PC) || defined(XP_BEOS) +#if defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) static PRBool firstTime = 1; if (firstTime) { if (getenv("GECKO_USE_COMPUTED_HEIGHT")) { diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 9c732f1ce7b..a9851eaddb1 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -1828,7 +1828,7 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext, // delegate all painting to the plugin instance. if ((NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) && mInstanceOwner) mInstanceOwner->Paint(aDirtyRect); -#elif defined (XP_PC) +#elif defined (XP_WIN) || defined(XP_OS2) if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) { nsIPluginInstance * inst; if (NS_OK == GetPluginInstance(inst)) { diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 85f0b13f799..9d9d1c30b7f 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -1764,7 +1764,7 @@ RenderSelectionCursor(nsIRenderingContext& aRenderingContext, // XXX letter-spacing // XXX word-spacing -#if defined(XP_PC) || defined(XP_UNIX) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_UNIX) || defined(XP_MAC) #define USE_INVERT_FOR_SELECTION #endif diff --git a/mozilla/layout/printing/nsPrintEngine.cpp b/mozilla/layout/printing/nsPrintEngine.cpp index 1d5bfbc6e98..f09c8040c0a 100644 --- a/mozilla/layout/printing/nsPrintEngine.cpp +++ b/mozilla/layout/printing/nsPrintEngine.cpp @@ -573,11 +573,11 @@ nsPrintEngine::Print(nsIPrintSettings* aPrintSettings, // need for capturing result on each doc and sub-doc that is printed gDumpFileNameCnt = 0; gDumpLOFileNameCnt = 0; -#if defined(XP_PC) +#if defined(XP_WIN) || defined(XP_OS2) if (kPrintingLogMod && kPrintingLogMod->level == DUMP_LAYOUT_LEVEL) { RemoveFilesInDir(".\\"); } -#endif // XP_PC +#endif // XP_WIN || XP_OS2 #endif // EXTENDED_DEBUG_PRINTING nsresult rv = NS_ERROR_FAILURE; @@ -1043,7 +1043,7 @@ nsPrintEngine::PrintPreview(nsIPrintSettings* aPrintSettings, return NS_ERROR_FAILURE; } -#if defined(XP_PC) && defined(EXTENDED_DEBUG_PRINTING) +#if (defined(XP_WIN) || defined(XP_OS2)) && defined(EXTENDED_DEBUG_PRINTING) if (!mIsDoingPrintPreview) { if (kPrintingLogMod && kPrintingLogMod->level == DUMP_LAYOUT_LEVEL) { RemoveFilesInDir(".\\"); @@ -2427,7 +2427,7 @@ nsPrintEngine::SetupToPrintContent(nsIDeviceContext* aDContext, po->DestroyPresentation(); } -#if defined(XP_PC) && defined(EXTENDED_DEBUG_PRINTING) +#if (defined(XP_WIN) || defined(XP_OS2)) && defined(EXTENDED_DEBUG_PRINTING) // We need to clear all the output files here // because they will be re-created with second reflow of the docs if (kPrintingLogMod && kPrintingLogMod->level == DUMP_LAYOUT_LEVEL) { @@ -4694,7 +4694,7 @@ nsPrintEngine::FirePrintCompletionEvent() //-- Debug helper routines //--------------------------------------------------------------- //--------------------------------------------------------------- -#if defined(XP_PC) && defined(EXTENDED_DEBUG_PRINTING) +#if (defined(XP_WIN) || defined(XP_OS2)) && defined(EXTENDED_DEBUG_PRINTING) #include "windows.h" #include "process.h" #include "direct.h" diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 97f3ce0a455..ebeb77f22ea 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -87,7 +87,7 @@ #include "nsITimerInternal.h" #define NS_MENU_POPUP_LIST_INDEX 0 -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #define NSCONTEXTMENUISMOUSEUP 1 #endif diff --git a/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp b/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp index 3923a622151..b850a2c1170 100644 --- a/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp +++ b/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp @@ -445,7 +445,7 @@ nsIMdbFactory *nsAddrDatabase::GetMDBFactory() return gMDBFactory; } -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // this code is stolen from nsFileSpecWin. Since MDB requires a native path, for // the time being, we'll just take the Unix/Canonical form and munge it void nsAddrDatabase::UnixToNative(char*& ioPath) @@ -485,7 +485,7 @@ void nsAddrDatabase::UnixToNative(char*& ioPath) *cp = *(cp + 1); } } -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ #ifdef XP_MAC // this code is stolen from nsFileSpecMac. Since MDB requires a native path, for @@ -603,7 +603,7 @@ NS_IMETHODIMP nsAddrDatabase::OpenMDB(nsFileSpec *dbName, PRBool create) if (m_mdbEnv) m_mdbEnv->SetAutoClear(PR_TRUE); -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) UnixToNative(nativeFileName); #endif if (!dbName->Exists()) diff --git a/mozilla/mailnews/addrbook/src/nsAddrDatabase.h b/mozilla/mailnews/addrbook/src/nsAddrDatabase.h index b7d0c869a56..1fb18fe7131 100644 --- a/mozilla/mailnews/addrbook/src/nsAddrDatabase.h +++ b/mozilla/mailnews/addrbook/src/nsAddrDatabase.h @@ -330,7 +330,7 @@ protected: static PRInt32 FindInCache(nsAddrDatabase* pAddrDB); PRBool MatchDbName(nsFileSpec *dbName); // returns TRUE if they match -#if defined(XP_PC) || defined(XP_MAC) // this should go away when we can provide our own file stream to MDB/Mork +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) // this should go away when we can provide our own file stream to MDB/Mork static void UnixToNative(char*& ioPath); #endif diff --git a/mozilla/mailnews/base/src/nsMessengerMigrator.h b/mozilla/mailnews/base/src/nsMessengerMigrator.h index a46dcc468f7..8e5cb9336a6 100644 --- a/mozilla/mailnews/base/src/nsMessengerMigrator.h +++ b/mozilla/mailnews/base/src/nsMessengerMigrator.h @@ -64,7 +64,7 @@ #define PSUEDO_NAME_PREFIX "newsrc-" #define PSUEDO_SECURE_NAME_PREFIX "snewsrc-" -#if defined(XP_PC) +#if defined(XP_WIN) || defined(XP_OS2) /* another case of mac vs. windows in 4.x * on mac, the default for news fcc, if you used imap, * was "Sent on Local Mail" @@ -82,7 +82,7 @@ #define NEWS_FAT_FILE_NAME "NewsFAT" #else #error dont_know_what_your_news_fat_file_is -#endif /* XP_PC, XP_MAC */ +#endif /* XP_WIN, XP_OS2, XP_MAC */ #endif /* XP_UNIX || XP_BEOS */ diff --git a/mozilla/mailnews/base/src/nsMsgFolderCache.cpp b/mozilla/mailnews/base/src/nsMsgFolderCache.cpp index 70eda1ecbc2..c5b6e828819 100644 --- a/mozilla/mailnews/base/src/nsMsgFolderCache.cpp +++ b/mozilla/mailnews/base/src/nsMsgFolderCache.cpp @@ -221,7 +221,7 @@ nsresult nsMsgFolderCache::OpenMDB(const char *dbName, PRBool exists) if (m_mdbEnv) m_mdbEnv->SetAutoClear(PR_TRUE); -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) // UnixToNative(nativeFileName); #endif if (exists) diff --git a/mozilla/mailnews/db/msgdb/public/nsMsgDatabase.h b/mozilla/mailnews/db/msgdb/public/nsMsgDatabase.h index 8afea776290..f1261ef57d7 100644 --- a/mozilla/mailnews/db/msgdb/public/nsMsgDatabase.h +++ b/mozilla/mailnews/db/msgdb/public/nsMsgDatabase.h @@ -175,7 +175,7 @@ protected: static int FindInCache(nsMsgDatabase* pMessageDB); PRBool MatchDbName(nsFileSpec &dbName); // returns TRUE if they match -#if defined(XP_PC) || defined(XP_MAC) // this should go away when we can provide our own file stream to MDB/Mork +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) // this should go away when we can provide our own file stream to MDB/Mork static void UnixToNative(char*& ioPath); #endif diff --git a/mozilla/mailnews/db/msgdb/src/nsImapMailDatabase.cpp b/mozilla/mailnews/db/msgdb/src/nsImapMailDatabase.cpp index 9450d314172..dff628713ca 100644 --- a/mozilla/mailnews/db/msgdb/src/nsImapMailDatabase.cpp +++ b/mozilla/mailnews/db/msgdb/src/nsImapMailDatabase.cpp @@ -108,7 +108,7 @@ NS_IMETHODIMP nsImapMailDatabase::Open(nsIFileSpec *aFolderName, PRBool create, char *nativeFolderName = nsCRT::strdup((const char *) folderName); -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) UnixToNative(nativeFolderName); #endif stat (nativeFolderName, &st); diff --git a/mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp index 77664f705ea..bc5754d3091 100644 --- a/mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp +++ b/mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp @@ -863,7 +863,7 @@ NS_IMETHODIMP nsMsgDatabase::QueryInterface(REFNSIID aIID, void** aResult) return gMDBFactory; } -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // this code is stolen from nsFileSpecWin. Since MDB requires a native path, for // the time being, we'll just take the Unix/Canonical form and munge it void nsMsgDatabase::UnixToNative(char*& ioPath) @@ -903,7 +903,7 @@ void nsMsgDatabase::UnixToNative(char*& ioPath) *cp = *(cp + 1); } } -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ #ifdef XP_MAC // this code is stolen from nsFileSpecMac. Since MDB requires a native path, for @@ -980,7 +980,7 @@ nsresult nsMsgDatabase::OpenMDB(const char *dbName, PRBool create) if (m_mdbEnv) m_mdbEnv->SetAutoClear(PR_TRUE); m_dbName = dbName; -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) UnixToNative(nativeFileName); #endif if (stat(nativeFileName, &st)) diff --git a/mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp b/mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp index 8be50dfd410..e3276ac4bfc 100644 --- a/mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp +++ b/mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp @@ -110,7 +110,7 @@ nsComm4xProfile::GetMailDir(const PRUnichar *profileName, PRUnichar **_retval) *_retval = ToNewUnicode(prefValue); #endif } -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) else { nsCOMPtr mailLocation; rv = resolvedLocation->Clone(getter_AddRefs(mailLocation)); diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraImport.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraImport.cpp index 53329f4579a..3404ca512c7 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraImport.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraImport.cpp @@ -57,7 +57,7 @@ #include "nsReadableUtils.h" -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include "nsEudoraWin32.h" #endif #ifdef XP_MAC @@ -105,7 +105,7 @@ private: static void ReportSuccess( nsString& name, PRInt32 count, nsString *pStream); private: -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) nsEudoraWin32 m_eudora; #endif #ifdef XP_MAC @@ -168,7 +168,7 @@ private: static void ReportSuccess( nsString& name, nsString *pStream); private: -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) nsEudoraWin32 m_eudora; #endif #ifdef XP_MAC diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraSettings.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraSettings.cpp index a379d6265c1..5c7f27f893b 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraSettings.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraSettings.cpp @@ -30,7 +30,7 @@ #include "EudoraDebugLog.h" -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #include "nsEudoraWin32.h" #endif #ifdef XP_MAC @@ -82,7 +82,7 @@ NS_IMETHODIMP nsEudoraSettings::AutoLocate(PRUnichar **description, nsIFileSpec return( rv); *description = nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NAME); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) *_retval = nsEudoraWin32::FindSettingsFile( *location); #endif @@ -110,7 +110,7 @@ NS_IMETHODIMP nsEudoraSettings::Import(nsIMsgAccount **localMailAccount, PRBool // Get the settings file if it doesn't exist if (!m_pLocation) { -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) if (NS_SUCCEEDED( rv = NS_NewFileSpec( &m_pLocation))) { if (!nsEudoraWin32::FindSettingsFile( m_pLocation)) { NS_IF_RELEASE( m_pLocation); @@ -134,7 +134,7 @@ NS_IMETHODIMP nsEudoraSettings::Import(nsIMsgAccount **localMailAccount, PRBool } // do the settings import -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) *_retval = nsEudoraWin32::ImportSettings( m_pLocation, localMailAccount); #endif #ifdef XP_MAC diff --git a/mozilla/modules/libjar/nsJAR.cpp b/mozilla/modules/libjar/nsJAR.cpp index ac138b4d18e..35426b4cfd0 100644 --- a/mozilla/modules/libjar/nsJAR.cpp +++ b/mozilla/modules/libjar/nsJAR.cpp @@ -38,7 +38,7 @@ #ifdef XP_UNIX #include -#elif defined (XP_PC) +#elif defined (XP_WIN) || defined(XP_OS2) #include #endif diff --git a/mozilla/modules/libjar/nsZipArchive.cpp b/mozilla/modules/libjar/nsZipArchive.cpp index 046b2d88983..f4a95b739db 100644 --- a/mozilla/modules/libjar/nsZipArchive.cpp +++ b/mozilla/modules/libjar/nsZipArchive.cpp @@ -92,7 +92,7 @@ char * strdup(const char *src) #include #include #include -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) #include #endif diff --git a/mozilla/modules/libpr0n/decoders/bmp/nsBMPDecoder.h b/mozilla/modules/libpr0n/decoders/bmp/nsBMPDecoder.h index 0a3f46200f8..5e61a8f2f2d 100644 --- a/mozilla/modules/libpr0n/decoders/bmp/nsBMPDecoder.h +++ b/mozilla/modules/libpr0n/decoders/bmp/nsBMPDecoder.h @@ -105,7 +105,7 @@ struct bitFields { #define LITTLE_TO_NATIVE32(x) x #endif -#if defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) #define BMP_GFXFORMAT gfxIFormats::BGR #define RLE_GFXFORMAT_ALPHA gfxIFormats::BGR_A1 #else diff --git a/mozilla/modules/libpr0n/decoders/bmp/nsICODecoder.h b/mozilla/modules/libpr0n/decoders/bmp/nsICODecoder.h index 7d1903707bd..d14d2726a5c 100644 --- a/mozilla/modules/libpr0n/decoders/bmp/nsICODecoder.h +++ b/mozilla/modules/libpr0n/decoders/bmp/nsICODecoder.h @@ -51,7 +51,7 @@ #define NS_ICODECODER_CID \ { 0xcb3ede1a, 0xfa5, 0x4e27, { 0xaa, 0xfe, 0xf, 0x78, 0x1, 0xe5, 0xa1, 0xf1 } } -#if defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) #define GFXFORMATALPHA gfxIFormats::BGR_A1 #else #define USE_RGBA1 diff --git a/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp b/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp index 579652d5105..1580aad43e9 100644 --- a/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp +++ b/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp @@ -378,7 +378,7 @@ int nsGIFDecoder2::HaveDecodedRow( format = gfxIFormats::RGB_A1; } -#if defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) // XXX this works... format += 1; // RGB to BGR #endif @@ -490,7 +490,7 @@ int nsGIFDecoder2::HaveDecodedRow( if (cmap) {// cmap could have null value if the global color table flag is 0 for (PRUint32 x=0; xmGIFStruct->tpixel) { - #if defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) + #if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) *rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].blue; *rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].green; *rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].red; diff --git a/mozilla/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp b/mozilla/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp index d5834fe691f..848ee68ba4a 100644 --- a/mozilla/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +++ b/mozilla/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp @@ -308,7 +308,7 @@ NS_IMETHODIMP nsJPEGDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PR } gfx_format format = gfxIFormats::RGB; -#if defined(XP_PC) || defined(XP_BEOS) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) format = gfxIFormats::BGR; #endif @@ -342,7 +342,7 @@ NS_IMETHODIMP nsJPEGDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PR JPOOL_IMAGE, row_stride, 1); -#if defined(XP_PC) || defined(XP_BEOS) || defined(XP_MAC) || defined(XP_MACOSX) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(XP_MAC) || defined(XP_MACOSX) || defined(MOZ_WIDGET_PHOTON) // allocate buffer to do byte flipping if needed if (mInfo.output_components == 3) { mRGBPadRow = (PRUint8*) PR_MALLOC(row_stride); @@ -535,7 +535,7 @@ nsJPEGDecoder::OutputScanlines() samples = mSamples3[0]; } else { /* 24-bit color image */ -#if defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) memset(mRGBPadRow, 0, mInfo.output_width * 4); PRUint8 *ptrOutputBuf = mRGBPadRow; diff --git a/mozilla/modules/libpr0n/decoders/mng/imgContainerMNG.cpp b/mozilla/modules/libpr0n/decoders/mng/imgContainerMNG.cpp index 01b14e55a36..43db2cf2793 100644 --- a/mozilla/modules/libpr0n/decoders/mng/imgContainerMNG.cpp +++ b/mozilla/modules/libpr0n/decoders/mng/imgContainerMNG.cpp @@ -305,7 +305,7 @@ il_mng_processheader(mng_handle handle, mng_uint32 width, mng_uint32 height) gfx_format format; -#if defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) if (mng_get_alphadepth(handle)) { format = gfxIFormats::BGR_A8; mng_set_canvasstyle(handle, MNG_CANVAS_RGB8_A8); @@ -395,7 +395,7 @@ il_mng_refresh(mng_handle handle, container->mFrame->GetAlphaBytesPerRow(&abpr); // stupid Mac code that shouldn't be in the image decoders... -#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) PRInt32 iwidth; container->mFrame->GetWidth(&iwidth); PRUint8 *buf = (PRUint8 *)nsMemory::Alloc(bpr); @@ -417,7 +417,7 @@ il_mng_refresh(mng_handle handle, *cptr++ = *row++; } container->mFrame->SetImageData(buf, bpr, bpr*y); -#elif defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) +#elif defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON) PRUint8 *cptr = buf; PRUint8 *row = container->image+y*container->mByteWidth; for (PRUint32 x=0; x #ifdef XP_MAC #include "macstdlibextras.h" /* For strcasecmp and strncasecmp */ +#include #endif #else @@ -115,13 +116,13 @@ #define PR_Lock(a) ((void)0) #define PR_Unlock(a) ((void)0) -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #define XP_STRCASECMP(x,y) stricmp((x),(y)) #define XP_STRNCASECMP(x,y,n) strnicmp((x),(y),(n)) #else #define XP_STRCASECMP(x,y) strcasecmp((x),(y)) #define XP_STRNCASECMP(x,y,n) strncasecmp((x),(y),(n)) -#endif /*XP_PC*/ +#endif /* XP_WIN || XP_OS2 */ typedef FILE * XP_File; @@ -295,10 +296,6 @@ extern char* vr_findVerRegName(); extern XP_File vr_fileOpen(const char *name, const char * mode); -#if !defined(XP_PC) && !(defined(__GLIBC__) && __GLIBC__ >= 2) -extern char * strdup(const char * s); -#endif - #else #define vr_fileOpen PR_Open diff --git a/mozilla/modules/oji/src/scd.cpp b/mozilla/modules/oji/src/scd.cpp index e7ab69e5012..1232e29bb35 100644 --- a/mozilla/modules/oji/src/scd.cpp +++ b/mozilla/modules/oji/src/scd.cpp @@ -95,14 +95,14 @@ nsSymantecDebugManager::Create(nsISupports* outer, const nsIID& aIID, void* *aIn return rv; } -#if defined(XP_PC) && defined(_WIN32) +#if defined(XP_WIN) && defined(_WIN32) extern "C" HWND FindNavigatorHiddenWindow(void); #endif NS_METHOD nsSymantecDebugManager::SetDebugAgentPassword(PRInt32 pwd) { -#if defined(XP_PC) && defined(_WIN32) +#if defined(XP_WIN) && defined(_WIN32) HWND win = NULL; /* ** TODO:amusil Get to a hidden window for symantec debugger to get its password from. diff --git a/mozilla/modules/oji/tests/build/compile.mak b/mozilla/modules/oji/tests/build/compile.mak index 6cdf239fc64..a145559e7e7 100755 --- a/mozilla/modules/oji/tests/build/compile.mak +++ b/mozilla/modules/oji/tests/build/compile.mak @@ -35,9 +35,9 @@ INCLUDES = $(INCLUDES) \ !if defined(MOZ_DEBUG) -DEFINES=-DXP_PC -DXP_WIN -DDEBUG +DEFINES=-DXP_WIN -DDEBUG !else -DEFINES=-DXP_PC -DXP_WIN +DEFINES=-DXP_WIN !endif CC_OBJ=@cl $(DEFINES) /Zi /nologo $(INCLUDES) /c /Fo$(OBJ_DIR)\ /Fd$(OBJ_DIR)/default.pdb diff --git a/mozilla/modules/plugin/base/public/npapi.h b/mozilla/modules/plugin/base/public/npapi.h index b635d1770fd..6cfc252048b 100644 --- a/mozilla/modules/plugin/base/public/npapi.h +++ b/mozilla/modules/plugin/base/public/npapi.h @@ -38,7 +38,7 @@ /* - * npapi.h $Revision: 3.30 $ + * npapi.h $Revision: 3.31 $ * Netscape client plug-in API spec */ @@ -104,8 +104,8 @@ # undef NULL # ifndef XP_WIN # define XP_WIN 1 -# endif /* __INTEL__ */ -# endif /* XP_PC */ +# endif /* XP_WIN */ +# endif /* __INTEL__ */ #endif /* __MWERKS__ */ #if defined(XP_MAC) || defined(XP_MACOSX) diff --git a/mozilla/modules/plugin/base/public/nsplugindefs.h b/mozilla/modules/plugin/base/public/nsplugindefs.h index 534da8236d6..35540c18834 100644 --- a/mozilla/modules/plugin/base/public/nsplugindefs.h +++ b/mozilla/modules/plugin/base/public/nsplugindefs.h @@ -60,7 +60,7 @@ # include #endif -#if defined(XP_PC) && !defined(XP_OS2) +#if defined(XP_WIN) # include #endif @@ -240,7 +240,7 @@ struct nsPluginPort { typedef RgnHandle nsPluginRegion; typedef WindowRef nsPluginPlatformWindowRef; -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) struct nsPluginPort; typedef HRGN nsPluginRegion; @@ -309,7 +309,7 @@ struct nsPluginEvent { uint32 wParam; uint32 lParam; -#elif defined(XP_PC) +#elif defined(XP_WIN) uint16 event; uint32 wParam; uint32 lParam; diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp index 469cf035e27..3172ca3696c 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp @@ -1249,7 +1249,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result) return NPERR_GENERIC_ERROR; #endif -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) case NPNVnetscapeWindow: { if (!npp || !npp->ndata) return NPERR_INVALID_INSTANCE_ERROR; diff --git a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp index 818724e1307..211531dd0a9 100644 --- a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp @@ -59,9 +59,9 @@ #include "nsIFileStreams.h" #include "nsNetUtil.h" -#if defined(XP_PC) && !defined(XP_OS2) -#include "windows.h" -#include "winbase.h" +#ifdef XP_WIN +#include +#include #endif nsPluginInstancePeerImpl::nsPluginInstancePeerImpl() diff --git a/mozilla/modules/plugin/base/src/nsPluginSafety.h b/mozilla/modules/plugin/base/src/nsPluginSafety.h index 14fa3fb19bf..4585ed1499b 100644 --- a/mozilla/modules/plugin/base/src/nsPluginSafety.h +++ b/mozilla/modules/plugin/base/src/nsPluginSafety.h @@ -41,7 +41,7 @@ #include "npapi.h" #include "nsIPluginHost.h" -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN #define CALL_SAFETY_ON #endif diff --git a/mozilla/modules/plugin/samples/simple/npsimple.cpp b/mozilla/modules/plugin/samples/simple/npsimple.cpp index 04defddf27e..5664797fefd 100644 --- a/mozilla/modules/plugin/samples/simple/npsimple.cpp +++ b/mozilla/modules/plugin/samples/simple/npsimple.cpp @@ -108,7 +108,7 @@ gboolean draw (GtkWidget *widget, GdkEventExpose *event, gpointer data); * Windows PlatformInstance *----------------------------------------------------------------------------*/ -#if defined(XP_PC) && !defined(XP_OS2) // XXXX OS2TODO +#if defined(XP_WIN) // XXXX OS2TODO typedef struct _PlatformInstance { HWND fhWnd; @@ -288,7 +288,7 @@ public: NS_IMETHOD Repaint(void); #endif -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN static LRESULT CALLBACK PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); #endif @@ -702,7 +702,7 @@ NS_IMETHODIMP SimplePluginInstance::SetText(const char * aText) if(!fText) return NS_ERROR_OUT_OF_MEMORY; -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN if(fPlatform.fhWnd) { InvalidateRect( fPlatform.fhWnd, NULL, TRUE ); UpdateWindow( fPlatform.fhWnd ); @@ -1036,7 +1036,7 @@ gboolean draw (GtkWidget *widget, GdkEventExpose *event, gpointer data) * Windows Implementations *----------------------------------------------------------------------------*/ -#elif defined(XP_PC) && !defined(XP_OS2) +#elif defined(XP_WIN) const char* gInstanceLookupString = "instance->pdata"; /*+++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/mozilla/netwerk/base/src/nsURLParsers.cpp b/mozilla/netwerk/base/src/nsURLParsers.cpp index 02cb20bb7e1..dfab1f94fc6 100644 --- a/mozilla/netwerk/base/src/nsURLParsers.cpp +++ b/mozilla/netwerk/base/src/nsURLParsers.cpp @@ -401,7 +401,7 @@ nsNoAuthURLParser::ParseAfterScheme(const char *spec, PRInt32 specLen, const char *p = nsnull; if (specLen > 2) { // looks like there is an authority section -#if defined(XP_PC) +#if defined(XP_WIN) || defined(XP_OS2) // if the authority looks like a drive number then we // really want to treat it as part of the path if ((specLen > 3) && (spec[3] == ':' || spec[3] == '|') && @@ -431,7 +431,7 @@ nsNoAuthURLParser::ParseAfterScheme(const char *spec, PRInt32 specLen, SET_RESULT(path, pos, specLen - pos); } -#if defined(XP_PC) +#if defined(XP_WIN) || defined(XP_OS2) NS_IMETHODIMP nsNoAuthURLParser::ParseFilePath(const char *filepath, PRInt32 filepathLen, PRUint32 *directoryPos, PRInt32 *directoryLen, diff --git a/mozilla/netwerk/base/src/nsURLParsers.h b/mozilla/netwerk/base/src/nsURLParsers.h index 78134b72fe3..bbaf7099697 100644 --- a/mozilla/netwerk/base/src/nsURLParsers.h +++ b/mozilla/netwerk/base/src/nsURLParsers.h @@ -76,7 +76,7 @@ protected: class nsNoAuthURLParser : public nsBaseURLParser { public: -#if defined(XP_PC) +#if defined(XP_WIN) || defined(XP_OS2) NS_IMETHOD ParseFilePath(const char *, PRInt32, PRUint32 *, PRInt32 *, PRUint32 *, PRInt32 *, diff --git a/mozilla/netwerk/base/tests/urltest.cpp b/mozilla/netwerk/base/tests/urltest.cpp index 2f6931fec40..c77192ce6be 100644 --- a/mozilla/netwerk/base/tests/urltest.cpp +++ b/mozilla/netwerk/base/tests/urltest.cpp @@ -59,7 +59,7 @@ #include "nsNetCID.h" #include "nsIURL.h" -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #define NETLIB_DLL "netlib.dll" #define XPCOM_DLL "xpcom32.dll" #else diff --git a/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp b/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp index 0a9d2b8a89a..3101aa57ed5 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp @@ -61,7 +61,7 @@ #include #endif -#if defined(XP_PC) && !defined(XP_OS2) +#if defined(XP_WIN) #include #endif @@ -699,7 +699,7 @@ nsHttpHandler::InitUserAgentComponents() else if (os2ver == 45) mOscpu.Adopt(nsCRT::strdup("Warp 4.5")); -#elif defined(XP_PC) +#elif defined(XP_WIN) OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; if (GetVersionEx(&info)) { if (info.dwPlatformId == VER_PLATFORM_WIN32_NT) { diff --git a/mozilla/parser/htmlparser/src/CNavDTD.h b/mozilla/parser/htmlparser/src/CNavDTD.h index dcdaf7d8a46..d7780e95810 100644 --- a/mozilla/parser/htmlparser/src/CNavDTD.h +++ b/mozilla/parser/htmlparser/src/CNavDTD.h @@ -113,14 +113,14 @@ class nsTokenAllocator; an nsParser. ***************************************************************/ -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( disable : 4275 ) #endif class CNavDTD : public nsIDTD { -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( default : 4275 ) #endif diff --git a/mozilla/parser/htmlparser/src/COtherDTD.h b/mozilla/parser/htmlparser/src/COtherDTD.h index 00e2e800fd0..fc1d224c85f 100644 --- a/mozilla/parser/htmlparser/src/COtherDTD.h +++ b/mozilla/parser/htmlparser/src/COtherDTD.h @@ -111,14 +111,14 @@ class nsNodeAllocator; an nsParser. ***************************************************************/ -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( disable : 4275 ) #endif class COtherDTD : public nsIDTD { -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( default : 4275 ) #endif diff --git a/mozilla/parser/htmlparser/src/nsHTMLTokenizer.h b/mozilla/parser/htmlparser/src/nsHTMLTokenizer.h index 532773cacb2..031bf41c873 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLTokenizer.h +++ b/mozilla/parser/htmlparser/src/nsHTMLTokenizer.h @@ -64,7 +64,7 @@ Notes: ***************************************************************/ -#if defined(XP_PC) +#ifdef _MSC_VER #pragma warning( disable : 4275 ) #endif diff --git a/mozilla/profile/pref-migrator/public/nsIPrefMigration.idl b/mozilla/profile/pref-migrator/public/nsIPrefMigration.idl index 8e58f8b3d4f..375c2dfe995 100644 --- a/mozilla/profile/pref-migrator/public/nsIPrefMigration.idl +++ b/mozilla/profile/pref-migrator/public/nsIPrefMigration.idl @@ -53,7 +53,7 @@ #define PREF_FILE_NAME_IN_4x "preferences.js" #elif defined(XP_MAC) #define PREF_FILE_NAME_IN_4x "Netscape Preferences" -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) #define PREF_FILE_NAME_IN_4x "prefs.js" #else /* this will cause a failure at run time, as it should, since we don't know diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp index ed22c3dd67e..9156e8c79e2 100644 --- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp @@ -124,7 +124,7 @@ #define PSM_CERT7_DB "Certificates7" #define PSM_KEY3_DB "Key Database3" #define PSM_SECMODULE_DB "Security Modules" -#else /* XP_PC */ +#else /* XP_WIN || XP_OS2 */ #define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "rules.dat" #define POP_MAIL_FILTER_FILE_NAME_IN_4x "rules.dat" #define MAIL_SUMMARY_SUFFIX_IN_4x ".snm" diff --git a/mozilla/profile/public/nsIAccount.h b/mozilla/profile/public/nsIAccount.h index 0948eeed79d..372f129277f 100644 --- a/mozilla/profile/public/nsIAccount.h +++ b/mozilla/profile/public/nsIAccount.h @@ -92,7 +92,7 @@ public: // NS_IMETHOD PEPluginFunc( long selectorCode, void* paramBlock, void* returnData )=0; -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) OSVERSIONINFO *lpOsVersionInfo; #endif diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index 11c566fc479..68568979a68 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -97,8 +97,8 @@ #elif defined (XP_MAC) #define OLD_REGISTRY_FILE_NAME "Netscape Registry" #elif defined (XP_BEOS) -#else /* assume XP_PC */ -#ifndef XP_OS2 +#elif defined(XP_WIN) || defined(XP_OS2) +#ifdef XP_WIN #include #endif #define OLD_REGISTRY_FILE_NAME "nsreg.dat" @@ -1945,7 +1945,7 @@ nsresult nsProfile::Update4xProfileInfo() { nsresult rv = NS_OK; -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) char * oldRegFile = GetOldRegLocation(); rv = gProfileDataAccess->Get4xProfileInfo(oldRegFile, PR_TRUE); @@ -1954,7 +1954,7 @@ nsresult nsProfile::Update4xProfileInfo() #else /* XP_UNIX */ rv = gProfileDataAccess->Get4xProfileInfo(nsnull, PR_TRUE); -#endif /* XP_PC || XP_MAC */ +#endif /* XP_WIN || XP_OS2 || XP_MAC */ return rv; } @@ -2022,7 +2022,7 @@ NS_IMETHODIMP nsProfile::MigrateProfileInfo() { nsresult rv = NS_OK; -#if defined(XP_PC) || defined(XP_MAC) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) #if defined(DEBUG_profile_verbose) printf("Entered MigrateProfileInfo.\n"); @@ -2036,7 +2036,7 @@ NS_IMETHODIMP nsProfile::MigrateProfileInfo() #else /* XP_UNIX */ rv = gProfileDataAccess->Get4xProfileInfo(nsnull, PR_FALSE); -#endif /* XP_PC || XP_MAC */ +#endif /* XP_WIN || XP_OS2 || XP_MAC */ gProfileDataAccess->mProfileDataChanged = PR_TRUE; gProfileDataAccess->UpdateRegistry(nsnull); diff --git a/mozilla/profile/src/nsProfileAccess.cpp b/mozilla/profile/src/nsProfileAccess.cpp index 800f506a030..f0ba201743e 100644 --- a/mozilla/profile/src/nsProfileAccess.cpp +++ b/mozilla/profile/src/nsProfileAccess.cpp @@ -1062,7 +1062,7 @@ nsProfileAccess::Get4xProfileInfo(const char *registryName, PRBool fromImport) rv = GetPlatformCharset(charSet); if (NS_FAILED(rv)) return rv; -#if defined(XP_PC) || defined(XP_MAC) || defined(XP_MACOSX) +#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) || defined(XP_MACOSX) NS_ASSERTION(registryName, "Invalid registryName"); nsCOMPtr registryFile; diff --git a/mozilla/sun-java/stubs/include/jni_md.h b/mozilla/sun-java/stubs/include/jni_md.h index 1277ad7b1aa..d3e96ab4dfa 100644 --- a/mozilla/sun-java/stubs/include/jni_md.h +++ b/mozilla/sun-java/stubs/include/jni_md.h @@ -93,8 +93,8 @@ # define JNICALL # define JNIEXPORT # endif -/* PC */ -#elif defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +/* Win32 */ +#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) # include # if defined(_MSC_VER) || defined(__GNUC__) # if defined(WIN32) || defined(_WIN32) diff --git a/mozilla/sun-java/stubs/include/jri_md.h b/mozilla/sun-java/stubs/include/jri_md.h index f55dade8a93..cfb0ed0d9b2 100644 --- a/mozilla/sun-java/stubs/include/jri_md.h +++ b/mozilla/sun-java/stubs/include/jri_md.h @@ -79,7 +79,7 @@ extern "C" { # define JRI_PUBLIC_VAR(VarType) VarType # define JRI_CALLBACK # endif -#elif defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) +#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32) # include # if defined(_MSC_VER) || defined(__GNUC__) # if defined(WIN32) || defined(_WIN32) diff --git a/mozilla/sun-java/stubs/include/sysmacros_md.h b/mozilla/sun-java/stubs/include/sysmacros_md.h index b5206b63ff6..2591eee3b26 100644 --- a/mozilla/sun-java/stubs/include/sysmacros_md.h +++ b/mozilla/sun-java/stubs/include/sysmacros_md.h @@ -37,7 +37,7 @@ #ifndef SYSMACROS_MD_H_ #define SYSMACROS_MD_H_ -#if defined (XP_PC) && !defined (_WIN32) && !defined (XP_OS2) +#if defined (XP_WIN) && !defined (_WIN32) #ifndef HUGEP #define HUGEP __huge #endif @@ -45,7 +45,7 @@ #ifndef HUGEP #define HUGEP #endif -#endif /* defined(XP_PC) && !defined (_WIN32) && !defined (XP_OS2) */ +#endif /* WIN16 */ #endif /*SYSMACROS_MD_H_*/ diff --git a/mozilla/sun-java/stubs/include/typedefs_md.h b/mozilla/sun-java/stubs/include/typedefs_md.h index 8a398d2c7fb..f511bcd36c7 100644 --- a/mozilla/sun-java/stubs/include/typedefs_md.h +++ b/mozilla/sun-java/stubs/include/typedefs_md.h @@ -94,7 +94,7 @@ typedef unsigned long uint_t; /* this is already declared in OpenTransport.h, bu #endif #endif -#if defined(XP_PC) && !defined(XP_OS2) +#if defined(XP_WIN) typedef long int32_t; #endif diff --git a/mozilla/webshell/tests/viewer/nsEditorMode.cpp b/mozilla/webshell/tests/viewer/nsEditorMode.cpp index 9d029274072..f81f29b0651 100644 --- a/mozilla/webshell/tests/viewer/nsEditorMode.cpp +++ b/mozilla/webshell/tests/viewer/nsEditorMode.cpp @@ -61,17 +61,6 @@ static nsIEditor *gEditor; static NS_DEFINE_CID(kHTMLEditorCID, NS_HTMLEDITOR_CID); static NS_DEFINE_CID(kEditorCID, NS_EDITOR_CID); -#ifdef XP_PC -#define EDITOR_DLL "ender.dll" -#else -#ifdef XP_MAC -#define EDITOR_DLL "ENDER_DLL" -#else // XP_UNIX || XP_BEOS -#define EDITOR_DLL "libender"MOZ_DLL_SUFFIX -#endif -#endif - - nsresult NS_InitEditorMode(nsIDOMDocument *aDOMDocument, nsIPresShell* aPresShell) { nsresult result = NS_OK; diff --git a/mozilla/webshell/tests/viewer/nsViewerApp.cpp b/mozilla/webshell/tests/viewer/nsViewerApp.cpp index d1ef934e07f..78164ace813 100644 --- a/mozilla/webshell/tests/viewer/nsViewerApp.cpp +++ b/mozilla/webshell/tests/viewer/nsViewerApp.cpp @@ -104,7 +104,7 @@ #define DIALOG_FONT_SIZE 10 -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN #include "JSConsole.h" #ifdef NGPREFS #include "ngprefs.h" @@ -403,7 +403,7 @@ static void AddTestDocsFromFile(nsWebCrawler* aCrawler, const nsString& aFileName) { NS_LossyConvertUCS2toASCII cfn(aFileName); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) FILE* fp = fopen(cfn.get(), "rb"); #else FILE* fp = fopen(cfn.get(), "r"); @@ -766,7 +766,7 @@ nsViewerApp::AfterDispatch() #include "nsIDocument.h" #include "nsIURL.h" -#ifndef XP_PC +#if !defined(XP_WIN) && !defined(XP_OS2) #ifndef XP_MAC #define _MAX_PATH 512 #endif @@ -825,7 +825,7 @@ static void* GetWidgetNativeData(nsISupports* aObject) -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN extern JSConsole *gConsole; // XXX temporary robot code until it's made XP extern HINSTANCE gInstance, gPrevInstance; @@ -1117,7 +1117,7 @@ nsViewerApp::CreateRobot(nsBrowserWindow* aWindow) tempStr->Assign(NS_ConvertUTF8toUCS2(str)); gWorkList->AppendElement(tempStr); } -#if defined(XP_PC) && defined(NS_DEBUG) && !defined(XP_OS2) +#if defined(XP_WIN) && defined(NS_DEBUG) DebugRobot( gWorkList, gVisualDebug ? aWindow->mDocShell : nsnull, @@ -1552,7 +1552,7 @@ nsViewerApp::CreateSiteWalker(nsBrowserWindow* aWindow) //---------------------------------------- -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN #include "jsconsres.h" static void DestroyConsole() @@ -1600,7 +1600,7 @@ static void ShowConsole(nsBrowserWindow* aWindow) NS_IMETHODIMP nsViewerApp::CreateJSConsole(nsBrowserWindow* aWindow) { -#if defined(XP_PC) && !defined(XP_OS2) +#ifdef XP_WIN if (nsnull == gConsole) { ShowConsole(aWindow); } @@ -1611,7 +1611,7 @@ nsViewerApp::CreateJSConsole(nsBrowserWindow* aWindow) NS_IMETHODIMP nsViewerApp::DoPrefs(nsBrowserWindow* aWindow) { -#if defined(XP_PC) && defined(NGPREFS) && !defined(XP_OS2) +#if defined(XP_WIN) && defined(NGPREFS) INGLayoutPrefs *pPrefs; CoInitialize(NULL); diff --git a/mozilla/xpcom/ds/nsCRT.h b/mozilla/xpcom/ds/nsCRT.h index d04c7249a37..36163a854f9 100644 --- a/mozilla/xpcom/ds/nsCRT.h +++ b/mozilla/xpcom/ds/nsCRT.h @@ -49,7 +49,7 @@ # define NS_LINEBREAK "\015" # define NS_LINEBREAK_LEN 1 #else -# ifdef XP_PC +# if defined(XP_WIN) || defined(XP_OS2) # define NS_LINEBREAK "\015\012" # define NS_LINEBREAK_LEN 2 # else @@ -57,7 +57,7 @@ # define NS_LINEBREAK "\012" # define NS_LINEBREAK_LEN 1 # endif /* XP_UNIX */ -# endif /* XP_PC */ +# endif /* XP_WIN || XP_OS2 */ #endif /* XP_MAC */ extern const PRUnichar kIsoLatin1ToUCS2[256]; diff --git a/mozilla/xpcom/io/nsAppFileLocationProvider.cpp b/mozilla/xpcom/io/nsAppFileLocationProvider.cpp index 988d90bd3e2..6d563b7ff42 100755 --- a/mozilla/xpcom/io/nsAppFileLocationProvider.cpp +++ b/mozilla/xpcom/io/nsAppFileLocationProvider.cpp @@ -43,7 +43,7 @@ #define INCL_DOSPROCESS #define INCL_DOSMODULEMGR #include -#elif defined(XP_PC) +#elif defined(XP_WIN) #include #include #elif defined(XP_UNIX) @@ -353,7 +353,7 @@ NS_METHOD nsAppFileLocationProvider::GetProductDirectory(nsILocalFile **aLocalFi if (NS_FAILED(rv)) return rv; rv = directoryService->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir)); if (NS_FAILED(rv)) return rv; -#elif defined(XP_PC) +#elif defined(XP_WIN) nsCOMPtr directoryService = do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; @@ -416,7 +416,7 @@ NS_METHOD nsAppFileLocationProvider::GetDefaultUserProfileRoot(nsILocalFile **aL rv = GetProductDirectory(getter_AddRefs(localDir)); if (NS_FAILED(rv)) return rv; -#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_OS2) || defined(XP_PC) +#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_OS2) || defined(XP_WIN) // These 3 platforms share this part of the path - do them as one rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING("Profiles")); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/xpcom/tests/nsIFileTest.cpp b/mozilla/xpcom/tests/nsIFileTest.cpp index 4999945d418..efe86e69eec 100644 --- a/mozilla/xpcom/tests/nsIFileTest.cpp +++ b/mozilla/xpcom/tests/nsIFileTest.cpp @@ -361,7 +361,7 @@ int main(void) NS_ASSERTION(registrar, "Null nsIComponentRegistrar"); registrar->AutoRegister(nsnull); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) InitTest("c:\\temp\\", "sub1/sub2/"); InitTest("d:\\temp\\", "sub1\\sub2\\"); @@ -394,6 +394,6 @@ int main(void) CopyTest("/tmp/test.txt", "/tmp/foo"); #endif /* XP_UNIX */ -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ return 0; } diff --git a/mozilla/xpcom/threads/plevent.h b/mozilla/xpcom/threads/plevent.h index 636389a703e..3b6a85d6493 100644 --- a/mozilla/xpcom/threads/plevent.h +++ b/mozilla/xpcom/threads/plevent.h @@ -505,7 +505,7 @@ struct PLEvent { ** Returns the event queue associated with the main thread. ** */ -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) /* ----------------------------------------------------------------------- ** FUNCTION: PL_GetNativeEventReceiverWindow() ** @@ -527,7 +527,7 @@ PR_EXTERN(HWND) PL_GetNativeEventReceiverWindow( PLEventQueue *eqp ); -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ #ifdef XP_UNIX /* ----------------------------------------------------------------------- diff --git a/mozilla/xpfe/appshell/src/nsCommandLineService.cpp b/mozilla/xpfe/appshell/src/nsCommandLineService.cpp index 878af374c52..9367109fe60 100644 --- a/mozilla/xpfe/appshell/src/nsCommandLineService.cpp +++ b/mozilla/xpfe/appshell/src/nsCommandLineService.cpp @@ -242,7 +242,7 @@ PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave) if (!PL_strcasecmp(lookingFor+1,userGave+2) && (lookingFor[0] == '-') && (userGave[0] == '-') && (userGave[1] == '-')) return PR_TRUE; } #endif -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) /* on windows /mail is the same as -mail */ if (lookingFor && userGave && (lookingFor[0] != '\0') && (userGave[0] != '\0')) { if (!PL_strcasecmp(lookingFor+1,userGave+1) && (lookingFor[0] == '-') && (userGave[0] == '/')) return PR_TRUE; diff --git a/mozilla/xpfe/appshell/src/nsXULWindow.cpp b/mozilla/xpfe/appshell/src/nsXULWindow.cpp index 38fd3c51be2..3ea4c0aa6fb 100644 --- a/mozilla/xpfe/appshell/src/nsXULWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsXULWindow.cpp @@ -392,7 +392,7 @@ NS_IMETHODIMP nsXULWindow::Destroy() if (mWindow) mWindow->Show(PR_FALSE); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) // We need to explicitly set the focus on Windows nsCOMPtr parent(do_QueryReferent(mParentWindow)); if (parent) { diff --git a/mozilla/xpfe/bootstrap/nsAppRunner.cpp b/mozilla/xpfe/bootstrap/nsAppRunner.cpp index 8dd61df1e2d..948a2cd41a3 100644 --- a/mozilla/xpfe/bootstrap/nsAppRunner.cpp +++ b/mozilla/xpfe/bootstrap/nsAppRunner.cpp @@ -347,7 +347,7 @@ static NS_DEFINE_CID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID); /*********************************************/ // Default implemenations for nativeAppSupport // If your platform implements these functions if def out this code. -#if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_PHOTON) && !defined( XP_PC ) && !defined( XP_BEOS ) && !defined(MOZ_WIDGET_GTK) && !defined(MOZ_WIDGET_GTK2) +#if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_PHOTON) && !defined( XP_WIN) && !defined(XP_OS2) && !defined( XP_BEOS ) && !defined(MOZ_WIDGET_GTK) && !defined(MOZ_WIDGET_GTK2) nsresult NS_CreateSplashScreen(nsISplashScreen **aResult) { @@ -382,7 +382,7 @@ PRBool NS_CanRun() // nsISplashScreen will be removed. // -#if !defined( XP_PC ) && !defined(MOZ_WIDGET_GTK) && !defined(MOZ_WIDGET_GTK2) && !defined(XP_MAC) && (!defined(XP_MACOSX) || defined(MOZ_WIDGET_COCOA)) +#if !defined(XP_WIN) && !defined(XP_OS2) && !defined(MOZ_WIDGET_GTK) && !defined(MOZ_WIDGET_GTK2) && !defined(XP_MAC) && (!defined(XP_MACOSX) || defined(MOZ_WIDGET_COCOA)) nsresult NS_CreateNativeAppSupport(nsINativeAppSupport **aResult) { @@ -677,9 +677,9 @@ static PRBool IsStartupCommand(const char *arg) // windows allows /mail or -mail if ((arg[0] == '-') -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) || (arg[0] == '/') -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ ) { return PR_TRUE; } @@ -1004,7 +1004,7 @@ static nsresult VerifyInstallation(int argc, char **argv) } #ifdef DEBUG_warren -#ifdef XP_PC +#ifdef XP_WIN #define _CRTDBG_MAP_ALLOC #include #endif @@ -1361,7 +1361,7 @@ static void DumpHelp(char *appname) printf("%s-splash%sEnable splash screen.\n",HELP_SPACER_1,HELP_SPACER_2); #else printf("%s-nosplash%sDisable splash screen.\n",HELP_SPACER_1,HELP_SPACER_2); -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) printf("%s-quiet%sDisable splash screen.\n",HELP_SPACER_1,HELP_SPACER_2); #endif #endif @@ -1444,11 +1444,11 @@ static PRBool HandleDumpArguments(int argc, char* argv[]) #if defined(XP_UNIX) || defined(XP_BEOS) || (PL_strcasecmp(argv[i], "--help") == 0) #endif /* XP_UNIX || XP_BEOS*/ -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) || (PL_strcasecmp(argv[i], "/h") == 0) || (PL_strcasecmp(argv[i], "/help") == 0) || (PL_strcasecmp(argv[i], "/?") == 0) -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ ) { DumpHelp(argv[0]); return PR_TRUE; @@ -1458,10 +1458,10 @@ static PRBool HandleDumpArguments(int argc, char* argv[]) #if defined(XP_UNIX) || defined(XP_BEOS) || (PL_strcasecmp(argv[i], "--version") == 0) #endif /* XP_UNIX || XP_BEOS */ -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) || (PL_strcasecmp(argv[i], "/v") == 0) || (PL_strcasecmp(argv[i], "/version") == 0) -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ ) { DumpVersion(argv[0]); return PR_TRUE; @@ -1490,9 +1490,9 @@ static PRBool GetWantSplashScreen(int argc, char* argv[]) #ifdef XP_BEOS || (PL_strcasecmp(argv[i], "--nosplash") == 0) #endif /* XP_BEOS */ -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) || (PL_strcasecmp(argv[i], "/nosplash") == 0) -#endif /* XP_PC */ +#endif /* XP_WIN || XP_OS2 */ ) { dosplash = PR_FALSE; } @@ -1656,7 +1656,7 @@ int main(int argc, char* argv[]) return TranslateReturnValue(mainResult); } -#if defined( XP_PC ) && defined( WIN32 ) +#if defined( XP_WIN ) && defined( WIN32 ) // We need WinMain in order to not be a console app. This function is // unused if we are a console application. int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR args, int) @@ -1664,4 +1664,4 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR args, int) // Do the real work. return main(__argc, __argv); } -#endif // XP_PC && WIN32 +#endif // XP_WIN && WIN32 diff --git a/mozilla/xpfe/components/startup/src/nsCommandLineService.cpp b/mozilla/xpfe/components/startup/src/nsCommandLineService.cpp index 878af374c52..9367109fe60 100644 --- a/mozilla/xpfe/components/startup/src/nsCommandLineService.cpp +++ b/mozilla/xpfe/components/startup/src/nsCommandLineService.cpp @@ -242,7 +242,7 @@ PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave) if (!PL_strcasecmp(lookingFor+1,userGave+2) && (lookingFor[0] == '-') && (userGave[0] == '-') && (userGave[1] == '-')) return PR_TRUE; } #endif -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) /* on windows /mail is the same as -mail */ if (lookingFor && userGave && (lookingFor[0] != '\0') && (userGave[0] != '\0')) { if (!PL_strcasecmp(lookingFor+1,userGave+1) && (lookingFor[0] == '-') && (userGave[0] == '/')) return PR_TRUE; diff --git a/mozilla/xpinstall/stub/xpistub.cpp b/mozilla/xpinstall/stub/xpistub.cpp index d07f9501112..a3b265bb62f 100644 --- a/mozilla/xpinstall/stub/xpistub.cpp +++ b/mozilla/xpinstall/stub/xpistub.cpp @@ -42,7 +42,7 @@ #include "plstr.h" -#ifdef XP_PC +#if defined(XP_WIN) || defined(XP_OS2) #if defined(XP_OS2) #include #define MAX_PATH _MAX_PATH @@ -111,7 +111,7 @@ PR_PUBLIC_API(nsresult) XPI_Init( rv = NS_NewLocalFileWithFSSpec((FSSpec*)&aXPIStubDir, PR_FALSE, getter_AddRefs(compDir)); if (NS_FAILED(rv)) return rv; -#elif defined(XP_PC) +#elif defined(XP_WIN) || defined(XP_OS2) #ifdef XP_OS2_EMX char componentPath[MAX_PATH];