From de8213f561e41d353f6b5cdaa48bafa629cfda85 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 7 May 2024 11:30:59 +0200 Subject: [PATCH] Issue #2472 - Part 8: Fix conflicting defines on Mac. --- dom/events/TextComposition.cpp | 13 ------------- dom/plugins/base/npapi.h | 7 +++++++ dom/plugins/base/nsPluginInstanceOwner.h | 7 +++++++ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dom/events/TextComposition.cpp b/dom/events/TextComposition.cpp index bd7ebbc468..3b3dc6505b 100644 --- a/dom/events/TextComposition.cpp +++ b/dom/events/TextComposition.cpp @@ -21,21 +21,8 @@ #include "mozilla/Unused.h" #include "mozilla/dom/TabParent.h" -#ifdef XP_MACOSX -// Some defiens will be conflict with OSX SDK -#define TextRange _TextRange -#define TextRangeArray _TextRangeArray -#define Comment _Comment -#endif - #include "nsPluginInstanceOwner.h" -#ifdef XP_MACOSX -#undef TextRange -#undef TextRangeArray -#undef Comment -#endif - using namespace mozilla::widget; namespace mozilla { diff --git a/dom/plugins/base/npapi.h b/dom/plugins/base/npapi.h index aa6a66b2bd..996df80844 100644 --- a/dom/plugins/base/npapi.h +++ b/dom/plugins/base/npapi.h @@ -34,7 +34,14 @@ #endif #if defined(XP_MACOSX) +// Some defines will conflict with OSX SDK +#define TextRange _TextRange +#define TextRangeArray _TextRangeArray +#define Comment _Comment #include +#undef TextRange +#undef TextRangeArray +#undef Comment #include #ifndef NP_NO_CARBON #include diff --git a/dom/plugins/base/nsPluginInstanceOwner.h b/dom/plugins/base/nsPluginInstanceOwner.h index 03977b047f..0eba706cb4 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.h +++ b/dom/plugins/base/nsPluginInstanceOwner.h @@ -20,7 +20,14 @@ #ifdef XP_MACOSX #include "mozilla/gfx/QuartzSupport.h" +// Some defines will conflict with OSX SDK +#define TextRange _TextRange +#define TextRangeArray _TextRangeArray +#define Comment _Comment #include +#undef TextRange +#undef TextRangeArray +#undef Comment #endif class nsIInputStream;