From: panne Date: Fri, 19 Mar 2004 23:17:06 +0000 (+0000) Subject: [project @ 2004-03-19 23:17:06 by panne] X-Git-Tag: Initial_conversion_from_CVS_complete~1951 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=06ebaa8c011cc4c91fddc79f89ee37fe9d3c349b;p=ghc-hetmet.git [project @ 2004-03-19 23:17:06 by panne] Restrict the setlocale() to LC_CTYPE (was LC_ALL), because printf and friends are LC_NUMERIC-sensitive. This fixes the generation of heap profiles for e.g. de_DE locales where a comma separates the fractional part of a number, not a dot. (There was a similar bug in Hugs regarding atof, BTW, which was fixed last December.) Merge to STABLE (I leave this to the Grand Marshal of Releases, Mr. SimonM, because I'm not 100% sure of all the consequences.) --- diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 5255386..824c22f 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.79 2004/02/27 13:35:16 simonmar Exp $ + * $Id: RtsStartup.c,v 1.80 2004/03/19 23:17:06 panne Exp $ * * (c) The GHC Team, 1998-2002 * @@ -199,7 +199,7 @@ hs_init(int *argc, char **argv[]) #endif #ifdef HAVE_LOCALE_H - setlocale(LC_ALL,""); + setlocale(LC_CTYPE,""); #endif /* Record initialization times */