variable was defined, but had an empty value (reported by Peter Van Eynde)
* bug fix: non ordinary lambda-list keyword in ordinary lambda lists
signal a PROGRAM-ERROR, not a BUG.
+ * bug fix: SB-POSIX:READDIR works when built with large file support.
* optimization: loading generic functions no longer takes O(n^2) time,
proportional to the amount of methods in the generic function
(reported by Todd Sabin and Jeremy Brown)
;; opendir()
(:structure dirent
- ("struct dirent"
+ (#+(and linux largefile) "struct dirent64"
+ #-(and linux largefile) "struct dirent"
(:c-string name "char *" "d_name"
:distrust-length #+sunos t #-sunos nil)) t)
(define-call* "rmdir" int minusp (pathname filename))
(define-call* "unlink" int minusp (pathname filename))
(define-call "opendir" (* t) null-alien (pathname filename))
-(define-call "readdir" (* dirent)
+(define-call ("readdir" :largefile) (* dirent)
;; readdir() has the worst error convention in the world. It's just
;; too painful to support. (return is NULL _and_ errno "unchanged"
;; is not an error, it's EOF).
#'string<)
(sort (append '("." "..")
(mapcar (lambda (p)
- (enough-namestring p *current-directory*))
+ (let ((string (enough-namestring p *current-directory*)))
+ (if (pathname-name p)
+ string
+ (subseq string 0 (1- (length string))))))
(directory (make-pathname
:name :wild
:type :wild
:defaults *current-directory*))))
- #'string<))
+ #'string<))
(sb-posix:closedir dir)))
t)
(compiler-error "multiple &AUX in lambda list: ~S" list))
(setq auxp t
state :aux))
- (t
+ (t
;; It could be argued that &WHOLE and friends would be just ordinary
;; variables in an ordinary lambda-list, but since (1) it seem exceedingly
- ;; unlikely that that was that the programmer actually ment (2) the spec
+ ;; unlikely that that was that the programmer actually ment (2) the spec
;; can be interpreted as giving as licence to signal an error[*] we do.
;;
;; [* All lambda list keywords used in the
(multiple-value-bind (required optional restp rest keyp keys allowp auxp aux
morep more-context more-count)
(parse-lambda-list-like-thing lambda-list)
-
+
;; Check validity of parameters.
(flet ((need-symbol (x why)
(unless (symbolp x)
#include <sys/mman.h>
#include <sys/types.h>
+#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
return lstat(file_name, buf);
}
+struct dirent64 *
+readdir_largefile(DIR *dir) {
+ return readdir(dir);
+}
+
#endif
;;; program-error from bad lambda-list keyword
(assert (eq :ok
- (handler-case
+ (handler-case
(funcall (lambda (&whole x)
(list &whole x)))
(program-error ()
(defparameter *cat-out* (make-synonym-stream '*cat-out-pipe*))
(with-test (:name :run-program-cat-2)
- (let ((cat (run-program "/bin/cat" nil :input *cat-in* :output *cat-out*
+ (let ((cat (run-program "/bin/cat" nil :input *cat-in* :output *cat-out*
:wait nil)))
- (dolist (test '("This is a test!"
- "This is another test!"
+ (dolist (test '("This is a test!"
+ "This is another test!"
"This is the last test...."))
(write-line test *cat-in*)
(assert (equal test (read-line *cat-out*))))
;;; The above test used to use ed, but there were buffering issues: on some platforms
;;; buffering of stdin and stdout depends on their TTYness, and ed isn't sufficiently
-;;; agressive about flushing them. So, here's another test using :PTY.
+;;; agressive about flushing them. So, here's another test using :PTY.
(defparameter *tmpfile* "run-program-ed-test.tmp")
*ed*)
(unwind-protect
- (with-test (:name :run-program-ed)
+ (with-test (:name :run-program-ed)
(assert-ed nil "4")
(assert-ed ".s/bar/baz/g" "")
(assert-ed "w" "4")
;;; 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".)
-"1.0.0.15"
+"1.0.0.16"