diff options
author | Ian Lynagh <igloo@earth.li> | 2012-03-18 17:21:31 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-03-18 17:21:31 +0000 |
commit | d7bd9ee63968f6e4df6b32eff8ff11d866dca794 (patch) | |
tree | b336297d12f3eb129503a2a31f9cdf8139289237 | |
parent | 8fb03bfd768ea0d5c666bbe07a50cb05214bbe92 (diff) | |
parent | d879a5a8517b511733406049d46d6df5af20a15b (diff) | |
download | haskell-d7bd9ee63968f6e4df6b32eff8ff11d866dca794.tar.gz |
Merge branch 'master' of win:c:/m64/head2
-rw-r--r-- | includes/Rts.h | 7 | ||||
-rw-r--r-- | rts/StgCRun.c | 8 | ||||
-rw-r--r-- | rts/win32/ThrIOManager.c | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index 3360eda323..cb23fd1083 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -17,6 +17,13 @@ extern "C" { #endif +/* We include windows.h very early, as on Win64 the CONTEXT type has + fields "R8", "R9" and "R10", which goes bad if we've already + #define'd those names for our own purposes (in stg/Regs.h) */ +#if defined(HAVE_WINDOWS_H) +#include <windows.h> +#endif + #ifndef IN_STG_CODE #define IN_STG_CODE 0 #endif diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 3654b3336a..f08e35dd11 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -33,6 +33,14 @@ /* include Stg.h first because we want real machine regs in here: we * have to get the value of R1 back from Stg land to C land intact. */ + +/* We include windows.h very early, as on Win64 the CONTEXT type has + fields "R8", "R9" and "R10", which goes bad if we've already + #define'd those names for our own purposes (in stg/Regs.h) */ +#if defined(HAVE_WINDOWS_H) +#include <windows.h> +#endif + #define IN_STGCRUN 1 #include "Stg.h" #include "Rts.h" diff --git a/rts/win32/ThrIOManager.c b/rts/win32/ThrIOManager.c index bad621ced6..afcdc19d27 100644 --- a/rts/win32/ThrIOManager.c +++ b/rts/win32/ThrIOManager.c @@ -152,7 +152,7 @@ ioManagerStart (void) Capability *cap;
if (io_manager_event == INVALID_HANDLE_VALUE) {
cap = rts_lock();
-#if defined(mingw32_HOST_OS) && defined(__PIC__)
+#if defined(mingw32_HOST_OS) && defined(i386_HOST_Arch) && defined(__PIC__)
rts_evalIO(&cap,_imp__base_GHCziConcziIO_ensureIOManagerIsRunning_closure,NULL);
#else
rts_evalIO(&cap,&base_GHCziConcziIO_ensureIOManagerIsRunning_closure,NULL);
|