From 4ac5f72fc29ea5b89112b54f36d4d349fe09ae08 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Thu, 14 Sep 2000 22:52:17 +0000 Subject: [PATCH] #45263 r=nhotta, a=brendan Code from samake - report locale to current and to use OS, not c runtime --- intl/locale/src/nsLocaleService.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp index 58619669259b..cb1ed44a8da3 100644 --- a/intl/locale/src/nsLocaleService.cpp +++ b/intl/locale/src/nsLocaleService.cpp @@ -34,7 +34,7 @@ #include "nsIWin32Locale.h" #endif #ifdef XP_OS2 -#include +#include "unidef.h" #include "nsIOS2Locale.h" #endif #if defined(XP_UNIX) || defined(XP_BEOS) @@ -280,8 +280,8 @@ nsLocaleService::nsLocaleService(void) nsresult result = nsComponentManager::CreateInstance(kOS2LocaleFactoryCID, NULL,kIOS2LocaleIID,(void**)&os2Converter); if (NS_SUCCEEDED(result) && os2Converter!=nsnull) { - char* lc_all = setlocale(LC_ALL,""); - char* lang = getenv("LANG"); + char* lc_all = nsnull; + char* lang = nsnull; if (lc_all!=nsnull) { result = os2Converter->GetXPLocale(lc_all,&xpLocale); @@ -309,7 +309,9 @@ nsLocaleService::nsLocaleService(void) nsLocale* resultLocale = new nsLocale(); if (resultLocale==NULL) { os2Converter->Release(); return; } for(i=0;i