X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsStartup.c;h=0c5c2a36cb989815fc0ef2a26769d5eec9a0a1fb;hb=9fc59c6ee536c538f3f9b3ad12f09fbc7fd40ca3;hp=4971bedbac82b050979cdc1693603a5e0b2cf07f;hpb=557947d3f93e11285e36423ddb08d859af60ab47;p=ghc-hetmet.git diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 4971bed..0c5c2a3 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.72 2003/02/22 04:51:53 sof Exp $ + * $Id: RtsStartup.c,v 1.75 2003/08/22 22:24:15 sof Exp $ * * (c) The GHC Team, 1998-2002 * @@ -56,6 +56,10 @@ #include +#ifdef HAVE_LOCALE_H +#include +#endif + // Flag Structure struct RTS_FLAGS RtsFlags; @@ -150,7 +154,7 @@ hs_init(int *argc, char **argv[]) /* Initialise the stats department */ initStats(); -#if !defined(mingw32_TARGET_OS) && !defined(PAR) +#if defined(RTS_USER_SIGNALS) /* Initialise the user signal handler set */ initUserSignals(); /* Set up handler to run on SIGINT, etc. */ @@ -167,6 +171,10 @@ hs_init(int *argc, char **argv[]) } #endif +#ifdef HAVE_LOCALE_H + setlocale(LC_ALL,""); +#endif + /* Record initialization times */ stat_endInit(); } @@ -189,8 +197,8 @@ startupHaskell(int argc, char *argv[], void (*init_root)(void)) void getProgArgv(int *argc, char **argv[]) { - *argc = prog_argc; - *argv = prog_argv; + if (argc) { *argc = prog_argc; } + if (argv) { *argv = prog_argv; } } void