Index: /trunk/ccl/level-1/x86-trap-support.lisp
===================================================================
--- /trunk/ccl/level-1/x86-trap-support.lisp	(revision 5494)
+++ /trunk/ccl/level-1/x86-trap-support.lisp	(revision 5495)
@@ -72,15 +72,27 @@
 
 #+darwinx8664-target
+;;; Apple has decided that compliance with some Unix standard or other
+;;; requires gratuitously renaming ucontext/mcontext structures and
+;;; their components.  Do you feel more compliant now ?
 (progn
   (eval-when (:compile-toplevel :execute)
-    (or (load-record :mcontext64)
-        (def-foreign-type nil
-            (:struct :mcontext64
-                     (:es :x86_exception_state64_t)
-                     (:ss :x86_thread_state64_t)
-                     (:fs :x86_float_state64_t)))))
+    (def-foreign-type nil
+        (:struct :portable_mcontext64
+                 (:es :x86_exception_state64_t)
+                 (:ss :x86_thread_state64_t)
+                 (:fs :x86_float_state64_t)))
+    (def-foreign-type nil
+        (:struct :portable_ucontext64
+                 (:onstack (:signed 32))
+                 (:sigmask (:unsigned 32))
+                 (:ss_sp :address)
+                 (:ss_size (:unsigned 64))
+                 (:ss_flags  (:signed 32))
+                 (:link :address)
+                 (:uc_mcsize (:unsigned 64))
+                 (:uc_mcontext64 (:* (:struct :portable_mcontext64))))))
   (defconstant gp-regs-offset 0)
   (defmacro xp-gp-regs (xp)
-    `(pref (pref ,xp :ucontext64.uc_mcontext64) :mcontext64.ss))
+    `(pref (pref ,xp :portable_ucontext64.uc_mcontext64) :portable_mcontext64.ss))
 
   (defconstant flags-register-offset 17)
