Index: /branches/objc-gf/ccl/lib/foreign-types.lisp
===================================================================
--- /branches/objc-gf/ccl/lib/foreign-types.lisp	(revision 6053)
+++ /branches/objc-gf/ccl/lib/foreign-types.lisp	(revision 6054)
@@ -1748,7 +1748,7 @@
 
     (def-foreign-type-translator * (to)
-      (let* ((to (if (eq to t) *void-foreign-type* (parse-foreign-type to))))
-        (ensure-foreign-type-bits to)
-        (or (gethash to (ftd-pointer-types *target-ftd*))
+      (let* ((ftd *target-ftd*)
+             (to (if (eq to t) *void-foreign-type* (parse-foreign-type to ftd))))
+        (or (gethash to (ftd-pointer-types ftd))
             (setf (gethash to (ftd-pointer-types *target-ftd*))
                   (make-foreign-pointer-type
@@ -1791,9 +1791,40 @@
       (%def-foreign-type :signed-long signed-long-type ftd)
       (%def-foreign-type :unsigned-long unsigned-long-type ftd))
-    ))
-
-
-
-
-
-
+    ;;
+    ;; Defining the handful of foreign structures that are used
+    ;; to build OpenMCL here ensures that all backends see appropriate
+    ;; definitions of them.
+    ;;
+    ;; Don't use DEF-FOREIGN-TYPE here; this often runs too
+    ;; early in the cold load for that to work.
+    ;;
+    (parse-foreign-type
+     '(:struct :cdb-datum
+       (:data (* t))
+       (:size (:unsigned 32)))
+     ftd)
+    (parse-foreign-type
+     '(:struct :dbm-constant
+       (:class (:unsigned 32))
+       (:pad (:unsigned 32))
+       (:value
+        (:union nil
+         (:s32 (:signed 32))
+         (:u32 (:unsigned 32))
+         (:single-float :float)
+         (:double-float :double))))
+     ftd)
+    ;; This matches the xframe-list struct definition in
+    ;; "ccl:lisp-kernel;constants.h"
+    (parse-foreign-type
+     '(:struct :xframe-list
+       (:this (:* t #|(struct :ucontext)|#))
+       (:prev (:* (:struct  :xframe-list))))
+    ftd)
+  ))
+
+
+
+
+
+
