[Gc] [patch] fix darwin build

Andreas Tobler andreast-list at fgznet.ch
Wed Aug 18 10:24:24 PDT 2010


Hi,

Today I synced after a long time.

I do not know where this comes from:

CM_PROT_EXEC

On my darwin box, 10.5.8, I do not have such a const.

With the below patch I was able to successfully build and test on x86 
darwin.

Gruss,
Andreas

[deuterium:development/bdwgc/bdwgc] andreast% cvs diff -u os_dep.c
Index: os_dep.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/os_dep.c,v
retrieving revision 1.87
diff -u -r1.87 os_dep.c
--- os_dep.c	14 Aug 2010 13:59:21 -0000	1.87
+++ os_dep.c	18 Aug 2010 17:23:33 -0000
@@ -2878,6 +2878,10 @@
      /* Using vm_protect (mach syscall) over mprotect (BSD syscall) 
seems to
         decrease the likelihood of some of the problems described below. */
  #   include <mach/vm_map.h>
+#   include <mach/vm_prot.h>
+#   ifndef VM_PROT_EXEC
+#     define VM_PROT_EXEC VM_PROT_EXECUTE
+#   endif
      STATIC mach_port_t GC_task_self = 0;
  #   define PROTECT(addr,len) \
 
if(vm_protect(GC_task_self,(vm_address_t)(addr),(vm_size_t)(len), \


More information about the Gc mailing list