From e7b6e738fdf5f831be8301493471fd10d570631f Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 4 Sep 2008 18:51:22 +0000 Subject: [PATCH] Unbreak the GHC build with older versions of gcc Patch from kili@outback.escape.de, who says: Stg.h must be included before HsBase.h, because the latter contains function definitions causing older versions of gcc (3.3.5 in my case) to bail out with "error: global register variable follows a function definition" on Regs.h, which is included by Stg.h. --- cbits/PrelIOUtils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cbits/PrelIOUtils.c b/cbits/PrelIOUtils.c index c1999af..be97876 100644 --- a/cbits/PrelIOUtils.c +++ b/cbits/PrelIOUtils.c @@ -5,9 +5,14 @@ */ #define INLINE -#include "HsBase.h" + #ifdef __GLASGOW_HASKELL__ # include "Stg.h" +#endif + +#include "HsBase.h" + +#ifdef __GLASGOW_HASKELL__ # include "RtsMessages.h" void errorBelch2(const char*s, char *t) -- 1.7.10.4