[project @ 2004-03-19 23:17:06 by panne]
authorpanne <unknown>
Fri, 19 Mar 2004 23:17:06 +0000 (23:17 +0000)
committerpanne <unknown>
Fri, 19 Mar 2004 23:17:06 +0000 (23:17 +0000)
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.)

ghc/rts/RtsStartup.c

index 5255386..824c22f 100644 (file)
@@ -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 */