much pain.
\begin{code}
-#include "platform.h"
+#include "config.h"
#if defined(sunos4_TARGET_OS)
/* The sigaction in SunOS 4.1.X does not grok SA_SIGINFO */
#endif
#if defined(linux_TARGET_OS) || defined(linuxaout_TARGET_OS)
- /* to look *inside* sigcontext... */
-# include <asm/signal.h>
+/* to look *inside* sigcontext...
+
+ sigcontext has moved and been protected from the General Public,
+ in later versions (>2), the sigcontext decl is protected by
+ a __KERNEL__ #ifdef. As ever, we workaround by trying to
+ be version savvy - the version numbers are currently just a guess!
+ (ToDo: determine at what version no. the sigcontext move
+ was made).
+*/
+# ifndef LINUX_VERSION_CODE
+# include <linux/version.h>
+# endif
+# if (LINUX_VERSION_CODE < 0x020000)
+# include <asm/signal.h>
+# else
+# include <asm/sigcontext.h>
+# endif
+
#endif
#if defined(HAVE_SIGINFO_H)
#endif
#if defined(cygwin32_TARGET_OS)
-#include <windows.h>
+# include <windows.h>
#endif
\end{code}
{
/* From gdb/win32-nat.c */
DEBUG_EVENT event;
- BOOL t = TRUE; /* WaitForDebugEvent (&event, INFINITE); */
+ BOOL t = WaitForDebugEvent (&event, INFINITE);
fflush(stdout);
if (t == FALSE) {
if (delayTicks != 0) /* delayTicks>0 => don't handle timer expiry (in GC) */
delayTicks++;
- else if (WaitingThreadsHd != Prelude_Z91Z93_closure)
+ else if (WaitingThreadsHd != PrelBase_Z91Z93_closure)
AwaitEvent(RTSflags.ConcFlags.ctxtSwitchTime);
# ifdef PAR
if (CurrentTSO != NULL ||
# else
- if (RunnableThreadsHd != Prelude_Z91Z93_closure ||
+ if (RunnableThreadsHd != PrelBase_Z91Z93_closure ||
# endif
PendingSparksHd[REQUIRED_POOL] < PendingSparksTl[REQUIRED_POOL] ||
PendingSparksHd[ADVISORY_POOL] < PendingSparksTl[ADVISORY_POOL]) {