pkgsrc/lang/mono2/patches/patch-ad
richard db0f0f2ac3 SunOS updates to really use c99 and update mono-sigcontext.h to use
HAVE_UCONTEXT_H a bit more logically and motivated by illumos updates
involving regset.h.

Builds now reliably even if /lib/cpp is not present.
2016-08-15 10:24:31 +00:00

50 lines
1.3 KiB
Text

$NetBSD: patch-ad,v 1.2 2016/08/15 10:24:31 richard Exp $
--- mono/utils/mono-sigcontext.h.orig 2012-01-30 18:01:23.000000000 +0000
+++ mono/utils/mono-sigcontext.h
@@ -6,11 +6,12 @@
#include <asm/sigcontext.h>
#endif
-#if defined(__i386__)
-
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
+#ifdef HAVE_UCONTEXT_H
#include <ucontext.h>
#endif
+
+#if defined(__i386__)
+
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#endif
@@ -172,10 +173,6 @@
#elif defined(__mono_ppc__)
-#if HAVE_UCONTEXT_H
-#include <ucontext.h>
-#endif
-
#if defined(__linux__)
typedef struct ucontext os_ucontext;
@@ -211,7 +208,7 @@
#define UCONTEXT_REG_FPRn(ctx, n) (((os_ucontext*)(ctx))->uc_mcontext.__fpregs.__fpu_regs [(n)])
#define UCONTEXT_REG_NIP(ctx) _UC_MACHINE_PC(ctx)
#define UCONTEXT_REG_LNK(ctx) (((os_ucontext*)(ctx))->uc_mcontext.__gregs [_REG_LR])
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
typedef ucontext_t os_ucontext;
#define UCONTEXT_REG_Rn(ctx, n) ((ctx)->uc_mcontext.mc_gpr [(n)])
@@ -275,10 +272,6 @@
#endif
#elif defined(__s390x__)
-# if HAVE_UCONTEXT_H
-# include <ucontext.h>
-# endif
-
# define UCONTEXT_GREGS(ctx) (((ucontext_t *)(ctx))->uc_mcontext.gregs)
#endif