/[cmucl]/src/lisp/Darwin-os.h
ViewVC logotype

Contents of /src/lisp/Darwin-os.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations)
Sun Jan 9 00:12:36 2011 UTC (3 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, HEAD
Changes since 1.7: +2 -2 lines
File MIME type: text/plain
Changes to support building on Mac OS X 10.6.  When compiled on 10.6,
the resulting binary still works on 10.5.

lisp/Config.x86_darwin:
o Add -m32 flag to build and link a 32-bit binary.

lisp/Darwin-os.h:
o Include <sys/ucontext.h> instead of <ucontext.h> to get rid of the
  error about deprecated functions in ucontext.h.

lisp/gencgc.h:
o Mac OS X defines PAGE_SIZE in a header and that conflicts with our
  name.  Rename our PAGE_SIZE to GC_PAGE_SIZE.

lisp/gencgc.c:
o Rename PAGE_SIZE to GC_PAGE_SIZE.
1 /*
2
3 $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/Darwin-os.h,v 1.8 2011/01/09 00:12:36 rtoy Exp $
4
5 This code was written as part of the CMU Common Lisp project at
6 Carnegie Mellon University, and has been placed in the public domain.
7
8 */
9
10 #ifndef _DARWIN_OS_H_
11 #define _DARWIN_OS_H_
12
13 #include <sys/types.h>
14 #include <sys/mman.h>
15 #include <sys/signal.h>
16 #include <signal.h>
17 #include <sys/ucontext.h>
18 #include <mach/vm_types.h>
19
20 typedef caddr_t os_vm_address_t;
21 typedef vm_size_t os_vm_size_t;
22 typedef off_t os_vm_offset_t;
23 typedef int os_vm_prot_t;
24
25 #define OS_VM_PROT_READ PROT_READ
26 #define OS_VM_PROT_WRITE PROT_WRITE
27 #define OS_VM_PROT_EXECUTE PROT_EXEC
28
29 #define OS_VM_DEFAULT_PAGESIZE 4096
30
31 #define HANDLER_ARGS int signal, siginfo_t *code, os_context_t *context
32 #define CODE(code) ((code) ? code->si_code : 0)
33 #define os_context_t ucontext_t
34 #ifdef __i386__
35 #define RESTORE_FPU(context) restore_fpu(context)
36 #endif
37
38 int *sc_reg(os_context_t *, int);
39 void restore_fpu(ucontext_t *);
40
41 #define PROTECTION_VIOLATION_SIGNAL SIGBUS
42
43 #endif /* _DARWIN_OS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5