From 6b3cecf6060d60085b746ff20fe0a07890e05883 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 19 Dec 2008 10:31:43 -0800 Subject: [PATCH] Bug 462914: Test for setlocale at configure time in js/src r=crowder --- js/src/configure.in | 6 ++++++ js/src/js.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/src/configure.in b/js/src/configure.in index 03610e2a9868..52bbc3cffa7e 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -5044,6 +5044,12 @@ for lib_arg in $NSPR_LIBS $TK_LIBS; do done AC_SUBST(LIBS_PATH) +dnl ======================================================== +dnl JavaScript shell +dnl ======================================================== + +AC_HAVE_FUNCS(setlocale) + dnl ======================================================== dnl Use cygwin wrapper for win32 builds, except MSYS/MinGW dnl ======================================================== diff --git a/js/src/js.cpp b/js/src/js.cpp index 88c016d6c1fc..5a0880496fd8 100644 --- a/js/src/js.cpp +++ b/js/src/js.cpp @@ -3973,7 +3973,7 @@ main(int argc, char **argv, char **envp) #endif /* JSDEBUGGER */ CheckHelpMessages(); -#ifndef WINCE +#ifdef HAVE_SETLOCALE setlocale(LC_ALL, ""); #endif gStackBase = (jsuword)&stackDummy;