Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d879a5a8517b511733406049d46d6df5af20a15b >--------------------------------------------------------------- commit d879a5a8517b511733406049d46d6df5af20a15b Author: Ian Lynagh <[email protected]> Date: Sun Mar 18 16:30:25 2012 +0000 Fixes for the threaded RTS on Win64 >--------------------------------------------------------------- includes/Rts.h | 7 +++++++ rts/StgCRun.c | 8 ++++++++ rts/win32/ThrIOManager.c | 2 +- 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/includes/Rts.h b/includes/Rts.h index 3360eda..cb23fd1 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 3654b33..f08e35d 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 bad621c..afcdc19 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); _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
