===================================================================
@@ -122,12 +122,14 @@
const char *msg;
int i;
+#ifdef SIGPROF
if (sig == SIGPROF)
{
/* FIXME. */
runtime_sigprof (0, 0, nil, nil);
return;
}
+#endif
/* FIXME: Should check siginfo for more information when
available. */
@@ -257,6 +259,7 @@
void
runtime_resetcpuprofiler(int32 hz)
{
+#ifdef SIGPROF
struct itimerval it;
struct sigaction sa;
int i;
@@ -289,6 +292,7 @@
i = setitimer (ITIMER_PROF, &it, NULL);
__go_assert (i == 0);
}
+#endif
runtime_m()->profilehz = hz;
}
===================================================================
@@ -36,10 +36,13 @@
void*
runtime_SysReserve(void *v, uintptr n)
{
+ USED(v);
return runtime_SysAlloc(n);
}
void
runtime_SysMap(void *v, uintptr n)
{
+ USED(v);
+ USED(n);
}
===================================================================
@@ -12,6 +12,7 @@
#include <stdint.h>
#include <sys/wait.h>
+#include "runtime.h"
extern _Bool Exited (uint32_t *w)
__asm__ ("libgo_syscall.syscall.Exited.N32_libgo_syscall.syscall.WaitStatus");
@@ -37,7 +38,12 @@
_Bool
Stopped (uint32_t *w)
{
+#ifndef WIFSTOPPED
+ USED(w);
+ return 0;
+#else
return WIFSTOPPED (*w) != 0;
+#endif
}
extern _Bool Continued (uint32_t *w)
@@ -46,7 +52,12 @@
_Bool
Continued (uint32_t *w)
{
+#ifndef WIFCONTINUED
+ USED(w);
+ return 0;
+#else
return WIFCONTINUED (*w) != 0;
+#endif
}
extern _Bool CoreDump (uint32_t *w)
@@ -55,7 +66,12 @@
_Bool
CoreDump (uint32_t *w)
{
+#ifndef WCOREDUMP
+ USED(w);
+ return 0;
+#else
return WCOREDUMP (*w) != 0;
+#endif
}
extern int ExitStatus (uint32_t *w)
@@ -95,9 +111,10 @@
__asm__ ("libgo_syscall.syscall.TrapCause.N32_libgo_syscall.syscall.WaitStatus");
int
-TrapCause (uint32_t *w __attribute__ ((unused)))
+TrapCause (uint32_t *w)
{
-#ifndef __linux__
+#if !(defined(WIFSTOPPED) && defined(WSTOPSIG) && defined(SIGTRAP))
+ USED(w);
return -1;
#else
if (!WIFSTOPPED (*w) || WSTOPSIG (*w) != SIGTRAP)