0.8.3.5:
[sbcl.git] / src / code / load.lisp
index f7f7ca9..e8b9921 100644 (file)
                       stream
                       implementation
                       +backend-fasl-file-implementation+))))
-       ;; TO DO: Check for *FEATURES* which affect binary compatibility.
-       ;; (And don't forget to return T.:-)
-       ))))
+       ;; Read and validate *FEATURES* which affect binary compatibility.
+       (let ((faff-in-this-file (string-from-stream)))
+         (unless (string= faff-in-this-file *features-affecting-fasl-format*)
+           (error
+            "~@<incompatible ~S in fasl file ~S: ~2I~_~
+              Of features affecting binary compatibility, ~4I~_~S~2I~_~
+              this runtime has ~4I~_~A,~2I~_~
+              while the fasl expects ~4I~_~A.~:>"
+            '*features* 
+            stream
+            *features-potentially-affecting-fasl-format*
+            *features-affecting-fasl-format*
+            faff-in-this-file)))
+       ;; success
+       t))))
 
 ;; Setting this variable gives you a trace of fops as they are loaded and
 ;; executed.
 ;;; code for foreign symbol lookup should be here.
 (defun find-foreign-symbol-in-table (name table)
   (let ((prefixes
-         #!+(or osf1 sunos linux freebsd) #("" "ldso_stub__")
+         #!+(or osf1 sunos linux freebsd darwin) #("" "ldso_stub__")
         #!+openbsd #("")))
     (declare (notinline some)) ; to suppress bug 117 bogowarning
     (some (lambda (prefix)