mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Disabled debug printf, changed query setlocale() to pass NULL instead of an empty string.
This commit is contained in:
parent
24641e5743
commit
c75bc89454
@ -32,7 +32,7 @@
|
||||
#include "nsIPosixLocale.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsFileSpec.h" /* for nsAutoString */
|
||||
#define DEBUG_UNIX_COLLATION
|
||||
//#define DEBUG_UNIX_COLLATION
|
||||
|
||||
static NS_DEFINE_IID(kICollationIID, NS_ICOLLATION_IID);
|
||||
static NS_DEFINE_CID(kPosixLocaleFactoryCID, NS_POSIXLOCALEFACTORY_CID);
|
||||
@ -45,7 +45,7 @@ NS_IMPL_ISUPPORTS(nsCollationUnix, kICollationIID);
|
||||
|
||||
inline void nsCollationUnix::DoSetLocale()
|
||||
{
|
||||
char *locale = setlocale(LC_COLLATE, "");
|
||||
char *locale = setlocale(LC_COLLATE, NULL);
|
||||
mSavedLocale.SetString(locale ? locale : "");
|
||||
if (!mSavedLocale.EqualsIgnoreCase(mLocale)) {
|
||||
char newLocale[128];
|
||||
|
@ -212,7 +212,7 @@ nsresult nsDateTimeFormatUnix::FormatTMTime(nsILocale* locale,
|
||||
}
|
||||
|
||||
// generate data/time string
|
||||
char *old_locale = setlocale(LC_TIME, "");
|
||||
char *old_locale = setlocale(LC_TIME, NULL);
|
||||
(void) setlocale(LC_TIME, mPlatformLocale);
|
||||
if (PL_strlen(fmtD) && PL_strlen(fmtT)) {
|
||||
PL_strncat(fmtD, " ", NSDATETIME_FORMAT_BUFFER_LEN);
|
||||
|
Loading…
Reference in New Issue
Block a user