X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=cbits%2FPrelIOUtils.c;h=6444bd04e63c08b5825157490e1334620876c053;hb=ee7be4593b1b17d4ef45c37963b8b19d53865ab6;hp=cf74a8ea5f24e969b2f931181f6985dbde0d0fbc;hpb=ff82e794381b8ff689aef037ae28454b65b81d94;p=ghc-base.git diff --git a/cbits/PrelIOUtils.c b/cbits/PrelIOUtils.c index cf74a8e..6444bd0 100644 --- a/cbits/PrelIOUtils.c +++ b/cbits/PrelIOUtils.c @@ -5,9 +5,15 @@ */ #define INLINE + +#ifdef __GLASGOW_HASKELL__ +# include "Rts.h" +#endif + #include "HsBase.h" -#include "Stg.h" -#include "RtsMessages.h" + +#ifdef __GLASGOW_HASKELL__ +# include "RtsMessages.h" void errorBelch2(const char*s, char *t) { @@ -18,3 +24,14 @@ void debugBelch2(const char*s, char *t) { debugBelch(s,t); } + +// Use a C wrapper for this because we avoid hsc2hs in base +#if HAVE_LANGINFO_H +#include +char *localeEncoding (void) +{ + return nl_langinfo(CODESET); +} +#endif + +#endif /* __GLASGOW_HASKELL__ */