Fix for a couple of Unicode-related bugs.
... KLUDGE around the non-existence of proper external-format
support in GET-DESCRIPTOR-FOR / RUN-PROGRAM;
... hideous hack in asdf-install to allow downloads of binary data
through character streams.
* bug fix: RANDOM can be compiled when the compiler derives the type
of its numeric argument as a disjoint set of small integers.
(reported by Paul Dietz)
+ * fixed some bugs related to Unicode integration:
+ ** RUN-PROGRAM can allow its child to take input from a Lisp
+ stream. (reported by Stefan Scholl)
+ ** ASDF-INSTALL successfully downloads .tar.gz files in all
+ locales. (reported by Ken Causey)
* fixed some bugs revealed by Paul Dietz' test suite:
** INCF, DECF and REMF evaluate their place form as specified in
CLtS 5.1.3.
(socket-connect
s (car (host-ent-addresses (get-host-by-name (url-host (or *proxy* url)))))
(url-port (or *proxy* url)))
- (let ((stream (socket-make-stream s :input t :output t :buffering :full)))
+ (let ((stream (socket-make-stream s :input t :output t :buffering :full :external-format :iso-8859-1)))
;; we are exceedingly unportable about proper line-endings here.
;; Anyone wishing to run this under non-SBCL should take especial care
(format stream "GET ~A HTTP/1.0~%Host: ~A~%Cookie: CCLAN-SITE=~A~%~%"
(format t "Downloading ~A bytes from ~A ..."
(if length length "some unknown number of") url)
(force-output)
- (with-open-file (o file-name :direction :output)
+ (with-open-file (o file-name :direction :output :external-format :iso-8859-1)
(if length
(let ((buf (make-array length
:element-type
- (stream-element-type stream) )))
+ (stream-element-type stream))))
(read-sequence buf stream)
(write-sequence buf o))
(sb-executable:copy-stream stream o))))
(read-line object nil nil)
(unless line
(return))
- (sb-unix:unix-write fd line 0 (length line))
+ (sb-unix:unix-write
+ fd
+ ;; FIXME: this really should be
+ ;; (STRING-TO-OCTETS :EXTERNAL-FORMAT ...).
+ ;; RUN-PROGRAM should take an
+ ;; external-format argument, which should
+ ;; be passed down to here. Something
+ ;; similar should happen on :OUTPUT, too.
+ (map '(vector (unsigned-byte 8)) #'char-code line)
+ 0 (length line))
(if no-cr
(return)
(sb-unix:unix-write fd newline 0 1)))))
;; That's not just because POSIX-ENVIRON is having a bad hair
;; day and returning NIL, is it?
(assert (plusp (length (sb-ext:posix-environ))))
+ ;; make sure that a stream input argument is basically reasonable.
+ (let ((string (let ((i (make-string-input-stream "abcdef")))
+ (with-output-to-string (stream)
+ (sb-ext:run-program "/bin/cat" ()
+ :input i :output stream)))))
+ (assert (= (length string) 6))
+ (assert (string= string "abcdef")))
;; success convention for this Lisp program run as part of a larger script
(sb-ext:quit :unix-status 52)))
EOF
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.17.17"
+"0.8.17.18"