|
From: <cli...@li...> - 2005-06-09 03:21:16
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/src ChangeLog,1.4692,1.4693 (Jörg Höhle) 2. clisp/modules/bindings/glibc linux.lisp,1.17,1.18 (Jörg Höhle) 3. clisp/tests bind.tst,1.10,1.11 ChangeLog,1.377,1.378 (Sam Steingold) --__--__-- Message: 1 From: Jörg Höhle <ho...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.4692,1.4693 Date: Wed, 08 Jun 2005 12:04:11 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16993/src Modified Files: ChangeLog Log Message: do not use on __errno_location() Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4692 retrieving revision 1.4693 diff -u -d -r1.4692 -r1.4693 --- ChangeLog 7 Jun 2005 12:25:48 -0000 1.4692 +++ ChangeLog 8 Jun 2005 12:04:04 -0000 1.4693 @@ -1,3 +1,8 @@ +2005-06-08 Jörg Höhle <ho...@us...> + + * modules/bindings/glibc/linux.lisp (errno): Remove dependency on + __errno_location(). + 2005-06-07 Bruno Haible <br...@cl...> * genclisph.d (print_printf_arg, printf_with_args, print_file, --__--__-- Message: 2 From: Jörg Höhle <ho...@us...> To: cli...@li... Subject: clisp/modules/bindings/glibc linux.lisp,1.17,1.18 Date: Wed, 08 Jun 2005 12:04:12 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/modules/bindings/glibc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16993/modules/bindings/glibc Modified Files: linux.lisp Log Message: do not use on __errno_location() Index: linux.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/modules/bindings/glibc/linux.lisp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- linux.lisp 25 Jan 2005 14:35:16 -0000 1.17 +++ linux.lisp 8 Jun 2005 12:04:09 -0000 1.18 @@ -292,26 +292,27 @@ ;; in GNU, errno is a per-thread variable, so def-c-var is not appropriate ;; (def-c-var errno (:type ffi:int)) -;; link error: "undefined reference to `errno'" +;; Instead, errno is a cpp macro expanding to *__errno_location() +;; However, on PPC/glibc, no __errno_location() was found, and +;; some people use this file with *BSD. -(c-lines "#include <bits/errno.h>~%") +(c-lines "static int *clisp_errno_location(void);~%") +(c-lines "static int *clisp_errno_location() { return &errno; }~%") -(def-call-out errno-location (:name "__errno_location") +(ffi:def-call-out errno-location (:name "clisp_errno_location") (:arguments) (:return-type (c-pointer int))) ;; (define-symbol-macro errno (foreign-value (__errno_location))); setf-able -;; Here we optimize the most common use through an extra function -(def-call-out get-errno (:name "__errno_location") +;; Optimize the most common use through an extra function +(ffi:def-call-out get-errno (:name "clisp_errno_location") (:arguments) (:return-type (c-ptr int))) -(define-symbol-macro errno (get-errno)); not setf-able per se -(defun set-errno (value) +(define-symbol-macro errno (get-errno)); not yet setf-able +(cl:defun set-errno (value) (setf (foreign-value (errno-location)) value)) -(defsetf get-errno set-errno) - -; ------------------------------ <errno.h> ------------------------------------ +(cl:defsetf get-errno set-errno); errno becomes setf-able -; ============================ <sys/errno.h> ================================== +; ---------------------------- <sys/errno.h> ---------------------------------- ;;; ============================== <float.h> ================================== --__--__-- Message: 3 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/tests bind.tst,1.10,1.11 ChangeLog,1.377,1.378 Date: Wed, 08 Jun 2005 16:18:33 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26583/tests Modified Files: bind.tst ChangeLog Log Message: 5 more tests Index: bind.tst =================================================================== RCS file: /cvsroot/clisp/clisp/tests/bind.tst,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- bind.tst 14 Mar 2005 12:24:19 -0000 1.10 +++ bind.tst 8 Jun 2005 16:18:30 -0000 1.11 @@ -8,7 +8,7 @@ 6 (let ((x 5)) (multiple-value-bind (x) (1+ x) (declare (special x)) x)) 6 -(let ((x 5)) ((lambda (x) (declare (special x)) x) (1+ x))) +(let ((x 5)) ((lambda (x) (declare (special x)) x) (1+ x))) 6 ;; similarly, without enclosing lexical binding @@ -30,7 +30,7 @@ (block foo (handler-bind ((unbound-variable (lambda (c) (princ-error c) (return-from foo 'good)))) - ((lambda (x) (declare (special x)) x) (1+ x)))) + ((lambda (x) (declare (special x)) x) (1+ x)))) GOOD ;; variable being declared special is not being bound - a "free" declaration @@ -40,7 +40,7 @@ 6 (let ((x 5)) (multiple-value-bind (y) (1+ x) (declare (special x)) y)) 6 -(let ((x 5)) ((lambda (y) (declare (special x)) y) (1+ x))) +(let ((x 5)) ((lambda (y) (declare (special x)) y) (1+ x))) 6 ;; variable is not being declared special @@ -50,7 +50,7 @@ 6 (let ((x 5)) (multiple-value-bind (x) (1+ x) x)) 6 -(let ((x 5)) ((lambda (x) x) (1+ x))) +(let ((x 5)) ((lambda (x) x) (1+ x))) 6 ;; CLHS 3.3.4 - a "bound" declaration @@ -336,3 +336,18 @@ (list y x)) (bind-test-function-1))) (2 1) + +(let ((x 5)) (let ((x (1+ x)) (z (1+ x))) (declare (special x)) z)) +6 + +(let ((x 5)) (let* ((x (1+ x)) (z (1+ x))) (declare (special x)) z)) +7 + +(let ((x 5)) (multiple-value-bind (x z) (values (1+ x) (1+ x)) (declare (special x)) z)) +6 + +(let ((x 5)) ((lambda (x z) (declare (special x)) z) (1+ x) (1+ x))) +6 + +(let ((x 5)) ((lambda (&optional x z) (declare (special x)) z) (1+ x) (1+ x))) +6 Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/tests/ChangeLog,v retrieving revision 1.377 retrieving revision 1.378 diff -u -d -r1.377 -r1.378 --- ChangeLog 7 Jun 2005 11:03:41 -0000 1.377 +++ ChangeLog 8 Jun 2005 16:18:30 -0000 1.378 @@ -1,3 +1,7 @@ +2005-06-08 Sam Steingold <sd...@gn...> + + * bind.tst: 5 more tests + 2005-06-04 Bruno Haible <br...@cl...> * path.tst: Use UNKNOWN, not FIXME, for not-yet-determined values in --__--__-- _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest |