diff --git a/intl/build/nsI18nModule.cpp b/intl/build/nsI18nModule.cpp index 702f91515b29..8c83b9626349 100644 --- a/intl/build/nsI18nModule.cpp +++ b/intl/build/nsI18nModule.cpp @@ -341,7 +341,7 @@ static nsModuleComponentInfo components[] = nsDateTimeFormatWinConstructor }, #endif -#ifdef XP_UNIX +#ifdef USE_UNIX_LOCALE { "Platform locale", NS_POSIXLOCALE_CID, NS_POSIXLOCALE_CONTRACTID, @@ -358,7 +358,7 @@ static nsModuleComponentInfo components[] = nsDateTimeFormatUnixConstructor }, #endif -#ifdef XP_MAC +#ifdef USE_MAC_LOCALE { "Mac locale", NS_MACLOCALE_CID, NS_MACLOCALE_CONTRACTID, diff --git a/intl/locale/src/nsLocaleConstructors.h b/intl/locale/src/nsLocaleConstructors.h index 03e26400562f..112446eaf970 100644 --- a/intl/locale/src/nsLocaleConstructors.h +++ b/intl/locale/src/nsLocaleConstructors.h @@ -50,13 +50,21 @@ #include "nsLanguageAtomService.h" #include "nsLocaleCID.h" +#if defined(XP_MAC) || defined(XP_MACOSX) +#define USE_MAC_LOCALE +#endif + +#if defined(XP_UNIX) && !defined(XP_MACOSX) +#define USE_UNIX_LOCALE +#endif + #ifdef XP_WIN #include "nsIWin32LocaleImpl.h" #include "nsCollationWin.h" #include "nsDateTimeFormatWin.h" #endif -#ifdef XP_MAC +#ifdef USE_MAC_LOCALE #ifdef USE_UCCOLLATIONKEY #include "nsCollationMacUC.h" #else @@ -66,7 +74,7 @@ #include "nsMacLocale.h" #endif -#ifdef XP_UNIX +#ifdef USE_UNIX_LOCALE #include "nsCollationUnix.h" #include "nsDateTimeFormatUnix.h" #include "nsPosixLocale.h"