trivial diff: FreeBSD patch

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Feb 12 19:07:42 AEDT 1999


Estimated hours taken: 0.1

boehm_gc/mach_dep.c:
	Add support for FreeBSD (patch thanks to
	Marko Schuetz <marko at ki.informatik.uni-frankfurt.de>).

Index: boehm_gc/mach_dep.c
===================================================================
RCS file: /home/staff/zs/imp/mercury/boehm_gc/mach_dep.c,v
retrieving revision 1.8
diff -u -r1.8 mach_dep.c
--- mach_dep.c	1998/08/31 23:05:16	1.8
+++ mach_dep.c	1999/02/12 08:05:35
@@ -169,8 +169,8 @@
 #   endif	/* MACOS */
 
 #       if defined(I386) &&!defined(OS2) &&!defined(SVR4) &&!defined(MSWIN32) \
-	&& !defined(SCO) && !defined(SCO_ELF) && !(defined(LINUX) \
-	&& defined(__ELF__)) && !defined(DOS4GW)
+	&& !defined(SCO) && !defined(SCO_ELF) && !((defined(LINUX) \
+          || defined(__FreeBSD__)) && defined(__ELF__)) && !defined(DOS4GW)
 	/* I386 code, generic code does not appear to work */
 	/* It does appear to work under OS2, and asms dont */
 	/* This is used for some 38g UNIX variants and for CYGWIN32 */
@@ -183,7 +183,8 @@
 	  asm("pushl %ebx");  asm("call _GC_push_one"); asm("addl $4,%esp");
 #       endif
 
-#	if defined(I386) && defined(LINUX) && defined(__ELF__)
+#	if defined(I386) && (defined(LINUX) || defined(__FreeBSD__)) \
+          && defined(__ELF__)
 	/* This is modified for Linux with ELF (Note: _ELF_ only) */
 	  asm("pushl %eax");  asm("call GC_push_one"); asm("addl $4,%esp");
 	  asm("pushl %ecx");  asm("call GC_push_one"); asm("addl $4,%esp");

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list