Re: [Gc] [patch] fix darwin build

Ivan Maidanski ivmai at mail.ru
Wed Aug 18 11:43:25 PDT 2010


Hello, Andreas!

Thanks for reporting the bug. Fixed (but without unnecessary inclusion of vm_prot.h).

Regards.

Wed, 18 Aug 2010 19:24:24 +0200 Andreas Tobler <andreast-list at fgznet.ch>:

> 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), \
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/



More information about the Gc mailing list