[Openmcl-cvs-notifications] r13206 - in /trunk/source/lisp-kernel: lisptypes.h x86-exceptions.h
rme at clozure.com
rme at clozure.com
Mon Nov 16 19:44:53 UTC 2009
Author: rme
Date: Mon Nov 16 19:44:53 2009
New Revision: 13206
Log:
Changes to allow the Dawrin/x86 lisp kernels to build with the 10.5 SDK.
Modified:
trunk/source/lisp-kernel/lisptypes.h
trunk/source/lisp-kernel/x86-exceptions.h
Modified: trunk/source/lisp-kernel/lisptypes.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/lisptypes.h (original)
+++ trunk/source/lisp-kernel/lisptypes.h Mon Nov 16 19:44:53 2009
@@ -82,6 +82,7 @@
#ifdef DARWIN
#include <sys/signal.h>
#include <sys/ucontext.h>
+#include <AvailabilityMacros.h>
=
#ifdef PPC
#if WORD_SIZE =3D=3D 64
@@ -109,8 +110,8 @@
#endif /* PPC */
=
#ifdef X8664
-/* Broken <i386/ucontext.h> in xcode 2.4 */
-#ifndef _STRUCT_MCONTEXT64 /* A guess at what'll be defined when this is f=
ixed */
+#if MAC_OS_X_VERSION_MIN_REQUIRED <=3D MAC_OS_X_VERSION_10_4
+/* Broken <i386/ucontext.h> in Mac OS 10.4u SDK */
struct mcontext64 {
x86_exception_state64_t __es;
x86_thread_state64_t __ss; =
@@ -124,6 +125,7 @@
#define __fpu_mxcsr fpu_mxcsr
#define __fpu_xmm0 fpu_xmm0
#define __rsp rsp
+#define __trapno trapno
#define __faultvaddr faultvaddr
#define __err err
#define __rip rip
@@ -133,12 +135,12 @@
#define __rcx rcx
#define __r8 r8
#define __rflags rflags
-#else
+#else /* post-10.4 */
typedef mcontext_t MCONTEXT_T;
typedef ucontext_t ExceptionInformation;
#define UC_MCONTEXT(UC) UC->uc_mcontext
-#endif /* _STRUCT_MCONTEXT64 */
-#endif /* X86_64 */
+#endif
+#endif
=
#ifdef X8632
/* Assume rational <i386/ucontext.h> */
@@ -150,7 +152,7 @@
foo$UNIX2003 and similar nonsense, and that means getting the old
names (without leading __ prefixes.) Confused yet ? */
=
-/* #if STILL_SUPPORT_TIGER */
+#if MAC_OS_X_VERSION_MIN_REQUIRED <=3D MAC_OS_X_VERSION_10_4
#define __ss ss
#define __ds ds
#define __es es
@@ -164,9 +166,10 @@
#define __fpu_xmm0 fpu_xmm0
#define __fpu_mxcsr fpu_mxcsr
#define __fpu_stmm0 fpu_stmm0
+#define __trapno trapno
#define __err err
#define __faultvaddr faultvaddr
-/* #endif STILL_SUPPORT_TIGER */
+#endif
=
#define UC_MCONTEXT(UC) UC->uc_mcontext
typedef mcontext_t MCONTEXT_T;
Modified: trunk/source/lisp-kernel/x86-exceptions.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/x86-exceptions.h (original)
+++ trunk/source/lisp-kernel/x86-exceptions.h Mon Nov 16 19:44:53 2009
@@ -186,8 +186,8 @@
=
#ifdef DARWIN
#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler f=
akes that */
-#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.trapno =3D=3D 0=
xd) && (((UC_MCONTEXT(xp)->__es.err)&7)=3D=3D2))
-#define IS_PAGE_FAULT(info,xp) (UC_MCONTEXT(xp)->__es.trapno =3D=3D 0xe)
+#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno =3D=3D=
0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (UC_MCONTEXT(xp)->__es.__trapno =3D=3D 0xe)
/* The x86 version of sigreturn just needs the context argument; the
hidden, magic "flavor" argument that sigtramp uses is ignored. */
#define SIGRETURN(context) DarwinSigReturn(context)
More information about the Openmcl-cvs-notifications
mailing list