pkgsrc/lang/drscheme/patches/patch-ac
joerg 498e7d191b Add DragonFly support based on patch by Jeffrey Hsu.
Fix build with X11BASE!=/usr/X11R6.
2006-08-22 20:17:23 +00:00

71 lines
2.2 KiB
Text

$NetBSD: patch-ac,v 1.5 2006/08/22 20:17:23 joerg Exp $
--- mzscheme/gc/include/private/gcconfig.h.orig 2004-12-19 08:38:25.000000000 +0000
+++ mzscheme/gc/include/private/gcconfig.h
@@ -54,6 +54,11 @@
# define OPENBSD
# endif
+/* And one for DragonFlyBSD: */
+# if defined(__DragonFly__)
+# define DRAGONFLY
+# endif
+
/* And one for FreeBSD: */
# if defined(__FreeBSD__)
# define FREEBSD
@@ -303,7 +308,7 @@
# define OPENBSD
# define mach_type_known
# endif
-# if defined(FREEBSD) && (defined(i386) || defined(__i386__))
+# if (defined(FREEBSD) || defined(DRAGONFLY)) && (defined(i386) || defined(__i386__))
# define I386
# define mach_type_known
# endif
@@ -443,7 +448,8 @@
/* MACOS and AMIGA variants) */
/* I386 ==> Intel 386 */
/* (SEQUENT, OS2, SCO, LINUX, NETBSD, */
- /* FREEBSD, THREE86BSD, MSWIN32, */
+ /* DRAGONFLY, FREEBSD, THREE86BSD, */
+ /* MSWIN32, */
/* BSDI,SUNOS5, NEXT, other variants) */
/* NS32K ==> Encore Multimax */
/* MIPS ==> R2000 or R3000 */
@@ -1188,6 +1194,21 @@
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# endif
+# ifdef DRAGONFLY
+# define OS_TYPE "DRAGONFLY"
+# ifndef GC_FREEBSD_THREADS
+# define MPROTECT_VDB
+# endif
+# define SIG_SUSPEND SIGUSR1
+# define SIG_THR_RESTART SIGUSR2
+# define FREEBSD_STACKBOTTOM
+# ifdef __ELF__
+# define DYNAMIC_LOADING
+# endif
+ extern char etext[];
+ extern char * GC_FreeBSDGetDataStart();
+# define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
+# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
# ifndef GC_FREEBSD_THREADS
@@ -1940,8 +1961,13 @@
# define SUNOS5SIGS
# endif
+# if defined(DRAGONFLY)
+# define SUNOS5SIGS
+# endif
+
# if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
|| defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
+ || defined(DRAGONFLY) \
|| defined(DGUX) || defined(BSD) || defined(SUNOS4) \
|| defined(_AIX) || defined(DARWIN) || defined(OSF1)
# define UNIX_LIKE /* Basic Unix-like system calls work. */