From 653e325e08c5f632aa194f9239e938faca5abba5 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 3 Aug 2009 13:19:33 +0000 Subject: [PATCH] Windows build fixes --- includes/rts/Threads.h | 7 +++++++ rts/Schedule.c | 1 - rts/win32/AsyncIO.c | 1 - rts/win32/ConsoleHandler.c | 2 -- rts/win32/OSMem.c | 3 +-- rts/win32/Ticker.c | 2 -- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h index 06a0ed1..4f343b8 100644 --- a/includes/rts/Threads.h +++ b/includes/rts/Threads.h @@ -34,7 +34,14 @@ StgRegTable * resumeThread (void *); // int cmp_thread (StgPtr tso1, StgPtr tso2); int rts_getThreadId (StgPtr tso); + +#if !defined(mingw32_HOST_OS) pid_t forkProcess (HsStablePtr *entry); +#else +pid_t forkProcess (HsStablePtr *entry) + GNU_ATTRIBUTE(__noreturn__); +#endif + HsBool rtsSupportsBoundThreads (void); // The number of Capabilities diff --git a/rts/Schedule.c b/rts/Schedule.c index b3d523e..70ddf09 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1717,7 +1717,6 @@ forkProcess(HsStablePtr *entry } #else /* !FORKPROCESS_PRIMOP_SUPPORTED */ barf("forkProcess#: primop not supported on this platform, sorry!\n"); - return -1; #endif } diff --git a/rts/win32/AsyncIO.c b/rts/win32/AsyncIO.c index 1b57d37..8662e2a 100644 --- a/rts/win32/AsyncIO.c +++ b/rts/win32/AsyncIO.c @@ -12,7 +12,6 @@ #include #include #include "Schedule.h" -#include "RtsFlags.h" #include "Capability.h" #include "win32/AsyncIO.h" #include "win32/IOManager.h" diff --git a/rts/win32/ConsoleHandler.c b/rts/win32/ConsoleHandler.c index 13011cb..19057a3 100644 --- a/rts/win32/ConsoleHandler.c +++ b/rts/win32/ConsoleHandler.c @@ -5,10 +5,8 @@ #include "Rts.h" #include #include "ConsoleHandler.h" -#include "SchedAPI.h" #include "Schedule.h" #include "RtsUtils.h" -#include "RtsFlags.h" #include "AsyncIO.h" #include "RtsSignals.h" diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c index 4edb5bf..f61aadc 100644 --- a/rts/win32/OSMem.c +++ b/rts/win32/OSMem.c @@ -7,9 +7,8 @@ * ---------------------------------------------------------------------------*/ #include "Rts.h" -#include "OSMem.h" +#include "sm/OSMem.h" #include "RtsUtils.h" -#include "RtsMessages.h" #if HAVE_WINDOWS_H #include diff --git a/rts/win32/Ticker.c b/rts/win32/Ticker.c index 599604e..c1e20fb 100644 --- a/rts/win32/Ticker.c +++ b/rts/win32/Ticker.c @@ -3,12 +3,10 @@ * */ #include "Rts.h" -#include "Timer.h" #include "Ticker.h" #include #include #include -#include "OSThreads.h" /* * Provide a timer service for the RTS, periodically -- 1.7.10.4