diff --git a/db/mork/src/morkConfig.h b/db/mork/src/morkConfig.h
index f45267fcdcfb0f65d184fa92e35b7ef47f0a34c9..0b0954a615cf29ac671365d316b134515ab20578 100644
--- a/db/mork/src/morkConfig.h
+++ b/db/mork/src/morkConfig.h
@@ -50,8 +50,6 @@
 
 // { %%%%% begin platform defs peculiar to Mork %%%%%
 
-//#define XP_MAC 1
-
 #ifdef XP_MACOSX
 #define MORK_MAC 1
 #endif
diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp
index 4ad19d8c81217a29ee5d202bd32c5ab46314eb85..e46cc81f91187f02910430582546fc8e415c4f35 100644
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -817,16 +817,6 @@ const char * nsDefaultURIFixup::GetFileSystemCharset()
 const char * nsDefaultURIFixup::GetCharsetForUrlBar()
 {
   const char *charset = GetFileSystemCharset();
-#ifdef XP_MAC
-  // check for "x-mac-" prefix
-  if ((strlen(charset) >= 6) && charset[0] == 'x' && charset[2] == 'm')
-  {
-    if (!strcmp("x-mac-roman", charset))
-      return "ISO-8859-1";
-    // we can do more x-mac-xxxx mapping here
-    // or somewhere in intl code like nsIPlatformCharset.
-  }
-#endif
   return charset;
 }
 
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 97eae93ca33fc020342c4ffae794e31b6f0779f8..133015ff2430566408644530d603e50d9181834a 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -818,7 +818,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
     mCleanMessageManager(PR_FALSE),
     mNeedsFocus(PR_TRUE),
     mHasFocus(PR_FALSE),
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
     mShowAccelerators(PR_FALSE),
     mShowFocusRings(PR_FALSE),
 #else
@@ -4091,7 +4091,7 @@ nsGlobalWindow::CheckSecurityLeftAndTop(PRInt32* aLeft, PRInt32* aTop)
       screen->GetAvailLeft(&screenLeft);
       screen->GetAvailWidth(&screenWidth);
       screen->GetAvailHeight(&screenHeight);
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
       /* The mac's coordinate system is different from the assumed Windows'
          system. It offsets by the height of the menubar so that a window
          placed at (0,0) will be entirely visible. Unfortunately that
@@ -4431,7 +4431,7 @@ nsGlobalWindow::Dump(const nsAString& aStr)
 
   char *cstr = ToNewUTF8String(aStr);
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
   // have to convert \r to \n so that printing to the console works
   char *c = cstr, *cEnd = cstr + strlen(cstr);
   while (c < cEnd) {
diff --git a/editor/composer/src/nsComposerCommands.cpp b/editor/composer/src/nsComposerCommands.cpp
index ab1c759c20e41d28272201dbe6975b8fd45c1dc5..a8506c7a647c7973fd326a1944ae0001adb4c0bc 100644
--- a/editor/composer/src/nsComposerCommands.cpp
+++ b/editor/composer/src/nsComposerCommands.cpp
@@ -86,11 +86,6 @@ nsBaseComposerCommand::nsBaseComposerCommand()
 NS_IMPL_ISUPPORTS1(nsBaseComposerCommand, nsIControllerCommand)
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 nsBaseStateUpdatingCommand::nsBaseStateUpdatingCommand(const char* aTagName)
 : nsBaseComposerCommand()
 , mTagName(aTagName)
@@ -197,10 +192,6 @@ nsPasteNoFormattingCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsStyleUpdatingCommand::nsStyleUpdatingCommand(const char* aTagName)
 : nsBaseStateUpdatingCommand(aTagName)
 {
@@ -293,9 +284,6 @@ nsStyleUpdatingCommand::ToggleState(nsIEditor *aEditor, const char* aTagName)
 
   return rv;
 }
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 nsListCommand::nsListCommand(const char* aTagName)
 : nsBaseStateUpdatingCommand(aTagName)
@@ -351,10 +339,6 @@ nsListCommand::ToggleState(nsIEditor *aEditor, const char* aTagName)
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsListItemCommand::nsListItemCommand(const char* aTagName)
 : nsBaseStateUpdatingCommand(aTagName)
 {
@@ -435,10 +419,6 @@ nsListItemCommand::ToggleState(nsIEditor *aEditor, const char* aTagName)
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsRemoveListCommand::IsCommandEnabled(const char * aCommandName,
                                       nsISupports *refCon,
@@ -497,10 +477,6 @@ nsRemoveListCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsIndentCommand::IsCommandEnabled(const char * aCommandName,
                                   nsISupports *refCon, PRBool *outCmdEnabled)
@@ -593,11 +569,6 @@ nsOutdentCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 nsMultiStateCommand::nsMultiStateCommand()
 : nsBaseComposerCommand()
 {
@@ -673,10 +644,6 @@ nsMultiStateCommand::GetCommandStateParams(const char *aCommandName,
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsParagraphStateCommand::nsParagraphStateCommand()
 : nsMultiStateCommand()
 {
@@ -715,10 +682,6 @@ nsParagraphStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
   return htmlEditor->SetParagraphFormat(newState);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsFontFaceStateCommand::nsFontFaceStateCommand()
 : nsMultiStateCommand()
 {
@@ -779,10 +742,6 @@ nsFontFaceStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsFontSizeStateCommand::nsFontSizeStateCommand()
   : nsMultiStateCommand()
 {
@@ -859,9 +818,6 @@ nsFontSizeStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 nsFontColorStateCommand::nsFontColorStateCommand()
 : nsMultiStateCommand()
 {
@@ -909,10 +865,6 @@ nsFontColorStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsHighlightColorStateCommand::nsHighlightColorStateCommand()
 : nsMultiStateCommand()
 {
@@ -971,10 +923,6 @@ nsHighlightColorStateCommand::IsCommandEnabled(const char * aCommandName,
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsBackgroundColorStateCommand::nsBackgroundColorStateCommand()
 : nsMultiStateCommand()
 {
@@ -1013,10 +961,6 @@ nsBackgroundColorStateCommand::SetState(nsIEditor *aEditor, nsString& newState)
   return htmlEditor->SetBackgroundColor(newState);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsAlignCommand::nsAlignCommand()
 : nsMultiStateCommand()
 {
@@ -1074,12 +1018,6 @@ nsAlignCommand::SetState(nsIEditor *aEditor, nsString& newState)
   return htmlEditor->Align(newState);
 }
 
-
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 nsAbsolutePositioningCommand::nsAbsolutePositioningCommand()
 : nsBaseStateUpdatingCommand("")
 {
@@ -1151,10 +1089,6 @@ nsAbsolutePositioningCommand::ToggleState(nsIEditor *aEditor, const char* aTagNa
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsDecreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
                                           nsISupports *refCon,
@@ -1212,10 +1146,6 @@ nsDecreaseZIndexCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsIncreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
                                           nsISupports *refCon,
@@ -1266,10 +1196,6 @@ nsIncreaseZIndexCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED, enabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP
 nsRemoveStylesCommand::IsCommandEnabled(const char * aCommandName,
@@ -1317,10 +1243,6 @@ nsRemoveStylesCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsIncreaseFontSizeCommand::IsCommandEnabled(const char * aCommandName,
                                             nsISupports *refCon,
@@ -1366,10 +1288,6 @@ nsIncreaseFontSizeCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsDecreaseFontSizeCommand::IsCommandEnabled(const char * aCommandName,
                                             nsISupports *refCon,
@@ -1415,10 +1333,6 @@ nsDecreaseFontSizeCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED,outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsInsertHTMLCommand::IsCommandEnabled(const char * aCommandName,
                                       nsISupports *refCon,
@@ -1472,10 +1386,6 @@ nsInsertHTMLCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMPL_ISUPPORTS_INHERITED0(nsInsertTagCommand, nsBaseComposerCommand)
 
 nsInsertTagCommand::nsInsertTagCommand(const char* aTagName)
@@ -1584,9 +1494,6 @@ nsInsertTagCommand::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED, outCmdEnabled);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 /****************************/
 //HELPER METHODS
diff --git a/editor/composer/src/nsComposerDocumentCommands.cpp b/editor/composer/src/nsComposerDocumentCommands.cpp
index fd41899161ca957dde679655fcebb842d7a57073..b67f521387843242cb70da6fadbd71c48b90e40b 100644
--- a/editor/composer/src/nsComposerDocumentCommands.cpp
+++ b/editor/composer/src/nsComposerDocumentCommands.cpp
@@ -448,10 +448,6 @@ nsSetDocumentStateCommand::GetCommandStateParams(const char *aCommandName,
  *
  */
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsDocumentStateCommand::IsCommandEnabled(const char* aCommandName,
                                          nsISupports *refCon,
diff --git a/editor/composer/src/nsEditingSession.cpp b/editor/composer/src/nsEditingSession.cpp
index 2d02a4f1392960acb70e8eafc6487b8be3adb74f..3c201481edb3d255393162941b28ee7111c84860 100644
--- a/editor/composer/src/nsEditingSession.cpp
+++ b/editor/composer/src/nsEditingSession.cpp
@@ -641,10 +641,6 @@ nsEditingSession::GetEditorForWindow(nsIDOMWindow *aWindow,
   return editorDocShell->GetEditor(outEditor);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 /*---------------------------------------------------------------------------
 
   OnStateChange
@@ -894,11 +890,6 @@ nsEditingSession::OnSecurityChange(nsIWebProgress *aWebProgress,
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 /*---------------------------------------------------------------------------
 
   IsProgressForTargetDocument
@@ -1149,11 +1140,6 @@ nsEditingSession::EndPageLoad(nsIWebProgress *aWebProgress,
 #endif
 }
 
-
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 /*---------------------------------------------------------------------------
 
   GetDocShellFromWindow
diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp
index d19d388b1e3e3eeeba82ad7e14ba4bed5342607b..67881f836eb5b1dd2843a487a7828dea5a3484f3 100644
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -215,12 +215,6 @@ NS_INTERFACE_MAP_END
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsEditor)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsEditor)
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorMethods 
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP
 nsEditor::Init(nsIDOMDocument *aDoc, nsIContent *aRoot, nsISelectionController *aSelCon, PRUint32 aFlags)
@@ -1339,12 +1333,6 @@ NS_IMETHODIMP nsEditor::SetSpellcheckUserOverride(PRBool enable)
   return SyncRealTimeSpell();
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  main node manipulation routines 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP nsEditor::CreateNode(const nsAString& aTag,
                                    nsIDOMNode *    aParent,
                                    PRInt32         aPosition,
@@ -1702,11 +1690,6 @@ nsEditor::MoveNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aOffset)
   return InsertNode(aNode, aParent, aOffset);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  editor observer maintainance
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsEditor::AddEditorObserver(nsIEditorObserver *aObserver)
@@ -1744,11 +1727,6 @@ void nsEditor::NotifyEditorObservers(void)
     mEditorObservers[i]->EditAction();
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  action listener maintainance
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsEditor::AddEditActionListener(nsIEditActionListener *aListener)
@@ -1778,13 +1756,6 @@ nsEditor::RemoveEditActionListener(nsIEditActionListener *aListener)
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  docstate listener maintainance
-#pragma mark -
-#endif
-
-
 NS_IMETHODIMP
 nsEditor::AddDocumentStateListener(nsIDocumentStateListener *aListener)
 {
@@ -1812,12 +1783,6 @@ nsEditor::RemoveDocumentStateListener(nsIDocumentStateListener *aListener)
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  misc 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP nsEditor::OutputToString(const nsAString& aFormatType,
                                        PRUint32 aFlags,
                                        nsAString& aOutputString)
@@ -1873,11 +1838,6 @@ nsEditor::DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed)
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  support for selection preservation
-#pragma mark -
-#endif
 
 PRBool   
 nsEditor::ArePreservingSelection()
@@ -1910,12 +1870,6 @@ nsEditor::StopPreservingSelection()
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  IME event handlers 
-#pragma mark -
-#endif
-
 nsresult
 nsEditor::BeginIMEComposition()
 {
@@ -1961,13 +1915,6 @@ nsEditor::EndIMEComposition()
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIPhonetic
-#pragma mark -
-#endif
-
-
 NS_IMETHODIMP
 nsEditor::GetPhonetic(nsAString& aPhonetic)
 {
@@ -1980,13 +1927,6 @@ nsEditor::GetPhonetic(nsAString& aPhonetic)
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorIMESupport 
-#pragma mark -
-#endif
-
-
 static nsresult
 GetEditorContentWindow(nsIDOMElement *aRoot, nsIWidget **aResult)
 {
@@ -2035,7 +1975,7 @@ nsEditor::ForceCompositionEnd()
 // flag for Unix.
 // We should use nsILookAndFeel to resolve this
 
-#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
   // XXXmnakano see bug 558976, ResetInputState() has two meaning which are
   // "commit the composition" and "cursor is moved".  This method name is
   // "ForceCompositionEnd", so, ResetInputState() should be used only for the
@@ -2104,13 +2044,8 @@ nsEditor::GetComposing(PRBool* aResult)
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  public nsEditor methods 
-#pragma mark -
-#endif
-/* Non-interface, public methods */
 
+/* Non-interface, public methods */
 
 NS_IMETHODIMP
 nsEditor::GetRootElement(nsIDOMElement **aRootElement)
@@ -2274,11 +2209,6 @@ nsEditor::CloneAttributes(nsIDOMNode *aDestNode, nsIDOMNode *aSourceNode)
   return result;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  Protected and static methods 
-#pragma mark -
-#endif
 
 NS_IMETHODIMP nsEditor::ScrollSelectionIntoView(PRBool aScrollToAnchor)
 {
@@ -2761,11 +2691,6 @@ NS_IMETHODIMP nsEditor::CreateTxnForJoinNode(nsIDOMNode  *aLeftNode,
 
 // END nsEditor core implementation
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsEditor public static helper methods 
-#pragma mark -
-#endif
 
 // BEGIN nsEditor public helper methods
 
@@ -4271,13 +4196,6 @@ nsEditor::GetShouldTxnSetSelection()
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  protected nsEditor methods 
-#pragma mark -
-#endif
-
-
 NS_IMETHODIMP 
 nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction)
 {
diff --git a/editor/libeditor/base/nsEditorCommands.cpp b/editor/libeditor/base/nsEditorCommands.cpp
index 79e99ec88fadd9b99351c657efb82ee8133636a9..ee270c100a43b05d8e247338c5275cc6fa0cda31 100644
--- a/editor/libeditor/base/nsEditorCommands.cpp
+++ b/editor/libeditor/base/nsEditorCommands.cpp
@@ -60,10 +60,6 @@ nsBaseEditorCommand::nsBaseEditorCommand()
 
 NS_IMPL_ISUPPORTS1(nsBaseEditorCommand, nsIControllerCommand)
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP
 nsUndoCommand::IsCommandEnabled(const char * aCommandName, 
@@ -790,9 +786,6 @@ nsSelectionMoveCommands::GetCommandStateParams(const char *aCommandName,
   return aParams->SetBooleanValue(STATE_ENABLED,canUndo);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsInsertPlaintextCommand::IsCommandEnabled(const char * aCommandName,
@@ -850,10 +843,6 @@ nsInsertPlaintextCommand::GetCommandStateParams(const char *aCommandName,
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsPasteQuotationCommand::IsCommandEnabled(const char * aCommandName,
                                           nsISupports *refCon,
diff --git a/editor/libeditor/base/nsStyleSheetTxns.cpp b/editor/libeditor/base/nsStyleSheetTxns.cpp
index 2f26a479aff21d2534adc132ce36c4f433b758f0..b5446e112fdddcaee3c28c35721dcb81815aa858 100644
--- a/editor/libeditor/base/nsStyleSheetTxns.cpp
+++ b/editor/libeditor/base/nsStyleSheetTxns.cpp
@@ -128,10 +128,6 @@ AddStyleSheetTxn::GetTxnDescription(nsAString& aString)
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 RemoveStyleSheetTxn::RemoveStyleSheetTxn()
 :  EditTxn()
diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp
index 5b3d2d46519e53058576ecd76db9724160cdf582..80ccce28680478904a9b9c0ab228e4ab2a9267d7 100644
--- a/editor/libeditor/html/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp
@@ -1570,7 +1570,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromDrop(nsIDOMEvent* aDropEvent)
       nsCOMPtr<nsIDOMMouseEvent> mouseEvent(do_QueryInterface(aDropEvent));
       if (mouseEvent)
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
         mouseEvent->GetAltKey(&userWantsCopy);
 #else
         mouseEvent->GetCtrlKey(&userWantsCopy);
diff --git a/editor/libeditor/html/nsHTMLEditRules.cpp b/editor/libeditor/html/nsHTMLEditRules.cpp
index eb5fd2b069e252916c02793834f124b691180c6c..75cef3e8f8071b5326e45721416251f30d61eef8 100644
--- a/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -40,11 +40,6 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
-/* build on macs with low memory */
-#if defined(XP_MAC) && defined(MOZ_MAC_LOWMEM)
-#pragma optimization_level 1
-#endif
-
 #include "nsHTMLEditRules.h"
 
 #include "nsEditor.h"
@@ -8401,12 +8396,6 @@ nsHTMLEditRules::InsertMozBRIfNeeded(nsIDOMNode *aNode)
   return res;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditActionListener methods 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP 
 nsHTMLEditRules::WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
 {
diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp
index bfd4d3f1efa07b8d16113a157f759f5a52709450..885be97eb9f2b052bb176c5e9c726baa49099854 100644
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -1393,12 +1393,6 @@ PRBool nsHTMLEditor::IsModifiable()
   return !IsReadonly();
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIHTMLEditor methods 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsHTMLEditor::UpdateBaseURL()
 {
@@ -3484,11 +3478,6 @@ nsHTMLEditor::GetLinkedObjects(nsISupportsArray** aNodeList)
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorStyleSheets methods 
-#pragma mark -
-#endif
 
 NS_IMETHODIMP
 nsHTMLEditor::AddStyleSheet(const nsAString &aURL)
@@ -3810,12 +3799,6 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditor overrides 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP nsHTMLEditor::DeleteNode(nsIDOMNode * aNode)
 {
   // do nothing if the node is read-only
@@ -3863,12 +3846,6 @@ NS_IMETHODIMP nsHTMLEditor::InsertTextImpl(const nsAString& aStringToInsert,
   return nsEditor::InsertTextImpl(aStringToInsert, aInOutNode, aInOutOffset, aDoc);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsStubMutationObserver overrides 
-#pragma mark -
-#endif
-
 void
 nsHTMLEditor::ContentAppended(nsIDocument *aDocument, nsIContent* aContainer,
                               nsIContent* aFirstNewContent,
@@ -3922,11 +3899,6 @@ nsHTMLEditor::ContentRemoved(nsIDocument *aDocument, nsIContent* aContainer,
   }
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  support utils
-#pragma mark -
-#endif
 
 /* This routine examines aNode and it's ancestors looking for any node which has the
    -moz-user-select: all style lit.  Return the highest such ancestor.  */
@@ -4071,12 +4043,6 @@ nsHTMLEditor::DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed)
 #endif
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  StyleSheet utils 
-#pragma mark -
-#endif
-
 
 NS_IMETHODIMP 
 nsHTMLEditor::StyleSheetLoaded(nsCSSStyleSheet* aSheet, PRBool aWasAlternate,
@@ -4114,12 +4080,6 @@ nsHTMLEditor::StyleSheetLoaded(nsCSSStyleSheet* aSheet, PRBool aWasAlternate,
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsEditor overrides 
-#pragma mark -
-#endif
-
 
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
@@ -4265,12 +4225,6 @@ nsHTMLEditor::SelectAll()
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  Random methods 
-#pragma mark -
-#endif
-
 // this will NOT find aAttribute unless aAttribute has a non-null value
 // so singleton attributes like <Table border> will not be matched!
 void nsHTMLEditor::IsTextPropertySetByContent(nsIDOMNode        *aNode,
@@ -4340,9 +4294,6 @@ void nsHTMLEditor::IsTextPropertySetByContent(nsIDOMNode        *aNode,
   }
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 //================================================================
 // HTML Editor methods
@@ -4447,9 +4398,6 @@ nsHTMLEditor::GetEnclosingTable(nsIDOMNode *aNode)
   return tbl;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 #ifdef PRE_NODE_IN_BODY
 nsCOMPtr<nsIDOMElement> nsHTMLEditor::FindPreElement()
@@ -4552,9 +4500,6 @@ nsHTMLEditor::SetSelectionAtDocumentStart(nsISelection *aSelection)
   return aSelection->Collapse(rootElement,0);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 ///////////////////////////////////////////////////////////////////////////
 // RemoveBlockContainer: remove inNode, reparenting it's children into their
diff --git a/editor/libeditor/html/nsHTMLEditorEventListener.cpp b/editor/libeditor/html/nsHTMLEditorEventListener.cpp
index 5580754d8a85383ae09ea6638a4545e450e60421..1335e2595d33078f273c49eafe19752e7e3f7f53 100644
--- a/editor/libeditor/html/nsHTMLEditorEventListener.cpp
+++ b/editor/libeditor/html/nsHTMLEditorEventListener.cpp
@@ -136,7 +136,7 @@ nsHTMLEditorEventListener::MouseDown(nsIDOMEvent* aMouseEvent)
 
   PRBool isContextClick;
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
   // Ctrl+Click for context menu
   res = mouseEvent->GetCtrlKey(&isContextClick);
   NS_ENSURE_SUCCESS(res, res);
diff --git a/editor/libeditor/text/nsPlaintextEditor.cpp b/editor/libeditor/text/nsPlaintextEditor.cpp
index 5d4dd431530945a2edcf0dd7aec1dfcee381b6a0..53d6abd7dbb17ca61418f1f2c644de91a715b100 100644
--- a/editor/libeditor/text/nsPlaintextEditor.cpp
+++ b/editor/libeditor/text/nsPlaintextEditor.cpp
@@ -418,12 +418,6 @@ nsPlaintextEditor::HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent)
   return TypedText(str, eTypedText);
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIHTMLEditor methods 
-#pragma mark -
-#endif
-
 /* This routine is needed to provide a bottleneck for typing for logging
    purposes.  Can't use HandleKeyPress() (above) for that since it takes
    a nsIDOMKeyEvent* parameter.  So instead we pass enough info through
@@ -1207,12 +1201,6 @@ nsPlaintextEditor::SetNewlineHandling(PRInt32 aNewlineHandling)
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditor overrides 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP 
 nsPlaintextEditor::Undo(PRUint32 aCount)
 {
@@ -1457,13 +1445,6 @@ nsPlaintextEditor::OutputToStream(nsIOutputStream* aOutputStream,
   return encoder->EncodeToStream(aOutputStream);
 }
 
-
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsIEditorMailSupport overrides 
-#pragma mark -
-#endif
-
 NS_IMETHODIMP
 nsPlaintextEditor::InsertTextWithQuotations(const nsAString &aStringToInsert)
 {
@@ -1673,13 +1654,6 @@ nsPlaintextEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  nsEditor overrides 
-#pragma mark -
-#endif
-
-
 /** All editor operations which alter the doc should be prefaced
  *  with a call to StartOperation, naming the action and direction */
 NS_IMETHODIMP
@@ -1741,13 +1715,6 @@ nsPlaintextEditor::GetPIDOMEventTarget()
 }
 
 
-
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark  Random methods 
-#pragma mark -
-#endif
-
 nsresult
 nsPlaintextEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
                                             const nsAString & aAttribute,
diff --git a/editor/txtsvc/src/nsTextServicesDocument.cpp b/editor/txtsvc/src/nsTextServicesDocument.cpp
index e2587207f457c7a4e68ab403df276c1d81bb2a9e..4c5dc90717485531500da231f688a5717215b6f2 100644
--- a/editor/txtsvc/src/nsTextServicesDocument.cpp
+++ b/editor/txtsvc/src/nsTextServicesDocument.cpp
@@ -3821,11 +3821,7 @@ nsTextServicesDocument::NodeHasOffsetEntry(nsTArray<OffsetEntry*> *aOffsetTable,
 }
 
 // Spellchecker code has this. See bug 211343
-#ifdef XP_MAC
-#define IS_NBSP_CHAR(c) (((unsigned char)0xca)==(c))
-#else
 #define IS_NBSP_CHAR(c) (((unsigned char)0xa0)==(c))
-#endif
 
 nsresult
 nsTextServicesDocument::FindWordBounds(nsTArray<OffsetEntry*> *aOffsetTable,
diff --git a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
index 2834073bcac0c3e1b2178db85774621eab3424f4..cc8e5c5cf4301218f6466fc297123d1a24e199ef 100644
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -1027,11 +1027,6 @@ nsDocShellTreeOwner::GetOwnerRequestor()
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 ///////////////////////////////////////////////////////////////////////////////
 // DefaultTooltipTextProvider
 
@@ -1651,12 +1646,6 @@ ChromeTooltipListener::sAutoHideCallback(nsITimer *aTimer, void* aListener)
 } // sAutoHideCallback
 
 
-
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 NS_IMPL_ADDREF(ChromeContextMenuListener)
 NS_IMPL_RELEASE(ChromeContextMenuListener)
 
diff --git a/embedding/components/commandhandler/src/nsCommandManager.cpp b/embedding/components/commandhandler/src/nsCommandManager.cpp
index c3d9cf7e6c92b85f1fdde9e63e56d445f37fdd68..1fb8723d7ba22646cc9ca498defb1529be199f01 100644
--- a/embedding/components/commandhandler/src/nsCommandManager.cpp
+++ b/embedding/components/commandhandler/src/nsCommandManager.cpp
@@ -275,10 +275,6 @@ nsCommandManager::DoCommand(const char *aCommandName,
   return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 nsresult
 nsCommandManager::IsCallerChrome(PRBool *is_caller_chrome)
 {
diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
index 98b3d59dc415eff7ead0cf1c2ceb664cf686b2a7..bde5354dee45201e42349a52c3e78138503fa8c1 100644
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
@@ -215,12 +215,7 @@ struct CleanupData
 // volume / server dependent but it is difficult to obtain
 // that information. Instead this constant is a reasonable value that
 // modern systems should able to cope with.
-
-#ifdef XP_MAC
-const PRUint32 kDefaultMaxFilenameLength = 31;
-#else
 const PRUint32 kDefaultMaxFilenameLength = 64;
-#endif
 
 // Default flags for persistence
 const PRUint32 kDefaultPersistFlags = 
diff --git a/extensions/pref/autoconfig/src/nsReadConfig.cpp b/extensions/pref/autoconfig/src/nsReadConfig.cpp
index 8e30489232473d7cd564c12adb7d8a81e660c144..9293ef23c68f5d6b6fede3d518c78f50f518b267 100644
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -280,10 +280,7 @@ nsresult nsReadConfig::openAndEvaluateJSFile(const char *aFileName, PRInt32 obsc
                                     getter_AddRefs(jsFile));
         if (NS_FAILED(rv)) 
             return rv;
-        
-#ifdef XP_MAC
-        jsFile->AppendNative(NS_LITERAL_CSTRING("Essential Files"));
-#endif
+
         rv = jsFile->AppendNative(nsDependentCString(aFileName));
         if (NS_FAILED(rv)) 
             return rv;
diff --git a/ipc/chromium/src/base/third_party/nspr/prtime.cc b/ipc/chromium/src/base/third_party/nspr/prtime.cc
index e87e08cc39202f306511d4882c5fa185dea08c8a..a44f0ebd04e15373423627db83d24c67a5669678 100644
--- a/ipc/chromium/src/base/third_party/nspr/prtime.cc
+++ b/ipc/chromium/src/base/third_party/nspr/prtime.cc
@@ -478,10 +478,6 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
 PRTimeParameters
 PR_GMTParameters(const PRExplodedTime *gmt)
 {
-#if defined(XP_MAC)
-#pragma unused (gmt)
-#endif
-
     PRTimeParameters retVal = { 0, 0 };
     return retVal;
 }
diff --git a/ipc/chromium/src/base/third_party/nspr/prtypes.h b/ipc/chromium/src/base/third_party/nspr/prtypes.h
index d77a2a488900435d6a3c358956a32c6e2c2c2885..0d6e777dc80393b6c6a0a0b0c3eec8c83865433f 100644
--- a/ipc/chromium/src/base/third_party/nspr/prtypes.h
+++ b/ipc/chromium/src/base/third_party/nspr/prtypes.h
@@ -153,22 +153,6 @@
 #define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK
 #endif /* _WINDLL */
 
-#elif defined(XP_MAC)
-
-#define PR_EXPORT(__type) extern __declspec(export) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
-#define PR_IMPORT(__type) extern __declspec(export) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
-
-#define PR_EXTERN(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT(__type) __declspec(export) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
 #elif defined(XP_OS2) && defined(__declspec)
 
 #define PR_EXPORT(__type) extern __declspec(dllexport) __type
@@ -500,7 +484,7 @@ typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
 
 #ifndef __PRUNICHAR__
 #define __PRUNICHAR__
-#if defined(WIN32) || defined(XP_MAC)
+#if defined(WIN32)
 typedef wchar_t PRUnichar;
 #else
 typedef PRUint16 PRUnichar;
diff --git a/js/src/xpconnect/src/xpccomponents.cpp b/js/src/xpconnect/src/xpccomponents.cpp
index f2ca3b2379970c77bb933e59ab5dc6cddfb6286e..c1d3e303cddff6799256ef437fe07987d33fce10 100644
--- a/js/src/xpconnect/src/xpccomponents.cpp
+++ b/js/src/xpconnect/src/xpccomponents.cpp
@@ -2967,7 +2967,7 @@ SandboxDump(JSContext *cx, uintN argc, jsval *vp)
     if (!cstr)
         return JS_FALSE;
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
     // Be nice and convert all \r to \n.
     char *c = cstr, *cEnd = cstr + strlen(cstr);
     while (c < cEnd) {
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index 83cb7f35260e5ee15876c366430e2027fedadbd4..c7f5b435a86f2b877819231f0eb6cd7aeb2ab475 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -227,10 +227,6 @@ class DocumentViewerImpl;
 
 // a small delegate class used to avoid circular references
 
-#ifdef XP_MAC
-#pragma mark ** nsDocViewerSelectionListener **
-#endif
-
 class nsDocViewerSelectionListener : public nsISelectionListener
 {
 public:
@@ -289,11 +285,6 @@ private:
 };
 
 
-
-#ifdef XP_MAC
-#pragma mark ** DocumentViewerImpl **
-#endif
-
 //-------------------------------------------------------------
 class DocumentViewerImpl : public nsIDocumentViewer,
                            public nsIContentViewerEdit,
@@ -2593,9 +2584,6 @@ NS_IMETHODIMP DocumentViewerImpl::GetCanGetContents(PRBool *aCanGetContents)
   return NS_OK;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
 
 /* ========================================================================================
  * nsIContentViewerFile
diff --git a/layout/xul/base/src/nsListBoxBodyFrame.cpp b/layout/xul/base/src/nsListBoxBodyFrame.cpp
index 41033226c7a9fad7688f42e9dc3e3866eacfa235..f78ef0ad4f2a188fd0b4fd32b5c7a22740233beb 100644
--- a/layout/xul/base/src/nsListBoxBodyFrame.cpp
+++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp
@@ -80,10 +80,6 @@
  * the mouse. Then do all the queued requests in on shot.
  */
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 // the longest amount of time that can go by before the use
 // notices it as a delay.
 #define USER_TIME_THRESHOLD 150000
diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp
index 84802b8c4a0c7f4b312168a1ffee59a6adda36f3..953ddbd625e51690f1a42be75b6baf8e4a7e2cfd 100644
--- a/modules/libpref/src/nsPrefService.cpp
+++ b/modules/libpref/src/nsPrefService.cpp
@@ -871,7 +871,7 @@ static nsresult pref_InitInitialObjects()
 
     /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
     static const char* specialFiles[] = {
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
       "macprefs.js"
 #elif defined(XP_WIN)
       "winpref.js"
diff --git a/modules/libpref/src/prefapi.cpp b/modules/libpref/src/prefapi.cpp
index cf80c7c9310d98e102fefc45577067b51a88ff06..3791383b7164cea031744e9013c62e6f78a1c16e 100644
--- a/modules/libpref/src/prefapi.cpp
+++ b/modules/libpref/src/prefapi.cpp
@@ -45,12 +45,8 @@
 #define PL_ARENA_CONST_ALIGN_MASK 3
 #include "plarena.h"
 
-#if defined(XP_MAC)
-  #include <stat.h>
-#else
-  #ifdef XP_OS2
-    #include <sys/types.h>
-  #endif
+#ifdef XP_OS2
+  #include <sys/types.h>
 #endif
 #ifdef _WIN32
   #include "windows.h"
diff --git a/modules/libreg/src/nr_bufio.c b/modules/libreg/src/nr_bufio.c
index 8c3d41591ebc78f9fce5149a040cd6f1a7583fc3..63a1c33ab314a7088723a749d0f69e92660b099a 100644
--- a/modules/libreg/src/nr_bufio.c
+++ b/modules/libreg/src/nr_bufio.c
@@ -208,7 +208,7 @@ BufioFile*  bufio_Open(const char* name, const char* mode)
         switch (errno)
         {
             /* file not found */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
             case fnfErr:
 #else
             case ENOENT:
@@ -217,7 +217,7 @@ BufioFile*  bufio_Open(const char* name, const char* mode)
                 break;
 
             /* file in use */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
             case opWrErr:
 #else
             case EACCES:
diff --git a/modules/libreg/src/vr_stubs.h b/modules/libreg/src/vr_stubs.h
index 796f37ea73f11f9e1838afe8c1303cab52d4612f..50856ad1330a256e5c9821e43f0f0297c9fd0a7f 100644
--- a/modules/libreg/src/vr_stubs.h
+++ b/modules/libreg/src/vr_stubs.h
@@ -50,10 +50,6 @@
 
 #include <errno.h>
 #include <string.h>
-#ifdef XP_MAC
-#include "macstdlibextras.h"  /* For strcasecmp and strncasecmp */
-#include <extras.h>
-#endif
 
 #else
 
@@ -64,14 +60,10 @@
 
 #endif /* STANDALONE_REGISTRY*/
 
-#ifdef XP_MAC
-#include <stat.h>
-#else
 #if ( defined(BSDI) && !defined(BSDI_2) ) || defined(XP_OS2)
 #include <sys/types.h>
 #endif
 #include <sys/stat.h>
-#endif
 
 #ifndef FALSE
 #define FALSE 0
@@ -285,18 +277,10 @@ typedef int XP_Bool;
 typedef struct stat    XP_StatStruct;
 #define  XP_Stat(file,data)     stat((file),(data))
 
-#if defined(XP_MAC)
- extern int nr_RenameFile(char *from, char *to);
-#else
-    XP_BEGIN_PROTOS
-    #define nr_RenameFile(from, to)    rename((from), (to))
-    XP_END_PROTOS
-#endif
-
-
-
 XP_BEGIN_PROTOS
 
+#define nr_RenameFile(from, to)    rename((from), (to))
+
 extern char* globalRegName;
 extern char* verRegName;
 
diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp
index d62a53a108088295d8a9f813742bc03a97c83ed0..0d3e6a1e9149fb6e3e79eb613183ff89ad70df6c 100644
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -83,10 +83,6 @@ using namespace mozilla;
 /******************************************************************************
  * nsCacheProfilePrefObserver
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark nsCacheProfilePrefObserver
-#endif
-
 #define DISK_CACHE_ENABLE_PREF      "browser.cache.disk.enable"
 #define DISK_CACHE_DIR_PREF         "browser.cache.disk.parent_directory"
 #define DISK_CACHE_SMART_SIZE_FIRST_RUN_PREF\
@@ -969,11 +965,6 @@ private:
 /******************************************************************************
  * nsCacheService
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark nsCacheService
-#endif
-
 nsCacheService *   nsCacheService::gService = nsnull;
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsCacheService, nsICacheService)
@@ -2123,10 +2114,6 @@ nsCacheService::SetMemoryCache()
 /******************************************************************************
  * static methods for nsCacheEntryDescriptor
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 void
 nsCacheService::CloseDescriptor(nsCacheEntryDescriptor * descriptor)
 {
@@ -2248,10 +2235,6 @@ nsCacheService::ValidateEntry(nsCacheEntry * entry)
     return rv;
 }
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
 
 void
 nsCacheService::DeactivateEntry(nsCacheEntry * entry)
diff --git a/netwerk/cache/nsDiskCacheBinding.cpp b/netwerk/cache/nsDiskCacheBinding.cpp
index db64f1dd0f75c8945e454ef6a1c4ca5cc27b908a..b0557bd9492adc202dd2889bba0984b9ba0f20e3 100644
--- a/netwerk/cache/nsDiskCacheBinding.cpp
+++ b/netwerk/cache/nsDiskCacheBinding.cpp
@@ -50,11 +50,6 @@
  *  static hash table callback functions
  *
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark HASHTABLE CALLBACKS
-#endif
-
 struct HashTableEntry : PLDHashEntryHdr {
     nsDiskCacheBinding *  mBinding;
 };
@@ -96,11 +91,6 @@ ClearEntry(PLDHashTable *      /* table */,
 /******************************************************************************
  *  Utility Functions
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark DISK CACHE BINDERY
-#endif
-
 nsDiskCacheBinding *
 GetCacheEntryBinding(nsCacheEntry * entry)
 {
diff --git a/netwerk/cache/nsDiskCacheStreams.cpp b/netwerk/cache/nsDiskCacheStreams.cpp
index c16aaedffbc44fdda2b0a132b1ef5c28e7408888..36cd1eaea427e73195073c90a25a335cbd0c02cd 100644
--- a/netwerk/cache/nsDiskCacheStreams.cpp
+++ b/netwerk/cache/nsDiskCacheStreams.cpp
@@ -58,9 +58,6 @@
 /******************************************************************************
  *  nsDiskCacheInputStream
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark nsDiskCacheInputStream
-#endif
 class nsDiskCacheInputStream : public nsIInputStream {
 
 public:
@@ -193,10 +190,6 @@ nsDiskCacheInputStream::IsNonBlocking(PRBool * nonBlocking)
 /******************************************************************************
  *  nsDiskCacheOutputStream
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark nsDiskCacheOutputStream
-#endif
 class nsDiskCacheOutputStream : public nsIOutputStream
                               , public nsIDiskCacheStreamInternal
 {
@@ -305,11 +298,6 @@ nsDiskCacheOutputStream::IsNonBlocking(PRBool * nonBlocking)
 /******************************************************************************
  *  nsDiskCacheStreamIO
  *****************************************************************************/
-#ifdef XP_MAC
-#pragma mark -
-#pragma mark nsDiskCacheStreamIO
-#endif
-
 NS_IMPL_THREADSAFE_ISUPPORTS0(nsDiskCacheStreamIO)
 
 // we pick 16k as the max buffer size because that is the threshold above which
diff --git a/netwerk/protocol/about/nsAboutBloat.cpp b/netwerk/protocol/about/nsAboutBloat.cpp
index e0f7a525cdd7c81e6818a871e8dcb23b266d7418..6c7fa5d5b860289ada23856acd4aad0cb0a86572 100644
--- a/netwerk/protocol/about/nsAboutBloat.cpp
+++ b/netwerk/protocol/about/nsAboutBloat.cpp
@@ -53,11 +53,7 @@
 #include "nsDirectoryServiceDefs.h"
 #include "nsILocalFile.h"
 
-#ifdef XP_MAC
-extern "C" void GC_gcollect(void);
-#else
 static void GC_gcollect() {}
-#endif
 
 NS_IMPL_ISUPPORTS1(nsAboutBloat, nsIAboutModule)
 
diff --git a/rdf/base/src/nsRDFService.cpp b/rdf/base/src/nsRDFService.cpp
index e71e475198989beb9d853a0914a85be9a98a580f..b5a718fadce6a292c00737384eaaae2e434314f1 100644
--- a/rdf/base/src/nsRDFService.cpp
+++ b/rdf/base/src/nsRDFService.cpp
@@ -114,40 +114,24 @@ class BlobImpl;
 static void *
 DataSourceAllocTable(void *pool, PRSize size)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     return PR_MALLOC(size);
 }
 
 static void
 DataSourceFreeTable(void *pool, void *item)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     PR_Free(item);
 }
 
 static PLHashEntry *
 DataSourceAllocEntry(void *pool, const void *key)
 {
-#if defined(XP_MAC)
-#pragma unused (pool,key)
-#endif
-
     return PR_NEW(PLHashEntry);
 }
 
 static void
 DataSourceFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     if (flag == HT_FREE_ENTRY) {
         PL_strfree((char*) he->key);
         PR_Free(he);
diff --git a/rdf/datasource/src/nsFileSystemDataSource.cpp b/rdf/datasource/src/nsFileSystemDataSource.cpp
index 2818684a1809976e95a512ae913dd78fcc4cdc50..bcef1e1d5e6d35c19fbaa7a63cb2e0696e186ff1 100644
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -124,20 +124,6 @@ FileSystemDataSource::isDirURI(nsIRDFResource* source)
     rv = aDir->IsDirectory(&isDirFlag);
     if (NS_FAILED(rv)) return(PR_FALSE);
 
-#ifdef  XP_MAC
-    // Hide directory structure of packages under Mac OS 9/X
-    nsCOMPtr<nsILocalFileMac>   aMacFile = do_QueryInterface(aDir);
-    if (aMacFile)
-    {
-        PRBool isPackageFlag = PR_FALSE;
-        rv = aMacFile->IsPackage(&isPackageFlag);
-        if (NS_SUCCEEDED(rv) && isPackageFlag)
-        {
-            isDirFlag = PR_FALSE;
-        }
-    }
-#endif
-
     return(isDirFlag);
 }
 
@@ -1202,17 +1188,8 @@ FileSystemDataSource::GetFileSize(nsIRDFResource *source, nsIRDFInt **aResult)
         return(NS_RDF_NO_VALUE);
 
     PRInt64     aFileSize64;
-#ifdef  XP_MAC
-    // on Mac, get total file size (data + resource fork)
-    nsCOMPtr<nsILocalFileMac>   aMacFile = do_QueryInterface(aFile);
-    if (!aMacFile)
-        return(NS_ERROR_UNEXPECTED);
-    if (NS_FAILED(rv = aMacFile->GetFileSizeWithResFork(&aFileSize64)))
-        return(rv);
-#else
     if (NS_FAILED(rv = aFile->GetFileSize(&aFileSize64)))
         return(rv);
-#endif
 
     // convert 64bits to 32bits
     PRInt32     aFileSize32 = 0;
@@ -1262,24 +1239,6 @@ FileSystemDataSource::GetName(nsIRDFResource *source, nsIRDFLiteral **aResult)
     if (name.IsEmpty())
         return(NS_ERROR_UNEXPECTED);
 
-#ifdef  XP_MAC
-    nsCOMPtr<nsILocalFileMac>   aMacFile = do_QueryInterface(aFile);
-    if (aMacFile)
-    {
-        PRBool isPackageFlag = PR_FALSE;
-        rv = aMacFile->IsPackage(&isPackageFlag);
-        if (NS_SUCCEEDED(rv) && isPackageFlag)
-        {
-            // mungle package names under Mac OS 9/X
-            PRUint32 len = name.Length();
-            if (name.RFind(".app", PR_TRUE) == len - 4)
-            {
-                name.SetLength(len-4);
-            }
-        }
-    }
-#endif
-
 #ifdef  XP_WIN
     // special hack for IE favorites under Windows; strip off the
     // trailing ".url" or ".lnk" at the end of IE favorites names
diff --git a/widget/src/xpwidgets/nsPrimitiveHelpers.cpp b/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
index c206e22823e742922342dc555b3ab7fca33d787d..09b9ae66fdf87f25e3ad0c151254a7e6da6aa494 100644
--- a/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
+++ b/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
@@ -260,11 +260,6 @@ nsPrimitiveHelpers :: ConvertPlatformPlainTextToUnicode ( const char* inText, PR
 } // ConvertPlatformPlainTextToUnicode
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 //
 // ConvertPlatformToDOMLinebreaks
 //
diff --git a/widget/src/xpwidgets/nsTransferable.cpp b/widget/src/xpwidgets/nsTransferable.cpp
index 15ff17d7a5dedb964e2c4bcad2c3730a15db634b..7f93fdb0744a5425d868042128b3eb62caf9bc75 100644
--- a/widget/src/xpwidgets/nsTransferable.cpp
+++ b/widget/src/xpwidgets/nsTransferable.cpp
@@ -246,11 +246,6 @@ DataStruct::ReadCache(nsISupports** aData, PRUint32* aDataLen)
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 //-------------------------------------------------------------------------
 //
 // Transferable constructor
diff --git a/xpcom/io/nsLinebreakConverter.cpp b/xpcom/io/nsLinebreakConverter.cpp
index 23a9604037e4e7cd42f9845e29a606d6bd332207..f7abaf46ab68b097b1e3db781686a7224f287046 100644
--- a/xpcom/io/nsLinebreakConverter.cpp
+++ b/xpcom/io/nsLinebreakConverter.cpp
@@ -327,11 +327,6 @@ static T* ConvertUnknownBreaks(const T* inSrc, PRInt32& ioLen, const char* destB
 }
 
 
-#ifdef XP_MAC
-#pragma mark -
-#endif
-
-
 /*----------------------------------------------------------------------------
 	ConvertLineBreaks