|
clisp-cvs Digest, Vol 44, Issue 7
From: <clisp-cvs-request@li...> - 2009-12-11 12:04
|
Send clisp-cvs mailing list submissions to clisp-cvs@... 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 clisp-cvs-request@... You can reach the person managing the list at clisp-cvs-owner@... 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/modules/rawsock configure.in,1.33,1.34 rawsock.c,1.129,1.130 (Sam Steingold) 2. clisp/src ChangeLog,1.7218,1.7219 (Sam Steingold) 3. clisp/src ChangeLog, 1.7219, 1.7220 compiler.lisp, 1.354, 1.355 defs1.lisp, 1.75, 1.76 (Sam Steingold) 4. clisp/doc impbody.xml,1.582,1.583 impent.xml,1.362,1.363 (Sam Steingold) ---------------------------------------------------------------------- Message: 1 Date: Thu, 10 Dec 2009 14:58:39 +0000 From: Sam Steingold <sds@...> Subject: clisp/modules/rawsock configure.in,1.33,1.34 rawsock.c,1.129,1.130 To: clisp-cvs@... Message-ID: <E1NIkTX-0000Zh-0q@...> Update of /cvsroot/clisp/clisp/modules/rawsock In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2184/modules/rawsock Modified Files: configure.in rawsock.c Log Message: * modules/rawsock/rawsock.c: include <linux/netlink.h> when present (check_socket_protocol): add NETLINK_* * modules/rawsock/configure.in: check for <linux/netlink.h> Index: rawsock.c =================================================================== RCS file: /cvsroot/clisp/clisp/modules/rawsock/rawsock.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- rawsock.c 3 Dec 2009 21:03:58 -0000 1.129 +++ rawsock.c 10 Dec 2009 14:58:36 -0000 1.130 @@ -38,6 +38,9 @@ #if defined(HAVE_LINUX_IF_PACKET_H) # include <linux/if_packet.h> #endif +#if defined(HAVE_LINUX_NETLINK_H) +# include <linux/netlink.h> +#endif #if defined(HAVE_NET_IF_H) # include <net/if.h> #endif @@ -635,6 +638,12 @@ IPPROTO-ICMPV6 IPPROTO-DSTOPTS IPPROTO-NONE \ IPPROTO-RSVP IPPROTO-GRE IPPROTO-PIM IPPROTO-COMP \ NSPROTO-IPX NSPROTO-SPX NSPROTO-SPXII \ + NETLINK_ROUTE NETLINK_USERSOCK NETLINK_FIREWALL NETLINK_INET_DIAG \ + NETLINK_NFLOG NETLINK_XFRM NETLINK_SELINUX NETLINK_ISCSI \ + NETLINK_AUDIT NETLINK_FIB_LOOKUP NETLINK_CONNECTOR \ + NETLINK_NETFILTER NETLINK_IP6_FW NETLINK_DNRTMSG \ + NETLINK_KOBJECT_UEVENT NETLINK_GENERIC NETLINK_SCSITRANSPORT \ + NETLINK_ECRYPTFS \ ETH-P-LOOP ETH-P-PUP ETH-P-PUPAT ETH-P-IP ETH-P-X25 ETH-P-ARP \ ETH-P-BPQ ETH-P-IEEEPUP ETH-P-IEEEPUPAT ETH-P-DEC ETH-P-DNA-DL \ ETH-P-DNA-RC ETH-P-DNA-RT ETH-P-LAT ETH-P-DIAG ETH-P-CUST \ Index: configure.in =================================================================== RCS file: /cvsroot/clisp/clisp/modules/rawsock/configure.in,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- configure.in 2 Sep 2009 23:17:12 -0000 1.33 +++ configure.in 10 Dec 2009 14:58:36 -0000 1.34 @@ -13,6 +13,7 @@ BOLD_MSG([Rawsock (Headers)]) CL_TCPCONN AC_CHECK_HEADERS([sys/socket.h linux/if_packet.h netdb.h sys/uio.h \ +linux/netlink.h \ sys/types.h sys/ioctl.h errno.h stropts.h poll.h sys/un.h ifaddrs.h unistd.h]) AC_CHECK_HEADERS([net/if.h],[],[],[ #if defined(HAVE_SYS_TYPES_H) ------------------------------ Message: 2 Date: Thu, 10 Dec 2009 14:58:39 +0000 From: Sam Steingold <sds@...> Subject: clisp/src ChangeLog,1.7218,1.7219 To: clisp-cvs@... Message-ID: <E1NIkTX-0000Zn-IA@...> Update of /cvsroot/clisp/clisp/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2184/src Modified Files: ChangeLog Log Message: * modules/rawsock/rawsock.c: include <linux/netlink.h> when present (check_socket_protocol): add NETLINK_* * modules/rawsock/configure.in: check for <linux/netlink.h> Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7218 retrieving revision 1.7219 diff -u -d -r1.7218 -r1.7219 --- ChangeLog 2 Dec 2009 23:03:11 -0000 1.7218 +++ ChangeLog 10 Dec 2009 14:58:36 -0000 1.7219 @@ -1,3 +1,9 @@ +2009-12-08 Sam Steingold <sds@...> + + * modules/rawsock/rawsock.c: include <linux/netlink.h> when present + (check_socket_protocol): add NETLINK_* + * modules/rawsock/configure.in: check for <linux/netlink.h> + 2009-12-02 Sam Steingold <sds@...> * modules/rawsock/demos/sniffer.lisp: add a demo ------------------------------ Message: 3 Date: Thu, 10 Dec 2009 21:41:11 +0000 From: Sam Steingold <sds@...> Subject: clisp/src ChangeLog, 1.7219, 1.7220 compiler.lisp, 1.354, 1.355 defs1.lisp, 1.75, 1.76 To: clisp-cvs@... Message-ID: <E1NIql6-0003PN-0S@...> Update of /cvsroot/clisp/clisp/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13074/src Modified Files: ChangeLog compiler.lisp defs1.lisp Log Message: when compiling REQUIRE, if the module is not found (e.g., it is a dynamic module), call REQUIRE right away, at compile time. * defs1.lisp (augment-load-path, load-path-augmentations) (with-augmented-load-path): extracted from require (require): use with-augmented-load-path * compiler.lisp (load-or-compile): extracted from c-REQUIRE (c-REQUIRE): use load-or-compile Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7219 retrieving revision 1.7220 diff -u -d -r1.7219 -r1.7220 --- ChangeLog 10 Dec 2009 14:58:36 -0000 1.7219 +++ ChangeLog 10 Dec 2009 21:41:09 -0000 1.7220 @@ -1,3 +1,13 @@ +2009-12-10 Sam Steingold <sds@...> + + when compiling REQUIRE, if the module is not found (e.g., it is a + dynamic module), call REQUIRE right away, at compile time. + * defs1.lisp (augment-load-path, load-path-augmentations) + (with-augmented-load-path): extracted from require + (require): use with-augmented-load-path + * compiler.lisp (load-or-compile): extracted from c-REQUIRE + (c-REQUIRE): use load-or-compile + 2009-12-08 Sam Steingold <sds@...> * modules/rawsock/rawsock.c: include <linux/netlink.h> when present Index: compiler.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/src/compiler.lisp,v retrieving revision 1.354 retrieving revision 1.355 diff -u -d -r1.354 -r1.355 --- compiler.lisp 5 Nov 2009 17:19:52 -0000 1.354 +++ compiler.lisp 10 Dec 2009 21:41:09 -0000 1.355 @@ -3414,38 +3414,48 @@ (defun c-PROVIDE (module-name) (pushnew (module-name module-name) *compiled-modules* :test #'string=)) +;; load or compile +(defun load-or-compile (module-name file may-require) + (with-augmented-load-path ((make-pathname :name nil :type nil + :defaults *compile-file-pathname*)) + (let* ((present-files + (search-file file (append *source-file-types* '("lib")) nil)) + (newest-file (first present-files))) + ;; if the libfile occurs among the found Files + ;; and if it is the newest: + (if (and (consp present-files) + (string= (pathname-type newest-file) "lib")) + (load newest-file ; load libfile + :verbose (and *load-verbose* *compile-verbose*) + :print (and *load-print* *compile-print*)) + (if newest-file + ;; found file in *load-paths*+*compile-file-pathname* + (if *compile-file-directory* + ;; `compile-file' was given :output-file, + ;; so put the compiled file there + (compile-file newest-file :output-file + (merge-pathnames *compile-file-directory* + newest-file)) + ;; `compile-file' was called without an explicit + ;; :output-file arg, so compile `in place' + (compile-file newest-file)) + ;; file not found - call require + (if may-require + (require module-name) + (c-error *form* + (TEXT "Cannot find file ~S required by feature ~S") + file module-name))))))) + ;; auxiliary function: REQUIRE on file-compilation, cf. function REQUIRE (defun c-REQUIRE (module-name &optional (pathname nil p-given)) (setq module-name (module-name module-name)) (unless (or (member module-name *modules* :test #'string=) (member module-name *compiled-modules* :test #'string=)) (unless p-given (setq pathname (pathname module-name))) - (flet ((load-lib (file) - (let* ((*load-paths* - (cons (make-pathname :name nil :type nil - :defaults *compile-file-truename*) - *load-paths*)) - (present-files - (search-file file (append *source-file-types* '("lib")))) - (newest-file (first present-files))) - ;; if the libfile occurs among the found Files - ;; and if it is the newest: - (if (and (consp present-files) - (string= (pathname-type newest-file) "lib")) - (load newest-file ; load libfile - :verbose (and *load-verbose* *compile-verbose*) - :print (and *load-print* *compile-print*)) - (let ((fi (or newest-file file))) - (if (null *compile-file-directory*) - ;; `compile-file' was called without an explicit - ;; :output-file arg, so compile `in place' - (compile-file fi) - ;; `compile-file' was given :output-file, - ;; so put the compiled file there - (compile-file fi :output-file - (merge-pathnames *compile-file-directory* - fi)))))))) - (if (atom pathname) (load-lib pathname) (mapcar #'load-lib pathname))))) + (if (atom pathname) + (load-or-compile module-name pathname t) + (mapcar (lambda (path) (load-or-compile module-name path nil)) + pathname)))) ;;; auxiliary functions for ;;; LET/LET*/MULTIPLE-VALUE-BIND/Lambda-Expression/FLET/LABELS: Index: defs1.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/src/defs1.lisp,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- defs1.lisp 29 Sep 2009 21:59:08 -0000 1.75 +++ defs1.lisp 10 Dec 2009 21:41:09 -0000 1.76 @@ -168,22 +168,32 @@ (defvar *user-lib-directory* nil "The location of user-installed modules.") +(defun augment-load-path (paths) + (dolist (path paths *load-paths*) + (when path (setq *load-paths* (adjoin path *load-paths* :test #'equal))))) + +(defun load-path-augmentations (dynmod) + (list (merge-pathnames dynmod *lib-directory*) + (and *user-lib-directory* + (merge-pathnames dynmod *user-lib-directory*)) + (and *load-pathname* ; not truename to respect symlinks + (make-pathname :name nil :type nil :defaults *load-pathname*)) + (and *compile-file-pathname* ; could be called by eval-when-compile + (make-pathname :name nil :type nil + :defaults *compile-file-pathname*)))) + +(defmacro with-augmented-load-path (dirs &body body) + `(let ((*load-paths* + ;; the name "dynmod/" used here should be in sync with clisp-link + (augment-load-path + ,(if dirs `(list ,@dirs) '(load-path-augmentations "dynmod/"))))) + ,@body)) + (defun require (module-name &optional (pathname nil p-given)) (setq module-name (module-name module-name)) (unless (member module-name *modules* :test #'string=) (unless p-given (setq pathname (pathname module-name))) - (let (#+CLISP (*load-paths* *load-paths*) - #-CLISP (*default-pathname-defaults* '#"")) - ;; "dynmod/" should be in sync with clisp-link - #+CLISP (pushnew (merge-pathnames "dynmod/" *lib-directory*) *load-paths* - :test #'equal) - #+CLISP (when *user-lib-directory* - (pushnew (merge-pathnames "dynmod/" *user-lib-directory*) - *load-paths* :test #'equal)) - #+CLISP (when *load-truename* - (pushnew (make-pathname :name nil :type nil - :defaults *load-truename*) - *load-paths* :test #'equal)) + (with-augmented-load-path () (if (atom pathname) (load pathname) (mapcar #'load pathname))))) ------------------------------ Message: 4 Date: Thu, 10 Dec 2009 21:41:11 +0000 From: Sam Steingold <sds@...> Subject: clisp/doc impbody.xml,1.582,1.583 impent.xml,1.362,1.363 To: clisp-cvs@... Message-ID: <E1NIql5-0003PG-Gq@...> Update of /cvsroot/clisp/clisp/doc In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13074/doc Modified Files: impbody.xml impent.xml Log Message: when compiling REQUIRE, if the module is not found (e.g., it is a dynamic module), call REQUIRE right away, at compile time. * defs1.lisp (augment-load-path, load-path-augmentations) (with-augmented-load-path): extracted from require (require): use with-augmented-load-path * compiler.lisp (load-or-compile): extracted from c-REQUIRE (c-REQUIRE): use load-or-compile Index: impbody.xml =================================================================== RCS file: /cvsroot/clisp/clisp/doc/impbody.xml,v retrieving revision 1.582 retrieving revision 1.583 diff -u -d -r1.582 -r1.583 --- impbody.xml 25 Nov 2009 20:46:42 -0000 1.582 +++ impbody.xml 10 Dec 2009 21:41:09 -0000 1.583 @@ -4471,7 +4471,7 @@ <warning id="stream-eltype-stdio"><simpara>&clisp; expects to be able to do &character-t; i/o on standard streams like &terminal-io-var;, &standard-output-var;, &standard-input-var;, &error-output-var;, - &query-io-var; et al, thus is is a <emphasis>very</emphasis> bad idea + &query-io-var; et al, thus is is a &very-e; bad idea to change their &stream-element-type; even when you can. Use &make-stream; instead, see <xref linkend="bin-stdio"/>.</simpara></warning> @@ -5154,7 +5154,14 @@ forms are treated specially: &load-paths; is searched for &foolisp-f; &and-e; <filename>#P"foo.lib"</filename>. If the latest such file is a &lisp-file;, it is compiled; -otherwise the &lib-file; is loaded.</para> +otherwise the &lib-file; is loaded. +If neither is found, <code>(&require; &foo-f;)</code> is called.</para> +<warning id="module-user-file-name-conflict"><para>It is a &very-e; bad +idea to name your files the same way as &clisp; modules +(whether <link linkend="included-modules">system-supplied</link> +or <olink targetdoc="clink" targetptr="opt-install">user-installed</olink>) +because then &require-my; will use different files at compile +and execution times.</para></warning> <para>The &lib-file; is a <quote>header</quote> file which contains the constant, variable, inline and macro definitions necessary for Index: impent.xml =================================================================== RCS file: /cvsroot/clisp/clisp/doc/impent.xml,v retrieving revision 1.362 retrieving revision 1.363 diff -u -d -r1.362 -r1.363 --- impent.xml 1 Dec 2009 22:43:43 -0000 1.362 +++ impent.xml 10 Dec 2009 21:41:09 -0000 1.363 @@ -1077,6 +1077,7 @@ <!ENTITY before-e '<emphasis role="strong">before</emphasis>'> <!ENTITY must-e '<emphasis role="strong">must</emphasis>'> <!ENTITY cannot-e '<emphasis role="strong">cannot</emphasis>'> +<!ENTITY very-e '<emphasis role="strong">very</emphasis>'> <!ENTITY charset-glibc-libiconv 'This character set is only available on platforms with &glibc; or &libiconv;.'> <!ENTITY charset-libiconv 'This character set is only available on ------------------------------ ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ------------------------------ _______________________________________________ clisp-cvs mailing list clisp-cvs@... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest, Vol 44, Issue 7 **************************************** |
| Thread | Author | Date |
|---|---|---|
| clisp-cvs Digest, Vol 44, Issue 7 | <clisp-cvs-request@li...> |