From fbced7f5db441d632c6ceb8eb53f598e0588551b Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Sat, 26 May 2012 11:13:01 -0700
Subject: [PATCH] Fix so this can build on 8-bit cmucl.

o Clean up reader conditionals in MAKE-FD-STREAM.
o Add dummy %SET-FD-STREAM-EXTERNAL-FORMAT for non-unicode.
---
 src/code/fd-stream.lisp | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp
index 5f194a010..062a0d33a 100644
--- a/src/code/fd-stream.lisp
+++ b/src/code/fd-stream.lisp
@@ -2136,6 +2136,12 @@
 
 ;;;; Creation routines (MAKE-FD-STREAM and OPEN)
 
+;; The unicode version of this is in fd-stream-extfmt.lisp
+#-(and unicode (not unicode-boootstrap))
+(defun %set-fd-stream-external-format (stream extfmt &optional (updatep t))
+  (declare (ignore stream extfmt updatep))
+  (values))
+
 ;;; MAKE-FD-STREAM -- Public.
 ;;;
 ;;; Returns a FD-STREAM on the given file.
@@ -2246,15 +2252,12 @@
     ;; external format.
     ;;
     ;;#-unicode-bootstrap ; fails in stream-reinit otherwise
-    #+(and unicode (not unicode-bootstrap))
     (cond ((and (eq external-format :file-attribute) input)
 	   ;; Read the encoding file option with the external-format set to
 	   ;; :iso8859-1, and then change the external-format if necessary.
-	   #+(and unicode (not unicode-bootstrap))
 	   (%set-fd-stream-external-format stream :iso8859-1 nil)
 	   (set-routines stream element-type input output input-buffer-p
 			 :binary-stream-p binary-stream-p)
-	   #+(and unicode (not unicode-bootstrap))
 	   (%set-fd-stream-external-format stream :iso8859-1 nil)
 	   (multiple-value-bind (encoding eol-mode)
 	       (stream-encoding-file-attribute stream)
@@ -2271,18 +2274,14 @@
 	  ((eq external-format :file-attribute)
 	   ;; Non-input stream, so can not read the file attributes, so use the
 	   ;; :default.
-	   #+(and unicode (not unicode-bootstrap))
 	   (%set-fd-stream-external-format stream :default nil)
 	   (set-routines stream element-type input output input-buffer-p
 			 :binary-stream-p binary-stream-p)
-	   #+(and unicode (not unicode-bootstrap))
 	   (%set-fd-stream-external-format stream :default nil))
 	  (t
-	   #+(and unicode (not unicode-bootstrap))
 	   (%set-fd-stream-external-format stream external-format nil)
 	   (set-routines stream element-type input output input-buffer-p
 			 :binary-stream-p binary-stream-p)
-	   #+(and unicode (not unicode-bootstrap))
 	   (%set-fd-stream-external-format stream external-format nil)))
     stream))
 
-- 
GitLab