debian/0000755000000000000000000000000012256056666007204 5ustar debian/sbcl.dirs0000644000000000000000000000002112214415675010774 0ustar usr/share/binfmtsdebian/sbcl-doc.lintian-overrides0000644000000000000000000000010012214415675014232 0ustar sbcl-doc: copyright-should-refer-to-common-license-file-for-gpl debian/source/0000755000000000000000000000000012214415675010475 5ustar debian/source/format0000644000000000000000000000001412214415675011703 0ustar 3.0 (quilt) debian/sbcl.lintian-overrides0000644000000000000000000000037212214415675013502 0ustar sbcl: copyright-should-refer-to-common-license-file-for-gpl sbcl: script-not-executable sbcl: package-contains-empty-directory usr/lib/sbcl/site-systems/ sbcl: package-contains-empty-directory usr/share/common-lisp/systems/ sbcl: unusual-interpreter debian/changelog0000644000000000000000000057237312256056666011077 0ustar sbcl (2:1.1.14-2) unstable; urgency=medium * Import cl-asdf 3.0.3. This should fix loading systems that are installed via dpkg -- Christoph Egger Mon, 23 Dec 2013 16:57:50 +0100 sbcl (2:1.1.14-1) unstable; urgency=low * New upstream release: changes in sbcl-1.1.14 relative to sbcl-1.1.13: * optimization: complicated TYPEP tests are less opaque to the type propagation pass. (lp#1229340) * optimization: [N]BUTLAST perform a single pass over the list. (lp#1245697) * optimization: EQUALP on structures with raw slots (double-float/complex) no longer conses and is faster. * optimization: RESTART-CASE expands to more compact code. Thanks to Jan Moringen. (lp#1249055) * enhancement: Top-level defmethod without defgeneric no longer causes undefined-function warnings in subsequent forms. (lp#503095) * enhancement: Better error messages for system errors on Windows. * enhancement: run-sbcl.sh is usefully handled by rlwrap. Thanks to William Cushing. (lp#1249183) * enhancement: new function SB-EXT:ASSERT-VERSION->= accepts a version specification (multiple integer arguments) and signals a continuable error if the current SBCL version is lower (older) than the specification. (lp#674372) * enhancement: better ARRAY-RANK result derivation. (lp#1252108) * bug fix: EQUALP now compares correctly structures with raw slots larger than a single word. * bug fix: contribs couldn't be built on Windows with MinGW. * bug fix: Better pathname handling on Windows. (lp#922117) * bug fix: OPEN reports a more meaningful error when an existing file is opened for output with :if-exists :new-version. Thanks to Philip Munksgaard. (lp#455381) * bug fix: DEFSTRUCTs with NIL as a slot name no longer cause strange CLOS-related errors. (lp#633911) -- Christoph Egger Sat, 07 Dec 2013 16:47:29 +0100 sbcl (2:1.1.13-1) unstable; urgency=low * New upstream release: changes in sbcl-1.1.13 relative to sbcl-1.1.12: * optimization: better distribution of SXHASH over small conses of related values. (lp#309443) * other improvements to SXHASH: ** use the whole of the positive-fixnum range for SXHASH of fixnums * enhancement: The error message when calling an undefined alien function includes the name of the function on x86-64. * enhancement: sb-ext:run-program now supports :environment on Windows. * enhancement: ASDF is no longer required to load contribs at runtime. (lp#1132254) * enhancement: when called with a symbol, FIND-RESTART no longer calls COMPUTE-RESTARTS, making it faster and cons less (lp#769615) * enhancement: FIND-RESTART and COMPUTE-RESTARTS handle huge restart clusters better in some cases * enhancement: SOME/ANY/other quantification higher-order functions no longer cons. (lp#1070635) * bug fix: forward references to classes in fasls can now be loaded. (lp#746132) * bug fix: don't warn on a interpreted->compiled function redefinition from the same location. (patch by Douglas Katzman, lp#1042405) * bug fix: Create vectors of proper internal length when reading literal vectors from FASLs. (Reported by Jan Moringen) * bug fix: COMPILE can now succefully compile setf functions. (Reported by Douglas Katzman) * bug fix: run-program performs more correct escaping of arguments on Windows. (lp#1239242) * bug fix: function-lambda-expression on generic functions returns the actual name. * bug fix: (the [type] [constant]) now warns when [constant] matches [type] except for the number of values. (Reported by Nathan Trapuzzano on sbcl-help) * bug fix: signal errors in required cases of slot-definition initialization protocol. (lp#309072) * bug fix: run-sbcl.sh works better in the presence of symlinks on OS X. (thanks to Stelian Ionescu, lp#1242643) * bug fix: when given a restart object, FIND-RESTART checks whether the restart is active and, when a condition is supplied, whether the restart is associated to a different condition (lp#774410) -- Christoph Egger Tue, 05 Nov 2013 18:32:04 +0100 sbcl (2:1.1.12-1) unstable; urgency=low * new upstream release * enhancement: Add sb-bsd-sockets:socket-shutdown, for calling shutdown(3). (thanks to Jan Moringen, lp#1207483) * enhancement: document extensible sequences. (thanks to Jan Moringen, lp#994528) * optimization: EQUAL and EQUALP transforms are smarter. (thanks to Elias Martenson, lp#1220084) * optimization: CHAR-EQUAL is faster for constant and base-char arguments. * bug fix: probe-file now can access symlinks to pipes and sockets in /proc/pid/fd on Linux. (reported by Eric Schulte) * bug fix: SBCL can now be built on Solaris x86-64. * bug fix: Floating point exceptions do not persist on Solaris anymore. * bug fix: (setf . a) is pprinted correctly (reported by Douglas Katzman). * bug fix: handle compiler-error in LOAD when it's not run from inside EVAL. (lp#1219601) * bug fix: SB-GMP:MPZ-POW no longer segfaults given a non-bignum base. (thanks to Stephan Frank) * bug fix: space allocation of result bignums in SB-GMP is more accurate. (thanks to Stephan Frank, lp#1206191) * bug fix: sb-safepoint can now reliably handle signal interruptions of foreign code. (lp#1133018) * bug fix: the compiler-macro for MAKE-INSTANCE when emitting "fallback" constructors no longer fails to merge actual and default initargs (thanks to Jan Moringen, lp#1179858) * bug fix: the compiler-macro for MAKE-INSTANCE when emitting "fallback" constructors handles non-KEYWORD initialization arguments more correctly. * bug fix: loading the SB-SIMPLE-STREAMS contributed module no longer clobbers FILE-NAMESTRING. (thanks to Anton Kovalenko, lp#884603) * bug fix: class definitions with CPLs inconsistent with their metaclasses are less likely to destroy the object system's integrity. (lp#309076) * bug fix: restart clause parsing in RESTART-CASE is more in line with the standard. (lp#1203585, thanks to Jan Moringen) * bug fix: silence a note from RESTART-CASE under high-SPEED optimization settings. (lp#1023721) * bug fix: getting the order of arguments to SB-MOP:SET-FUNCALLABLE-INSTANCE-FUNCTION wrong produces a sensible error rather than a failed AVER. (reported by Paul Nathan) * bug fix: Parsing of &optional/&key/&rest arguments now never overwrites arguments during copying on x86 and x86-64; it may still happen on other platforms when there are more fixed arguments than stack slots. (reported by Jan Moringen) -- Christoph Egger Tue, 22 Oct 2013 21:55:31 +0200 sbcl (2:1.1.11-1) unstable; urgency=low * New upstream Release * enhancement: support building the manual under texinfo version 5. (lp#1189146) * enhancement: Windows builds no longer display the "Kitten of Death" message. A warning is instead appended to the regular banner, and may be muted with --noinform. (lp#728247) * enhancement: support building under new linker handling of syscalls under NetBSD. (thanks to Robert Swindells) * bug fix: undefined function errors are now properly reported on PPC and MIPS. (regression since 1.1.9) * bug fix: (funcall (function X junk)) didn't causes an error when X had a compiler macro. (thanks to Douglas Katzman). * bug fix: signal a warning when defining a setf-function when a setf-expander is already present. (thanks to Douglas Katzman). * bug fix: improved threading on PPC. * bug fix: ROOM works again on Windows. (lp#1206456) * bug fix: Streams were flushed even when there was one byte still left in the buffer. (lp#910213) * bug fix: OPEN handles correctly when :if-exists and :if-does-not-exist are either NIL or :ERROR. (reported by Jan Moringen) -- Christoph Egger Wed, 28 Aug 2013 20:09:14 +0200 sbcl (2:1.1.10-1) unstable; urgency=low * New upstream version * Upload to unstable again -- Christoph Egger Sun, 11 Aug 2013 17:29:52 +0200 sbcl (2:1.1.6-2) experimental; urgency=low * Import upstream patch 66ee4992 to fix compilation on svref of a symbol macro -- Christoph Egger Fri, 05 Apr 2013 09:22:30 +0200 sbcl (2:1.1.6-1) experimental; urgency=low * New upstream version * enhancement: the continuable error when defknown-ing over extant fndb entries can be ignored by passing :overwrite-fndb-silently t as a keyword argument to sb-c:defknown (after attributes). Useful to allow defknown to be re-loaded. Use with :allow-other-keys t for backward compatibility. * optimization: compiler is much faster in compiling SVREF and (SETF SVREF) forms. * bug fix: Prevent a make-array transform from modifying source forms causing problems for inlined code. Thanks to Bart Botta. (regression since 1.0.42.11-bis) * bug fix: clear-output calls the correct gray stream routine, sb-gray:stream-clear-output. (lp#1153257) * bug fix: an error is signalled for an invalid format modifier: ~<~@>. (lp#1153148) * bug fix: Better error messages for package operations (lp#1154776) * bug fix: delete-package on a nonexistent package should signal a cerror. (regression since 1.0.37.44). * bug fix: accessing &MORE (stack allocated &REST) arguments checks bounds. (lp#1154946, lp#1072112) * bug fix: compiling make-array no longer signals an error when the element-type is an uknown type, a warning is issued instead. Thanks to James Kalenius (lp#1156095) * bug fix: SEARCH on generic (non-VECTOR non-LIST) sequence types no longer produces wrong results for some inputs. (Thanks to Jan Moringen.) (lp#1153312) * minor incompatible change: SB-SPROF:WITH-PROFILING no longer loops by default. * new feature: package local nicknames. See manual for details. * new feature: SB-EXT:MAP-DIRECTORY provides a powerful interface for directory traversal: it is the backend used by SBCL for CL:DIRECTORY. * enhancement: easier to use restarts for resolving name-conflicts resulting from IMPORT, EXPORT, or USE-PACKAGE. * enhancement: variant DEFPACKAGE forms now signal a full error with restarts provided for resolving the situation. (lp#891351) * enhancement: by setting SB-EXT:*ON-PACKAGE-VARIANCE* appropriately variant DEFPACKAGE forms can now signal a full error with restarts provided for resolving the situation. See manual for details. (lp#891351) * enhancement: make-random-state now uses CryptGenRandom as a seed on Windows. (Thanks to Anton Kovalenko.) (lp#1102748) * enhancement: backtrace improvements ** secondary CLOS dispatch functions have better debug names (lp#503081) ** easier to read method names in backtraces. See SB-DEBUG:*METHOD-FRAME-STYLE*. ** SB-DEBUG:PRINT-BACKTRACE and SB-DEBUG:LIST-BACKTRACE are available as forwards-compatible replacements for SB-DEBUG:BACKTRACE and SB-DEBUG:BACKTRACE-AS-LIST. ** SB-DEBUG:*SHOW-ENTRY-POINT-DETAILS** has been deprecated, as the same information is available in less intrusive form as frame annotations. * enhancement: SB-POSIX now provides MAP-ANON. * enhancement: test-suite results are colorized, failures in red, unexpected success in green. Works on Windows and on terminals with ANSI escape code support. Can be disabled with --no-color. * optimization: SB-CONCURRENCY:QUEUE implementation is more efficient. (thanks to James M. Lawrence) * bug fix: no more unused variable style warnings from RESTART-CASE macroexpansion (lp#1113859) * bug fix: no more unused variable style warnings when loading sb-bsd-sockets.asd (lp#1114681) * bug fix: deleting a package removes it from implementation-package lists of other packages. * bug fix: SB-SPROF:WITH-PROFILING is now usable in the Slime REPL on Darwin. This does not fix the occasional "interrupt already pending" issue, though. * bug fix: (setf (documentation 'x 'function)) and (setf (documentation #'x t)) set documentation in different places. (regression since 1.0.43.63) * bug fix: build on newer glibc. (lp#1095036) -- Christoph Egger Fri, 29 Mar 2013 22:50:47 +0100 sbcl (2:1.1.4-1) experimental; urgency=low * New upstream release * optimization: LOOP expressions using "of-type character" have slightly more efficient expansions. * bug fix: very long (or infinite) constant lists in DOLIST do not result in very long compile times or heap exhaustion anymore. (lp#1095488) * bug fix: `#3(1) is read as #(1 1 1), not as #(1). (lp#1095918) * bug fix: adjust-array ignored :initial-element for simple-vectors. (lp#1096359) * bug fix: optimizations to MAKE-INSTANCE with literal list initargs no longer cause infinite loops (on circular data) or violate eqlity constraints. (lp#1099708) * bug fix: FIRST was not being open coded. (regression from 1.1.0) -- Christoph Egger Wed, 30 Jan 2013 13:30:43 -0800 sbcl (2:1.1.3-1) experimental; urgency=low * New upstream release changes in sbcl-1.1.3 relative to sbcl-1.1.2: * enhancement: warnings about bad locale settings, LANG, LC_CTYPE, etc. (lp#727625) * enhancement: support for C-c to interrupt the foreground thread on Windows. (Thanks to Anton Kovalenko.) * enhancement: STDCALL alien callbacks. (Thanks to Anton Kovalenko.) * enhancement: Safepoint builds on POSIX platforms can now optionally be built without pseudo-atomic sequences and their run-time overhead. * enhancement: Threads created outside of Lisp can enter Lisp through alien callbacks and appear as Lisp threads for the duration of that function invocation. On safepoint builds only. * enhancement: Miscellaneous improvements to namestrings and underlying calls to OS functions for file system access on Windows. (Thanks to Anton Kovalenko.) * enhancement: The MSI installer support for Windows now uses Windows Installer XML at least version 3.5 and includes various usability improvements. (Thanks to Dmitry Kalyanov and Anton Kovalenko.) * enhancement: The sb-bsd-sockets contrib now supports non-blocking-mode on Windows. (Thanks to Anton Kovalenko.) * enhancement: The Windows backend now supports the x86-64 platform. (Thanks to Anton Kovalenko.) * bug fix: fasls are now once again directly executable (on platforms supporting shebang lines, with a suitably-installed sbcl). * bug fix: make.sh --help no longer runs clean.sh. (lp#937001) * bug fix: Fix CAS access to slots of direct instances of structure classes in the presence of subclasses sharing the same conc-name. * bug fix: Logical pathname namestrings on Windows have been changed to be lower-case, to minimize differences between POSIX and Windows. -- Christoph Egger Tue, 01 Jan 2013 19:43:22 -0800 sbcl (2:1.1.2-1) experimental; urgency=low * New upstream release: changes in sbcl-1.1.2 relative to sbcl-1.1.1: * notice: System requirements for SBCL on Microsoft Windows: Windows NT 5.1 or newer (Windows XP, Server 2003) is required. Support for Windows 2000 (NT 5.0) is no longer being maintained. * notice: Starting with this version, SBCL on Windows no longer supports building with disabled thread support. * enhancement: frlocks have been added to SB-CONCURRENCY contrib module. * enhancement: New feature sb-dynamic-core allows the runtime to be rebuilt or relocated without requiring changes to the core file on all linkage table platforms. Required on Windows. (Thanks to Anton Kovalenko.) * enhancement: Console I/O streams use UCS-2. (Thanks to Anton Kovalenko.) * enhancement: I/O on Windows unnamed pipes is interruptible asynchronously using interrupt-thread, timers when running on Windows NT version 6.1 or newer (Windows 7, Server 2008 R2). (Thanks to Anton Kovalenko.) * enhancement: Support for the experimental safepoint-based stop-the-world protocol on the PowerPC platform. * bug fix: Non-blocking reads from the Windows console were not necessarily non-blocking. Thanks to Anton Kovalenko. (lp#308923) * bug fix: stability of threads on Windows has been improved upon through an updated stop-the-world protocol (thanks to Anton Kovalenko). * Drop 4th version digit -- Christoph Egger Fri, 07 Dec 2012 15:04:10 -0800 sbcl (2:1.1.1.0-3) experimental; urgency=low * Point SRC pathname translator to the install location of sbcl-source and not the random directory sbcl happens to be built in (Closes: #652372) -- Christoph Egger Fri, 07 Dec 2012 14:09:34 -0800 sbcl (2:1.1.1.0-2) experimental; urgency=low * Fix features for non-arch-all builds (Closes: #693682) -- Christoph Egger Wed, 28 Nov 2012 18:53:38 -0800 sbcl (2:1.1.1.0-1) experimental; urgency=low * New upstream release * changes in sbcl-1.1.1 relative to sbcl-1.1.0: * enhancement: WITH-COMPILATION-UNIT no longer grabs the world-lock. (COMPILE and COMPILE-FILE still do.) * optimization: the SPARC backend now supports the precise generational (GENCGC) garbage collection. Enabled by default on Solaris/SPARC and Linux/SPARC. Thanks to Raymond Toy (via CMUCL). * enhancement: add experimental support for the SB-THREAD feature and the timer facility on Windows. Thanks to Dmitry Kalyanov and Anton Kovalenko. Threads are enabled by default, and this version of SBCL is considered to be the last and final release to officially support building with threads disabled. * optimization: The compiler no longer rotates loops in some cases where this transformation actually lead to worse code being generated. * bug fix: SB-CLTL2:MACROEXPAND-ALL correctly handles shadowing of symbol-macros by lexical bindings. * bug fix: stack allocation was prevented by high DEBUG declaration in several cases. * bug fix: SB-EXT:GC-LOGFILE signaled an error when no logfile was set. (thanks to SANO Masatoshi) * bug fix: PARSE-NATIVE-NAMESTRING performed non-native parsing when :JUNK-ALLOWED was true. * bug fix: type derivation inferred overly conservative types for unions of array types. (lp#1050768) * changes in sbcl-1.1.0 relative to sbcl-1.0.58: * enhancement: New variable, sb-ext:*disassemble-annotate* for controlling source annotation of DISASSEMBLE output. Defaults to T. * enhancement: TIMEOUT arguments added to WITH-MUTEX and WITH-RECURSIVE-LOCK, and WAIT-P argument added to WITH-RECURSIVE-LOCK. * enhancement: SB-EXT:ATOMIC-PUSH and SB-EXT:ATOMIC-POP allow atomic operations on list heads. * enhancement: Optional features (not enabled by default) allow the use of signals for inter-thread synchronization to be reduced on certain supported platforms (currently Linux, Solaris, and FreeBSD on x86 and x86-64). Set (and :sb-thread :sb-safepoint :sb-thruption :sb-wtimer) to test these experimental features. Known remaining bugs include minor thread safety issues, less timely freeing of memory by GC, and certain (not yet optimally low) runtime overhead. Thanks to Anton Kovalenko. * optimization: CL:SORT and CL:STABLE-SORT of lists are faster and use fewer comparisons, particularly on almost-sorted inputs. * bug fix: Reading floats with large exponents no longer takes too much time before reporting that the exponent is too large. * bug fix: SB-BSD-SOCKETS:SOCKET-RECEIVE with a UDP socket now works correctly when the received datagram is larger than the provided buffer. (lp#1023438, thanks to Robert Uhl) * bug fix: SB-EXT:GET-CAS-EXPANSION returned a bogus read-form when given a SYMBOL-VALUE form with a constant symbol argument. * bug fix: SB-EXT:GET-CAS-EXPANSION signaled an error when a macro expanding into a DEFCAS defined place was used as the place. * bug fix: FIND and POSITION signaled a type-error when non-bits where looked for from bit-vectors. * bug fix: a race condition around thread creation could (in SBCL 1.0.57) lead to internal errors or crashes (lp#1058799). * documentation: a section on random number generation has been added to the manual. (lp#656839) -- Christoph Egger Fri, 16 Nov 2012 19:10:02 -0800 sbcl (2:1.0.58.0-1) experimental; urgency=low * changes in sbcl-1.0.58 relative to sbcl-1.0.57: * enhancement: implicit generic function warnings now specify the package in which the new generic function is being created. * enhancement: SB-EXT:ATOMIC-UPDATE makes it easy to perform non-destructive updates of CAS-able places (similar to Clojure's swap!). * enhancement: run-program no longer decodes and re-encodes environment when :environment argument is not provided. (lp#985904) * enhancement: errors during compiler-macro expansion no longer cause runtime errors, only a compile-time warning, otherwise behaving as if the compiler macro had declined to expand. * optimization: On x86-64, code alignment of block headers is done with multi-byte NOPs now instead of repetitions of the single-byte NOP. * optimization: MAP-INTO is substantially faster when the target sequence is of unknown type; mapping into lists is no longer O(N^2). (thanks to James M. Lawrence) * optimization: the compiler no longer heap-conses to check exits in cases where the exit function is dynamic extent, or when it can prove the exit function cannot escape. * optimization: SB-SEQUENCE:DOSEQUENCE is faster on vectors of unknown element type, and vectors that aren't SIMPLE-ARRAYs. * optimization: CL:SORT and CL:STABLE-SORT are more efficient in execution speed (around 1/3 the time in some cases), and a little better in terms of comparison calls. (Thanks to Takeru Ohta) * bug fix: On SPARC, a limitation on the number of code constants emittable by the compiler has been lifted, allowing certain long functions to compiled and assembled which had previously been unsupported; fixes cl-bench on this ISA (lp#1008996). * bug fix: potential for infinite recursion during compilation of CLOS slot typechecks when dependency graph had loops. (lp#1001799) * bug fix: error forms reported with some program-errors were not escaped properly. * bug fix: functions from EVAL are now on more equal footing with functions from COMPILE. (lp#1000783, lp#851170, lp#922408) * bug fix: ENSURE-GENERIC-METHOD-COMBINATION accepts method combination objects as its :METHOD-COMBINATION argument, not just lists designating method combinations. (lp#936513) * bug fix: run-program no longer unconditionally uses /tmp/ for temporary files. (lp#968837). * bug fix: restore build on solaris/sparc. (lp#1008506) * bug fix: an issue with LDB in the PowerPC backend has been resolved; this fixes an issue found with cl-postgres (thanks to Tomas Hlavaty). * bug fix: compiler-macro lambda-lists specifying non-keyword symbols as keyword arguments no longer accidentally match unevaluated symbols against them. * bug fix: FORMAT used to loop infinitely in some cases when a COLINC parameter was zero, now it signals an error. (lp#905817, fixed since 1.0.56.19) * bug fix: run-program with :pty t no longer makes the pty as the process's controling terminal. * Add back PowerPC Support (Closes: XXX) * Add some rules aiding bootstrapping -- Christoph Egger Tue, 07 Aug 2012 23:45:09 +0200 sbcl (2:1.0.57.0-2) unstable; urgency=low * Depend on netbase as it provides /etc/protocols -- Christoph Egger Sat, 16 Jun 2012 00:00:53 +0200 sbcl (2:1.0.57.0-1) unstable; urgency=low * New upstream version -- Christoph Egger Tue, 22 May 2012 19:26:00 +0200 sbcl (2:1.0.56.0-1) unstable; urgency=low * New upstream release * bug fix: fix copy-structure. When copying from stack to heap, garbage could end up in the heap making GC unhappy. (Thanks to James Knight, lp#911027) * enhancements * SBCL can now be built using Clang. * ASDF has been updated 2.20. * bug fix: compiler errors when weakening hairy integer types. (lp#913232) * bug fix: don't complain about a too-hairy lexical environment for inlining when the function has never been requested for inlining. (lp#963530) -- Christoph Egger Sat, 14 Apr 2012 13:58:18 +0200 sbcl (2:1.0.55.0-1) unstable; urgency=low * New upstream release -- Christoph Egger Mon, 09 Jan 2012 21:50:33 +0100 sbcl (2:1.0.54.0-1) unstable; urgency=low * New upstream release -- Christoph Egger Tue, 06 Dec 2011 21:50:24 +0100 sbcl (2:1.0.53.0-1) unstable; urgency=low * New upstream release -- Christoph Egger Mon, 07 Nov 2011 01:34:47 +0100 sbcl (2:1.0.52.0-2) unstable; urgency=low * Enable gzip compression * Do not recreate version file -- Christoph Egger Sun, 30 Oct 2011 14:06:44 +0100 sbcl (2:1.0.52.0-1) unstable; urgency=low * New upstream release -- Christoph Egger Mon, 10 Oct 2011 21:29:28 +0200 sbcl (2:1.0.51.0-1) unstable; urgency=low * New upstream release -- Christoph Egger Mon, 22 Aug 2011 16:02:00 +0200 sbcl (1:1.0.50.0-1) unstable; urgency=low * New upstream release -- Christoph Egger Tue, 12 Jul 2011 22:47:18 +0200 sbcl (1:1.0.49.0-1) unstable; urgency=low * New upstream release * Update Policy version from .1 to .2 -- no changes -- Christoph Egger Mon, 06 Jun 2011 12:13:37 +0200 sbcl (1:1.0.48.0-2) unstable; urgency=low * Fix build error on kfreebsd-amd64 due to changed signal handling in glibc -- previously we got a SIGBUS now we get a SIGSEGV -- Christoph Egger Mon, 16 May 2011 00:33:29 +0200 sbcl (1:1.0.48.0-1) unstable; urgency=low * New upstream release * Explain missing asdf (Closes: ##623633) * Fix missing '/' in doc-base registration -- Christoph Egger Wed, 11 May 2011 00:05:37 +0200 sbcl (1:1.0.47.0-2) unstable; urgency=low * Fix core file location, dh-lisp update (Closes: #620011) -- Christoph Egger Tue, 29 Mar 2011 20:18:38 +0200 sbcl (1:1.0.47.0-1) unstable; urgency=low * New upstream Version -- Christoph Egger Mon, 28 Mar 2011 19:13:40 +0200 sbcl (1:1.0.46.0-2) unstable; urgency=low * Fix sbcl-doc * Install sbcl.html into html subdirectory * Change link in html/index.html to point to the new file, not to the directory removed in 1.0.39-2 (Closes: #589022) * add vcs browser field -- Christoph Egger Wed, 23 Feb 2011 19:40:45 +0100 sbcl (1:1.0.46.0-1) unstable; urgency=low * New upstream version -- Christoph Egger Mon, 21 Feb 2011 16:36:44 +0100 sbcl (1:1.0.45.0-1) experimental; urgency=low * New Upstream Version * Rework install target * Add kfreebsd support * Move to format 3.0 (quilt) * Runn the tests -- Christoph Egger Wed, 29 Dec 2010 15:21:28 +0100 sbcl (1:1.0.43.0-1) experimental; urgency=low * New upstream Version -- Christoph Egger Fri, 01 Oct 2010 18:05:45 +0200 sbcl (1:1.0.42.0-1) experimental; urgency=low * Import new upstream. Major changes: * build changes * Cross-compilation host is now specified to make.sh using command-line argument --xc-host= instead of a positional argument. (thanks to Daniel Herring) * Install location can be specified to make.sh using command-line argument --prefix=. (thanks to Daniel Herring) * optimization: The default implementation of COMPUTE-DISCRIMINATING-FUNCTION does much less wasted work. * enhancement: Explicit memory barrier operations are now available for use by multithreaded code. See documentation for details. * enhancement: Experimental support for threading on Linux/PPC. * bug fix: RENAME-PACKAGE returns the package. (Thanks to Eric Marsden) * bug fix: EXPT signals an error if first argument is a zero and second argument is a floating point zero. (thanks to Roman Marynchak) * bug fix: DEFTYPE signals an error for non-list lambda-lists. (thanks to Roman Marynchak) * bug fix: make ASDF-INSTALL compatible with the now-included ASDF2. (reported by Phil Hargett; patch from Jim Wise) * optimization: validity of observed keyword initargs to MAKE-INSTANCE is cached, leading to many fewer expensive calls to COMPUTE-APPLICABLE-METHODS. * optimization: in the (unoptimized) general method for MAKE-INSTANCE on a CLASS argument, search for and call an appropriate optimized ctor function if it exists. * bug fix: WRITE always returns the correct value. * Bump standards version 3.9.0 → 3.9.1, no changes -- Christoph Egger Wed, 15 Sep 2010 11:59:35 +0200 sbcl (1:1.0.40.0-2) unstable; urgency=low * Breaking too old cl-asdf (Closes: #573408) * Line-Break longer relationship lines -- Christoph Egger Sat, 17 Jul 2010 11:22:25 +0200 sbcl (1:1.0.40.0-1) unstable; urgency=low * Import new upstream. Major changes: * bug fix: readdir now works on :inode64 darwin builds * bug fix: Name conflicts between symbols passed as arguments to a single call to IMPORT no longer add multiple symbols with the same name to the package (detectable via DO-SYMBOLS). * bug fix: support building without the dlshim on darwin x86 and x86-64. * bug fix: TRACE :ENCAPSULATE NIL now works on ppc/linux. * target experimental for now -- Christoph Egger Sun, 04 Jul 2010 00:13:31 +0200 sbcl (1:1.0.39.0-2) unstable; urgency=medium * Build one monolitic html file -- avoiding too long file names (Closes: #587440) * Upgrade to standards version 3.9.0 * Replace Confilcts: with Breaks where appropriate * urgency=medium due to rc bug fix -- Christoph Egger Thu, 01 Jul 2010 19:12:33 +0200 sbcl (1:1.0.39.0-1) unstable; urgency=low * Import new upstream. Major changes: + bug fix: Backtrace from undefined function on x86 and x86-64 now show the calling frame. + bug fix: linkage-table entries on PPC now no longer overflow their space allocation (potentially causing crashes if they are written out of order). + bug fix: Scrub control stack after scavenging in gencgc on non-x86oid platforms, preventing the GC from seeing stale pointers on the control stack in subsequent GCs (which would, and does, break invariants). + bug fix: 32-bit unicode external formats now work on big-endian systems. + bug fix: Literal characters with code points greater than about 32767 now work on PPC UNICODE builds. + bug fix: Any noise left by SSE operations (sqrt and conversions) in the high order bits are explicitly cleared out. In some contrived situations, this could lead to wrong results in mixed real/complex float arithmetic. + bug fix: Fix function/macro redefinition warnings when building with clisp. (lp#576787, thanks to Josh Elsasser) + new platform: experimental support for ppc/openbsd (thanks to Josh Elsasser). + bug fix: Floating-point traps now work on ppc/linux. + incompatible change: Thread names are now restricted to SIMPLE-STRINGs like for any other thread-related datastructure, MUTEX, etc. (lp#547095) + deprecation: the SB-QUEUE contrib was merged into the SB-CONCURRENCY contrib module. New code should depend on SB-CONCURRENCY, not SB-QUEUE. + deprecation: SB-THEAD:GET-MUTEX was deprecated in favor of SB-THREAD:GRAB-MUTEX. + new contributed module: SB-CONCURRENCY is a new contrib; it's supposed to contain additional data structures and tools for concurrent programming; at the moment it contains a lock-free queue, and a lock-free mailbox implementation. + new feature: added SB-THREAD:GRAB-MUTEX; it's like the now deprecated GET-MUTEX but takes &key rather than &optional parameters. Also added :TIMEOUT argument to GRAB-MUTEX on non-sb-lutex platforms like Linux and BSD. + new feature: added SB-THREAD:TRY-SEMAPHORE, a non-blocking variant of SB-THREAD:WAIT-ON-SEMAPHORE. + new feature: SB-EXT:ATOMIC-DECF has been added as a companion to SB-EXT:ATOMIC-INCF. + new feature: a CANCEL-DEADLINE is associated with DEADLINE-TIMEOUT conditions to defer the deadline for forever. + enhancement: *STANDARD-OUTPUT*, *STANDARD-INPUT*, and *ERROR-OUTPUT* are now bivalent. + enhancement: errors from NO-APPLICABLE-METHOD and NO-PRIMARY-METHOD now have a RETRY restart available to retry the generic function call. + enhancement: SB-BSD-SOCKET improvements + sockets and socket streams now have a more informative printed representation based on the corresponding SOCKET-NAME and SOCKET-PEERNAME. + SOCKET-MAKE-STREAM once more supports the :AUTO-CLOSE option. (lp#540413) + SOCKET-CLOSE now accepts :ABORT argument, which is passed on to CL:CLOSE when appropriate, and no longer disassociates the stream from the socket if close failed. (lp#543951) + improvements to the instrumenting profiler + new feature: report per-function GC overhead. (thanks to John Fremlin) + optimization: counters no longer use locks for the overflow mode. + bug fix: whenever a profiling counter wrapped into overflow mode, it incurred an off-by-one miscount. + enhancement: improved MAKE-HASH-TABLE documentation (lp#543473) + enhancement: improved DEFMETHOD pretty-printing. + enhancement: perform range reduction when arguments are too large for x87's transcendentals (instead of returning 0). (lp#327192) + enhancement: eliminate some spurious TYPE-WARNINGs. Should help with some of CL-PPCRE's macros. (lp#570079) + enhancement: our machine code is slightly less hostile to valgrind on x86-64. + enhancement: up-to-date versions of NetBSD-current are supported. (Thanks to Robert Swindells and Aleksej Saushev) + bug fix: correct restart text for the continuable error in MAKE-PACKAGE. + bug fix: a rare case of startup-time page table corruption. + bug fix: a semaphore with multiple waiters and some of them unwinding due to timeouts could be left in an inconsistent state. + bug fix: fix typo in "Reporting Bugs" section of the manual (lp#520366) + bug fix: misoptimization of multiplication by one in (SB-C::FLOAT-ACCURACY 0) policies. + bug fix: miscounts in SB-PROFILE. + bug fix: Fix lost wakeup bug between SB-THREAD:CONDITION-WAIT and CONDITION-NOTIFY on Linux. See threads "lost wakeup in condition-wait / condition-notify" (Feb 2010) and "Condition-Wait, Deadline handler, waking up itself" (March 2010) for further details. + bug fix: allow forward FIND and POSITION on lists to elide checking :END against length of the list if the element is found before the specified END is reached. (thanks to Alec Berryman, lp#554385) + bug fix: errors signalled during package graph modification no longer block FIND-SYMBOL and FIND-PACKAGE in other threads. (lp#511072) + bug fix: SB-POSIX build was broken when SBCL was compiled without the :SB-DOC feature. (lp#552564) + bug fix: SB-INTROSPECT build issues on GENGC/PPC. (lp#490490) + bug fix: more robust runtime executable path detection. (lp#375549) + bug fix: GCD always returns positive values. (lp#413680) + bug fix: Converting division to multiplication by reciprocal handles denormals. + bug fix: We were too eager in eliding range reduction tests on x87. The maximal magnitude is 2^63, not 2^64. + bug fix: Transforms for TRUNCATE don't die when the result is completely ignored anymore. + bug fix: Maybe restore buildability on Alpha. + bug fix: READ-BYTE isn't inline anymore, fixing weird streams failures. (lp#569404) + bug fix: RANDOM-STATE can be printed readably again. + bug fix: Unreadable objects were sometimes printed like #<\nFoo>. + bug fix: Using EQL with non-constant values of constant type (e.g. EQL types) could result in type mismatches during compilation. + enhancement: Backtrace from THROW to uncaught tag on x86oids now shows stack frame thrown from. + enhancement: WITH-COMPILATION-UNIT :POLICY allows restricting changes to compiler optimization qualities inside dynamic extent of its body. + enhancement: LOAD-LOGICAL-PATHNAME-TRANSLATIONS can be used to load translations from SYS:SITE;.TRANSLATIONS.NEWEST (thanks to Michael Weber) + optimization: SLOT-VALUE and (SETF SLOT-VALUE) take advantage of constraint propgation, allowing better compilation eg. when used to access structures with WITH-SLOTS. (lp#520366) + optimization: the compiler is now more aware of the type of the underlying storage vector for multidimensional simple arrays resulting in better code for accessing such arrays. + optimization: passing NIL as the environment argument to TYPEP no longer inhibits optimizing it. (lp#309788) + optimization: more efficient register usage when handling single-float arguments on x86-64. (thanks to Lutz Euler) + optimization: ADJUST-ARRAY and STABLE-SORT on vectors no longer use pre-allocated temporary vectors. (lp#496249) + bug fix: Fix compiler error involving MAKE-ARRAY and IF forms in :INITIAL-CONTENTS. (lp#523612) + bug fix: FUNCTION-LAMBDA-EXPRESSION lost declarations from interpreted functions. (lp#524707) + bug fix: bogus style warnings from certain (SETF SLOT-VALUE) and WITH-SLOTS usages during compilation. + bug fix: SB-C::CLASS-INFO now prints correctly. (lp#514762) + enhancement: Can now build with ud2 instead of int3 as trap instruction on all x86oid platforms with :UD2-BREAKPOINTS target feature. + bug fix: Breakpoints now work when using ud2 instead of int3 as trap instruction (tested on x86oid linux with ud2-breakpoints). + bug fix: slam.sh now works on win32. + bug fix: better differences of numeric types. (lp#309124) + bug fix: arrays declared intersection and union types can have their upgraded element type derived. (lp#316078) + bug fix: SB-SPROF allocation profiling for all threads failed to profile threads started during profiling. (lp#472499) + bug fix: SB-INTROSPECT test failure when building without SB-EVAL feature. (lp#535658) + bug fix: SB-CLTL2:DECLARATION-INFORMATION did not take SB-EXT:RESTRICT-COMPILER-POLICY into account. (lp#313337) + bug fix: Comma inside a backquoted array or structure resulted in nonsense values instead of signaling an error. (lp#309093) + bug fix: Spurious unused variable warning in a DEFSTRUCT edge case. (lp#528807) + bug fix: More consistent warnings and notes for ignored DYNAMIC-EXTENT declarations (lp#497321) + bug fix: FIND and POSITION on lists did not check sequence bounds properly and failed to detect circular lists (lp#452008) + bug fix: leakage from ~/.asdf-install into the ASDf-INSTALL contrib build (lp#538974) + bug fix: LOOP OF-TYPE VECTOR compile-time error. (lp#540186) + bug fix: SIGNAL SB-SYS:INTERACTIVE-INTERRUPT before entering the debugger due to it, so that handlers can run. + bug fix: reparsing undefined types if they have become defined since parsing. (lp#309128) + bug fix: missing &REST type in a proclamation for a function with both &REST and &KEY in lambda-list caused miscompilation (lp#458354) + bug fix: WHO-CALLS information for source-transformed and compiler-macro expanded calls (lp#542174) + bug fix: more accurate WHO-MACROEXPANDS information; point into rather than just at toplevel form. + new feature: SB-EXT:TYPEXPAND-1, SB-EXT:TYPEXPAND, and SB-EXT:TYPEXPAND-ALL behave exactly like their MACROEXPAND counterparts but work on type specifiers. + new feature: SB-EXT:DEFINED-TYPE-NAME-P returns whether a symbol is known to name a type specifier. + new feature: SB-EXT:VALID-TYPE-SPECIFIER-P returns whether a given type specifier is valid where "valid" basically means "would be accepted as second argument of TYPEP". + new feature: SB-INTROSPECT:FUNCTION-TYPE takes a function-designator and returns the function's declared, or derived FTYPE. + new feature: SB-POSIX now supports accessing the d_ino member of dirent structures. (Thanks to Philipp Marek and Pierre THEIRRY) + new feature: The function SB-EXT:SEED-RANDOM-STATE has been added to provide for seeding a RANDOM-STATE object with user-provided data or from the operating system's PRNG. Also, (MAKE-RANDOM-STATE T) will attempt to initialize the returned state from the operating system's PRNG where possible. (Thanks to Fare Rideau; launchpad bug lp#310116) + bug fix: Fix SB-SIMPLE-STREAMS:READ-VECTOR to correctly set the FILE-POSITION of the stream being read from. (launchpad bug lp#491087) + bug fix: Fix grammar and style issues for the docstrings of printer-related variables and functions. (Thanks to mon_key; launchpad bug lp#518696) + bug fix: Fix compilation on chenygc platforms. Thanks to Larry Valkama and Bruce O'Neel. + bug fix: SB-THREAD:CONDITION-WAIT sometimes signaled a deadline twice in a row even though a handler defered the deadline long into the future. (lp#512914) + bug fix: A deadline handler was run without interrupts enabled for a deadline signaled within SB-THREAD:CONDITION-WAIT. That could result in infinitely spinning, non-killable threads. + bug fix: Backtrace from internal-errors on x86-64 os x was truncated before reaching the erring stack frame. + bug fix: Fix type derivation for EXPT when raising a fixnum to a real power. (launchpad bug lp#525949) + bug fix: Fix SB-EXT:GENERATION-* accessors for generations > 0 on GENCGC platforms. (launchpad bug lp#529014) + bug fix: More robust checks for invalid DEFMETHOD argument specializers. (launchpad bug lp#525916) + bug fix: Fix building on Darwin when sysctl is not in the user's PATH. (Thanks to Robert Goldman) + optimization: ROUND with a single single-float or double-float argument is properly inlined when possible. + optimization: Slightly better code is generated for integer<->float conversions and for single-float<->double-float conversions on x86-64. + optimization: SB-ROTATE-BYTE:ROTATE-BYTE now generates more efficient code for 32-bit and 64-bit rotations on x86-64. + bug fix: The install script changes the ownership of directories as well as files for contrib modules using asdf. (thanks to Eugene Ossintsev; launchpad bug lp#508485) + bug fix: TRUNCATE with a single single-float or double-float argument is properly inlined when possible. (launchpad bug lp#489388) + bug fix: Passing a rotation count of zero to SB-ROTATE-BYTE:ROTATE-BYTE no longer causes a compiler error on x86 and ppc. + bug fix: GET-MACRO-CHARACTER bogusly computed its second return value always relative to *READTABLE* rather than the passed argument. * Add myself to uploaders * Update standards version (no change) * Upgrade to debian source 1.0 -- Christoph Egger Sat, 26 Jun 2010 20:19:08 +0200 sbcl (1:1.0.34.0-1.1) unstable; urgency=low * Non-maintainer upload. * Add texlive-font-utils to Build-Depends: (Closes: #562305) - Thanks to Ilya Barygin and Jari Aalto. -- tony mancill Thu, 06 May 2010 21:27:45 -0700 sbcl (1:1.0.34.0-1) unstable; urgency=low * Import new upstream. Major changes: + minor incompatible change: threading support is now enabled by default on x86[-64] Linux. + enhancement: SB-INTROSPECT:DEFTYPE-LAMBDA-LIST now also works on most builtin types. + enhancement: Errors during compile-time-too processing (i.e. EVAL-WHEN) are now caught and reported just like errors during macroexpansion. + enhancement: SB-POSIX now provides access to tcdrain(), tcflow(), tcflush(), tcgetsid(), and tcsendbreak(). (thanks to Jerry James) + enhancement: ASDF systems can now depends on SB-QUEUE. + fixes and improvements related to Unicode and external formats: +* bug fix: error handling and restart usage in the ucs-2 external format has been improved. +* there is now an implementation of the ucs-4 external format. +* the utf-16 and utf-32 external formats are supported. + bug fix: SB-POSIX wrapper for putenv no longer tries to put lisp strings in the environment. setenv() and unsetenv() are also provided. (reported by Fare Rideau; launchpad bug lp#460455) + bug fix: LOAD of both .fasl and .FASL type files now forces fasl-style loading. This ensures sensible errors for .FASL files from other implementations on case-insensitive filesystems. (reported by Willem Broekema; launchpad bug lp#489417) + bug fix: #p"\\\\" can now be read without error on Win32. (reported by Willem Broekema; launchpad bug lp#489698). + bug fix: some minor code rearrangements to reenable warning-free building from CMUCL (reported by xme@gmx.net; launchpad bug lp#491104) + bug fix: PRINT-OBJECT for clos instances respects the right margin when pretty printing + bug fix: FIND-PACKAGE & DEFPACKAGE were not thread safe. (reported by Attila Lendvai) + optimization: faster FIND and POSITION on strings of unknown element type in high SPEED policies. (thanks to Karol Swietlicki) + optimization: faster CONCATENATE 'STRING in low SPEED policies (reported by David Vázquez) + improvement: better error signalling for bogus parameter specializer names in DEFMETHOD forms (reported by Pluijzer) + bug fix: DELETE-FILE once again works on logical pathnames (regression since 1.0.30.49) + bug fix: LOGICAL-PATHNAME signals a TYPE-ERROR if pathspec is specified incorrectly. + bug fix: redefinition of a class via DEFCLASS without :DEFAULT-INITARGS removes previous default initargs (reported by Lars Rune Nøstdal and Samium Gromoff) + bug fix: correct WHO-CALLS information for inlined lambdas with complex lambda-lists. (reported by Peter Seibel) + bug fix: SAVE-LISP-AND-DIE option :SAVE-RUNTIME-OPTIONS did not work correctly when starting from an executable core without saved runtime options (reported by Faré Rideau, thanks to Zach Beane) + bug fix: (SETF SLOT-VALUE) signalled a warning which should have been an optimization note instead. (reported by Martin Cracauer) + bug fix: WITH-SLOTS did not work with THE forms. (thanks to David Tolpin) + bug fix: Have RUN-PROGRAM with :INPUT T only run the subprocess in a new process group if it doesn't need to share stdin with the sbcl process. (thanks to Leslie Polzer) + bug fix: SATISFIES could be misoptimized to refer to a local function. (reported by Stanislaw Halik) + improvement: support O_LARGEFILE access to files larger than 2GB on x86-64/linux. (thanks to Daniel Janus; launchpad bug #453080) + new feature: SB-INTROSPECT:WHO-SPECIALIZES-DIRECTLY to get a list of definitions for methods specializing on the passed class itself. + new feature: SB-INTROSPECT:WHO-SPECIALIZES-GENERALLY to get a list of definitions for methods specializing on the passed class itself, or on subclasses of it. + new build flag: :sb-xref-for-internals; SBCL will collect xref information about itself during the build (e.g. for M-? in Slime), if this flag is enabled in customize-target-features.lisp. This will increase the core size by about 5-6mb, though, so it's mostly interesting to SBCL developers. + new feature: various GENCGC tuning parameters have been experimentally documented and exported from SB-EXT. See documentation for details. + fixes and improvements related to Unicode and external formats: ++ the Unicode character database has been upgraded to the Unicode 5.2 standard, giving names and properties to a number of new characters, and providing a few extra characters with case transformations. ++ improvement: restarts for providing replacement input/output on coding errors for fd-stream external formats. ++ improvement: where : is a keyword corresponding to an external format the system supports, it is now possible to specify (: :replacement ) as an external format which will automatically substitute on encoding or decoding errors for streams and for STRING-TO-OCTETS and its inverse. (launchpad bug #317072) ++ improvement: the file streams underlying the standard streams (such as +STANDARD-INPUT*, *TERMINAL-IO*) are opened with an external format which uses the replacement mechanism to handle encoding errors, preventing various infinite error chains and unrecoverable I/O confusion. ++ minor incompatible change: the utf-8 external format now correctly refuses to encode Lisp characters in the surrogate range (char-codes between #xd800 and #xdfff). ++ fix a typo preventing conversion of strings into octet vectors in the latin-2 encoding. (reported by Attila Lendvai; launchpad bug #471689) ++ fix a bug in the octet multibyte handling of decoding errors and the USE-VALUE restart. (launchpad bug #314939) ++ fix the bug underlying the expected failure in the FORCE-END-OF-FILE restart on fd-stream decoding errors. ++ fix a bug in the ATTEMPT-RESYNC fd-stream decoding restart when the error is near the end of file. ++ fix a double-error case in unibyte octet conversions, when the first use of USE-VALUE is ignored. ++ fix bugs in handling of undefined code points in unibyte encodings. ++ fix LISTEN (and consequent hangs in READ-CHAR-NO-HANG) on bivalent streams after an UNREAD-CHAR. + enhancement: SB-INTROSPECT:ALLOCATION-INFORMATION also reports if the object is allocated in a boxed region of dynamic space. + enhancement: SB-POSIX:FORK now signals an error if an attempt to fork with multiple Lisp threads running is made, instead of going ahead with unpredictable consequences. (reported by Leslie Polzer) + bug fix: uses of slot accessors on specialized method parameters within the bodies of SLOT-VALUE-USING-CLASS methods no longer triggers a type error while finalizing the class. This fix may cause classes with slot accessors to be finalized later than previously. (reported by Lars Rune Nøstdal; launchpad bug #473699) + bug fix: restore buildability on the MIPS platform. (regression from 1.0.30.38, reported by Samium Gromoff) + bug fix: inspecting closures is less likely to fail with a type error. + bug fix: no timer starvation when setting the system clock back. (launchpad bug #460283) + bug fix: WITH-STANDARD-IO-SYNTAX now binds *PRINT-PPRINT-DISPATCH* to the standard pprint dispatch table as specified by CLHS. + bug fix: give CLISP a hint about a type declaration to enable it to build the cross-compiler without warnings. (thanks to Josh Elasser; launchpad bug #396597) + bug fix: correctly dump literal objects in defaulting forms of arglists. (reported by Attila Lendvai; launchpad bug #310132) + bug fix: distinguish in type specifiers between arrays that might be complex and arrays that are definitely complex. (launchpad bug #309129) + bug fix: SUBTYPEP knows that the SYMBOL type is not SUBTYPEP the KEYWORD type. (reported by Levente Mészáros; launchpad bug #485972) + bug fix: setting the value of a symbol-macro within a method in the presence of type declarations works properly again. (reported by Iban Hatchondo; launchpad bug #485019) * Removed the usage of dh_undocumented * We also dropped the alpha architecture (Closes: #545847) and powerpc (Closes: #517374) * Removed unneeded Section from sbcl-source -- Peter Van Eynde Wed, 30 Dec 2009 22:47:25 +0100 sbcl (1:1.0.31.0-2) unstable; urgency=low * should have changed to lisp section * fixed a typo in src/compiler/alpha/move.lisp should allow to build on alpha again * Drop non-PC architectures due to lack of time. (Closes: #526967) -- Peter Van Eynde Tue, 03 Nov 2009 17:35:26 +0100 sbcl (1:1.0.31.0-1) unstable; urgency=low * New upstream release. Major changes: + improvement: stack allocation is should now be possible in all nested inlining cases: failure to stack allocate when equivalent code is manually open coded is now considered a bug. + improvements related to Unicode: +* the Unicode character database has been upgraded to the Unicode 5.1 standard, giving names and properties to a number of new characters, and providing a few extra characters with case transformations. +* the system now recognizes and produces names for Unicode Hangul syllable characters. +* the EBCDIC-US external-format is now supported for octet operations (as well as for stream operations). + new feature: experimental :EMIT-CFASL parameter to COMPILE-FILE can be used to output toplevel compile-time effects into a separate .CFASL file. + optimization: COERCE to VECTOR, STRING, SIMPLE-STRING and recognizable one-dimenstional subtypes of ARRAY is upto 70% faster when the coercion is actually needed. + optimization: TRUNCATE on known single- and double-floats is upto 25% faster. + optimization: division of floating point numbers by constants uses multiplication by reciprocal when an exact reciprocal exists. + optimization: multiplication of single- and double-floats floats by constant two has been optimized. + optimization: ARRAY-IN-BOUNDS-P is resolved at compile-time when sufficient type information is available. (thanks to Leslie Polzer) + optimization: SLOT-VALUE and (SETF SLOT-VALUE) with constant slot names on known structure objects are as efficient as defstruct generated accessors. + optimization: unused vector creation can now be optimized away. + improvement: ASDF systems can now depends on SB-INTROSPECT. + improvement: a STYLE-WARNING is signalled when a generic function clobbers an earlier FTYPE proclamation. + improvement: the compiler is able to track the effective type of generic function across method addition and removal even in the absence of an explicit DEFGENERIC. + improvement: DESCRIBE now reports on symbols naming undefined but assumed or declared function as well. + improvement: recompilation of systems using SB-GROVEL now works (thanks to Leslie Polzer) + improvements to SB-CLTL2 (thanks to Larry D'Anna): +* functions DECLARATION-INFORMATION, PARSE-MACRO, and ENCLOSE have been documented. +* AUGMENT-ENVIRONMENT and DEFINE-DECLARATION have been implemented. +* DECLARATION-INFORMATION now supports declaration name DECLARATION as well as user defined declaration names. +* VARIABLE-INFORMATION is now aware of alien variables. + improvement: improved address space layout on OpenBSD (thanks to Josh Elsasser) + improvement: pretty-printing of various Lisp forms has been improved (thanks to Tobias Rittweiler) + bug fix: calls to DECODE-FLOAT and INTEGER-DECODE-FLOAT whose value was unused were deleted in safe code. (reported by John Fremlin) + bug fix: a failing AVER compiling certain MAKE-ARRAY forms. (reported by James Wright) + bug fix: some out-of-line array predicates were missing (reported by Stelian Ionescu) + bug fix: a failing AVER in CONVERT-MV-CALL has been fixed. (thanks to Larry D'Anna) + bug fix: a failing AVER in %ALLOCATE-CLOSURES conversion has been fixed (thanks to Larry D'Anna) + bug fix: SLEEP supports times over 100 million seconds on long on OpenBSD as well. (reported by Josh Elsasser) + bug fix: DELETE-FILE on streams no longer closes the stream with :ABORT T, leading to possible attempts to delete the same file twice. See docstring on DELETE-FILE for details. (reported by John Fremlin) + bug fix: DELETE-FILE once again deletes the file named by the pathname designator argument, rather than its truename. (reported by Luis Oliveira) + bug fix: the low-level debugger had 32-bit assumptions and was missing information about some array types. (thanks to Luis Oliveira) + bug fix: moderately complex combinations of inline expansions could be miscompiled if the result was declared to be dynamic extent. + bug fix: on x86, SAP-REF of sizes greater than 8 bits with offsets of the form (+ ) were miscompiled under certain circumstances. + bug fix: in some cases no compiler note about failure to stack allocate was emitted, even if the objects were in fact heap allocated. + bug fix: minor violation of "otherwise inaccessible" rule for stack allocation could cause objects users might reasonably expect to be heap allocated to be stack allocated. + bug fix: DESCRIBE signalled an error for generic functions under certain circumstances. (thanks to Leslie Polzer) + bug fix: Fixed spelling of an error message. + minor incompatible change: SB-THREAD:JOIN-THREAD-ERROR-THREAD and SB-THREAD:INTERRUPT-THREAD-ERROR-THREAD have been deprecated in favor of SB-THREAD:THREAD-ERROR-THREAD. + new contrib module: SB-QUEUE provides thread-safe lockless FIFO queues. + new feature: docstrings for local and anonymous functions are no longer discarded. (thanks to Leslie Polzer) + new feature: SB-THREAD:SYMBOL-VALUE-IN-THREAD provides access to symbol values in other threads. + new feature: SB-INTROSPECT:ALLOCATION-INFORMATION provides information about object allocation. + optimization: division of a real float by a complex float is implemented with a specialised code sequence. + optimization: MAKE-INSTANCE with non-constant class-argument but constant keywords is an order of magnitude faster. + optimization: MAKE-INSTANCE with constant keyword arguments is x2-4 faster in the presence of :AROUND or non-standard primary INITIALIZE-INSTANCE methods, and similarly for non-standard metaclass classes as long as there are no methods additional on MAKE-INSTANCE. + optimization: more efficient type-checks for FIXNUMs when the value is known to be a signed word on x86 and x86-64. + optimization: compiler now optimizes (EXPT -1 INTEGER), (EXPT -1.0 INTEGER), and (EXPT -1.0d0 INTEGER) into an ODDP test. (thanks to Stas Boukarev and Paul Khuong) + optimization: compiler is smarter about delegating argument type checks to callees. + optimization: several character functions are now compiled somewhat more efficiently. (reported by Lynn Quam) + optimization: the compiler now derives simple types for LOAD-VALUE-FORMs. + improvement: less unsafe constant folding in floating point arithmetic, especially for mixed complex/real -float operations. + optimization: constant double and single floats are stored in native unboxed format on x86[-64]. + optimization: smarter code for arithmetic operations with constant floats, complex floats, or integers on x86[-64]. + optimization: smarter code for conjugate/multiplication of float complexes and abs/negate of floats on x86-64. + optimization: more efficient complex float and real float operations on x86-64. + improvement: complex float division is slightly more stable. + improvement: DESCRIBE output has been reworked to be easier to read and contains more pertinent information. + improvement: failure to provide requested stack allocation compiler notes provided in all cases (requested stack allocation not happening without a note being issued is now considered a bug.) + bug fix: SB-POSIX exports the documented types and functions FILE-DESCRIPTOR and FILENAME, and also the corresponding -DESCRIPTOR types. (reported by "abhi") + bug fix: on 64 bit platforms FILL worked incorrectly on arrays with upgraded element type (COMPLEX SINGLE-FLOAT), regression from 1.0.28.55. (thanks to Paul Khuong) + bug fix: looping around HANDLER-CASE could silently consume stack space on each iteration. (reported by "foobar") + bug fix: better error signalling when calls to functions seeking elements from lists (eg. ADJOIN) are compiled with both :TEST and :TEST-NOT. (reported by Tobias Rittweiler) + bug fix: regressions in DIRECTORY from 1.0.28.61: pattern matching of directory components now works as it used to. (various prolems reported by Michael Becker, Gabriel Dos Reis, Cyrus Harmon, and Harald Hanche-Olsen) + bug fix: :PTY option in RUN-PROGRAM was broken with stream arguments. (reported by Elliot Slaughter, thanks to Stas Boukarev) + bug fix: bogus undefined variable warnings from fopcompiled references to global variables. (thanks to Lars Rune Nøstdal) + bug fix: foreign function names should now appear in backtraces on FC6 as well. (reported by Tomasz Skutnik and Tobias Rautenkranz) + bug fix: SETF compiler macro documentation strings are not discarded anymore. + bug fix: GENTEMP is now unaffected by pretty printer dispatch table. (thanks to Alex Plotnick) + bug fix: SLEEP accepts large integer arguments, truncating them to SIGNED-WORD on the assumption that sleeping for 68 years is sufficient for anyone. (reported by Leslie Polzer, thanks to Stas Boukarev) + bug fix: compiler notes for expensive slot type checks could be emitted at runtime MAKE-INSTANCE calls. (reported by Samium Gromoff) * Updated Standards-Version no real changes * force sb-ext:*runtime-pathname* to #P"/usr/bin/sbcl" in contrib * ignore script-not-executable lintian errors as fasl files now generate a false positive * stop lintian complaining about the empty directory * remove asdf LICENSE file from package, it is already in the docs * also shut linitian up about the clc directory -- Peter Van Eynde Tue, 01 Sep 2009 14:26:14 +0100 sbcl (1:1.0.29.11-1) unstable; urgency=low * Go to 1.0.29.11 on advice of sbcl-devel. * new upstream release. Major changes: + minor incompatible change: under weak type checking policy integer types are weakened less aggressively. + minor incompatible change: SAVE-LISP-AND-DIE :TOPLEVEL function is now allowed to return, which causes SBCL to quit with exit status 0. Previously if the function returned with a small integer return value, that value was accidentally reused as the exit status. + new feature: SB-EXT:DEFINE-HASH-TABLE-TEST allows defining new arguments to MAKE-HASH-TABLE :TEST, and MAKE-HASH-TABLE has been extended with :HASH-FUNCTION argument. Refer to user manual for details. + new feature: SB-EXT:DEFGLOBAL macro allows defining global non-special variables. + new feature: SB-EXT:GET-TIME-OF-DAY provides access to seconds and microseconds since the Unix epoch on all platforms. + new feature: SB-EXT:ALWAYS-BOUND proclamation inhibits MAKUNBOUND, and allows the compiler to safely elide boundedness checks for special variables. + new feature: SB-EXT:GLOBAL proclamation inhibits SPECIAL proclamations for the symbol, prohibits both lexical and dynamic binding. This is mainly an efficiency measure for threaded platforms, but also valueable in expressing intent. + optimization: the compiler uses a specialized version of FILL when the element type is know in more cases, making eg. (UNSIGNED-BYTE 8) case almost 90% faster. + optimization: accesses to potentially non-simple arrays where element type is known are 50% faster. + optimization: compiler now generates faster array typechecking code. + optimization: ARRAY-DIMENSION is now faster for multidimensional and non-simple arrays. + optimization: multidimensional array accesses in the absence of type information regarding array rank are approximately 10% faster due to open coding of ARRAY-RANK. + optimization: result of (FILL (MAKE-ARRAY ...) ...) and (REPLACE (MAKE-ARRAY ...) ...) can be stack allocated if the result of MAKE-ARRAY form can be. + optimization: result of call to VECTOR can now be stack allocated. + optimization: MAKE-ARRAY with :INITIAL-CONTENTS is now vastly faster as long as the resulting array is one-dimensional and has a known element type. In particular, :INITIAL-CONTENTS (LIST ...) where the length of the list matches the known length of the vector does not allocate the list as an intermediate step. Ditto for VECTOR and simple backquoted forms. + optimization: MAKE-ARRAY can now stack allocate in the presence of :INITIAL-CONTENTS and :INITIAL-ELEMENT as long as the result has a known element type, and is known to be simple and one dimensional. + improvement: SBCL now emits a compiler note where stack allocation was requested but could not be provided (not in all cases, unfortunately) + improvement: better MACHINE-VERSION responses. (thanks to Josh Elsasser) + improvement: pretty-printing loop has been implemented properly. (thanks to Tobias Rittweiler) + documentation: CLOS slot typechecing policy has been documented. + bug fix: FILE-AUTHOR no longer signals an error on Windows. + bug fix: SB-SPROF could be foiled by foreign code not have a frame pointer, leading to memory faults. (thanks to Bart Botta) + bug fix: better floating point exception handling on x86/OpenBSD. (thanks to Josh Elsasser) + bug fix: exit status from QUIT when called under --script was lost (reported by Hubert Kauker) + bug fix: MAKE-ARRAY for non-zero :INITIAL-ELEMENT always used the same implementation of FILL to initialize the array, even if a more efficient one was available (reported by Stas Boukarev, thanks to Paul Khuong) + bug fix: potential miscompilation of array stack allocation on x86 and x86-64. (reported by Time Tossavainen) + bug fix: some forms of AND, OR, and COND resulted in expansions that could result in their subforms being treated as top level forms. (reported by James Knight) + bug fix: On x86/x86-64 alien functions declared to return integers shorter than a machine register could leave garbage in the high bits of the result register (bug 316325). + bug fix: disable address space randomization Linux/x86-64 as well, not just x86-64. (reported by Ken Olum) + bug fix: Attempting to DEREF an (ALIEN (* T)) would produce a WARNING and generate incorrect code. + bug fix: #201; type inference for CONS and ARRAY types could derive wrong results in the presence of eg. RPLACA or ADJUST-ARRAY. + bug fix: special variables with a proclaimed specific subtype of FUNCTION could not be assigned to or bound with PROGV. (reported by Lorenz Mösenlechner) + bug fix: the value of CL:- in the inspector was the previous expression evaluated rather than the expression being evaluated. + bug fix: constants can no longer be locally declared special. + bug fix: signals delivered to threads started from foreign land (read: directly by pthread_create, not by MAKE-THREAD) are redirected to a Lisp thread by blocking all signals and resignalling. + bug fix: SHARED-INITIALIZE initialized unbound :ALLOCATION :CLASS slots from :INITFORM, if any. + a number of bugs in cross-compilation have been fixed, with the ultimate result that building under (at least) clisp should be much more reliable. + minor incompatible changes: echo-streams now propagate unread-char to the underlying input stream, and no longer permit unreading more than one character. + improvement: on x86/x86-64 Lisp call frames now have the same layout as C frames, allowing for instance more reliable backtraces. + improvement: the debugger REPL can now reference lexical variables by name directly for code compiled with (DEBUG 3). + improvement: errors from malformed declarations now have better source paths associated with them. (thanks to Tobias Rittweiler) + optimization: faster local calls on x86/x86-64 + bug fix: some error messages for out-of-bound array indexes confused the index and the bound. (thanks to Stas Boukarev) + bug fix: pretty printing malformed DEFPACKAGE forms (thanks to Sidney Markowitz) + bug fix: running regressions tests in shells without OSTYPE set now works. (reported by Harald Hanche-Olsen) + bug fix: more robust static space exhaustion signalling from MAKE-STATIC-VECTOR (thanks to Daniel Lowe) + bug fix: (SETF DOCUMENTATION) for anonymous function now throws the docstring away instead of storing it under names such as (LAMBDA (X)). (reported by Leslie Polzer) + bug fix: timers could go off in the wrong order, be delayed indefinitely (thanks to Ole Arndt for the patch) + bug fix: RESTART-FRAME and RETURN-FROM-FRAME stack corruption + bug fix: the discriminating function for PRINT-OBJECT no longer preserves potentially-invalid effective methods in its cache. + bug fix: SB-INTROSPECT:FIND-DEFINITION-SOURCE now works with funcallable instances as well (thanks to Paul Khuong) + bug fix: using RUN-PROGRAM does not interfere with SB-POSIX:WAIT, SB-POSIX:WAITPID and their C equivalents. * Limit dynamic space size for contrib rebuilds. May thanks for Peter Volkov and Nikodmus Siivola (Closes: #474402) * We need a newer common-lisp-controller -- Peter Van Eynde Fri, 19 Jun 2009 06:30:56 +0200 sbcl (1:1.0.27.0-1) unstable; urgency=low * New upstream release. Major changes: changes in sbcl-1.0.27 relative to 1.0.26: * improvement: the system either recovers from stack exhaustion or dies properly as opposed to leaving the user uncertain of whether the handler trampled on some random memory next to the stack or having to rely on --lose-on-corruption (which is still a good idea to use in production because stack exhaustion can happen in signal handlers which will likely lead to hangs.) * bug fix: fix gc related interrupt handling bug on ppc (regression from 1.0.25.37, reported by Harald Hanche-Olsen) * bug fix: fix ERROR leaking memory (reported by David Thompson) changes in sbcl-1.0.26 relative to 1.0.25: * incompatible change: an interruption (be it a function passed to INTERRUPT-THREAD or a timer function) runs in an environment where interrupts can be enabled. The interruption can use WITH-INTERRUPTS or WITHOUT-INTERRUPTS as it sees fit. Use WITHOUT-INTERRUPTS to avoid nesting of interruptions and potentially running out of stack. Keep in mind that in the absence of WITHOUT-INTERRUPTS some potentially blocking operation such as acquiring a lock can enable interrupts. * incompatible change: GC-OFF and GC-ON are removed, as they were always unsafe. Use WITHOUT-GCING instead. * new feature: runtime option --disable-ldb * new feature: runtime option --lose-on-corruption to die at the slightest hint of possibly non-recoverable errors: running out of memory, stack, alien stack, binding stack, encountering a memory fault, etc. In the absence of --lose-on-corruption a warning is printed to stderr. * enhancement: detect binding stack exhaustion * enhancement: detect alien stack exhaustion on x86/x86-64 * improvement: generally more stable and reliable interrupt handling * improvement: there is a per thread interruption queue, interruptions are executed in order of arrival * improvement: a repeating timer reschedules itself when the it has finished, but expiration times are spaced equally. If an expiration time is in the past it will trigger after a short grace period that may give a chance to other things to run. * optimization: slightly faster gc on multithreaded builds * optimization: faster WITHOUT-GCING * bug fix: when JOIN-THREAD signals an error, do it when not holding important locks so that the debugger/handler doesn't produce recursive errors or deadlock. * bug fix: real-time signals are not used anymore, so no more hanging when the system wide real-time signal queue gets full. * bug fix: INTERRUPT-THREAD on a dying thread could produce memory fault. * bug fix: finalizers, gc hooks never run in a WITHOUT-INTERRUPTS * bug fix: fix random memory faults related to interrupts on alpha * bug fix: fix random memory faults related to interrupts on sparc * bug fix: fix deadlocks related to starting threads * bug fix: fix deadlines on locks on futex platforms * bug fix: restore errno in signal handlers * bug fix: fix deadlocks related to hash tables * bug fix: fix deadlocks in pcl * imported new upstream version * now using debhelper version 7 * updated standard version without any real changes * use dh_prep instead of dh_clean -k -- Peter Van Eynde Sun, 19 Apr 2009 15:44:17 +0200 sbcl (1:1.0.25.0-1) unstable; urgency=low * add ${misc:Depends} for all targets * replace gs-gpl with ghostscript * updated standard version without any real changes * Fixed the section for the doc-base files * reindented changelog * fixed groff problem "a space character is not allowed in an escape name" by random typing * removed full path from update-binfmts * New upstream, old uploader. (Closes: #514884, #436024) Major changes: changes in sbcl-1.0.25 relative to 1.0.24: + incompatible change: SB-INTROSPECT:FUNCTION-ARGLIST is deprecated, to be removed later. Please use SB-INTROSPECT:FUNCTION-LAMBDA-LIST instead. + new feature: SB-INTROSPECT:DEFTYPE-LAMBDA-LIST allows retrieval of DEFTYPE lambda lists. (thanks to Tobias Rittweiler) + enhancement: MUTEX-VALUE is to be superseded by MUTEX-OWNER that has a better name and does not return values so stale on multiprocessor systems. Also, HOLDING-MUTEX-P was added for about the only sane usage of MUTEX-OWNER. + improvement: unithread builds keep track of MUTEX-VALUE. + improvement: reading from a TWO-WAY-STREAM does not touch the output stream anymore making it thread safe to have a concurrent reader and a writer, for instance, in a pipe. + improvement: GET-SETF-EXPANDER avoids adding bindings for constant arguments, making compiler-macros for SETF-functions able to inspect their constant arguments. + improvement: COMPILE-FILE reports times with millisecond accuracy (thanks to Luis Oliveira) + optimization: CHAR-CODE type derivation has been improved, making TYPEP elimination on subtypes of CHARACTER work better. (reported by Tobias Rittweiler, patch by Paul Khuong) + bug fix: setting alien structure fields of type struct by value now computes the right offset for the memory copy. + bug fix: compilation problem involving inlined calls to aliens with result type VOID. (reported by Ken Olum) + bug fix: #235a; sequential inline expasion in different policies no longer reuses the functional from the previous expansion site. + bug fix: DEFTYPE no longer breaks on bodies consisting of a single unquoted symbol. Regression from 1.0.22.8. (reported by Ariel Badichi) + bug fix: named ENUMs in multiply-referenced alien record types no longer cause an implied type redefinition. Regression from 1.0.21.29. + bug fix: sign-extension of small signed return values now works with C code compiled with gcc 4.3 or newer. (reported by Liam Healy) changes in sbcl-1.0.24 relative to 1.0.23: + new feature: ARRAY-STORAGE-VECTOR provides access to the underlying data vector of a multidimensional SIMPLE-ARRAY. + new feature: the system now signals a continuable error if standard readtable modification is attempted. (thanks to Tobias Rittweiler) + new feature: DIRECTORY has been extended with a non-standard keyword argument :RESOLVE-SYMLINKS. (thanks to TC-Rucho) + enhancement: SB-BSD-SOCKETS:MAKE-SOCKET-STREAM keyword argument handling has been robustified and documented better. (thanks to Robert Goldman) + optimization: faster generic arithmetic dispatch on x86 and x86-64. + optimization: FORMAT ~D and ~F are now approximately 5% faster. + tradeoff: constant FORMAT control strings are now compiled unless SPACE > SPEED (previously only when SPEED > SPACE.) + bug fix: Red Hat Enterprise 3 mmap randomization workaround. (thanks to Thomas Burdick) + bug fix: DEFCLASS and ENSURE-CLASS-USING-CLASS are now expected to be thread safe. + bug fix: lexical type declarations are now correctly reported by SB-CLTL2. (reported by Larry D'Anna) + bug fix: STRING-TO-OCTETS did not handle :START properly when using UTF-8 as external format. (thanks to Luis Oliveira) + bug fix: errors from invalid fill-pointer values to (SETF FILL-POINTER) are signalled correctly. (thanks to Stas Boukarev) + bug fix: SET-MACRO-CHARACTER accepts NIL as the readtable designator. (thanks to Tobias Rittweiler) + bug fix: SET-DISPATCH-MACRO-CHARACTER accepts NIL as the readtable designator, and returns T instead of the function. (thanks to Tobias Rittweiler) + bug fix: direct superclasses of STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS now default to STANDARD-OBJECT and FUNCALLABLE-STANDARD-OBJECT as required by AMOP. + bug fix: compiling a call to SLOT-VALUE with a constant slot-name when no class with the named slot yet exists no longer causes a compile-time style-warning. + bug fix: :ALLOCATION :CLASS slots are type-checked properly in safe code. (reported by Didier Verna) + bug fix: #430; nested structure constructors can stack allocate. + bug fix: on some 64-bit platforms dynamic space size was truncated to #xffff0000 bytes. (reported by Benjamin Lambert) + bug fix: setting *READ-SUPPRESS* to T no longer renders the default REPL unusable. (reported by Daniel Herring) + bug fix: return values of READ-SEQUENCE did not take :START into account on file streams, regressions since 1.0.12.22. (reported by Thomas Russ, patch by Paul Khuong) + bug fix: using SET or (SETF SYMBOL-VALUE) to change the value of a method specializer used to confuse permuation vector optimization. + bug fix: system inserted bogus implicit type declarations for local special variables in DEFMETHOD bodies. + bug fix: #354; duplicated frames in backtraces due to non-tail-call-optimized XEPs to functions with return type NIL have been elimited. + bug fix: #357; MAKE-INSTANCE/SHARED-INITIALIZE now initializes structure object slots according to DEFSTRUCT initforms, and DEFSTRUCT forms :INCLUDEind structure classes defined using DEFCLASS :METACLASS STRUCTURE-CLASS now inherit their initforms. (reported by Bruno Haible and Stephen Wilson) + bug fix: #395; fill-pointer output streams used now support element-type BASE-CHAR as well. + bug fix: compiler error when attempting to derive return value of ARRAY-ELEMENT-TYPE when the array type was a union of intersection types. + bug fix: address-spaces overlapped on OpenBSD. (thanks to Josh Elsasser) + bug fix: Mac OS X binaries should now be portable between Leopard and Tiger. changes in sbcl-1.0.23 relative to 1.0.22: + enhancement: when disassembling method functions, disassembly for the associated fast function is also produced. + enhancement: system stores DEFTYPE lambda-lists, so DESCRIBE can report them. + optimization: printing with *PRINT-PRETTY* true is now more efficient as long as the object being printed doesn't require special handling by the pretty printer. + bug fix: slot symbol-macros from WITH-SLOTS inside DEFMETHOD bodies now interact correctly with type declarations. + partial bug fix: PCL detects infinite recursion during wrapper validation. (thanks to Attila Lendvai) + bug fix: #426; nested function calls are inlined properly. Previously if FOO was an inline function, in calls of the form (FOO (FOO ...)) the outer call was not inlined. + bug fix: long long arguments passed in registers to alien functions on PowerPC Linux and NetBSD are now handled correctly when preceded by SYSTEM-AREA-POINTERs. (reported by Josh Elsasser) changes in sbcl-1.0.22 relative to 1.0.21: + minor incompatible change: LOAD-SHARED-OBJECT no longer by default looks for the shared object in the current directory, but passes the native namestring of the designated pathname to the operation system's shared object loading function as-it. + minor incompatible change: --disable-debugger toplevel option now takes effect before processing of initialization files and --eval or --load options. + new feature: new commandline argument: --script, which supports shebang lines. See documentation for details. (based on work by Kevin Reid) + new feature: SAVE-LISP-AND-DIE can save current values of --dynamic-space-size and --control-stack-size in the executable core, causing it to skip normal runtime option processing. See documentation for details. (thanks to Zach Beane) + enhancement: inoccous calls to EVAL or generic functions dispatching on subclasses of eg. STREAM no longer cause compiler notes to appear. + enhancement: the system no longer resignals errors from --load and --eval toplevel arguments as SIMPLE-ERRORS, which caused restarts associated with the original error to be lost. (thanks to Ariel Badichi) + enhancement: :DONT-SAVE keyword argument has been added to LOAD-SHARED-OBJECT for controlling interaction with SAVE-LISP-AND-DIE, and UNLOAD-SHARED-OBJECT can be used to undo the effects of an earlier LOAD-SHARED-OBJECT call. + bug fix: ADJUST-ARRAY on multidimensional arrays used bogusly give them a fill pointer unless :DISPLACED-TO or :INITIAL-CONTENTS were provided. (reported by Cedric St-Jean) + bug fix: circularity handling in the reader did not treat raw structure slots correctly. (reported by Cedric St-Jean) + bug fix: SERVE-EVENT occasionally signaled an error about bogus file descriptors when there were none. + bug fix: DEFINE-COMPILER-MACRO support of destructuring lambda-lists was broken. (reporteed by Willem Broekema) + bug fix: SB-EXT:NATIVE-NAMESTRING on Windows did not work on pathnames without a directory. + bug fix: COMPILE-FILE did not warn about undefined variable references at toplevel, and LOAD of the resulting fasl did not signal an error. + bug fix: functions with non-required arguments used to end up with (SB-C::&OPTIONAL-DISPATCH ...) as their name. + bug fix: redefining a function with non-required arguments didn't update the system's knowledge about its call signature properly. + bug fix: fixed #431; incompatible alien record type redefinitions are detected and handled. (reported by Neil Haven) + bug fix: using RESTRICT-COMPILER-POLICY with DEBUG 3 could cause PROGV miscompilation. (reported by Matthias Benkard, patch by Juho Snellman) + bug fix: on x86 and x86-64 backtraces were sometimes truncated after alien stack frames. + bug fix: strings passed to mk{s,d}temp lacked null termination changes in sbcl-1.0.21 relative to 1.0.20: + new feature: the compiler is able to track the effective type of a generic function across method addition and removal. + new feature: SB-EXT:ATOMIC-INCF allows atomic incrementation of appropriately typed structure slots without locking. + new feature: SB-EXT:CALL-WITH-TIMING provides access to timing information like those gathered by TIME using a programming-friendly interface. + new feature: TIME reports time taken even if the form performs a non-local transfer of control. + enhancement: reduced conservativism on GENCGC platforms: on average 45% less pages pinned (measured from SBCL self build). + bug fix: SB-EXT:COMPARE-AND-SWAP on SYMBOL-VALUE can no longer mutate constant symbols or violate declaimed type of the symbol. + bug fix: SB-THREAD:SIGNAL-SEMAPHORE could fail to wakeup threads sleeping on the semaphore in heavily contested semaphores. + bug fix: semaphores and condition variables were not interrupt safe. + bug fix: SB-THREAD:CONDITION-WAIT doesn't allow waits on mutexes owned by other threads anymore. + bug fix: FIND on lists called KEY outside the specified subsequence. (reported by budden) + bug fix: LOG doesn't use single-float intermediate results when given mixed integer and double-float arguments, leading to better precision. (reported by Bob Felts) + bug fix: LOG with base zero returned values of inconsistent type. changes in sbcl-1.0.20 relative to 1.0.19: + minor incompatible change: OPTIMIZE qualities SB-C::STACK-ALLOCATE-DYNAMIC-EXTENT, SB-C::STACK-ALLOCATE-VECTOR, and SB-C::STACK-ALLOCATE-VALUE-CELLS no longer exist. See documentation and SB-EXT:*STACK-ALLOCATE-DYNAMIC-EXTENT* for details. + documentation: some slot access efficiency guidelines have been added to the user manual. + optimization: ASSOC-IF, ASSOC-IF-NOT, MEMBER-IF, MEMBER-IF-NOT, RASSOC, RASSOC-IF, and RASSOC-IF-NOT are now equally efficient as ASSOC and MEMEBER. + optimization: calls to ASSOC, MEMBER, and RASSOC can be transformed to more efficient EQ-comparison versions more often. + optimization: enhanced derivation of DOLIST iteration variable type for constant lists. + optimization: constant folding of simple (LIST ...) forms as DOLIST arguments. + optimization: runtime lookup of function definitions can be elided in more cases, eg: (let ((x 'foo)) (funcall foo)). + optimization: compiler is able to derive the return type of (AREF (THE STRING X) Y) as being CHARACTER. + optimization: CLRHASH on empty hash-tables no longer does pointless work. (thanks to Alec Berryman) + optimization: REPLACE deftransforms don't punt when :START1 or :START2 is given + bug fix: compiling DESTRUCTURING-BIND on constant list arguments no longer emits a code deletion note. (reported by Andrew Gasparovic) + bug fix: bogus odd-number-of-keywords STYLE-WARNINGs from calls to functions with an odd number of &OPTIONAL arguments, a &REST argument, and one or more &KEY arguments at the call site. + bug fix: STYLE-WARNINGs for functions with both &OPTIONAL and &KEY arguments appeared at call sites as well. + bug fix: fixed #425; CLOSE drops input buffers from streams, so READ-LINE &co can no longer read from them afterwards. (reported by Damien Cassou) + bug fix: fixed #427: unused local aliens no longer cause compiler breakage. (reported by Stelian Ionescu, Andy Hefner and Stanislaw Halik) + bug fix: non-local exit from a WITH-ALIEN form no longer causes alien-stack leakage. (reported by Andy Hefner) + bug fix: PROGV signals an error when an attempt to violate declared type of a variable or bind a constant is made. + bug fix: SET signals an error when an attempt to violate declared type of a variable is made. + bug fix: restart computation during the execution of a restart test function no longer causes infinite recursion. (reported by Michael Weber) + bug fix: calling SB-COVER:REPORT with a non-directory pathname now signals an error. (thanks to Pierre Mai) + bug fix: EXPORT left symbol unexported in conflict situations. (thanks to Michael Weber) + bug fix: correctly handle name conflicts involving CL:NIL. (thanks to Michael Weber) + bug fix: RESOLVE-CONFLICT restart for name conflicts handles conflicts arising from USEing package with conflicting symbols correctly. (thanks to Michael Weber) changes in sbcl-1.0.19 relative to 1.0.18: + new feature: user-customizable variable SB-EXT:*MUFFLED-WARNINGS*; warnings that go otherwise unhandled will be muffled if they are of the type that's the value of this variable. + optimization: stack allocation is slightly more efficient on x86 and x86-64. + bug fix: DEFSTRUCT forms with user-specified :CONSTRUCTOR options, where a raw slot always is initialized using the initform whose type is not know sufficiently well a compile-time are now compiled correctly. (reported by John Morrison) + bug fix: compiler no longer makes erronous assumptions in the presence of non-foldable SATISFIES types. + bug fix: stack analysis missed cleanups of dynamic-extent arguments in non-let-converted calls to local functions. + improvements to the Windows port: ++ adjusted address spaces for building on both Win32 and Win64. (thanks for John Connors) + fixed some bugs revealed by Paul Dietz' test suite: ++ interval arithmetic during type derivation used inexact integer to single-float coercions. ++ arithmetic operations involving large integers and single floats give the same results in compiled and interpreted code. ++ deriving the result type of COERCE no longer signals an error if the derived type of the second argument is a MEMBER type containing invalid type specifiers. ++ ADJOIN with constant NIL as second argument works correctly. ++ FUNCTION-KEYWORDS was called SB-PCL::FUNCTION-KEYWORD-PARAMETERS. * reindented changelog debian/changelog -- Peter Van Eynde Mon, 16 Feb 2009 13:55:49 +0100 sbcl (1:1.0.18.0-2) unstable; urgency=low * Fix cffi NULL pointer dereferencing. (Closes: #503255) -- Thiemo Seufer Sat, 25 Oct 2008 01:06:48 +0100 sbcl (1:1.0.18.0-1) unstable; urgency=low * New upstream release. Major changes: + minor incompatible change: SB-SPROF:WITH-PROFILING now by default profiles only the current thread. + minor incompatible change: changes to SYMBOL-VALUE of constants defined with DEFCONSTANT now signal an error. + enhancement: SB-SPROF now has support for wallclock profiling, and is also able to profile specific threads. REPORT output has also additional sorting options. + enhancement: better pretty-printing of DEFPACKAGE forms. (Thanks to Michael Weber) + optimization: structure allocation has been improved ** constructors created by non-toplevel DEFSTRUCTs are ~40% faster. ** out of line constructors are ~10% faster. ** inline constructors are ~15% faster. ** inline constructors are capable of dynamic extent allocation (generally on x86 and x86-64, in some cases on other platforms as well.) + optimization: simple uses of HANDLER-CASE and HANDLER-BIND no longer cons. + optimization: file compiler is now able to coalesce non-circular lists, non-base strings, and bit-vectors. Additionally, constants are never referenced through SYMBOL-VALUE at runtime. + optimization: code defining methods on PRINT-OBJECT (and other generic functions in the COMMON-LISP package) now loads faster. + bug fix: EAI_NODATA is deprecated since RFC 3493. Stop using it in sb-bsd-sockets. + bug fix: if COMPILE-FILE aborts due to an unwind, the partial fasl is now deleted. (reported by Attila Lendvai) + bug fix: READ-LINE always returned NIL for the last line in files. (reported by Yoshinori Tahara) + bug fix: more accurate disassembly annotations of foreign function calls. (thanks to Andy Hefner) + bug fix: trimming non-simple strings and non-string string designators when the there is nothing to trim works properly. (thanks to James Knight) + new feature: SB-POSIX bindings for mlockall, munlockall, and setsid. (thanks to Travis Cross) + fixed some bugs revealed by Paul Dietz' test suite: ** NIL is a valid function name (regression at 1.0.13.38) ** FILL on lists was missing its return value (regression at 1.0.12.27) ** STRING-TRIM, STRING-LEFT-TRIM, and STRING-RIGHT-TRIM did not respect fill pointers properly (regression at 1.0.12.23) ** STRING-TRIM, STRING-LEFT-TRIM, and STRING-RIGHT-TRIM did not respect displacement indices properly (regression at 1.0.12.23) -- Thiemo Seufer Fri, 04 Jul 2008 23:00:48 +0100 sbcl (1:1.0.17.0-1) unstable; urgency=low * New upstream release. Major changes: + temporary regression: user code can no longer allocate closure variable storage on stack, due to bug 419 without explicitly requesting it. Please consult sbcl-devel for advice if you need to use this feature in the meanwhile. + new feature: runtime argument --control-stack-size can be used to adjust thread default control stack size. + enhancement: improved TIME output ** all times are reported using the measured accuracy (milliseconds for real and GC times, microseconds for everything else.) ** processor cycle counts on x86 and x86-64. ** interpreted forms are counted for both evaluator modes. ** number of lambdas converted by the compiler is reported. ** CPU percentage report (computed from real and total run time.) ** more comprehensive run time reporting, using a condenced format ** interperted form, lambda, and page fault counts are omitted when zero. + optimization: ADJOIN and PUSHNEW are upto ~70% faster in normal SPEED policies. + optimization: APPEND is upto ~10% faster in normal SPEED policies. + optimization: two argument forms of LAST are upto ~10% faster in normal SPEED policies. + optimization: NCONC no longer needs to heap cons its &REST list in normal SPEED policies. + bug fix: SB-FLUID build feature no longer breaks the build. (thanks to Sidney Markowitz) + bug fix: UNION and NUNION work with :TEST-NOT once more, regression since 1.0.9.1. (thanks to Eric Marsden) + bug fix: result of MAKE-ARRAY can be stack allocated - regression since 1.0.15.36. (thanks to Paul Khuong) + bug fix: LAST when always returned the whole list when given a bignum as the second argument. + bug fix: dynamic extent allocation of nested lists and vectors could leak to otherwise accessible parts. + bug fix: invalid optimization of heap-allocated alien variable reference. + bug fix: fasl header checking is less vulnerable to different platform word lengths. + bug fix: more correct assembler syntax for GNU binutils 2.18.50.0.4 support. (thanks to Marijn Schouten) + bug fix: fix ECASE warnings from CMUCL-as-xc-host. (reported by Andreas Franke) + bug fix: the fopcompiler can handle LOCALLY forms (with no declarations) successfully. (reported by Attila Lendvai) -- Thiemo Seufer Sun, 01 Jun 2008 03:27:19 +0100 sbcl (1:1.0.16.0-2) unstable; urgency=low * Fix alpha build failure. -- Thiemo Seufer Sat, 03 May 2008 08:28:53 +0100 sbcl (1:1.0.16.0-1) unstable; urgency=low * Re-allow builds for alpha and sparc. * New upstream release. Major changes: + minor incompatible change: revert the changes to sb-posix's error signaling added in 1.0.14. + minor incompatible change: change PROBE-FILE back to returning NIL whenever we can't get a truename, as was the case before 1.0.14. + minor incompatible change: SB-BSD-SOCKETS:NAME-SERVICE-ERROR now inherits from ERROR instead of just CONDITION. + new feature: SB-INTROSPECT can provide source locations for instances as well. (thanks to Tobian Ritterweiler) + optimization: binding special variables now generates smaller code on threaded platforms. + optimization: MEMBER and ASSOC are over 50% faster for :TEST #'EQ and cases where no :TEST is given but the compiler can infer that the element to search is of type (OR FIXNUM (NOT NUMBER)). + optimization: better LOGNOT on fixnums. + optimization: modular arithmetic for a particular requested width is implemented using a tagged representation unless a better representation is available. + fixed bug 423: TRULY-THE and *CHECK-CONSISTENCY* interaction. + bug fix: SB-BSD-SOCKETS:MAKE-INET-ADDRESS checks the input string for wellformedness and returns a specialized vector. (reported by Francois-Rene Rideau) + bug fix: FIND-CLASS was not thread-safe. (reported by Attila Lendvai) + bug fix: ~R was broken for vigtillions. (thanks to Luis Oliveira) + bug fix: attempt to obtain *SCHEDULER-LOCK* recursively when unscheduling timer at the same time as another timer fires. + bug fix: don't reschedule timers for dead threads. + bug fix: periodic polling was broken. (thanks to Espen S Johnsen) + bug fix: copying output from RUN-PROGRAM to a stream signalled bogus errors if select() was interrupted. + enhancement: add support for fcntl's struct flock to SB-POSIX. -- Thiemo Seufer Thu, 01 May 2008 13:34:28 +0100 sbcl (1:1.0.15.0-2) unstable; urgency=low * Re-allow builds for mips and mipsel (Closes: #463569) -- Thiemo Seufer Fri, 28 Mar 2008 15:37:57 +0000 sbcl (1:1.0.15.0-1) unstable; urgency=low * Better watch file, thanks to Raphael Geissert (Closes: #449735) * New upstream. Major changes: + enhancement: cleaner backtraces for interactive interrupts, as well as other cases where the interesting frames used to be obscured by interrupt handling frames. + enhancement: untracing a whole package using (UNTRACE "FOO") is now supported, and tracing a whole package using (TRACE "FOO") now traces SETF-functions as well. + enhancement: implement SB-POSIX:MKTEMP and SB-POSIX:MKDTEMP. + SB-DEBUG:PRINT-FRAME-CALL now prints the entry-point kind even when SB-DEBUG:*SHOW-ENTRY-POINT-DETAILS* is NIL. + unreadably printed representation of hash-tables now includes weakness if any. + bug fix: partially fixed #188: type propagation from assignments is now more efficient. + bug fix: fixed #407: (COERCE X 'SINGLE-FLOAT) and (COERCE X 'DOUBLE-FLOAT) are not flushable. + bug fix: on x86 and x86-64 pointer based EQ-hashing now uses the full address of the object, and none of the tag bits. + bug fix: readably printing hash-tables now respects other printer control variables. (reported by Cedric St-Jean) + bug fix: compiler gave a bogus STYLE-WARNING for the :SYNCHRONIZED keyword with MAKE-HASH-TABLE. + bug fix: export SB-POSIX:MKSTEMP. + bug fix: SORT was not interrupt safe. + bug fix: XREF accounts for the last node of each basic-block as well. + bug fix: MAKE-INSTANCE optimizations interacted badly with non-keyword :DEFAULT-INITARGS in the presence of :BEFORE/:AFTER methods on SHARED-INITIALIZE. (thanks to Matt Marjanovic) + bug fix: the CTOR optimization for MAKE-INSTANCE should no longer create obsolete instances in the case of redefinition or obsoletion of a superclass. (thanks to Andy Hefner) + bug fix: Support for the Alpha architecture has been revived; it had suffered somewhat from lack of maintenance since sbcl-1.0. + improvements to the Windows port: ** The system detects the codepage to use at startup, instead of using the value from the saved core. (thanks to Kei Suzuki) -- Peter Van Eynde Fri, 14 Mar 2008 23:42:40 +0100 sbcl (1:1.0.14.0-1) unstable; urgency=low * New upstream release. Major changes: + new feature: SB-EXT:*EXIT-HOOKS* are called when the process exits (see documentation for details.) + partially fixed bug #108: ROOM no longer suffers from occasional (AVER (SAP= CURRENT END)) failures . + fixed bug #402: proclaimed non-standard declarations in DEFMETHOD bodies no longer cause a WARNING to be signalled. (reported by Vincent Arkesteijn) + bug fix: (TRUNCATE X 0) when X is a bignum now correctly signals DIVISION-BY-ZERO. Similarly for MOD and REM (which suffered due to the bug in TRUNCATE.) (reported by Michael Weber) + bug fix: SB-SPROF:REPORT no longer signals an error if there are no samples. (reported by Andy Hefner) + bug fix: functions compiled using (COMPILE NIL '(LAMBDA ...)) no longer appear as (NIL ...) frames in backtraces. + bug fix: RESOLVE-CONFLICT (and the other name conflict machinery) is now actually exported from SB-EXT as documented. (reported by Maciej Katafiasz) + bug fix: sb-aclrepl now correctly understands how to inspect single-floats on 64-bit platforms where single-floats are not boxed. + bug fix: SB-MOP:CLASS-SLOTS now signals an error if the class has not yet been finalized. (reported by Levente Meszaros) + bug fix: CLOSE :ABORT T behaves more correctly on Windows. + DESCRIBE and (DOCUMENTATION ... 'OPTIMIZE) describe meaning of SBCL-specific optimize qualities. -- Peter Van Eynde Wed, 30 Jan 2008 21:19:30 +0100 sbcl (1:1.0.13.0-1) unstable; urgency=low * updated standard version no real changes * Changed to group maintenance * New upstream. Major changes: + minor incompatible change: RUN-PROGRAM now uses execvp(3) to find an executable in the search path, and does so in the child process's PATH. The function FIND-EXECUTABLE-IN-SEARCH-PATH has been removed; it can be found in the CVS history, for somebody who needs that search behavior (see the manual). + minor incompatible change: compiler policy re. weakening type checks has changed: now type checks are weakened on if SAFETY < 2 and SAFETY < SPEED. + SB-EXT:NATIVE-NAMESTRING takes a new keyword AS-FILE, forcing unparsing of directory pathnames as files. Analogously, SB-EXT:PARSE-NATIVE-NAMESTRING takes an AS-DIRECTORY, forcing a filename to parse into a directory pathname. + enhancement: implicit generic function creation now signals a specific style-warning IMPLICIT-GENERIC-FUNCTION-WARNING, which users can bind handlers for and muffle around calls to LOAD. + enhancement: RUN-PROGRAM allows unicode arguments and environments to be used (using the default stream external format), and allows non-simple strings to be used. (thanks to Harald Hanche-Olsen) + optimization: COPY-SEQ, FILL, and SUBSEQ are 30-80% faster for strings and vectors whose element-type or simplicity is not fully known at compile-time. + optimization: STRING-TRIM and related functions no longer allocate a new string when no trimming needs to be performed. These functions are also faster than before when the input string has been declared as a simple-string. + optimization: READ-SEQUENCE on simple-strings is up to 80% faster. + optimization: READ-LINE is significantly faster for files containing long lines. + optimization: non-open coded uses of character comparison operators (e.g. char=) no longer cons when called with more than one parameter on platforms supporting dynamic-extent allocation. + bug fix: READ-SEQUENCE on composite stream wrapping a Gray stream with STREAM-ELEMENT-TYPE (UNSIGNED-BYTE 8) signalled an error. + bug fix: COPY-SEQ on lists did not signal a type-error on improper lists in safe code. + bug fix: some sequence functions elided bounds checking when SPEED > SAFETY. + bug fix: too liberal weakening of union-type checks when SPEED > SAFETY. + bug fix: more bogus fixnum declarations in ROOM implementation have been fixed. * We lost the ChangeLog when moving away from CVS * Make source files not executable * Prepare for release -- Peter Van Eynde Mon, 14 Jan 2008 07:58:16 +0100 sbcl (1:1.0.12.0-1) unstable; urgency=low * New upstream version. Major changes: + new feature: MAKE-HASH-TABLE now experimentally accepts a :SYNCHRONIZED argument, which makes the hash-table safe for concurrent accesses (but not iteration.) See also: SB-EXT:WITH-LOCKED-HASH-TABLE, and SB-EXT:HASH-TABLE-SYNCHRONIZED-P. + optimization: CONCATENATE on strings is an order of magnitue faster in code compiled with (> SPEED SPACE). + optimization: SUBSEQ is ~50% faster on lists. + bug fix: bug 417 fixed -- source location reporting is now more robust. + bug fix: SUBSEQ on a list will now correctly signal an error if if END is smaller then START. + bug fix: SB-PROFILE will no longer report extra consing for nested calls to profiled functions. + bug fix: ROOM implementation had bogus fixnum declarations which could cause type-errors when calling ROOM on large images. + bug fix: if file compilation is aborted, the partial fasl is now deleted, and COMPILE-FILE returns NIL as the primary value. + bug fix: number of thread safety issues relating to SBCL's internal hash-table usage have been fixed. + bug fix: SB-SYS:WITH-PINNED-OBJECTS could cause garbage values to be returned from its body when the values were being returned using unknown-values return convection and the W-P-O was wrapped inside an UNWIND-PROTECT. * Moved Homepage: field -- Peter Van Eynde Wed, 12 Dec 2007 05:49:07 +0100 sbcl (1:1.0.11.0-1) unstable; urgency=low * Use Vcs-Bzr in control file * New upstream release. Major changes: + incompatible change: hash-table accessor functions are no longer automatically protected by locks. Concurrent accesses on the same hash-table from multiple threads can give inconsistent results or even corrupt the hash-table completely. Multi-threaded applications should do their own locking at the correct granularity. In the current implementation it is still safe to have multiple readers access the same table, but it's not guaranteed that this property will be maintained in future releases. + minor incompatible change: (SETF MUTEX-VALUE) is not longer supported, and will signal an error at runtime. + enhancement: SB-THREAD package now exports a semaphore interface. + enhancement: CONS can now stack-allocate on x86 and x86-64. (Earlier LIST and LIST* supported stack-allocation, but CONS did not.) + enhancement: nested lists can now be stack allocated on platforms providing stack allocation support. + enhancement: dynamic-extent support has been extended to support cases where there are multiple possible sources for the stack allocated value. + optimization: RELEASE-MUTEX no longer needs to perform a syscall if the mutex is uncontested on Linux. + bug fix: symbol-macro expansion now uses the *MACROEXPAND-HOOK* as specified by the CLHS. (thanks to Tobias Rittweiler) + bug fix: NaN comparison now works on x86-64. + bug fix: CLOSE :ABORT T on a stream with pending output now works. + bug fix: instances of non-standard metaclasses using standard instance structure protocol sometimes missed the slot type checks in safe code. + bug fix: known functions can be inlined in high-debug code. -- Peter Van Eynde Fri, 26 Oct 2007 23:38:00 +0200 sbcl (1:1.0.10.0-1) unstable; urgency=low * New upstream version. Major changes: + new feature: SB-CLTL2 contrib module now implements FUNCTION-INFORMATION. (thanks to Larry D'Anna) + optimization: scavenging weak pointers is now more efficient, requiring O(1) instead of O(N) per weak pointer to identify scanvenged vs. unscavenged pointers. (thanks to Paul Khuong) + optimization: typechecking (SETF SLOT-VALUE) is now ~5x faster in method bodies using constant slot-names when the first argument is a specializer parameter for the method. + optimization: SLOT-VALUE &co are now ~50% faster for variable slot names, when the class of the instance is a direct instance STANDARD-CLASS or FUNCALLABLE-STANDARD-CLASS (making them only 3x as slow as the constant slot-name case.) + optimization: member type construction is now O(N) instead of O(N^2). + optimization: UNION and NUNION are now O(N+M) for large inputs as long as the :TEST function is one of EQ, EQL, EQUAL, or EQUALP. + enhancement: DEFINE-MODIFY-MACRO lambda-list information is now more readable in environments like Slime which display it. (thanks to Tobias C. Rittweiler) + bug fix: SB-EXT:COMPARE-AND-SWAP was non-atomic unless the compiler was able to infer the correct argument type for the object on which the CAS operation was being performed. + bug fix: copy propagation interfered with parallel assignment semantics in local calls. (reported by Paul Khuong) + bug fix: the signed modular fixnum shift compiled to wrong code on x86 and x86-64. (spotted by a slight modification to some of PFD's random tests) -- Peter Van Eynde Thu, 27 Sep 2007 22:32:05 +0200 sbcl (1:1.0.9.0-1) unstable; urgency=low * New upstream version. Major changes: + minor incompatible change: SB-SYS:OUTPUT-RAW-BYTES is deprecated. + enhancement: SB-EXT:FINALIZE accepts a :DONT-SAVE keyword argument, indicating the finalizer should be cancelled when SAVE-LISP-AND-DIE is called. + enhancement: default PRINT-OBJECT methods for classes, slot-definitions, and generic function now print the object identity for anonymous instances. (thanks to Attila Lendvai) + enhancement: as an extension to MOP, SBCL now supports SETF of STANDARD-INSTANCE-ACCESS and FUNCALLABLE-STANDARD-INSTANCE-ACCESS. (thanks to Attila Lendvai) + enhancement: sb-cover has an alternate annotation mode which puts the form annotations at the car of the form, instead of annotating it completely. The benefit of this mode is that it shows better which forms were instrumented by the compiler. + bug fix: new compiler transforms for MEMBER and ASSOC were affected by printer control variables. (reported by Dan Corkill) + bug fix: system leaked memory when delayed output was performed by the OS in smaller chunks then expected. (thanks to David Smith) + bug fix: system leaked memory when file streams were not closed properly. + bug fix: large objects written to slow streams that were modified after the write could end up with the modified state written to the underlying file descriptor. + bug fix: multiple threads operating in parallel on the same stream could cause buffer-overflows. + bug fix: source location information is stored correctly (broken since 1.0.6). This bug would generally show up as the Slime debugger higlighting the wrong form when the sldb-show-source command was used. + bug fix: Branch forms are again annotated as branches in the sb-cover annotations. + bug fix: GCD on MOST-NEGATIVE-FIXNUM no longer causes an infinite loop on x86-64. (reported by Gregory Vanuxem) + bug fix: EQUALP could return wrong results for structures with raw slots (slots with a :TYPE of SINGLE-FLOAT, DOUBLE-FLOAT, or a machine word). (reported by Vjacheslav Fyodorov) + bug fix: sb-sprof sampling didn't work on non-x86oid platforms. (patch by Pierre Mai) * Removed sparc, alpha, mips and mipsel ports as they did not build for quite some time and there are more important things in life then trying to get them to work again and again and again. * This fixes the sparc64 install by removing it. (Closes: #394775) * This also fixes the gcc-3.4/g++-3.4 dependency. (Closes: #440431) -- Peter Van Eynde Fri, 14 Sep 2007 05:38:35 +0200 sbcl (1:1.0.8.0-1) unstable; urgency=low * added .debian to the lisp version, as requested by upstream. * New upstream version. Major changes: + enhancement: experimental macro SB-EXT:COMPARE-AND-SWAP provides atomic compare-and-swap operations on threaded platforms. + enhancement: experimental function SB-EXT:RESTRICT-COMPILER-POLICY allows assining a global minimum value to optimization qualities (overriding proclamations and declarations). + enhancement: closed over variables can be stack-allocated on x86 and x86-64. + performance bug fix: GETHASH and (SETF GETHASH) are once again non-consing. + optimization: slot definition lookup is now O(1). This speeds up eg. SLOT-VALUE and (SETF SLOT-VALUE) with variable slot names. + optimization: STRING-TO-OCTETS is now up to 60% faster for UTF-8. + optimization: ASSOC and MEMBER can now be open-coded for all combinations of keyword arguments when second argument is constant and SPEED >= SPACE. In other cases a specialized version is selected. + bug fix: using obsoleted structure instances with TYPEP and generic functions now signals a sensible error. + bug fix: threads waiting on GET-FOREGROUND can be interrupted. (reported by Kristoffer Kvello) + bug fix: backtrace construction is now more careful when making lisp-objects from pointers on the stack, to avoid creating bogus objects that can be seen by the GC. + bug fix: defaulting of values in contexts expecting more than 7 variables now works on x86-64. (reported by Christopher Laux) + bug fix: modifications to packages (INTERN, EXPORT, etc) are now thread safe. + bug fix: (SETF SYMBOL-PLIST) no longer allows assigning a non-list as the property-list of a symbol. + bug fix: DEFMETHOD forms with CALL-NEXT-METHOD in the method body, in EVAL-WHEN forms with both :COMPILE-TOPLEVEL and :LOAD-TOPLEVEL situations requested, are once again file-compileable. (reported by Sascha Wilde) -- Peter Van Eynde Wed, 15 Aug 2007 10:40:01 +0200 sbcl (1:1.0.7.0-1) unstable; urgency=low * New upstream version. Major changes: + MOP improvement: support for user-defined subclasses of SB-MOP:SPECIALIZER has been enhanced. The experimental interface function SB-PCL:MAKE-METHOD-SPECIALIZERS-FORM, called as part of the expansion of DEFMETHOD, is responsible for generating a form which creates a list of specializers when evaluated. Additional functions SB-PCL:[UN]PARSE-SPECIALIZER-USING-CLASS provide debugging and introspective support. + minor incompatible change: the (unsupported) spinlock interface has changed: free spinlock now has the value NIL, and a held spinlock has the owning thread as its value. + enhancement: WITHOUT-INTERRUPTS now binds ALLOW-WITH-INTERRUPTS and WITH-LOCAL-INTERRUPTS as local macros. Refer to documentation string for details. + enhancement: name of a socket-stream is now "a socket" instead of "a constant string". + enhancement: SB-POSIX now supports lockf(). (Thanks to Zach Beane.) + enhancement: SB-POSIX now supports getcwd(). (Thanks to Tassilo Horn.) + enhancement: SB-INTROSPECT:FUNCTION-ARGLIST shows nicer argument lists for generic functions. (Thanks to Tobias C. Rittweiler) + optimization: bignum printing speed has been improved by 20-40% (depending on the bignum size.) + bug fix: WITH-MUTEX and WITH-RECURSIVE-LOCK are now interrupt safe on Linux. + bug fix: the cache used by the CLOS to store precomputed effective methods, slot offsets, and constant return values is now thread and interrupt safe. + bug fix: generic function dispatch function updating is now thread and interrupt safe (in the sense that the known issues have been fixed.) + bug fix: ADD/REMOVE-METHOD is now thread and interrupt safe. + bug fix: interning EQL-specializers is now thread and interrupt safe. + bug fix: asdf systems with dependencies to the SB-POSIX or SB-BSD-SOCKETS contribs can be loaded with :FORCE T. + bug fix: interrupt safety of applicable method computation has been improved. * Also remove .fontconfig on make clean. -- Peter Van Eynde Tue, 10 Jul 2007 21:19:56 +0200 sbcl (1:1.0.6.0-1) unstable; urgency=low * New upstream. Major changes: + new contrib: sb-cover, an experimental code coverage tool, is included as a contrib module. + optimization: STRING-TO-OCTETS for unibyte encodings and UTF-8 is significantly faster. + optimization: calls of the form (AREF FOO (+ INDEX )) now produce more efficient code on x86-64 if the compiler can determine that (+ INDEX ) does not require a bounds check and FOO has an element type at least 8 bits wide. + enhancement: a new, experimental synchronous timeout facility is provided. Refer to SB-SYS:WITH-DEADLINE for details. + enhancement: when a symbol name conflict error arises, the conflicting symbols are always printed with a package prefix. (thanks to Kevin Reid) + enhancement: stepping is now once again supported on the SPARC and MIPS platforms. (It is also now more likely to work on CheneyGC builds on the PPC.) + enhancement: sb-sprof can now also track and report accurate call counts. + bug fixes: the treatment of non-standard subclasses of SB-MOP:SPECIALIZER is more correct. + incompatible change: PURIFY no longer copies the data from the dynamic space into the static and read-only spaces on platforms that use the generational garbage collector + bug fix: GETHASH, (SETF GETHASH), CLRHASH and REMHASH are now interrupt safe. + bug fix: GC race condition occasionally resulting in crashes with the error message "SIG_STOP_FOR_GC blocked at a bad place" has been fixed. + bug fix: &ENVIRONMENT variables in macro lambda lists can now be declared ignored. + bug fix: DEFSETF lambda lists without &ENVIRONMENT no longer cause a STYLE-WARNING to be signalled (regression from 1.0.4.) + bug fix: an asynchronous interrupt could previously leave the system running with GC inhibited. + bug fix: a DECLARE form evaluated at top-level now causes an error rather than silently (or verbosely) returning NIL. + bug fix: trying to dissassemble functions compiled at high DEBUG could result in a error being signalled due to source form lookup errors. (reported by Peter Graves) -- Peter Van Eynde Thu, 31 May 2007 22:32:33 +0200 sbcl (1:1.0.5.0-2) unstable; urgency=low * Fixed XS-Vcs-Bzr line in control file. * Now build-depends on texlive, texlive-extra-utils and texlive-generic-recommended (Closes: #422046) -- Peter Van Eynde Fri, 04 May 2007 22:20:42 +0200 sbcl (1:1.0.5.0-1) unstable; urgency=low * New upstream major changes: + incompatible change: removed writer methods for host-ent-name, host-ent-addresses -- changing the values did not update the DNS information anyway. + minor incompatible change: changed experimental JOIN-THREAD interface + documentation: the manual now lists reader and writer methods in class slot documentation sections. (thanks to Richard M Kreuter) + documentation: unwinding from asyncronous events has been documented as unsafe. + documentation: SB-SYS:WITHOUT-GCING has been documented as unsafe in multithreaded application code. + optimization: GET-INTERNAL-REAL-TIME has been optimized on POSIX platforms. (thanks to James Anderson for the optimization hint) + optimization: REPLACE, SUBSEQ, and COPY-SEQ are now optimized in more cases. + optimization: STRING-{EQUAL,LESSP,GREATER-P} and their NOT- variants no longer cons. + optimization: Direct calls to CHAR-{EQUAL,LESSP,GREATERP} and their NOT- variants no longer cons. + optimization: EQUAL hash tables no longer use SXHASH for objects of all data types, but instead use an EQL hash for types for which EQUAL is the same as EQL. + optimization: the non-inlined generic versions of AREF and (SETF AREF) are significantly faster. + optimization: new STRING-OUTPUT-STREAM implementation is much faster for large outputs and conses 30% less on average. + enhancement: XREF information is now collected for references made to global variables using SYMBOL-VALUE and a constant argument. + enhancement: SIGINT now causes a specific condition SB-SYS:INTERACTIVE-INTERRUPT to be signalled. + bug fix: FILE-POSITION used to signal an error in some cases where ANSI requires it to return NIL. + bug fix: ADJUST-ARRAY is now interrupt-safe. + bug fix: adding and removing fd-handlers is now interrupt-safe. + bug fix: bad type declaration in the CLOS implementation has been fixed. (reported by James Anderson) + bug fix: incorrect ROOM reporting on x86-64 has been fixed. (thanks to Lutz Euler) + bug fix: DEFSETF now allows &ENVIRONMENT and disallows &AUX as required by the CLHS. (reported by Samium Gromoff) + bug fix: dead unbound variable references now signal an error. (reported by Marco Monteiro) + bug fix: / with an unused value was being deleted in safe code. (thanks to Marco Monteiro and Kevin Reid) + bug fix: number of characters that can be written onto a single line in a file is unlimited. + bug fix: some GC deadlocks caused by asynchronous interrupts have been fixed by inhibiting interrupts for when GC is disbled. + bug fix: some interrupt safety issues with GETHASH, (SETF GETHASH), CLRHASH and REMHASH have been fixed. + bug fix: binding *BREAK-ON-SIGNALS* to a value that is not a type specifier no longer causes infinite recursion. + bug fix: SB-EXT:MUFFLE-CONDITIONS declarations no longer trigger a bogus warning in DEFMETHOD bodies. (reported by Kevin Reid) + bug fix: an &environment argument with the correct variable information is passed to macros that are expanded during byte compilation. (reported by Samium Gromoff) + bug fix: a logic error was causing the hash function for bignums to have excessive amounts of collisions. (reported by Faré Rideau) + bug fix: modifying the contents of an array could change the return value of SXHASH on that array, which is only allowed for strings and bit vectors. (bug introduced in 0.9.16) + improvement: a style-warning is signaled for CASE (etc) clauses with duplicate keys. (thanks to Kevin Reid) -- Peter Van Eynde Sun, 29 Apr 2007 01:04:47 +0200 sbcl (1:1.0.4.0-2) unstable; urgency=low * Upload to unstable -- Peter Van Eynde Mon, 09 Apr 2007 01:42:32 +0200 sbcl (1:1.0.4.0-1) experimental; urgency=low * make.sh actually needs bash, or at least not dash because of the "time " statements. * New upstream major changes: + incompatible change: the thread-safe (on most platforms) getaddrinfo and getnameinfo sockets functions are used instead of gethostbyaddr and gethostbyname, on platforms where the newer functions are available. As a result, the ALIASES field of HOST-ENT will always be NIL on these platforms. + change: runtimes with embedded cores (i.e. saved with :EXECUTABLE T) don't print the startup banner, but behave as if --noinform was passed as a command line argument. (thanks to Kevin Reid) + new experimental feature: added JOIN-THREAD (by NIIMI Satoshi) + optimization: code using alien values with undeclared types is much faster. + optimization: the compiler is now able to open code SEARCH in more cases. + optimization: more compact typechecks on x86-64 (thanks to Lutz Euler) + bug fix: using standardized COMMON-LISP special variables as loop variables no longer signals bogus package lock violations. (reported by Eric Marsden) + bug fix: declaring local loop variables to be of a range-limited type such as (SINGLE-FLOAT 1.0 2.0) no longer causes a compile-time error. (reported by Andras Simon) + bug fix: >= and <= gave wrong results when used with NaNs. (Some NaN bugs remain on x86-64.) + bug fix: the #= and ## reader macros now interact reasonably with funcallable instances. + bug fix: type-checks for function arguments were compiled using the compiler policy settings of the wrong lexical environment (in 1.0.2 and 1.0.3). + bug fix: SHADOW accepts characters as string designators, as required by the spec (thanks to Eric Marsden) + bug fix: fixed GC safety issues when foreign functions are called with non-base strings as arguments + bug fix: more consistent error output for fatal-compiler-warnings, like reader errors + bug fix: functions with proper names were showing up as NIL in backtraces (reported by Edi Weitz, regression in 1.0.2) -- Peter Van Eynde Tue, 27 Mar 2007 06:57:11 +0200 sbcl (1:1.0.3.35-1) experimental; urgency=low * New intermediate upstream as 1.0.3.0 causes type related problems with the new inlined sort. This causes a full warning in swank (part of slime) for example. Notable changes: + new platform: experimental support for x86-64/darwin (MacOS). + incompatible change: the thread-safe (on most platforms) getaddrinfo and getnameinfo sockets functions are used instead of gethostbyaddr and gethostbyname, on platforms where the newer functions are available. As a result, the ALIASES field of HOST-ENT will always be NIL on these platforms. + optimization: code using alien values with undeclared types is much faster. + optimization: the compiler is now able to open code SEARCH in more cases. + optimization: more compact typechecks on x86-64 (thanks to Lutz Euler) + bug fix: >= and <= gave wrong results when used with NaNs. + bug fix: the #= and ## reader macros now interact reasonably with funcallable instances. + bug fix: type-checks for function arguments were compiled using the compiler policy settings of the wrong lexical environment (in 1.0.2 and 1.0.3). + bug fix: SHADOW accepts characters as string designators, as required by the spec (thanks to Eric Marsden) + bug fix: fixed GC safety issues when foreign functions are called with non-base strings as arguments + bug fix: more consistent error output for fatal-compiler-warnings, like reader errors + bug fix: functions with proper names were showing up as NIL in backtraces (reported by Edi Weitz, regression in 1.0.2) -- Peter Van Eynde Wed, 7 Mar 2007 20:37:44 +0100 sbcl (1:1.0.3.0-1) experimental; urgency=low * New upstream. Major changes: + optimization: calls of the form (AREF FOO (+ INDEX )) now produce more efficient code on the x86 if the compiler can determine that (+ INDEX ) does not require a bounds check and FOO has an element type at least 8 bits wide. + bug fix: references to undefined variables are handled the same way in toplevel forms as in the normal compiler + bug fix: the build scripts again work with non-bash /bin/sh (thanks to Magnus Henoch) + improvement: faster compilation times for complex functions + improvement: added readlink support to SB-POSIX (thanks to Richard M Kreuter) -- Peter Van Eynde Wed, 28 Feb 2007 23:08:25 +0100 sbcl (1:1.0.2.0-1) experimental; urgency=low * New upstream release. major changes: in 1.0.2: + improvement: experimental support for mach exception handling on x86/macos. requires building with :MACH-EXCEPTION-HANDLER feature to use. + improvement: support for GBK external format. (thanks to Chun Tian (binghe)) + improvement: the debugger now displays variables that have been closed over, in code compiled with (DEBUG 2) or higher + new feature: added a RESTART-FRAME debugger command + new feature: new generic function SB-GRAY:STREAM-FILE-POSITION can be used to provide an implementation for FILE-POSITION on Gray streams (thanks to Eric Marsden) + new feature: add syslog, openlog and closelog support to SB-POSIX (thanks to Richard Kreuter) + optimization: the function call overhead in code compiled with a high DEBUG optimization setting is significantly + bug fix: an error is signaled for attempts to use READ-SEQUENCE for a (SIGNED-BYTE 8) stream and (UNSIGNED-BYTE 8) vector, or vice versa. (thanks to Tony Martinez) + bug fix: the initforms for DEFMETHOD &AUX parameters are only evaluated once (reported by Kevin Reid) + bug fix: the :SHOW-PROGRESS keyword parameter to SB-SPROF:WITH-PROFILING works again (thanks to Kilian Sprotte) + bug fix: an error is signaled for tagbodies with duplicate tags (thanks to Stephen Wilson) + bug fix: NIL can be used as a tagbody tag (thanks to Stephen Wilson) + bug fix: SBCL works on Linux/ppc systems with a kernel configured to use 65k pages (thanks to David Woodhouse) + bug fix: fix SB-POSIX dirent and socket on NetBSD (thanks to Richard Kreuter) in 1.0.1: + new feature: the compiler stores cross-referencing information abount function calls (who-calls), macroexpansion (who-macroexpands) and special variables (who-binds, who-sets, who-references) for code compiled with (< SPACE 3). This information is available through the sb-introspect contrib. + new feature: users may subclass SEQUENCE, and have instances of these classes interoperate with standard Common Lisp functions if a number of methods are defined. (This feature is experimental and the interface subject to change based on feedback from SBCL users and the general community) + improvement: sb-sprof traces call stacks to an arbitrary depth on x86/x86-64, rather than the previous fixed depth of 8 + improvement: another pthread back-end of mutex "pthread-futex". + bug fix: non-ascii command-line arguments are processed correctly (thanks to Yaroslav Kavenchuk) + bug fix: non-required arguments were not passed correctly when a method defined using DEFMETHOD was called from a mop-generated method using CALL-NEXT-METHOD (reported by Pascal Costanza) + bug fix: recursion is now permitted in accessors through SLOT-UNBOUND. (reported by Pascal Costanza) + bug fix: an error was signaled at startup if the HOME environment 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. + bug fix: ENOUGH-NAMESTRING works relative to #p"/" as well. (thanks to Marco Monteiro) + enhancement: DESTRUCTURING-BIND lambda-list uses &BODY instead of &REST for better automatic indentation support. (thanks to Matt Pillsbury) + 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) + optimization: the FIND and POSITION family of sequence functions are significantly faster on arrays whose element types have been declared. * upload to experimental during the freeze -- Peter Van Eynde Tue, 6 Feb 2007 11:11:27 +0100 sbcl (1:1.0.0.0-1) unstable; urgency=low * New upstream version. Major changes: + improvement: runtime option --dynamic-space-size can be used to set the size of the dynamic space reserved on startup. + improvement: floating point modes in effect are now saved in core, and restored on startup. + improvement: GET-INTERNAL-REAL-TIME now reports the time since startup, not time since first call to GET-INTERNAL-REAL-TIME. + improvement: SAVE-LISP-AND-DIE explicitly checks that multiple threads are not running after *SAVE-HOOKS* have run. + improvement: writes to CLOS instance slots are type-checked in code compiled with (SAFETY 3) + improvement: SB-POSIX supports time(2), utime(2) and utimes(2) (thanks to Zach Beane) + improvement: support for files larger than 2GB for CL streams and SB-POSIX on Linux/x86 + improvement: added support for the Shift-JIS external format. (contributed by NIIMI Satoshi) + improvement: callbacks are supported on Linux/PPC. (thanks to Joshua Ross) + bug fix: compiler bug triggered by a (non-standard) VALUES declaration in a LET* was fixed. (reported by Kaersten Poeck) + bug fix: file compiler no longer confuses validated and already dumped structurres. (reported by Kaersten Poeck) + bug fix: ADJUST-ARRAY :FILL-POINTER T on an array without a fill-pointer signals a type-error as required. (thanks to Lars Brinkhoff) + bug fix: disassemly of funcallable instances works. + bug fix: single stepping on PPC. + bug fix: fix thread-safety problems in the type system (generally manifesting as nonsensical errors like "STRING is a bad type specifier for sequences" or "The value 1 is not of type FIXNUM") + bug fix: version components are handled correctly in TRANSLATE-PATHNAME (reported by Josip Gracin) + bug fix: an error is signaled for attempts to displace arrays with incompatible element types (thanks to Mario Mommer) + bug fix: more correct handling of wide characters in debug info (bug reported by Attila Lendvai and fixed by Juho Snellman) + optimization: method calls with &OPTIONAL or &KEY arguments are faster and don't cause extra consing + optimization: MAP and MAP-INTO are significantly faster on vectors whose elements types have been declared. + Improvements to SB-SPROF: ** Support for allocation profiling ** Reduced profiling overhead, especially for long profiling runs -- Peter Van Eynde Thu, 30 Nov 2006 22:18:48 +0100 sbcl (1:0.9.18.0-3) UNRELEASED; urgency=low * token new version -- Peter Van Eynde Sun, 12 Nov 2006 23:15:23 +0100 sbcl (1:0.9.18.0-2) unstable; urgency=high * make $HOME the build directory. Should (Closes: #397987) and fix the FTBFS * Fix for FTBFS on mips/mipsel because of changed kernel headers. (Closes: #398233) -- Peter Van Eynde Sun, 12 Nov 2006 20:53:57 +0100 sbcl (1:0.9.18.0-1) unstable; urgency=low * New upstream version. Major changes: + enhancement: SB-POSIX now supports cfsetispeed(3), cfsetospeed(3), cfgetispeed(3), cfgetospeed(3), and related constants. (thanks to Max-Gerd Retzlaff) + bug fix: two potential GC deadlocks affecting threaded builds. + bug fix: (TYPEP #\A '(NOT (MEMBER #\" #\{ #\:))) now correctly returns T (reported by Anton Kazennikov) + bug fix: the STORE-VALUE restart of CHECK-TYPE works correctly with non-variable places + bug fix: remove a race condition in the setting of funcallable-instance functions, this should make threaded CLOS code more stable against memory faults. + bug fix: corruption of specials when unbinding is interrupted by an asynchronous unwind (reported by Hannu Koivisto) + improvement: the debugger will now also display local variables that are only used once, for code compiled with a DEBUG optimization quality of 2 or higher. * Add lintian overrides because the licence isn't GPL it just uses the wrong words that trigger the lintian warning it seems. -- Peter Van Eynde Wed, 8 Nov 2006 07:25:40 +0100 sbcl (1:0.9.17.0-2) UNRELEASED; urgency=low * added XS-Vcs-Svn field to control file * Try to fix mipsel build problems. -- Peter Van Eynde Wed, 18 Oct 2006 06:02:12 +0200 sbcl (1:0.9.17.0-1) unstable; urgency=low * New upstream version, major changes: - feature: weak hash tables, see MAKE-HASH-TABLE documentation - incompatible change: External-format support for FFI calls changed. - incompatible change: SB-EXT package no longer contains the following unused symbols: *GC-NOTIFY-AFTER*, *GC-NOTIFY-BEFORE*, *GC-NOTIFY-STREAM*, *ERROR-PRINT-LENGTH*, *ERROR-PRINT-LEVEL*, *ERROR-PRINT-LINES* - incompatible change: the single-stepper is no longer available on Alpha, Mips and Sparc platforms. - minor incompatible change: the direct superclasses of SB-MOP:FUNCALLABLE-STANDARD-OBJECT are (FUNCTION STANDARD-OBJECT), not (STANDARD-OBJECT FUNCTION). This makes the class-precedence-lists of GENERIC-FUNCTION and STANDARD-GENERIC-FUNCTION comply with the requirement of ANSI 1.4.4.5. - minor incompatible change: the default stream external format on non-unicode SBCL is no longer detected from the locale, but is always ISO-8859-1 - new feature: Add a version of evaluator that uses an interpreter instead of the compiler. EVAL still uses the compiler by default, to switch it to use the interpreter, set the value of the variable SB-EXT:*EVALUATOR-MODE* to :INTERPRET. - minor incompatible change: the single-stepper REPL has been merged with the normal debugger (see the "Stepping" heading of the debugger help for more details). The debugger command STEP will no longer switch to the single-stepper REPL. - bug fix: ENOUGH-NAMESTRING on pathnames with no name and a pattern for a type now works. - bug fix: loading of default sysinit file works. (thanks to Leonid Slobodov) - bug fix: better detection of circularities in the file-compiler. (reported by Marco Monteiro) - bug fix: the CL pathname functions now work with files that have non-ASCII characters in their names (thanks to Yaroslav Kavenchuk) - bug fix: The :PTY argument for RUN-PROGRAM will now work on systems with Unix98 pty semantics. - bug fix: ASDF-INSTALL will now work with bsd tar. - bug fix: ASDF-INSTALL uses GNU tar on Solaris (thanks to Josip Gracin). - bug fix: timers expiring in dead threads no longer cause a type-error (reported by Paul "Nonny Mouse"). - bug fix: thanks to more lightweight single-stepper instrumentation, code compiled with (DEBUG 3) will compile and execute significantly faster, and will have more accurate type-inferencing than before - bug fix: SLOT-VALUE optimizations are no longer done on method parameters whose bindings are modified -- Peter Van Eynde Wed, 27 Sep 2006 07:24:18 +0200 sbcl (1:0.9.16.0-1) unstable; urgency=low * New upstream version. Major changes: + feature: implemented the READER-METHOD-CLASS and WRITER-METHOD-CLASS portion of the Class Initialization Protocol as specified by AMOP. + incompatible change: variable SB-EXT:*USE-IMPLEMENTATION-TYPES* no longer exists. + optimization: faster LOGCOUNT implementation on x86 and x86-64 (thanks to Lutz Euler) + optimization: hashing of general arrays and vectors has been improved. (reported by Any Fingerhut) + enhancement: SB-INTROSPECT is now able to find definitions of profiled functions. (thanks to Troels Henriksen) + enhancement: compiler-macro expansion applies now to FUNCALL forms as well, allowing compiler-macros for SETF-functions to expand. + enhancement: step-instrumentation no longer wraps known single-value functions with multiple-value context, allowing better type inference. + fixed bug #337: use of MAKE-METHOD in method combination now works even in the presence of user-defined method classes. (reported by Bruno Haible and Pascal Costanza) + fixed bug #339(c): if there are applicable methods not part of any long-form method-combination group, call INVALID-METHOD-ERROR. (reported by Bruno Haible) + fixed bug #361: the :FUNCTION initarg in the protocol for initialization of methods can now be used to override internally-produced optimized functions. (reported by Bruno Haible) + bug fix: extensions of MAKE-METHOD-LAMBDA which wrap the system-provided lambda expression no longer cause warnings about unbound #:|pv-table| symbols. + bug fix: improved the handling of type declarations and the detection of violations for keyword arguments with non-constant defaults. + bug fix: potentially erronous calls to PATHNAME and MERGE-PATHNAMES were being flushed in some cases. (reported by Richard Kreuter) + bug fix: compiled calls to TYPEP were mishandling obsolete instances. (reported by James Bielman and Attila Lendvai) + bug fix: format strings with ~> without matching ~< no longer trigger an AVER, but signal an understandable error instead. (reported by Antonio Martinez) + bug fix: specifying an output-file without a pathname-type for COMPILE-FILE or COMPILE-FILE-PATHNAME resulted in using the type of input-file instead of "fasl". (reported by Robert Dodier) + bug fix: compiler-macro lambda-list parsing of FUNCALL forms. (reported by James Y Knight). + bug fix: compiler-macros-function did not consider the environment argument for shadowing by local functions. + bug fix: compiler-macros expansion was inhibited by local INLINE declarations. + bug fix: inline expansions of known functions were subject to step-instrumentation in high debug policies, leading to problems with type-inference. + bug fix: compiler failed to differentiate between different CONS types in some cases. + bug fix: fixed input, output and error redirection in RUN-PROGRAM for win32. (thanks to Mike Thomas and Yaroslav Kavenchuk) + bug fix: #368: incorrect use of expressed vs. upgraded array element type. + bug fix: #306a: more precise unions of array types. + thread-safety improvements: ** CONDITION-WAIT could return early on Linux, if the thread was interrupted and subsequently continued with SIGCONT. ** STABLE-SORT and ADJUST-ARRAY were not reentrant. * Make sbcl.info file one file. Fixes the 'cannot find Top' error. (Closes: #382770) -- Peter Van Eynde Tue, 5 Sep 2006 14:56:30 +0200 sbcl (1:0.9.15.0-1) unstable; urgency=low [ René van Bevern ] * manually bootstrapped the previous SBCL version on Sparc, so that SBCL should autobuild again there * Build SBCL on Sparc and Alpha with GCC 4.1 + fixed src/runtime/{sparc,alpha}-arch.c for compilation with GCC 4.1 + debian/control: do not depend on gcc-3.4 for sparc, alpha + debian/rules: use gcc (default 4.1) for sparc and alpha * debian/ld-script.alpha-linux: document the purpose of this ld script * Minor cleanup of our diff.gz: reverted Debian's changes on files: + src/runtime/ld-script.alpha-linux: overwritten by debian/ld-script.alpha-linux at build-time + src/runtime/Config.alpha-linux, src/code/toplevel.lisp: they had no effect [ Peter Van Eynde ] * Move to bzr * New upstream, changes: - added support for the ucs-2 external format. (contributed by Ivan Boldyrev) - minor incompatible change: pretty printing of objects of type (cons symbol) is, in the default pprint-dispatch-table, now sensitive to whether the symbol satisfies FBOUNDP. (thanks to Marcus Pearce) - minor incompatible change: SB-MOP:FINALIZE-INHERITANCE is now called later in a class's lifetime, possibly as late as when the first instance of the class is created. Previously, SB-MOP:FINALIZE-INHERITANCE was called by the system as soon as a class became finalizeable. - fixed bug: FILE-POSITION sometimes returned inconsistent results for multibyte external-format streams. (thanks to "vbzoli") - fixed bug: CHANGE-CLASS would fail to preserve the values of slots with :ALLOCATION :CLASS inherited from superclasses of the original class. - fixed bug: anonymous classes can now be created using the :NAME initarg and MAKE-INSTANCE / REINITIALIZE-INSTANCE, as specified by AMOP. (reported by Leonid Slobodov on comp.lang.lisp) - fixed bug: core-files saved with :EXECUTABLE T can again be executed when SBCL_HOME isn't set. (reported by James Knight) - fixed bug: toplevel LOCALLY forms with declarations could occasionally get miscompiled. (reported by Yaroslav Kavenchuk) - fixed bug: printing from several different threads using different values of *print-case* could cause invalid output, due to some internal special variables of the printer not being bound thread-locally (reported by Max Mikhanosha) - fixed bug: SPECIALIZER metaobjects (including anonymous classes and EQL-SPECIALIZERs) can be used as specializers to DEFMETHOD. (reported by Pascal Costanza) - fixed bug: FINALIZE-INHERITANCE is called from REINITIALIZE-INSTANCE on classes when the class has previously been finalized, as required by AMOP. - minor code generation optimizations: ** better register allocation in CLOS dispatching functions ** overflow detection when coercing signed bytes to fixnums on x86-64 ** is now implemented with one IMUL instruction instead of three shifts ** more efficient bit-vector access on x86 and x86-64 ** more efficient access to raw structure slots on x86 and x86-64 - fixed some bugs revealed by Paul Dietz' test suite: ** ENSURE-DIRECTORIES-EXIST.8: ENSURE-DIRECTORIES-EXIST must return its argument. -- Peter Van Eynde Sat, 5 Aug 2006 23:15:03 +0200 sbcl (1:0.9.14.0-2) unstable; urgency=low [ René van Bevern ] * debian/prerm: replace another reference to /usr/bin/sbcl-run by /usr/lib/sbcl/sbcl-run [ Peter Van Eynde ] * Prepare for release. -- Peter Van Eynde Wed, 5 Jul 2006 22:34:49 +0200 sbcl (1:0.9.14.0-1) unstable; urgency=low [René van Bevern] * debian/install-clc.lisp: unify logical pathname translations for "SYS:SRC;**;*.*.*" and "SYS:CONTRIB;**;*.*.*" to "SYS:**;*.*.*" and fix with that the missing "contrib/" part in the SYS:CONTRIB translation. All source definitions are accessible now, this Closes: #323274 * Split the package sbcl-common to sbcl-doc and sbcl-source, so that the rather big source code does not need to be installed with the small documentation. Also make sbcl-doc include the "SBCL Internals" book + debian/control: - build-depend on graphviz and gs-gpl, because the SBCL Internals documentation wants to draw graphs with "dot" and convert them with Ghostscript - declare sbcl-source and sbcl-doc packages, make SBCL description point at them + debian/sbcl-common.doc-base split to debian/sbcl-doc.doc-base.sbcl, debian/sbcl-doc.doc-base.sbcl-internals, debian/sbcl-doc.doc-base.asdf + debian/rules - install source to sbcl-source and documentation to sbcl-doc - build, install and make clean "SBCL Internals" documentation + debian/sbcl-common.dirs split into sbcl-doc.dirs and sbcl-source.dirs + debian/sbcl-common.postinst, debian/sbcl-common.prerm: removed, handled by dh_installdocs + debian/control: build-depend on graphviz and gs-gpl, because the SBCL Internals documentation wants to draw graphs with "dot" and convert them with Ghostscript * sbcl-run is not intented for usage by end-users. It is used by the SBCL package to execute SBCL binary files with binfmt-misc only and pollutes the $PATH namespace + debian/rules: do not install manual-page for sbcl-run, install sbcl-run to /usr/lib/sbcl instead of /usr/bin + debian/binfmt: point to /usr/lib/sbcl/sbcl-run as interpreter [ Peter Van Eynde ] * Move asdf.info and .pdf to cl-asdf package * New upstream * also clean up ./doc/internals/sbcl-internals.cps * move -doc and -source package to doc section -- Peter Van Eynde Sat, 1 Jul 2006 00:07:41 +0200 sbcl (1:0.9.13.0-2) unstable; urgency=low * Also copy sbcl-info-1 file. -- Peter Van Eynde Tue, 6 Jun 2006 13:21:33 +0200 sbcl (1:0.9.13.0-1) unstable; urgency=low * New upstream. Major chances include: + new feature: source path information is generated for macro-expansion errors for use in IDE's like Slime (thanks to Helmut Eller) + bug fix: calls to the compiler no longer modify *RANDOM-STATE* + bug fix: compiler does not loop forever on an invalid type in TYPEP. + improvement: compilation of most CLOS applications is significantly faster + optimization: added a limited bytecode compiler for simple toplevel forms, speeding up compilation and FASL loading -- Peter Van Eynde Wed, 31 May 2006 16:28:28 +0200 sbcl (1:0.9.12.0-1) unstable; urgency=low * Ignore /etc/sbcl.rc loading errors. (Closes: #360458) * New upstream release. * Updated standard version without real changes. -- Peter Van Eynde Mon, 15 May 2006 00:58:42 +0200 sbcl (1:0.9.11.0-1) unstable; urgency=low * Also build with threading on AMD64. * New upstream release, skipped the 0.9.10 series. -- Peter Van Eynde Mon, 27 Mar 2006 09:35:59 +0200 sbcl (1:0.9.9.0-2) unstable; urgency=low * ROOM now prints correct values (Closes: #352181) -- Peter Van Eynde Sat, 11 Feb 2006 08:56:35 +0100 sbcl (1:0.9.9.0-1) unstable; urgency=low * New upstream * Improved short description on a suggestion of Matt R Hall -- Peter Van Eynde Sat, 28 Jan 2006 10:46:42 +0100 sbcl (1:0.9.8.0-1) unstable; urgency=low * Added conflicts with older versions of cl-clx-sbcl. Noted by Humberto Ortiz Zuazaga on the Lisp Gardners ML. * New upstream release -- Peter Van Eynde Sat, 31 Dec 2005 17:15:50 +0100 sbcl (1:0.9.7.1-3) unstable; urgency=low * Found stupid bug: run dh_lisp in binary-arch target, NOT in binary-indep (!). (Closes: #343406, #341784) -- Peter Van Eynde Thu, 15 Dec 2005 07:35:39 +0100 sbcl (1:0.9.7.1-2) unstable; urgency=low * Added gcc-3.4 dependency for alpha and mips * Use correct 'use this corefile' syntax in buildscript Closes: #341856 -- Peter Van Eynde Sat, 3 Dec 2005 09:58:44 +0100 sbcl (1:0.9.7.1-1) unstable; urgency=low * Added build-depndency on dh-lisp (Closes: #341500) -- Peter Van Eynde Thu, 1 Dec 2005 05:51:26 +0100 sbcl (1:0.9.6.55-1) unstable; urgency=low * Now use dh-lisp correctly. (Closes: #338393) * Removed :purify t in save-lisp-and-die on advice of upstream. (Closes: #340104) * New upstream solves infinite loop in kernel < 2.6.11 -- Peter Van Eynde Wed, 23 Nov 2005 21:55:25 +0100 sbcl (1:0.9.6.0-12) unstable; urgency=low * use gcc-3.4 on selected platforms again -- Peter Van Eynde Thu, 10 Nov 2005 23:06:25 +0100 sbcl (1:0.9.6.0-11) unstable; urgency=low * Give up on the clisp cross-compiling, manualy recompile everywhere with sbcl. -- Peter Van Eynde Tue, 8 Nov 2005 21:18:05 +0100 sbcl (1:0.9.6.0-10) unstable; urgency=low * Dropped bash from build-dependecies * Check if clisp is installed * Use 128MB of clisp memory * Use unmodified clisp mem file from newer package. -- Peter Van Eynde Mon, 7 Nov 2005 06:55:25 +0100 sbcl (1:0.9.6.0-9) unstable; urgency=low * Detect better what memfile to use as clisp host. -- Peter Van Eynde Sat, 5 Nov 2005 16:50:43 +0100 sbcl (1:0.9.6.0-8) unstable; urgency=low * Added patches to allow cross-building from clisp. This seems to work on my machine at least. It also fixes the FTBFS on sparc. (Closes: #337594) * So dropped the Build-Dependency on sbcl, and we use clisp * corrected the problem in pre-rm script that prevents removal (Closes: #337365) -- Peter Van Eynde Sat, 5 Nov 2005 11:25:52 +0100 sbcl (1:0.9.6.0-7) unstable; urgency=low * Last try at the buildd problem * Suggest slime, not ilisp anymore * No more Pre-Depends on common-lisp-controller -- Peter Van Eynde Wed, 2 Nov 2005 22:45:49 +0100 sbcl (1:0.9.6.0-6) unstable; urgency=low * Use gcc-3.4 on sparc * Still trying to get out of the buildd swamp. -- Peter Van Eynde Wed, 2 Nov 2005 05:16:35 +0100 sbcl (1:0.9.6.0-4) unstable; urgency=low * Try to force to use the testing version without the dependency hell. -- Peter Van Eynde Tue, 1 Nov 2005 19:22:53 +0100 sbcl (1:0.9.6.0-3) unstable; urgency=low * Fixed the sbcl, sbcl-common dependency: sbcl does not need sbcl-common, but suggests it it does conflict with an older version. This should fix all the FTBS problems at the moment. -- Peter Van Eynde Mon, 31 Oct 2005 23:45:06 +0100 sbcl (1:0.9.6.0-2) unstable; urgency=low * move locale stuff later in the debian/rules file, as to avoid perl warnings. * use the current gcc for compilation, it should 'just work' -- Peter Van Eynde Mon, 31 Oct 2005 07:51:51 +0100 sbcl (1:0.9.6.0-1) unstable; urgency=low * Updated watch file * New upstream * Also use luca's (= ${Source-Version}) trick to link sbcl to sbcl-common -- Peter Van Eynde Thu, 27 Oct 2005 22:03:52 +0200 sbcl (1:0.9.5.50-1) unstable; urgency=low * tools-for-build/where-is-mcontext.c: added exit(0) (Closes: #331252) * Added mipsel architecture, actual work was done by Thiemo Seufer * New upstream -- Peter Van Eynde Wed, 12 Oct 2005 23:09:35 +0200 sbcl (1:0.9.5.9-1) unstable; urgency=low * New upstream * Now based on a mixed cvs/darcs buildsystem -- Peter Van Eynde Tue, 13 Sep 2005 20:57:06 +0200 sbcl (1:0.9.4.65-1) unstable; urgency=low * Peter Van Eynde + New upstream version + Improved saving of stage1, should be root-resistant. Closes: #327311 I prefer not to modify the upstream clean.sh script, so I hide the stage1 files in a tar file + Improved 2.4 kernel detection to always fail. Closes: #327818 * René van Bevern: + integration with binfmt-support: if binfmt-support is installed, FASL objects are now executable like normal programs (if the kernel supports it, like the Default one in Debian) - debian/sbcl-run (new): script to run lisp program given at the command line and quit - debian/binfmt (new): binary format description - debian/rules: install /usr/bin/sbcl-run and /usr/share/binfmts/sbcl - debian/control: Recommend binfmt-support - debian/postinst: register binary format description - debian/prerm: unregister binary format description - README.Debian: mention binfmt-support integration + provide sbcl-XX, XX being the FASL version number, so that packages can depend on this if they include SBCL FASL files - debian/control: add ${sbcl:fasl-version} to Provides - debian/fasl-version.lisp (new): append current FASL version to debian/sbcl.substvars - debian/rules: run fasl-version.lisp in stage1 after it is built + allow she-bang (e.g. #!/usr/bin/sbcl-run) in lisp source - debian/install-clc.lisp: set up reader macro to discard #!-lines -- Peter Van Eynde Mon, 12 Sep 2005 21:06:15 +0200 sbcl (1:0.9.3.72-1) unstable; urgency=low * Updated alpha linker script * Updated upstream: fixed alpha compiler bug * Fix another buglet in alpha compiler * New upstream, should work with alpha again -- Peter Van Eynde Sun, 21 Aug 2005 15:34:31 +0200 sbcl (1:0.9.3.51-1) unstable; urgency=low * New upstream -- Peter Van Eynde Sat, 13 Aug 2005 21:33:52 +0200 sbcl (1:0.9.3.36-1) unstable; urgency=low * Correct /etc/sbclrc /etc/sbcl\.rc load order in manual page. * Correct syntax error in changelog * Corrected bash-ism in postinst * New upstream. * Drop threading support for sarge and hoary '24' distributions * Drop dead if running on 2.4 or without NTPL * Show stderr during building a core * sbcl-common replaces a file in sbcl -- Peter Van Eynde Fri, 12 Aug 2005 20:36:27 +0200 sbcl (1:0.9.3.15-1) experimental; urgency=low * Try newer upstream with the experimental buildds * Clean better -- Peter Van Eynde Tue, 2 Aug 2005 21:31:49 +0200 sbcl (1:0.9.3.0-2) unstable; urgency=low * make scripts required for building executable. -- Peter Van Eynde Tue, 2 Aug 2005 14:40:09 +0200 sbcl (1:0.9.3.0-1) unstable; urgency=low * New upstream, kept the patches from Satoshi to have a fall-back encoding. * Added generated ChangeLog -- Peter Van Eynde Fri, 29 Jul 2005 12:36:30 +0200 sbcl (1:0.9.2.0-3) unstable; urgency=medium * Force a source upload as the -1 version was native by accident. -- Peter Van Eynde Tue, 5 Jul 2005 13:43:54 +0200 sbcl (1:0.9.2.0-2) unstable; urgency=medium * Removed CVS build script * Updated policy version * Added watch file * Removed the gcc-4.0 depends as it seems to cause major problems. Keep using gcc-3.4 for the moment. I will try to upload newer version of sbcl to experimental to iron out further gcc-4 problems. * As this correct rather important problem it has urgency medium -- Peter Van Eynde Tue, 5 Jul 2005 10:37:09 +0200 sbcl (1:0.9.2.0-1) unstable; urgency=low * New upstream. * Now with gcc-4.0 to provoke problems -- Peter Van Eynde Wed, 22 Jun 2005 21:20:10 +0200 sbcl (1:0.9.1.41-2) unstable; urgency=low * Include mips patch from Thiemo Seufer. -- Peter Van Eynde Mon, 20 Jun 2005 08:23:25 +0200 sbcl (1:0.9.1.41-1) unstable; urgency=low * Added patch from NIIMI Satoshi to default to latin-1 enconding if the default external-format of the locale is not known. Closes: #312826 * Added patch to disable :sb-thread is the system is not capable of starting threads. Based on the patch of Ingvar. Closes: #311818 * New upstream does not allow reading from a closed file handle. Closes: #286334 * Remove menu file as the intented form of interaction is via slime. * Improve debian/rules clean target -- Peter Van Eynde Mon, 13 Jun 2005 18:28:31 +0200 sbcl (1:0.9.1.28-1) unstable; urgency=low * New upstream. * Relaxed build dependencies. * Stop doing the tests at all because the interrupt test hangs. -- Peter Van Eynde Tue, 7 Jun 2005 05:36:11 +0200 sbcl (1:0.9.1.1-1) unstable; urgency=low * Added locales to the Build-Depends. Closes: #310927 * New upstream. -- Peter Van Eynde Fri, 27 May 2005 09:42:57 +0200 sbcl (1:0.9.0.39-1) unstable; urgency=low * New upstream to fix unicode related problems. -- Peter Van Eynde Fri, 20 May 2005 18:59:02 +0200 sbcl (1:0.9.0.19-2) unstable; urgency=low * Fixed the --noprogrammer flag to the correct --disable-debugger. * Follow the package maintainters manual in enforcing a certain locale. Both fixes from RalfD -- Peter Van Eynde Sat, 7 May 2005 22:16:30 +0200 sbcl (1:0.9.0.19-1) unstable; urgency=low * Upstream bugfix for 0.9.0.0 release. * Now build with all build-time checks disabled! But rebuild sbcl with itself, thus testing the newly build sbcl Closes: #306711, #302355 * Now loads /etc/sbcl.rc also. Found by Fare'. -- Peter Van Eynde Fri, 6 May 2005 07:15:31 +0200 sbcl (1:0.9.0.0-1) unstable; urgency=low * New upstream release. Added 0 to version number to indicate patchlevel. -- Peter Van Eynde Mon, 25 Apr 2005 06:52:14 +0200 sbcl (1:0.8.21.16-2) unstable; urgency=low * Changes to build scripts make the autobuilders fail. Fixed scripts. -- Peter Van Eynde Wed, 6 Apr 2005 05:31:00 +0200 sbcl (1:0.8.21.16-1) unstable; urgency=low * Updated upstream release. * Improved scripts to build package. * Improved doc-base file to list correct location of html files and added top level html index file. Closes: #303229 * Corrected build-depends, sb-bsd-sockets should now work. Closes: #290661 Closes: #303250 -- Peter Van Eynde Tue, 5 Apr 2005 19:42:43 +0200 sbcl (1:0.8.21.7-1) unstable; urgency=low * New upstream version. -- Peter Van Eynde Tue, 29 Mar 2005 20:32:37 +0200 sbcl (1:0.8.20.5-3) unstable; urgency=low * Add LANG=en_US.UTF-8 to the build environment. * Move sbcl-common stuff out of sbcl directories to avoid overwriting the sbcl files on upgrades. -- Peter Van Eynde Sun, 13 Mar 2005 22:52:41 +0100 sbcl (1:0.8.20.5-2) unstable; urgency=low * Cleaned up better, avoiding a FTBFS reported by RalfD. * Split into indep and arch parts. -- Peter Van Eynde Thu, 10 Mar 2005 06:45:59 +0100 sbcl (1:0.8.20.5-1) unstable; urgency=low * New upstream. * Corrected menu file * Converted - in to \- in manual pages * Included patch from Andreas Jochens that gives gcc-4 support. Closes: #298430 -- Peter Van Eynde Mon, 7 Mar 2005 16:51:56 +0100 sbcl (1:0.8.19.39-2) unstable; urgency=low * New maintainer. (Closes: #297445: O: sbcl -- A development environment for Common Lisp) * Adopted by Peter Van Eynde -- Peter Van Eynde Tue, 1 Mar 2005 10:20:00 +0100 sbcl (1:0.8.19.39-1) unstable; urgency=low * New upstream (closes:296824) -- Kevin M. Rosenberg Fri, 25 Feb 2005 00:50:33 -0700 sbcl (1:0.8.19.29-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 17 Feb 2005 05:40:22 -0700 sbcl (1:0.8.19.22-1) unstable; urgency=low * New upstream * Hard code sbcl path in debian/rules -- Kevin M. Rosenberg Thu, 10 Feb 2005 08:52:15 -0700 sbcl (1:0.8.19.21-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 9 Feb 2005 17:27:19 -0700 sbcl (1:0.8.19.15-1) unstable; urgency=low * New upstream * Removed mips/mipsel from Architectures since upstream has been broken on these for 6 months and no fix is planned. -- Kevin M. Rosenberg Fri, 4 Feb 2005 15:04:09 -0700 sbcl (1:0.8.19.10-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 31 Jan 2005 20:55:15 -0700 sbcl (1:0.8.19-1) unstable; urgency=low * New upstream * Add amd64 to supported architectures -- Kevin M. Rosenberg Tue, 25 Jan 2005 17:47:21 -0700 sbcl (1:0.8.18.38-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 22 Jan 2005 18:04:48 -0700 sbcl (1:0.8.18.30-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 13 Jan 2005 15:30:43 -0700 sbcl (1:0.8.18.23-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 9 Jan 2005 23:39:17 -0700 sbcl (1:0.8.18-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 28 Dec 2004 16:52:38 -0700 sbcl (1:0.8.17.23-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 7 Dec 2004 08:38:10 -0700 sbcl (1:0.8.17.21-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 5 Dec 2004 13:06:59 -0700 sbcl (1:0.8.17.20-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Fri, 3 Dec 2004 18:16:43 -0700 sbcl (1:0.8.17.28-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 9 Dec 2004 14:17:27 -0700 sbcl (1:0.8.17.4-1) unstable; urgency=low * New upstream * Use absolute path for sbcl in sbcl.sh (closes:280153) -- Kevin M. Rosenberg Wed, 1 Dec 2004 02:03:19 -0700 sbcl (1:0.8.17-2) unstable; urgency=low * Add patch for compilation on mips -- Kevin M. Rosenberg Mon, 29 Nov 2004 12:09:09 -0700 sbcl (1:0.8.17-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 28 Nov 2004 17:12:59 -0700 sbcl (1:0.8.16.27-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 2 Nov 2004 10:21:18 -0700 sbcl (1:0.8.16-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 25 Oct 2004 14:32:20 -0600 sbcl (1:0.8.15.7-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 2 Oct 2004 19:25:23 -0600 sbcl (1:0.8.15.6-1) unstable; urgency=low * New upstream (closes:273606) -- Kevin M. Rosenberg Sat, 2 Oct 2004 08:50:17 -0600 sbcl (1:0.8.15-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 29 Sep 2004 14:11:43 -0600 sbcl (1:0.8.14.28-2) unstable; urgency=low * Rebuild on i386 for sb-bsd-sockets inclusion (closes:273493) -- Kevin M. Rosenberg Sun, 26 Sep 2004 09:38:43 -0600 sbcl (1:0.8.14.28-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 23 Sep 2004 13:31:42 -0600 sbcl (1:0.8.14.24-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 14 Sep 2004 12:21:36 -0600 sbcl (1:0.8.14.21-1) unstable; urgency=low * New upstream * Add -finline-functions to CFLAGS for powerpc -- Kevin M. Rosenberg Mon, 13 Sep 2004 15:13:42 -0600 sbcl (1:0.8.14.17-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 13 Sep 2004 10:33:45 -0600 sbcl (1:0.8.14.9-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Fri, 10 Sep 2004 03:04:42 -0600 sbcl (1:0.8.14-2) unstable; urgency=high * Fix the setting of incorrect upstream file permissions -- Kevin M. Rosenberg Tue, 31 Aug 2004 10:27:41 -0600 sbcl (1:0.8.14-1) unstable; urgency=high * New upstream * Urgency high to migrate to sarge -- Kevin M. Rosenberg Mon, 30 Aug 2004 16:41:49 -0600 sbcl (0.8.21+truly.0.8.13.79-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 25 Aug 2004 13:45:15 -0600 sbcl (0.8.21+truly.0.8.13.78-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 25 Aug 2004 09:28:58 -0600 sbcl (0.8.21+truly.0.8.13.68-2) unstable; urgency=low * Include source and set logical pathname translation to more neutral value (closes:267456) -- Kevin M. Rosenberg Tue, 24 Aug 2004 02:02:38 -0600 sbcl (0.8.21+truly.0.8.13.68-1) unstable; urgency=low * New upstream -- root Mon, 16 Aug 2004 19:33:34 -0600 sbcl (0.8.21+truly.0.8.13.62-1) unstable; urgency=low * New upstream (closes:265644) -- Kevin M. Rosenberg Sat, 14 Aug 2004 12:54:09 -0600 sbcl (0.8.21+truly.0.8.13.60-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Fri, 13 Aug 2004 17:31:09 -0600 sbcl (0.8.21+truly.0.8.13.56-1) unstable; urgency=low * New upstream * Add time to build-depends (closes:264255) -- Kevin M. Rosenberg Wed, 11 Aug 2004 02:10:59 -0600 sbcl (0.8.21+truly.0.8.13.26-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 5 Aug 2004 01:44:39 -0600 sbcl (0.8.21+truly.0.8.13.19-1) unstable; urgency=low * New upstream * More common-lisp-controller 4 changes -- Kevin M. Rosenberg Tue, 3 Aug 2004 08:37:03 -0600 sbcl (0.8.21+truly.0.8.13.13-1) unstable; urgency=low * New upstream * Switch to common-lisp-controller 4 -- Kevin M. Rosenberg Sat, 31 Jul 2004 22:38:53 -0600 sbcl (0.8.21+truly.0.8.13.11-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 29 Jul 2004 17:00:23 -0600 sbcl (0.8.21+truly.0.8.13-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 25 Jul 2004 15:33:31 -0600 sbcl (0.8.21+truly.0.8.12.34-1) unstable; urgency=low * New upstream (closes: 256764) * Re-add alpha architecure with Debian unstable specific linker script (debian/ld-script.alpha-linux) -- Kevin M. Rosenberg Mon, 12 Jul 2004 23:23:10 -0600 sbcl (0.8.21+truly.0.8.12-3) unstable; urgency=low * Re-add mips and mipsel to Architectures since sbcl built fine on tbm's mips system. Will upload manually built packages if autobuilding fails again. -- Kevin M. Rosenberg Mon, 28 Jun 2004 15:52:18 -0600 sbcl (0.8.21+truly.0.8.12-2) unstable; urgency=low * Remove mips and mipsel from architectures since they are not building correctly on Debian sid. -- Kevin M. Rosenberg Fri, 25 Jun 2004 22:30:15 -0600 sbcl (0.8.21+truly.0.8.12-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Fri, 25 Jun 2004 17:52:38 -0600 sbcl (0.8.21+truly.0.8.11.20-1) unstable; urgency=low * New upstream * Enable sb-threads and sb-futex on i386 -- Kevin M. Rosenberg Thu, 24 Jun 2004 07:39:23 -0600 sbcl (0.8.21+truly.0.8.11-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 7 Jun 2004 17:14:38 -0600 sbcl (0.8.21+truly.0.8.10.48-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 22 May 2004 23:48:06 -0600 sbcl (0.8.21+truly.0.8.10.33-1) unstable; urgency=low * New upstream * Add missing depends (closes:249556) -- Kevin M. Rosenberg Tue, 18 May 2004 05:57:16 -0600 sbcl (0.8.21+truly.0.8.10.21-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 12 May 2004 15:51:38 -0600 sbcl (0.8.21+truly.0.8.10.14-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 8 May 2004 10:44:27 -0600 sbcl (0.8.21+really.0.8.13-1) unstable; urgency=low * New upstream * Provide info documentation files (closes: 247683) -- Kevin M. Rosenberg Thu, 6 May 2004 09:29:03 -0600 sbcl (0.8.21+really.0.8.10.9-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 3 May 2004 19:34:43 -0600 sbcl (0.8.21+really.0.8.10-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 26 Apr 2004 17:24:26 -0600 sbcl (0.8.21+really.0.8.9.56-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 22 Apr 2004 12:10:35 -0600 sbcl (0.8.21+really.0.8.9.35-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 12 Apr 2004 20:38:34 -0600 sbcl (0.8.21+really.0.8.9.29-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 8 Apr 2004 09:01:17 -0600 sbcl (0.8.21+really.0.8.9.27-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 7 Apr 2004 16:07:49 -0600 sbcl (0.8.21+really.0.8.9.14-1) unstable; urgency=low * New upstream * Remove alpha from Architecutres -- Kevin M. Rosenberg Thu, 1 Apr 2004 18:22:44 -0700 sbcl (0.8.21+really.0.8.9-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 24 Mar 2004 09:11:43 -0700 sbcl (0.8.21+really.0.8.8.30-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 17 Mar 2004 14:28:50 -0700 sbcl (0.8.21+really.0.8.8.27-1) unstable; urgency=low * New upstream * Add --force-connect to call to clc-send-command -- Kevin M. Rosenberg Tue, 16 Mar 2004 10:36:40 -0700 sbcl (0.8.21+really.0.8.8.23-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 10 Mar 2004 21:28:30 -0700 sbcl (0.8.21+really.0.8.8-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 24 Feb 2004 17:06:53 -0700 sbcl (0.8.21+really.0.8.7.27-1) unstable; urgency=low * New upstream * Hack around incorrect version number -- Kevin M. Rosenberg Wed, 28 Jan 2004 10:40:57 -0700 sbcl (0.8.21-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 26 Jan 2004 01:22:41 -0700 sbcl (0.8.7-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 28 Dec 2003 16:43:15 -0700 sbcl (0.8.6.34-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 9 Dec 2003 14:36:07 -0700 sbcl (0.8.5.44-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 16 Nov 2003 18:11:39 -0700 sbcl (0.8.5.30-1) unstable; urgency=low * New upstream * debian/rules: handle new location of sbcl-asdf-install (closes:220115) -- Kevin M. Rosenberg Mon, 10 Nov 2003 17:56:24 -0700 sbcl (0.8.5.28-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 10 Nov 2003 12:07:45 -0700 sbcl (0.8.5-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 25 Oct 2003 11:35:45 -0600 sbcl (0.8.4.20-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 12 Oct 2003 00:07:00 -0600 sbcl (0.8.4-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 2 Oct 2003 14:57:29 -0600 sbcl (0.8.3.95-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 20 Sep 2003 14:04:20 -0600 sbcl (0.8.3.83-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 20 Sep 2003 03:36:53 -0600 sbcl (0.8.3.68-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 15 Sep 2003 09:56:50 -0600 sbcl (0.8.3.61+kmr-1) unstable; urgency=low * New upstream * Patch describe function (closes: 210871) -- Kevin M. Rosenberg Fri, 12 Sep 2003 12:30:20 -0600 sbcl (0.8.3.42-1) unstable; urgency=low * Add Dutch translation from Tim Vandermeersch (closes: 209113) * New upstream -- Kevin M. Rosenberg Sun, 7 Sep 2003 14:30:57 -0600 sbcl (0.8.3.39-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 6 Sep 2003 22:17:27 -0600 sbcl (0.8.3-2) unstable; urgency=low * Ensure sbcl.sh is executable -- Kevin M. Rosenberg Mon, 25 Aug 2003 21:33:27 -0600 sbcl (0.8.3-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 25 Aug 2003 10:13:45 -0600 sbcl (0.8.2.53-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 21 Aug 2003 10:00:20 -0600 sbcl (0.8.2.49-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 17 Aug 2003 18:51:20 -0600 sbcl (0.8.2.27-1) unstable; urgency=low * New upstream * Install new sbcl-asdf-install executable * Rename sbcl-clean.core to sbcl-dist.core * Use dh_install rather than install in rules file -- Kevin M. Rosenberg Mon, 11 Aug 2003 22:10:07 -0600 sbcl (0.8.2.18-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 6 Aug 2003 08:51:58 -0600 sbcl (0.8.2.15-1) unstable; urgency=low * New upstream * Work around broken autobuilder from common-lisp-controller bug (close:202644) -- Kevin M. Rosenberg Tue, 5 Aug 2003 12:48:53 -0600 sbcl (0.8.2.13-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 2 Aug 2003 16:16:49 -0600 sbcl (0.8.2.12-3) unstable; urgency=low * Add check for existence of /usr/bin/clc-autobuild-impl before calling it in postinst since autobuilders are reporting a failure to execute that script. -- Kevin M. Rosenberg Fri, 1 Aug 2003 19:21:15 -0600 sbcl (0.8.2.12-2) unstable; urgency=low * Re-add common-lisp-controller to build-depends -- Kevin M. Rosenberg Fri, 1 Aug 2003 15:52:34 -0600 sbcl (0.8.2.12-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Fri, 1 Aug 2003 12:58:44 -0600 sbcl (0.8.2.11-1) unstable; urgency=low * New upstream * Use gettext for language support (closes: 203667) * Add French translation (closes:203668) -- Kevin M. Rosenberg Thu, 31 Jul 2003 15:10:20 -0600 sbcl (0.8.1.53.1-3) unstable; urgency=low * Hard code paths to common-lisp-controller binaries to hopefully help autobuilders regarding bug # 202644 -- Kevin M. Rosenberg Mon, 28 Jul 2003 21:43:06 -0600 sbcl (0.8.1.53.1-2) unstable; urgency=low * Add common-lisp-controller to build-depends since autobuilder is not adding the Pre-depends on common-lisp-controller when installing sbcl to build sbcl (closes:202644) -- Kevin M. Rosenberg Thu, 24 Jul 2003 09:21:11 -0600 sbcl (0.8.1.53.1-1) unstable; urgency=low * New upstream * Patch for nil rank arrays (closes:202502) -- Kevin M. Rosenberg Wed, 25 Jun 2003 15:58:58 -0600 sbcl (0.8.1-1) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 21 Jun 2003 09:58:44 -0600 sbcl (0.8.0-1) unstable; urgency=low * New upstream * Don't look for /usr/local/lib/sbcl.core (closes: 193239) -- Kevin M. Rosenberg Wed, 30 Apr 2003 13:56:05 -0600 sbcl (0.8alpha.0-1) unstable; urgency=low * New upstream * Rename /etc/sbclrc to /etc/sbcl.rc * Load /etc/sbcl.rc when installing CLC core * Rework rules file to use SBCL's make files for installing contribs * Remove unnecessary DH_COMPAT export from rules file -- Kevin M. Rosenberg Mon, 21 Apr 2003 17:24:46 -0600 sbcl (0.7.14-1) unstable; urgency=low * New maintainer * New upstream (closes: 169735) * Rework sbcl-clean.core handling (closes: 180291) * Ensure CVS metadata is not installed in binary (closes: 184916) * Upgrade to debhelper 4 and use debian/compat file * Update standards-version to 3.5.9.0 [no changes required] * Update to correct required common-lisp-controller version * Add version checking to debconf requirement * Rework config and remove bashism * Rework templates to use new inherit auto-building feature * Rework postinst to use clc-autobuild-impl function * Add debhelper cleaning to rules file * Remove duplicate conffile's -- Kevin M. Rosenberg Tue, 25 Mar 2003 12:40:37 -0700 sbcl (0.7.13-2) unstable; urgency=low * Kevin M. Rosenberg's fixes: * Add upstream contrib packages * symlink contrib .asd files in /usr/lib/sbcl/systems -- Jonathan Hseu Sun, 2 Mar 2003 15:29:52 -0500 sbcl (0.7.13-1) unstable; urgency=low * New upstream * Exclude sbcl.core from sbcl.md5sums (closes: Bug#181121) -- Jonathan Hseu Wed, 26 Feb 2003 23:02:39 -0600 sbcl (0.7.11-1) unstable; urgency=low * New upstream -- Jonathan Hseu Tue, 21 Jan 2003 21:14:47 -0600 sbcl (0.7.10-1) unstable; urgency=low * New upstream * Add mips and mipsel archs. -- Jonathan Hseu Mon, 02 Dec 2002 03:25:25 -0600 sbcl (0.7.9-1) unstable; urgency=low * New upstream * Add Kevin Rosenberg's sbcl.sh fixes to return an error code if packages fail to build and to add the make-user-image option. -- Jonathan Hseu Tue, 29 Oct 2002 03:43:05 -0600 sbcl (0.7.8-1) unstable; urgency=low * Rename install-defsystem.lisp to install-clc.lisp * Change sbcl.sh so that: * Change reference from defsystem.lisp to common-lisp-controller.lisp * Make install-clc and remove-clc synonyms for install-defsystem and remove-defsystem. * Change reference from install-defsystem.lisp to install-clc.lisp * Change all "defsystem" to "clc" in echo's * Add mips and mipsel to archs -- Jonathan Hseu Mon, 30 Sep 2002 22:35:32 -0500 sbcl (0.7.7-1) unstable; urgency=low * New upstream -- Jonathan Hseu Sun, 25 Aug 2002 14:36:14 -0500 sbcl (0.7.6-6) unstable; urgency=low * Report build failures in sbcl.sh (closes: Bug#155603) * Show output on rebuild in sbcl.sh for errors (closes: Bug#155666) -- Jonathan Hseu Wed, 7 Aug 2002 01:20:11 -0500 sbcl (0.7.6-5) unstable; urgency=low * Take out --disable-debugger in install-defsystem, because its effects are permanent -- Jonathan Hseu Thu, 1 Aug 2002 18:33:43 -0500 sbcl (0.7.6-4) unstable; urgency=low * Add "etc/common-lisp/sbcl" to dirs (closes: Bug#154900) -- Jonathan Hseu Tue, 30 Jul 2002 23:49:36 -0500 sbcl (0.7.6-3) unstable; urgency=low * Depend on debconf -- Jonathan Hseu Sat, 27 Jul 2002 17:39:38 -0500 sbcl (0.7.6-2) unstable; urgency=low * Add support for common-lisp-controller v3 install-defsystem * Reduce short description length * Load /etc/lisp-config.lisp every invocation of sbcl * Offer the user an autobuild option for CL libraries -- Jonathan Hseu Sat, 27 Jul 2002 01:13:42 -0500 sbcl (0.7.6-1) unstable; urgency=low * New upstream -- Jonathan Hseu Thu, 25 Jul 2002 02:57:07 -0500 sbcl (0.7.5-2) unstable; urgency=low * Applied Christophe's fix for alphas -- Jonathan Hseu Tue, 25 Jun 2002 15:59:22 +0200 sbcl (0.7.5-1) unstable; urgency=low * New upstream -- Jonathan Hseu Sun, 23 Jun 2002 20:14:30 -0500 sbcl (0.7.4-2) unstable; urgency=low * Fix redirects in sbcl.sh -- Jonathan Hseu Sat, 1 Jun 2002 00:51:21 -0500 sbcl (0.7.4-1) unstable; urgency=low * Fix faulty linker flag (closes: Bug#146900) * Fix doc-base file (closes: Bug#146976) * Fix defsystem (closes: Bug#146508) * Quiet compilation (closes: Bug#148252) * New description (closes: Bug#148660) -- Jonathan Hseu Thu, 16 May 2002 17:12:42 -0500 sbcl (0.7.3-2) unstable; urgency=low * Patch from Daniel Barlow so that it builds on newer alphas -- Jonathan Hseu Sun, 5 May 2002 23:27:37 -0500 sbcl (0.7.3-1) unstable; urgency=low * New upstream * Change build-deps to read docbook-dsssl rather than docbook-stylesheets -- Jonathan Hseu Fri, 3 May 2002 01:47:27 -0500 sbcl (0.7.2-1) unstable; urgency=low * New upstream * Add html user manual * Add powerpc build -- Jonathan Hseu Sun, 24 Mar 2002 16:56:35 -0500 sbcl (0.7.1.22-1) unstable; urgency=low * Add sparc to architecture list * Fix missing symlink (closes: Bug#129258) * Move sbcl.core to /usr/lib/sbcl/ * Make sbcl.sh work on machines that don't do bash -> sh * Add menu item -- Jonathan Hseu Wed, 6 Mar 2002 01:56:00 -0600 sbcl (0.7.1-2) unstable; urgency=low * Add alpha to architecture list -- Jonathan Hseu Sun, 03 Mar 2002 15:03:50 -0600 sbcl (0.7.1-1) unstable; urgency=low * New upstream -- Jonathan Hseu Mon, 28 Jan 2002 01:34:52 -0600 sbcl (0.6.13-6) unstable; urgency=low * Fix sbcl.sh once again (closes: Bug#126270) -- Jonathan Hseu Tue, 25 Dec 2001 07:14:18 -0600 sbcl (0.6.13-5) unstable; urgency=low * Fix install-defsystem in sbcl.sh (closes: Bug#126024) * Change Build-Depends to depend on sbcl instead of lisp-compiler -- Jonathan Hseu Thu, 20 Dec 2001 23:39:50 -0600 sbcl (0.6.13-4) unstable; urgency=low * New maintainer * Initial upload (closes: Bug#110729) * Added posix and defsystem fixes from Christophe Rhodes's patch -- Jonathan Hseu Mon, 10 Dec 2001 18:04:44 -0600 sbcl (0.6.13-3) unstable; urgency=low * Fixed common-lisp-controller integration. -- Peter Van Eynde Sun, 9 Dec 2001 08:49:14 +0100 sbcl (0.6.13-2) unstable; urgency=low * TRACE on Alpha works * icache flushing on Alpha is no longer a NOP * Deleted some dead code * "environ" bug may be fixed * compiles on Alpha -- Daniel Barlow Fri, 10 Aug 2001 16:34:16 +0100 sbcl (0.6.13-1) unstable; urgency=low * New upstream. -- Daniel Barlow Fri, 10 Aug 2001 16:19:36 +0100 sbcl (0.6.12.65-1) unstable; urgency=low * New upstream. INSPECT now works again * Added workaround for (posix-environ) to /etc/sbclrc * Made sbcl.sh a little quieter -- Christophe Rhodes Mon, 6 Aug 2001 11:27:52 +0100 sbcl (0.6.12.43-1) unstable; urgency=low * New upstream -- Christophe Rhodes Sun, 1 Jul 2001 11:55:16 +0100 sbcl (0.6.12.4-1) unstable; urgency=low * NMU (well, maybe) acknowledged. * We have multiarchitecture builds. Next step, the world. * Multiple fixes (thanks, Dan) to the sbclrc logic for defsystem. -- Christophe Rhodes Tue, 8 May 2001 23:42:02 +0100 sbcl (0.6.12.3-1) unstable; urgency=low * NMU (Is that what you call it?) * New upstream version * Now builds on Alpha architecture too -- Daniel Barlow Tue, 8 May 2001 14:45:37 +0100 sbcl (0.6.11.41-2) unstable; urgency=low * Aaargh. We need to remove the compiled defsystem on uninstall -- Christophe Rhodes Sun, 22 Apr 2001 23:44:14 +0100 sbcl (0.6.11.41-1) unstable; urgency=low * Slight fixups in build process; * We're probably stable enough to release to sourceforge. -- Christophe Rhodes Sun, 22 Apr 2001 21:21:19 +0100 sbcl (0.6.11.36-1) unstable; urgency=low * Update to latest cvs * Use the --noprogrammer switch in the common-lisp-controller script -- Christophe Rhodes Sun, 15 Apr 2001 10:23:17 +0100 sbcl (0.6.11.32-1) unstable; urgency=low * Initial Release. -- Christophe Rhodes Fri, 6 Apr 2001 17:55:32 +0100 debian/dirs0000644000000000000000000000020212214415675010053 0ustar usr/bin usr/share/man/man1 etc usr/lib/common-lisp/bin usr/lib/sbcl etc/common-lisp/sbcl usr/lib/sbcl usr/share/lintian/overrides debian/prerm0000644000000000000000000000202012214415675010237 0ustar #! /bin/sh # prerm script for sbcl set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see /usr/share/doc/packaging-manual/ case "$1" in remove|upgrade|deconfigure) rm /usr/lib/sbcl/sbcl.core /usr/lib/sbcl/sbcl-new.core \ > /dev/null 2>&1 || true if [ -x /usr/sbin/update-binfmts ]; then update-binfmts --package sbcl --remove sbcl /usr/lib/sbcl/sbcl-run \ || true fi ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/control0000644000000000000000000000562112214415675010604 0ustar Source: sbcl Section: lisp Priority: optional Homepage: http://www.sbcl.org Maintainer: Debian Common Lisp Team Uploaders: Peter Van Eynde , Christoph Egger Build-Depends: dh-lisp, debhelper (>> 7.0.0), sbcl (>> 1:0.9.5.50-9), sbcl-source, texinfo, zlib1g-dev, texlive-extra-utils, texlive, locales, graphviz, ghostscript, texlive-generic-recommended, texlive-font-utils, time, netbase Standards-Version: 3.9.2 Vcs-Git: http://git.debian.org/git/pkg-common-lisp/sbcl.git Vcs-Browser: http://git.debian.org/?p=pkg-common-lisp/sbcl.git;a=summary Package: sbcl Architecture: i386 amd64 kfreebsd-amd64 kfreebsd-i386 powerpc Depends: ${shlibs:Depends}, ${misc:Depends} Breaks: cl-clx-sbcl (<= 0.7.0-1), common-lisp-controller (<< 6.18), cl-asdf (<= 2:1.502) Suggests: sbcl-doc, sbcl-source, slime Provides: lisp-compiler, ${sbcl:fasl-version} Recommends: binfmt-support (>= 1.1.2) Description: Common Lisp compiler and development system SBCL is a development environment for the ANSI Common Lisp language. It provides a native-code compiler and an integrated debugger, as well as all the features in the ANSI specification. . SBCL also contains other extensions to the ANSI specification, including a foreign-function interface, a pseudo-server API, user-extensible stream functionality, a Meta-Object Protocol, and an ability to run external processes. . To browse SBCL source definitions with development environments, install the sbcl-source package. For documentation on SBCL's usage and internals, the package sbcl-doc is provided. Package: sbcl-doc Replaces: sbcl (<< 1:0.8.20.5-3), sbcl-common (<= 1:0.9.13.0-2) Depends: ${shlibs:Depends}, ${misc:Depends} Section: doc Breaks: sbcl-common (<= 1:0.9.13.0-2) Architecture: all Description: Documentation for Steel Bank Common Lisp This package provides documentation for SBCL -- a development environment for the ANSI Common Lisp language. . The documents in this package cover SBCL-specific extensions to the language, explain how to use this Common Lisp implementation and how it differs from the ANSI standard. . The manual about SBCL's internals is also included in this package and may be of interest for people who intent to work with SBCL's source code. Package: sbcl-source Replaces: sbcl (<< 1:0.8.20.5-3), sbcl-common (<= 1:0.9.13.0-2) Depends: ${shlibs:Depends}, ${misc:Depends} Breaks: sbcl-common (<= 1:0.9.13.0-2) Architecture: all Description: Source code files for SBCL This package provides the source code for SBCL -- a development environment for the ANSI Common Lisp language. . The source code is useful in conjunction with development environments and debuggers like SLIME, that allow macro expansion and lookup of source definitions. . Installing this package enables your source browser to dig deeply into the core of Steel Bank Common Lisp. debian/docs0000644000000000000000000000005112214415675010044 0ustar BUGS CREDITS NEWS PRINCIPLES README TODO debian/binfmt0000644000000000000000000000035512214415675010402 0ustar # This executes executable files that start with "# FASL." using the # specified sbcl wrapper script # # -- René van Bevern , Sun Aug 28 15:15:49 2005 package sbcl interpreter /usr/lib/sbcl/sbcl-run magic # FASL\x0a debian/clean0000644000000000000000000000040112214415675010175 0ustar build-arch-stamp build-indep-stamp configure-stamp src/runtime/Config contrib/sb-bsd-sockets/foo.c contrib/sb-posix/foo.c doc/manual/variables.texinfo customize-target-features.lisp src/runtime/ldso-stubs.S doc/internals/sbcl-internals.cps whitespace-stamp debian/install-clc.lisp0000644000000000000000000000202512214415675012272 0ustar ;;; -*- Mode: LISP; Package: CL-USER -*- ;;; ;;; Copyright (C) Peter Van Eynde 2001 and Kevin Rosenberg 2002-2003 ;;; ;;; License: LGPL v2 ;;; (in-package "COMMON-LISP-USER") (handler-case (load "/usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp") (error (e) (format t "~%Error during load of common-lisp-controller.lisp: ~A~%" e) (sb-unix:unix-exit 1))) (handler-case (common-lisp-controller:init-common-lisp-controller-v4 "sbcl") (error (e) (format t "~%Error running init-common-lisp-controller-v4: ~A~%" e) (sb-unix:unix-exit 1))) (when (probe-file #p"/etc/lisp.config") (load #p"/etc/lisp.config")) (setf (logical-pathname-translations "SYS") '(("SYS:**;*.*.*" #P"/usr/share/sbcl-source/**/*.*"))) (set-dispatch-macro-character #\# #\! (lambda (stream bang arg) (declare (ignore bang arg)) (read-line stream) (values))) (ignore-errors (format t "~%Saving to sbcl-new.core...") (sb-ext:gc :full t) (sb-ext:save-lisp-and-die "sbcl-new.core")) debian/sbcl-run0000644000000000000000000000072312214415675010647 0ustar #!/bin/sh # Wrapper script to run FASL or Lisp files quietly with Steel Bank # Common Lisp. It is used by binfmt-support to execute SBCL fasls # natively. # # -- René van Bevern , Sun Aug 28 15:18:41 2005 if [ "$1" ]; then program="$1"; shift sbcl --noinform --userinit /dev/null --disable-debugger --eval\ "(progn (load \"$program\") (quit))" --end-toplevel-options "$@" else echo "Usage: $0 sbcl-program [arguments ...]" fi debian/NEWS0000644000000000000000000000054512214415675007700 0ustar sbcl (1:1.0.47.0-2) unstable; urgency=low Starting with sbcl 1.0.47.0-2 common-lisp-controller has been dropped from the sbcl packages. One of the results of this is asdf no longer being available on startup. To get the old behaviour put `(require 'asdf)` in /etc/sbclrc -- Christoph Egger Tue, 10 May 2011 22:50:18 +0200 debian/sbcl-doc.install0000644000000000000000000000042512214415675012254 0ustar usr/share/doc/sbcl/html /usr/share/doc/sbcl-doc/ usr/share/doc/sbcl/sbcl.html /usr/share/doc/sbcl-doc/html/ usr/share/doc/sbcl/sbcl.pdf /usr/share/doc/sbcl-doc/ doc/internals/sbcl-internals /usr/share/doc/sbcl-doc/html doc/internals/sbcl-internals.pdf /usr/share/doc/sbcl-doc/ debian/sbcl.install0000644000000000000000000000020612214415675011506 0ustar usr/bin/sbcl usr/lib/sbcl usr/lib/sbcl/sbcl.core usr/share/man/man1/sbcl.1 debian/sbcl.rc /etc debian/install-clc.lisp /usr/lib/sbcl/ debian/sbcl-doc.dirs0000644000000000000000000000006412214415675011546 0ustar usr/share/doc/sbcl-doc usr/share/lintian/overrides debian/sbcl.rc0000644000000000000000000000046712214415675010455 0ustar ;;; -*- Lisp -*- ;;; this file gets installed as /etc/sbcl.rc and run on every ;;; invocation of sbcl (if (probe-file "/etc/lisp-config.lisp") (load "/etc/lisp-config.lisp") (format t "~%;;; Hey: there is no /etc/lisp-config.lisp file, please run \"dpkg-reconfigure common-lisp-controller\" as root")) debian/patches/0000755000000000000000000000000012256056567010633 5ustar debian/patches/sbcl-kfreebsd.patch0000644000000000000000000003015712214415702014350 0ustar Index: sbcl-1.1.10/make-config.sh =================================================================== --- sbcl-1.1.10.orig/make-config.sh 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/make-config.sh 2013-08-11 17:37:39.128114976 +0200 @@ -262,7 +262,7 @@ ;; *BSD) case `uname` in - FreeBSD) + *FreeBSD) sbcl_os="freebsd" ;; OpenBSD) Index: sbcl-1.1.10/src/runtime/Config.x86-bsd =================================================================== --- sbcl-1.1.10.orig/src/runtime/Config.x86-bsd 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/Config.x86-bsd 2013-08-11 17:37:39.128114976 +0200 @@ -14,7 +14,11 @@ ARCH_SRC = x86-arch.c OS_SRC = bsd-os.c x86-bsd-os.c +ifneq (, $(filter GNU%, $(shell uname -s))) +OS_LIBS = -ldl +else OS_LIBS = # -ldl +endif ifdef LISP_FEATURE_SB_CORE_COMPRESSION OS_LIBS += -lz endif Index: sbcl-1.1.10/src/runtime/bsd-os.c =================================================================== --- sbcl-1.1.10.orig/src/runtime/bsd-os.c 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/bsd-os.c 2013-08-11 17:37:39.138116567 +0200 @@ -63,7 +63,7 @@ static void netbsd_init(); #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined LISP_FEATURE_FREEBSD #include #if defined(LISP_FEATURE_SB_THREAD) && !defined(LISP_FEATURE_SB_PTHREAD_FUTEX) #include @@ -92,7 +92,7 @@ #ifdef __NetBSD__ netbsd_init(); -#elif defined(__FreeBSD__) +#elif defined(LISP_FEATURE_FREEBSD) freebsd_init(); #elif defined(__OpenBSD__) openbsd_init(); @@ -107,7 +107,7 @@ /* (Unlike most of the other context fields that we access, the * signal mask field is a field of the basic, outermost context * struct itself both in FreeBSD 4.0 and in OpenBSD 2.6.) */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(LISP_FEATURE_DARWIN) +#if defined(LISP_FEATURE_FREEBSD) || defined(__NetBSD__) || defined(LISP_FEATURE_DARWIN) return &context->uc_sigmask; #elif defined (__OpenBSD__) return &context->sc_mask; @@ -244,7 +244,7 @@ mach_error_memory_fault_handler); #else undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT, -#ifdef LISP_FEATURE_FREEBSD +#if defined(LISP_FEATURE_FREEBSD) && !defined(__GLIBC__) (__siginfohandler_t *) #endif memory_fault_handler); @@ -372,8 +372,10 @@ } #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(LISP_FEATURE_FREEBSD) +#ifndef __GLIBC__ extern int getosreldate(void); +#endif int sig_memory_fault; @@ -381,10 +383,14 @@ { /* Memory fault signal on FreeBSD was changed from SIGBUS to * SIGSEGV. */ +#ifdef __GLIBC__ + sig_memory_fault = SIGSEGV; +#else if (getosreldate() < 700004) sig_memory_fault = SIGBUS; else sig_memory_fault = SIGSEGV; +#endif /* Quote from sbcl-devel (NIIMI Satoshi): "Some OSes, like FreeBSD * 4.x with GENERIC kernel, does not enable SSE support even on @@ -456,7 +462,9 @@ { char path[PATH_MAX + 1]; +#ifndef __GLIBC__ if (getosreldate() >= 600024) { +#endif /* KERN_PROC_PATHNAME is available */ size_t len = PATH_MAX + 1; int mib[4]; @@ -467,6 +475,7 @@ mib[3] = -1; if (sysctl(mib, 4, &path, &len, NULL, 0) != 0) return NULL; +#ifndef __GLIBC__ } else { int size; size = readlink("/proc/curproc/file", path, sizeof(path) - 1); @@ -474,6 +483,7 @@ return NULL; path[size] = '\0'; } +#endif if (strcmp(path, "unknown") == 0) return NULL; return copied_string(path); Index: sbcl-1.1.10/src/runtime/bsd-os.h =================================================================== --- sbcl-1.1.10.orig/src/runtime/bsd-os.h 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/bsd-os.h 2013-08-11 17:37:39.138116567 +0200 @@ -9,7 +9,7 @@ * files for more information. */ -#ifdef __FreeBSD__ +#if defined(LISP_FEATURE_FREEBSD) #include #endif @@ -32,7 +32,7 @@ typedef off_t os_vm_offset_t; typedef int os_vm_prot_t; -#if defined __FreeBSD__ +#if defined(LISP_FEATURE_FREEBSD) /* Note: The man page for sigaction(2) in FreeBSD 4.0 says that this * is an mcontext_t, but according to comments by Raymond Wiker in the * original FreeBSD port of SBCL, that's wrong, it's actually a Index: sbcl-1.1.10/src/runtime/run-program.c =================================================================== --- sbcl-1.1.10.orig/src/runtime/run-program.c 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/run-program.c 2013-08-11 17:37:39.138116567 +0200 @@ -164,7 +164,7 @@ setsid(); #elif defined(LISP_FEATURE_DARWIN) setpgid(0, getpid()); -#elif defined(SVR4) || defined(__linux__) || defined(__osf__) +#elif defined(SVR4) || defined(__linux__) || defined(__osf__) || defined(__GLIBC__) setpgrp(); #else setpgrp(0, getpid()); Index: sbcl-1.1.10/src/runtime/x86-64-arch.c =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-64-arch.c 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-64-arch.c 2013-08-11 17:37:39.138116567 +0200 @@ -68,7 +68,7 @@ * we need to do this nasty absolute index magic number thing * instead. */ return &context->uc_mcontext.gregs[17]; -#elif defined __FreeBSD__ +#elif defined LISP_FEATURE_FREEBSD return &context->uc_mcontext.mc_rflags; #elif defined LISP_FEATURE_DARWIN return CONTEXT_ADDR_FROM_STEM(rflags); Index: sbcl-1.1.10/src/runtime/x86-64-assem.S =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-64-assem.S 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-64-assem.S 2013-08-11 17:37:39.138116567 +0200 @@ -25,7 +25,7 @@ #include "genesis/thread.h" /* Minimize conditionalization for different OS naming schemes. */ -#if defined __linux__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __sun || defined _WIN64 +#if defined __linux__ || defined LISP_FEATURE_FREEBSD || defined __OpenBSD__ || defined __NetBSD__ || defined __sun || defined _WIN64 #define GNAME(var) var #else #define GNAME(var) _##var @@ -33,7 +33,7 @@ /* Get the right type of alignment. Linux, FreeBSD and OpenBSD * want alignment in bytes. */ -#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined __NetBSD__ || defined(__sun) || defined _WIN64 +#if defined(__linux__) || defined(LISP_FEATURE_FREEBSD) || defined(__OpenBSD__) || defined __NetBSD__ || defined(__sun) || defined _WIN64 #define align_4byte 4 #define align_8byte 8 #define align_16byte 16 Index: sbcl-1.1.10/src/runtime/x86-64-bsd-os.h =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-64-bsd-os.h 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-64-bsd-os.h 2013-08-11 17:37:39.138116567 +0200 @@ -16,7 +16,7 @@ * store signal context information, but at least they tend to use the * same stems to name the structure fields, so by using this macro we * can share a fair amount of code between different variants. */ -#if defined __FreeBSD__ +#if defined LISP_FEATURE_FREEBSD #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext.mc_ ## stem #elif defined(__OpenBSD__) #define CONTEXT_ADDR_FROM_STEM(stem) &context->sc_ ## stem Index: sbcl-1.1.10/src/runtime/x86-arch.c =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-arch.c 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-arch.c 2013-08-11 17:37:39.138116567 +0200 @@ -66,7 +66,7 @@ * we need to do this nasty absolute index magic number thing * instead. */ return &context->uc_mcontext.gregs[16]; -#elif defined __FreeBSD__ +#elif defined LISP_FEATURE_FREEBSD return &context->uc_mcontext.mc_eflags; #elif defined __OpenBSD__ return &context->sc_eflags; Index: sbcl-1.1.10/src/runtime/x86-assem.S =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-assem.S 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-assem.S 2013-08-11 17:37:39.138116567 +0200 @@ -32,7 +32,7 @@ * * (Except Win32, which is unlikely ever to be ELF, sorry. -- AB 2005-12-08) */ -#if defined __linux__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __sun +#if defined __linux__ || defined LISP_FEATURE_FREEBSD || defined __NetBSD__ || defined __OpenBSD__ || defined __sun #define GNAME(var) var #else #define GNAME(var) _##var @@ -47,7 +47,7 @@ * matter any more, perhaps it's just clutter we could get * rid of? -- WHN 2004-04-18) */ -#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun) || defined(LISP_FEATURE_WIN32) +#if defined(__linux__) || defined(LISP_FEATURE_FREEBSD) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun) || defined(LISP_FEATURE_WIN32) #define align_4byte 4 #define align_8byte 8 #define align_16byte 16 Index: sbcl-1.1.10/src/runtime/x86-bsd-os.c =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-bsd-os.c 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-bsd-os.c 2013-08-11 17:37:39.148116965 +0200 @@ -29,6 +29,7 @@ #endif #endif + /* KLUDGE: There is strong family resemblance in the signal context * stuff in FreeBSD and OpenBSD, but in detail they're different in * almost every line of code. It would be nice to find some way to @@ -40,7 +41,8 @@ * entails; unfortunately, currently the situation is worse, not * better, than in the above paragraph. */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(LISP_FEATURE_DARWIN) + +#if defined(LISP_FEATURE_FREEBSD) || defined(__OpenBSD__) || defined(LISP_FEATURE_DARWIN) int * os_context_register_addr(os_context_t *context, int offset) { @@ -112,7 +114,7 @@ int *os_context_pc_addr(os_context_t *context) { -#if defined __FreeBSD__ +#if defined LISP_FEATURE_FREEBSD return CONTEXT_ADDR_FROM_STEM(eip); #elif defined __OpenBSD__ return CONTEXT_ADDR_FROM_STEM(pc); @@ -251,7 +253,7 @@ /* FPU state is saved per context on post-KSE systems. * On earlier systems, it is shared in a whole process. */ -#if defined(__FreeBSD_version) && __FreeBSD_version >= 500040 +#if (defined(__FreeBSD_version) && __FreeBSD_version >= 500040) || defined(__GLIBC__) struct envxmm *ex = (struct envxmm *)(context->uc_mcontext.mc_fpstate); __asm__ __volatile__ ("fldcw %0" : : "m" (ex->en_cw)); #endif Index: sbcl-1.1.10/src/runtime/x86-bsd-os.h =================================================================== --- sbcl-1.1.10.orig/src/runtime/x86-bsd-os.h 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/x86-bsd-os.h 2013-08-11 17:37:39.148116965 +0200 @@ -3,7 +3,7 @@ #ifdef LISP_FEATURE_FREEBSD #include -#include +#include #endif typedef int os_context_register_t; @@ -17,7 +17,7 @@ * store signal context information, but at least they tend to use the * same stems to name the structure fields, so by using this macro we * can share a fair amount of code between different variants. */ -#if defined __FreeBSD__ +#if defined LISP_FEATURE_FREEBSD #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext.mc_ ## stem #elif defined(__OpenBSD__) #define CONTEXT_ADDR_FROM_STEM(stem) &context->sc_ ## stem Index: sbcl-1.1.10/src/runtime/Config.x86-64-bsd =================================================================== --- sbcl-1.1.10.orig/src/runtime/Config.x86-64-bsd 2013-08-11 17:37:21.000000000 +0200 +++ sbcl-1.1.10/src/runtime/Config.x86-64-bsd 2013-08-11 17:37:39.148116965 +0200 @@ -14,7 +14,11 @@ ARCH_SRC = x86-64-arch.c OS_SRC = bsd-os.c x86-64-bsd-os.c +ifneq (, $(filter GNU%, $(shell uname -s))) +OS_LIBS = -ldl +else OS_LIBS = # -ldl +endif ifdef LISP_FEATURE_SB_CORE_COMPRESSION OS_LIBS += -lz endif debian/patches/fix-manpage.patch0000644000000000000000000000043112214415675014037 0ustar --- a/doc/sbcl.1 +++ b/doc/sbcl.1 @@ -41,7 +41,7 @@ To run SBCL, type "sbcl". After startup messages a prompt execute it, print any values returned, give you another prompt, and wait for your next input. +\f(Cx -\f(C $ sbcl ...[startup messages elided]... * (+ 1 2 3) debian/patches/disable-version-build.patch0000644000000000000000000000073212214415675016032 0ustar Index: sbcl/generate-version.sh =================================================================== --- sbcl.orig/generate-version.sh 2011-10-30 11:49:08.579866000 +0100 +++ sbcl/generate-version.sh 2011-10-30 12:53:57.488874008 +0100 @@ -4,7 +4,7 @@ # Check that (1) we have git (2) this is a git tree. if ( which git >/dev/null 2>/dev/null && git describe >/dev/null 2>/dev/null ) then - echo "ok" + echo "" else echo "" fi debian/patches/update-asdf.patch0000644000000000000000000067021112256056567014060 0ustar Index: sbcl/contrib/asdf/asdf.lisp =================================================================== --- sbcl.orig/contrib/asdf/asdf.lisp 2013-09-12 21:53:38.532055503 +0200 +++ sbcl/contrib/asdf/asdf.lisp 2013-12-23 16:57:40.006323583 +0100 @@ -1,5 +1,5 @@ ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- -;;; This is ASDF 3.0.2: Another System Definition Facility. +;;; This is ASDF 3.0.3: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to . @@ -54,7 +54,7 @@ (declaim (optimize (speed 1) (safety 3) (debug 3))) (setf ext:*gc-verbose* nil)) -#+(or abcl clisp clozure cmu ecl xcl) +#+(or abcl clisp clozure cmu ecl xcl) ;; punt on hard package upgrade on those implementations (eval-when (:load-toplevel :compile-toplevel :execute) (unless (member :asdf3 *features*) (let* ((existing-version @@ -71,7 +71,7 @@ (existing-version-number (and existing-version (read-from-string existing-major-minor))) (away (format nil "~A-~A" :asdf existing-version))) (when (and existing-version - (< existing-version-number #+abcl 2.25 #+cmu 2.018 #-(or abcl cmu) 2.27)) + (< existing-version-number 2.27)) (rename-package :asdf away) (when *load-verbose* (format t "~&; Renamed old ~A package away to ~A~%" :asdf away)))))) @@ -86,7 +86,7 @@ ;; CAUTION: we must handle the first few packages specially for hot-upgrade. ;; This package definition MUST NOT change unless its name too changes; ;; if/when it changes, don't forget to add new functions missing from below. - ;; Until then, asdf/package is frozen to forever + ;; Until then, uiop/package is frozen to forever ;; import and export the same exact symbols as for ASDF 2.27. ;; Any other symbol must be import-from'ed and re-export'ed in a different package. (:use :common-lisp) @@ -562,7 +562,14 @@ (home-package-p existing to-package) (symbol-package-name existing))) (t (ensure-inherited name symbol to-package from-package t shadowed imported inherited))))))) + (defun recycle-symbol (name recycle exported) + ;; Takes a symbol NAME (a string), a list of package designators for RECYCLE + ;; packages, and a hash-table of names (strings) of symbols scheduled to be + ;; EXPORTED from the package being defined. It returns two values, the + ;; symbol found (if any, or else NIL), and a boolean flag indicating whether + ;; a symbol was found. The caller (DEFINE-PACKAGE) will then do the + ;; re-homing of the symbol, etc. (check-type name string) (check-type recycle list) (check-type exported hash-table) @@ -776,6 +783,28 @@ :mix ,mix :reexport ,reexport :unintern ,unintern))))) (defmacro define-package (package &rest clauses) + "DEFINE-PACKAGE takes a PACKAGE and a number of CLAUSES, of the form +\(KEYWORD . ARGS\). +DEFINE-PACKAGE supports the following keywords: +USE, SHADOW, SHADOWING-IMPORT-FROM, IMPORT-FROM, EXPORT, INTERN -- as per CL:DEFPACKAGE. +RECYCLE -- Recycle the package's exported symbols from the specified packages, +in order. For every symbol scheduled to be exported by the DEFINE-PACKAGE, +either through an :EXPORT option or a :REEXPORT option, if the symbol exists in +one of the :RECYCLE packages, the first such symbol is re-homed to the package +being defined. +For the sake of idempotence, it is important that the package being defined +should appear in first position if it already exists, and even if it doesn't, +ahead of any package that is not going to be deleted afterwards and never +created again. In short, except for special cases, always make it the first +package on the list if the list is not empty. +MIX -- Takes a list of package designators. MIX behaves like +\(:USE PKG1 PKG2 ... PKGn\) but additionally uses :SHADOWING-IMPORT-FROM to +resolve conflicts in favor of the first found symbol. It may still yield +an error if there is a conflict with an explicitly :SHADOWING-IMPORT-FROM symbol. +REEXPORT -- Takes a list of package designators. For each package, p, in the list, +export symbols with the same name as those exported from p. Note that in the case +of shadowing, etc. the symbols with the same name may not be the same symbols. +UNINTERN -- Remove symbols here from PACKAGE." (let ((ensure-form `(apply 'ensure-package ',(parse-define-package-form package clauses)))) `(progn @@ -846,10 +875,14 @@ ;;;; Early meta-level tweaks -#+(or abcl (and allegro ics) (and (or clisp cmu ecl mkcl) unicode) - clozure lispworks (and sbcl sb-unicode) scl) +#+(or abcl allegro clisp cmu ecl mkcl clozure lispworks sbcl scl) (eval-when (:load-toplevel :compile-toplevel :execute) - (pushnew :asdf-unicode *features*)) + ;; Check for unicode at runtime, so that a hypothetical FASL compiled with unicode + ;; but loaded in a non-unicode setting (e.g. on Allegro) won't tell a lie. + (when (and #+allegro (member :ics *features*) + #+(or clisp cmu ecl mkcl) (member :unicode *features*) + #+sbcl (member :sb-unicode *features*)) + (pushnew :asdf-unicode *features*))) #+allegro (eval-when (:load-toplevel :compile-toplevel :execute) @@ -860,6 +893,20 @@ (setf excl:*warn-on-nested-reader-conditionals* nil)) (setf *print-readably* nil)) +#+clozure (in-package :ccl) +#+(and clozure windows-target) ;; See http://trac.clozure.com/ccl/ticket/1117 +(eval-when (:load-toplevel :compile-toplevel :execute) + (unless (fboundp 'external-process-wait) + (in-development-mode + (defun external-process-wait (proc) + (when (and (external-process-pid proc) (eq (external-process-%status proc) :running)) + (with-interrupts-enabled + (wait-on-semaphore (external-process-completed proc)))) + (values (external-process-%exit-code proc) + (external-process-%status proc)))))) +#+clozure (in-package :uiop/common-lisp) + + #+cormanlisp (eval-when (:load-toplevel :compile-toplevel :execute) (deftype logical-pathname () nil) @@ -962,6 +1009,12 @@ ;;;; compatfmt: avoid fancy format directives when unsupported (eval-when (:load-toplevel :compile-toplevel :execute) (defun frob-substrings (string substrings &optional frob) + "for each substring in SUBSTRINGS, find occurrences of it within STRING +that don't use parts of matched occurrences of previous strings, and +FROB them, that is to say, remove them if FROB is NIL, +replace by FROB if FROB is a STRING, or if FROB is a FUNCTION, +call FROB with the match and a function that emits a string in the output. +Return a string made of the parts not omitted or emitted by FROB." (declare (optimize (speed 0) (safety 3) (debug 3))) (let ((length (length string)) (stream nil)) (labels ((emit-string (x &optional (start 0) (end (length x))) @@ -998,8 +1051,6 @@ #+(or gcl genera) (frob-substrings format `("~3i~_" #+(or genera gcl2.6) ,@'("~@<" "~@;" "~@:>" "~:>"))) #-(or gcl genera) format)) - - ;;;; ------------------------------------------------------------------------- ;;;; General Purpose Utilities for ASDF @@ -1007,7 +1058,7 @@ (:nicknames :asdf/utility) (:recycle :uiop/utility :asdf/utility :asdf) (:use :uiop/common-lisp :uiop/package) - ;; import and reexport a few things defined in :asdf/common-lisp + ;; import and reexport a few things defined in :uiop/common-lisp (:import-from :uiop/common-lisp #:compatfmt #:loop* #:frob-substrings #+ecl #:use-ecl-byte-compiler-p #+mcl #:probe-posix) (:export #:compatfmt #:loop* #:frob-substrings #:compatfmt @@ -1021,14 +1072,15 @@ #:remove-plist-keys #:remove-plist-key ;; plists #:emptyp ;; sequences #:+non-base-chars-exist-p+ ;; characters + #:+max-character-type-index+ #:character-type-index #:+character-types+ #:base-string-p #:strings-common-element-type #:reduce/strcat #:strcat ;; strings - #:first-char #:last-char #:split-string + #:first-char #:last-char #:split-string #:stripln #:+cr+ #:+lf+ #:+crlf+ #:string-prefix-p #:string-enclosed-p #:string-suffix-p #:find-class* ;; CLOS #:stamp< #:stamps< #:stamp*< #:stamp<= ;; stamps #:earlier-stamp #:stamps-earliest #:earliest-stamp #:later-stamp #:stamps-latest #:latest-stamp #:latest-stamp-f - #:list-to-hash-set ;; hash-table + #:list-to-hash-set #:ensure-gethash ;; hash-table #:ensure-function #:access-at #:access-at-count ;; functions #:call-function #:call-functions #:register-hook-function #:match-condition-p #:match-any-condition-p ;; conditions @@ -1070,9 +1122,9 @@ ;; undefining the previous function is the portable way ;; of overriding any incompatible previous gf, except on CLISP. ;; We usually try to do it only for the functions that need it, - ;; which happens in asdf/upgrade - however, for ECL, we need this hammer, + ;; which happens in asdf/upgrade - however, for ECL, we need this hammer ;; (which causes issues in clisp) - ,@(when (or #-clisp supersede #+(or ecl gcl2.7) t) ; XXX + ,@(when (or #-clisp supersede #+(or ecl gcl2.7) t) `((undefine-function ',name))) #-gcl ; gcl 2.7.0 notinline functions lose secondary return values :-( ,@(when (and #+ecl (symbolp name)) ; fails for setf functions on ecl @@ -1188,23 +1240,54 @@ ;;; Characters -(with-upgradability () +(with-upgradability () ;; base-char != character on ECL, LW, SBCL, Genera. LW also has SIMPLE-CHAR. (defconstant +non-base-chars-exist-p+ (not (subtypep 'character 'base-char))) (when +non-base-chars-exist-p+ (pushnew :non-base-chars-exist-p *features*))) +(with-upgradability () + (defparameter +character-types+ ;; assuming a simple hierarchy + #(#+non-base-chars-exist-p base-char #+lispworks lw:simple-char character)) + (defparameter +max-character-type-index+ (1- (length +character-types+)))) + +(with-upgradability () + (defun character-type-index (x) + (declare (ignorable x)) + #.(case +max-character-type-index+ + (0 0) + (1 '(etypecase x + (character (if (typep x 'base-char) 0 1)) + (symbol (if (subtypep x 'base-char) 0 1)))) + (otherwise + '(or (position-if (etypecase x + (character #'(lambda (type) (typep x type))) + (symbol #'(lambda (type) (subtypep x type)))) + +character-types+) + (error "Not a character or character type: ~S" x)))))) + ;;; Strings (with-upgradability () (defun base-string-p (string) + "Does the STRING only contain BASE-CHARs?" (declare (ignorable string)) (and #+non-base-chars-exist-p (eq 'base-char (array-element-type string)))) (defun strings-common-element-type (strings) + "What least subtype of CHARACTER can contain all the elements of all the STRINGS?" (declare (ignorable strings)) - #-non-base-chars-exist-p 'character - #+non-base-chars-exist-p - (if (loop :for s :in strings :always (or (null s) (typep s 'base-char) (base-string-p s))) - 'base-char 'character)) + #.(if +non-base-chars-exist-p+ + `(aref +character-types+ + (loop :with index = 0 :for s :in strings :do + (cond + ((= index ,+max-character-type-index+) (return index)) + ((emptyp s)) ;; NIL or empty string + ((characterp s) (setf index (max index (character-type-index s)))) + ((stringp s) (unless (>= index (character-type-index (array-element-type s))) + (setf index (reduce 'max s :key #'character-type-index + :initial-value index)))) + (t (error "Invalid string designator ~S for ~S" s 'strings-common-element-type))) + :finally (return index))) + ''character)) (defun reduce/strcat (strings &key key start end) "Reduce a list as if by STRCAT, accepting KEY START and END keywords like REDUCE. @@ -1222,12 +1305,16 @@ :finally (return output))) (defun strcat (&rest strings) + "Concatenate strings. +NIL is interpreted as an empty string, a character as a string of length one." (reduce/strcat strings)) (defun first-char (s) + "Return the first character of a non-empty string S, or NIL" (and (stringp s) (plusp (length s)) (char s 0))) (defun last-char (s) + "Return the last character of a non-empty string S, or NIL" (and (stringp s) (plusp (length s)) (char s (1- (length s))))) (defun split-string (string &key max (separator '(#\Space #\Tab))) @@ -1238,6 +1325,7 @@ \"a.b.c.d.e\" :max 3 :separator \".\" it will return (\"a.b.c\" \"d\" \"e\")." (block () (let ((list nil) (words 0) (end (length string))) + (when (zerop end) (return nil)) (flet ((separatorp (char) (find char separator)) (done () (return (cons (subseq string 0 end) list)))) (loop @@ -1270,6 +1358,22 @@ (and (string-prefix-p prefix string) (string-suffix-p string suffix)))) + (defvar +cr+ (coerce #(#\Return) 'string)) + (defvar +lf+ (coerce #(#\Linefeed) 'string)) + (defvar +crlf+ (coerce #(#\Return #\Linefeed) 'string)) + + (defun stripln (x) + "Strip a string X from any ending CR, LF or CRLF. +Return two values, the stripped string and the ending that was stripped, +or the original value and NIL if no stripping took place. +Since our STRCAT accepts NIL as empty string designator, +the two results passed to STRCAT always reconstitute the original string" + (check-type x string) + (block nil + (flet ((c (end) (when (string-suffix-p x end) + (return (values (subseq x 0 (- (length x) (length end))) end))))) + (when x (c +crlf+) (c +lf+) (c +cr+) (values x nil))))) + ;;; CLOS (with-upgradability () @@ -1280,7 +1384,7 @@ (symbol (find-class x errorp environment))))) -;;; stamps: a REAL or boolean where NIL=-infinity, T=+infinity +;;; stamps: a REAL or a boolean where NIL=-infinity, T=+infinity (eval-when (#-lispworks :compile-toplevel :load-toplevel :execute) (deftype stamp () '(or real boolean))) (with-upgradability () @@ -1304,12 +1408,6 @@ (define-modify-macro latest-stamp-f (&rest stamps) latest-stamp)) -;;; Hash-tables -(with-upgradability () - (defun list-to-hash-set (list &aux (h (make-hash-table :test 'equal))) - (dolist (x list h) (setf (gethash x h) t)))) - - ;;; Function designators (with-upgradability () (defun ensure-function (fun &key (package :cl)) @@ -1320,14 +1418,17 @@ i.e. for a boolean keyword character number or pathname. Otherwise if FUN is a non-literally constant symbol, return its FDEFINITION. If FUN is a CONS, return the function that applies its CAR -to the appended list of the rest of its CDR and the arguments. +to the appended list of the rest of its CDR and the arguments, +unless the CAR is LAMBDA, in which case the expression is evaluated. If FUN is a string, READ a form from it in the specified PACKAGE (default: CL) and EVAL that in a (FUNCTION ...) context." (etypecase fun (function fun) ((or boolean keyword character number pathname) (constantly fun)) - ((or function symbol) fun) - (cons #'(lambda (&rest args) (apply (car fun) (append (cdr fun) args)))) + (symbol fun) + (cons (if (eq 'lambda (car fun)) + (eval fun) + #'(lambda (&rest args) (apply (car fun) (append (cdr fun) args))))) (string (eval `(function ,(with-standard-io-syntax (let ((*package* (find-package package))) (read-from-string fun)))))))) @@ -1357,7 +1458,7 @@ (defun access-at-count (at) "From an AT specification, extract a COUNT of maximum number - of sub-objects to read as per ACCESS-AT" +of sub-objects to read as per ACCESS-AT" (cond ((integerp at) (1+ at)) @@ -1365,16 +1466,38 @@ (1+ (first at))))) (defun call-function (function-spec &rest arguments) + "Call the function designated by FUNCTION-SPEC as per ENSURE-FUNCTION, +with the given ARGUMENTS" (apply (ensure-function function-spec) arguments)) (defun call-functions (function-specs) + "For each function in the list FUNCTION-SPECS, in order, call the function as per CALL-FUNCTION" (map () 'call-function function-specs)) (defun register-hook-function (variable hook &optional call-now-p) - (pushnew hook (symbol-value variable)) + "Push the HOOK function (a designator as per ENSURE-FUNCTION) onto the hook VARIABLE. +When CALL-NOW-P is true, also call the function immediately." + (pushnew hook (symbol-value variable) :test 'equal) (when call-now-p (call-function hook)))) +;;; Hash-tables +(with-upgradability () + (defun ensure-gethash (key table default) + "Lookup the TABLE for a KEY as by gethash, but if not present, +call the (possibly constant) function designated by DEFAULT as per CALL-FUNCTION, +set the corresponding entry to the result in the table, and return that result." + (multiple-value-bind (value foundp) (gethash key table) + (if foundp + value + (setf (gethash key table) (values (call-function default)))))) + + (defun list-to-hash-set (list &aux (h (make-hash-table :test 'equal))) + "Convert a LIST into hash-table that has the same elements when viewed as a set, +up to the given equality TEST" + (dolist (x list h) (setf (gethash x h) t)))) + + ;;; Version handling (with-upgradability () (defun unparse-version (version-list) @@ -1471,6 +1594,7 @@ (loop :for x :in conditions :thereis (match-condition-p x condition))) (defun call-with-muffled-conditions (thunk conditions) + "calls the THUNK in a context where the CONDITIONS are muffled" (handler-bind ((t #'(lambda (c) (when (match-any-condition-p c conditions) (muffle-warning c))))) (funcall thunk))) @@ -1478,7 +1602,6 @@ (defmacro with-muffled-conditions ((conditions) &body body) `(call-with-muffled-conditions #'(lambda () ,@body) ,conditions))) - ;;;; --------------------------------------------------------------------------- ;;;; Access to the Operating System @@ -1487,7 +1610,7 @@ (:recycle :uiop/os :asdf/os :asdf) (:use :uiop/common-lisp :uiop/package :uiop/utility) (:export - #:featurep #:os-unix-p #:os-windows-p #:os-genera-p #:detect-os ;; features + #:featurep #:os-unix-p #:os-macosx-p #:os-windows-p #:os-genera-p #:detect-os ;; features #:getenv #:getenvp ;; environment variables #:implementation-identifier ;; implementation identifier #:implementation-type #:*implementation-type* @@ -1501,6 +1624,11 @@ ;;; Features (with-upgradability () (defun featurep (x &optional (*features* *features*)) + "Checks whether a feature expression X is true with respect to the *FEATURES* set, +as per the CLHS standard for #+ and #-. Beware that just like the CLHS, +we assume symbols from the KEYWORD package are used, but that unless you're using #+/#- +your reader will not have magically used the KEYWORD package, so you need specify +keywords explicitly." (cond ((atom x) (and (member x *features*) t)) ((eq :not (car x)) (assert (null (cddr x))) (not (featurep (cadr x)))) @@ -1509,22 +1637,38 @@ (t (error "Malformed feature specification ~S" x)))) (defun os-unix-p () + "Is the underlying operating system some Unix variant?" (or #+abcl (featurep :unix) #+(and (not abcl) (or unix cygwin darwin)) t)) + (defun os-macosx-p () + "Is the underlying operating system MacOS X?" + ;; OS-MACOSX is not mutually exclusive with OS-UNIX, + ;; in fact the former implies the latter. + (or + #+allegro (featurep :macosx) + #+clisp (featurep :macos) + (featurep :darwin))) + (defun os-windows-p () + "Is the underlying operating system Microsoft Windows?" (or #+abcl (featurep :windows) #+(and (not (or abcl unix cygwin darwin)) (or win32 windows mswindows mingw32)) t)) (defun os-genera-p () + "Is the underlying operating system Genera (running on a Symbolics Lisp Machine)?" (or #+genera t)) (defun os-oldmac-p () + "Is the underlying operating system an (emulated?) MacOS 9 or earlier?" (or #+mcl t)) (defun detect-os () + "Detects the current operating system. Only needs be run at compile-time, +except on ABCL where it might change between FASL compilation and runtime." (loop* :with o :for (feature . detect) :in '((:os-unix . os-unix-p) (:os-windows . os-windows-p) + (:os-macosx . os-macosx-p) (:genera . os-genera-p) (:os-oldmac . os-oldmac-p)) :when (and (not o) (funcall detect)) :do (setf o feature) (pushnew o *features*) :else :do (setf *features* (remove feature *features*)) @@ -1538,6 +1682,9 @@ (with-upgradability () (defun getenv (x) + "Query the environment, as in C getenv. +Beware: may return empty string if a variable is present but empty; +use getenvp to return NIL in such a case." (declare (ignorable x)) #+(or abcl clisp ecl xcl) (ext:getenv x) #+allegro (sys:getenv x) @@ -1579,6 +1726,7 @@ (with-upgradability () (defun first-feature (feature-sets) + "A helper for various feature detection functions" (dolist (x feature-sets) (multiple-value-bind (short long feature-expr) (if (consp x) @@ -1588,15 +1736,18 @@ (return (values short long)))))) (defun implementation-type () + "The type of Lisp implementation used, as a short UIOP-standardized keyword" (first-feature '(:abcl (:acl :allegro) (:ccl :clozure) :clisp (:corman :cormanlisp) (:cmu :cmucl :cmu) :ecl :gcl (:lwpe :lispworks-personal-edition) (:lw :lispworks) :mcl :mkcl :sbcl :scl (:smbx :symbolics) :xcl))) - (defvar *implementation-type* (implementation-type)) + (defvar *implementation-type* (implementation-type) + "The type of Lisp implementation used, as a short UIOP-standardized keyword") (defun operating-system () + "The operating system of the current host" (first-feature '(:cygwin (:win :windows :mswindows :win32 :mingw32) ;; try cygwin first! (:linux :linux :linux-target) ;; for GCL at least, must appear before :bsd @@ -1605,6 +1756,7 @@ :genera))) (defun architecture () + "The CPU architecture of the current host" (first-feature '((:x64 :x86-64 :x86_64 :x8664-target :amd64 (:and :word-size=64 :pc386)) (:x86 :x86 :i386 :i486 :i586 :i686 :pentium3 :pentium4 :pc386 :iapx386 :x8632-target) @@ -1625,6 +1777,7 @@ (error "Can't determine fasl version."))) (defun lisp-version-string () + "return a string that identifies the current Lisp implementation version" (let ((s (lisp-implementation-version))) (car ; as opposed to OR, this idiom prevents some unreachable code warning (list @@ -1660,6 +1813,8 @@ s)))) (defun implementation-identifier () + "Return a string that identifies the ABI of the current implementation, +suitable for use as a directory name to segregate Lisp FASLs, C dynamic libraries, etc." (substitute-if #\_ #'(lambda (x) (find x " /:;&^\\|?<>(){}[]$#`'\"")) (format nil "~(~a~@{~@[-~a~]~}~)" @@ -1673,6 +1828,7 @@ (with-upgradability () (defun hostname () + "return the hostname of the current host" ;; Note: untested on RMCL #+(or abcl clozure cmu ecl genera lispworks mcl mkcl sbcl scl xcl) (machine-instance) #+cormanlisp "localhost" ;; is there a better way? Does it matter? @@ -1686,6 +1842,7 @@ #+cmu (defun parse-unix-namestring* (unix-namestring) + "variant of LISP::PARSE-UNIX-NAMESTRING that returns a pathname object" (multiple-value-bind (host device directory name type version) (lisp::parse-unix-namestring unix-namestring 0 (length unix-namestring)) (make-pathname :host (or host lisp::*unix-host*) :device device @@ -1735,22 +1892,27 @@ ;;;; Jesse Hager: The Windows Shortcut File Format. ;;;; http://www.wotsit.org/list.asp?fc=13 -#-(or clisp genera) ; CLISP doesn't need it, and READ-SEQUENCE annoys old Genera. +#-(or clisp genera) ; CLISP doesn't need it, and READ-SEQUENCE annoys old Genera that doesn't need it (with-upgradability () (defparameter *link-initial-dword* 76) (defparameter *link-guid* #(1 20 2 0 0 0 0 0 192 0 0 0 0 0 0 70)) (defun read-null-terminated-string (s) + "Read a null-terminated string from an octet stream S" + ;; note: doesn't play well with UNICODE (with-output-to-string (out) (loop :for code = (read-byte s) :until (zerop code) :do (write-char (code-char code) out)))) (defun read-little-endian (s &optional (bytes 4)) + "Read a number in little-endian format from an byte (octet) stream S, +the number having BYTES octets (defaulting to 4)." (loop :for i :from 0 :below bytes :sum (ash (read-byte s) (* 8 i)))) (defun parse-file-location-info (s) + "helper to parse-windows-shortcut" (let ((start (file-position s)) (total-length (read-little-endian s)) (end-of-header (read-little-endian s)) @@ -1774,6 +1936,8 @@ (read-null-terminated-string s)))))) (defun parse-windows-shortcut (pathname) + "From a .lnk windows shortcut, extract the pathname linked to" + ;; NB: doesn't do much checking & doesn't look like it will work well with UNICODE. (with-open-file (s pathname :element-type '(unsigned-byte 8)) (handler-case (when (and (= (read-little-endian s) *link-initial-dword*) @@ -1822,7 +1986,7 @@ #:merge-pathnames* #:nil-pathname #:*nil-pathname* #:with-pathname-defaults ;; Predicates - #:pathname-equal #:logical-pathname-p #:physical-pathname-p + #:pathname-equal #:logical-pathname-p #:physical-pathname-p #:physicalize-pathname #:absolute-pathname-p #:relative-pathname-p #:hidden-pathname-p #:file-pathname-p ;; Directories #:pathname-directory-pathname #:pathname-parent-directory-pathname @@ -1835,7 +1999,7 @@ #:subpathname #:subpathname* #:ensure-absolute-pathname #:pathname-root #:pathname-host-pathname - #:subpathp + #:subpathp #:enough-pathname #:with-enough-pathname #:call-with-enough-pathname ;; Checking constraints #:ensure-pathname ;; implemented in filesystem.lisp to accommodate for existence constraints ;; Wildcard pathnames @@ -1851,7 +2015,9 @@ (with-upgradability () (defun normalize-pathname-directory-component (directory) - "Given a pathname directory component, return an equivalent form that is a list" + "Convert the DIRECTORY component from a format usable by the underlying +implementation's MAKE-PATHNAME and other primitives to a CLHS-standard format +that is a list and not a string." #+gcl2.6 (setf directory (substitute :back :parent directory)) (cond #-(or cmu sbcl scl) ;; these implementations already normalize directory components. @@ -1869,6 +2035,8 @@ (error (compatfmt "~@") directory)))) (defun denormalize-pathname-directory-component (directory-component) + "Convert the DIRECTORY-COMPONENT from a CLHS-standard format to a format usable +by the underlying implementation's MAKE-PATHNAME and other primitives" #-gcl2.6 directory-component #+gcl2.6 (let ((d (substitute-if :parent (lambda (x) (member x '(:up :back))) @@ -1879,7 +2047,7 @@ (t d)))) (defun merge-pathname-directory-components (specified defaults) - ;; Helper for merge-pathnames* that handles directory components. + "Helper for MERGE-PATHNAMES* that handles directory components" (let ((directory (normalize-pathname-directory-component specified))) (ecase (first directory) ((nil) defaults) @@ -1906,7 +2074,8 @@ ;; This will be :unspecific if supported, or NIL if not. (defparameter *unspecific-pathname-type* #+(or abcl allegro clozure cmu gcl genera lispworks mkcl sbcl scl xcl) :unspecific - #+(or clisp ecl #|These haven't been tested:|# cormanlisp mcl) nil) + #+(or clisp ecl #|These haven't been tested:|# cormanlisp mcl) nil + "Unspecific type component to use with the underlying implementation's MAKE-PATHNAME") (defun make-pathname* (&rest keys &key (directory nil #+gcl2.6 directoryp) host (device () #+allegro devicep) name type version defaults @@ -1947,11 +2116,11 @@ if the SPECIFIED pathname does not have an absolute directory, then the HOST and DEVICE both come from the DEFAULTS, whereas if the SPECIFIED pathname does have an absolute directory, -then the HOST and DEVICE both come from the SPECIFIED. +then the HOST and DEVICE both come from the SPECIFIED pathname. This is what users want on a modern Unix or Windows operating system, -unlike the MERGE-PATHNAME behavior. +unlike the MERGE-PATHNAMES behavior. Also, if either argument is NIL, then the other argument is returned unmodified; -this is unlike MERGE-PATHNAME which always merges with a pathname, +this is unlike MERGE-PATHNAMES which always merges with a pathname, by default *DEFAULT-PATHNAME-DEFAULTS*, which cannot be NIL." (when (null specified) (return-from merge-pathnames* defaults)) (when (null defaults) (return-from merge-pathnames* specified)) @@ -1983,9 +2152,23 @@ :type (funcall unspecific-handler type) :version (funcall unspecific-handler version)))))) + (defun logical-pathname-p (x) + "is X a logical-pathname?" + (typep x 'logical-pathname)) + + (defun physical-pathname-p (x) + "is X a pathname that is not a logical-pathname?" + (and (pathnamep x) (not (logical-pathname-p x)))) + + (defun physicalize-pathname (x) + "if X is a logical pathname, use translate-logical-pathname on it." + ;; Ought to be the same as translate-logical-pathname, except the latter borks on CLISP + (let ((p (when x (pathname x)))) + (if (logical-pathname-p p) (translate-logical-pathname p) p))) + (defun nil-pathname (&optional (defaults *default-pathname-defaults*)) "A pathname that is as neutral as possible for use as defaults - when merging, making or parsing pathnames" +when merging, making or parsing pathnames" ;; 19.2.2.2.1 says a NIL host can mean a default host; ;; see also "valid physical pathname host" in the CLHS glossary, that suggests ;; strings and lists of strings or :unspecific @@ -1999,15 +2182,20 @@ ;; the default shouldn't matter, but we really want something physical #-mcl ,@'(:defaults defaults))) - (defvar *nil-pathname* (nil-pathname (translate-logical-pathname (user-homedir-pathname)))) + (defvar *nil-pathname* (nil-pathname (physicalize-pathname (user-homedir-pathname))) + "A pathname that is as neutral as possible for use as defaults +when merging, making or parsing pathnames") (defmacro with-pathname-defaults ((&optional defaults) &body body) + "Execute BODY in a context where the *DEFAULT-PATHNAME-DEFAULTS* are as neutral as possible +when merging, making or parsing pathnames" `(let ((*default-pathname-defaults* ,(or defaults '*nil-pathname*))) ,@body))) ;;; Some pathname predicates (with-upgradability () (defun pathname-equal (p1 p2) + "Are the two pathnames P1 and P2 reasonably equal in the paths they denote?" (when (stringp p1) (setf p1 (pathname p1))) (when (stringp p2) (setf p2 (pathname p2))) (flet ((normalize-component (x) @@ -2027,12 +2215,6 @@ (=? pathname-type) (=? pathname-version))))))) - (defun logical-pathname-p (x) - (typep x 'logical-pathname)) - - (defun physical-pathname-p (x) - (and (pathnamep x) (not (logical-pathname-p x)))) - (defun absolute-pathname-p (pathspec) "If PATHSPEC is a pathname or namestring object that parses as a pathname possessing an :ABSOLUTE directory component, return the (parsed) pathname. @@ -2219,7 +2401,7 @@ 1- If TYPE is :DIRECTORY or ENSURE-DIRECTORY is true, the string is made the last directory component, and NAME and TYPE are NIL. if the string is empty, it's the empty pathname with all slots NIL. -2- If TYPE is NIL, the substring is file-namestring, and its NAME and TYPE +2- If TYPE is NIL, the substring is a file-namestring, and its NAME and TYPE are separated by SPLIT-NAME-TYPE. 3- If TYPE is a string, it is the given TYPE, and the whole string is the NAME. @@ -2228,7 +2410,7 @@ which must be one of :BACK or :UP and defaults to :BACK. HOST, DEVICE and VERSION components are taken from DEFAULTS, -which itself defaults to *NIL-PATHNAME*, also used if DEFAULTS in NIL. +which itself defaults to *NIL-PATHNAME*, also used if DEFAULTS is NIL. No host or device can be specified in the string itself, which makes it unsuitable for absolute pathnames outside Unix. @@ -2329,6 +2511,7 @@ (subpathname (ensure-directory-pathname pathname) subpath :type type))) (defun pathname-root (pathname) + "return the root directory for the host and device of given PATHNAME" (make-pathname* :directory '(:absolute) :name nil :type nil :version nil :defaults pathname ;; host device, and on scl, *some* @@ -2336,6 +2519,7 @@ . #.(or #+scl '(:parameters nil :query nil :fragment nil)))) (defun pathname-host-pathname (pathname) + "return a pathname with the same host as given PATHNAME, and all other fields NIL" (make-pathname* :directory nil :name nil :type nil :version nil :device nil :defaults pathname ;; host device, and on scl, *some* @@ -2343,6 +2527,8 @@ . #.(or #+scl '(:parameters nil :query nil :fragment nil)))) (defun subpathp (maybe-subpath base-pathname) + "if MAYBE-SUBPATH is a pathname that is under BASE-PATHNAME, return a pathname object that +when used with MERGE-PATHNAMES* with defaults BASE-PATHNAME, returns MAYBE-SUBPATH." (and (pathnamep maybe-subpath) (pathnamep base-pathname) (absolute-pathname-p maybe-subpath) (absolute-pathname-p base-pathname) (directory-pathname-p base-pathname) (not (wild-pathname-p base-pathname)) @@ -2351,7 +2537,33 @@ (let ((enough (enough-namestring maybe-subpath base-pathname))) (and (relative-pathname-p enough) (pathname enough)))))) + (defun enough-pathname (maybe-subpath base-pathname) + "if MAYBE-SUBPATH is a pathname that is under BASE-PATHNAME, return a pathname object that +when used with MERGE-PATHNAMES* with defaults BASE-PATHNAME, returns MAYBE-SUBPATH." + (check-type maybe-subpath (or null pathname)) + (check-type base-pathname (or null pathname)) + (when (pathnamep base-pathname) (assert (absolute-pathname-p base-pathname))) + (or (and base-pathname (subpathp maybe-subpath base-pathname)) + maybe-subpath)) + + (defun call-with-enough-pathname (maybe-subpath defaults-pathname thunk) + "In a context where *DEFAULT-PATHNAME-DEFAULTS* is bound to DEFAULTS-PATHNAME (if not null, +or else to its current value), call THUNK with ENOUGH-PATHNAME for MAYBE-SUBPATH +given DEFAULTS-PATHNAME as a base pathname." + (let ((enough (enough-pathname maybe-subpath defaults-pathname)) + (*default-pathname-defaults* (or defaults-pathname *default-pathname-defaults*))) + (funcall thunk enough))) + + (defmacro with-enough-pathname ((pathname-var &key (pathname pathname-var) + (defaults *default-pathname-defaults*)) + &body body) + "Shorthand syntax for CALL-WITH-ENOUGH-PATHNAME" + `(call-with-enough-pathname ,pathname ,defaults #'(lambda (,pathname-var) ,@body))) + (defun ensure-absolute-pathname (path &optional defaults (on-error 'error)) + "Given a pathname designator PATH, return an absolute pathname as specified by PATH +considering the DEFAULTS, or, if not possible, use CALL-FUNCTION on the specified ON-ERROR behavior, +with a format control-string and other arguments as arguments" (cond ((absolute-pathname-p path)) ((stringp path) (ensure-absolute-pathname (pathname path) defaults on-error)) @@ -2370,28 +2582,37 @@ ;;; Wildcard pathnames (with-upgradability () - (defparameter *wild* (or #+cormanlisp "*" :wild)) - (defparameter *wild-directory-component* (or #+gcl2.6 "*" :wild)) - (defparameter *wild-inferiors-component* (or #+gcl2.6 "**" :wild-inferiors)) + (defparameter *wild* (or #+cormanlisp "*" :wild) + "Wild component for use with MAKE-PATHNAME") + (defparameter *wild-directory-component* (or #+gcl2.6 "*" :wild) + "Wild directory component for use with MAKE-PATHNAME") + (defparameter *wild-inferiors-component* (or #+gcl2.6 "**" :wild-inferiors) + "Wild-inferiors directory component for use with MAKE-PATHNAME") (defparameter *wild-file* (make-pathname :directory nil :name *wild* :type *wild* - :version (or #-(or allegro abcl xcl) *wild*))) + :version (or #-(or allegro abcl xcl) *wild*)) + "A pathname object with wildcards for matching any file in a given directory") (defparameter *wild-directory* (make-pathname* :directory `(:relative ,*wild-directory-component*) - :name nil :type nil :version nil)) + :name nil :type nil :version nil) + "A pathname object with wildcards for matching any subdirectory") (defparameter *wild-inferiors* (make-pathname* :directory `(:relative ,*wild-inferiors-component*) - :name nil :type nil :version nil)) + :name nil :type nil :version nil) + "A pathname object with wildcards for matching any recursive subdirectory") (defparameter *wild-path* - (merge-pathnames* *wild-file* *wild-inferiors*)) + (merge-pathnames* *wild-file* *wild-inferiors*) + "A pathname object with wildcards for matching any file in any recursive subdirectory") (defun wilden (path) + "From a pathname, return a wildcard pathname matching any file in any subdirectory of given pathname's directory" (merge-pathnames* *wild-path* path))) ;;; Translate a pathname (with-upgradability () (defun relativize-directory-component (directory-component) + "Given the DIRECTORY-COMPONENT of a pathname, return an otherwise similar relative directory component" (let ((directory (normalize-pathname-directory-component directory-component))) (cond ((stringp directory) @@ -2402,17 +2623,21 @@ directory)))) (defun relativize-pathname-directory (pathspec) + "Given a PATHNAME, return a relative pathname with otherwise the same components" (let ((p (pathname pathspec))) (make-pathname* :directory (relativize-directory-component (pathname-directory p)) :defaults p))) (defun directory-separator-for-host (&optional (pathname *default-pathname-defaults*)) + "Given a PATHNAME, return the character used to delimit directory names on this host and device." (let ((foo (make-pathname* :directory '(:absolute "FOO") :defaults pathname))) (last-char (namestring foo)))) #-scl (defun directorize-pathname-host-device (pathname) + "Given a PATHNAME, return a pathname that has representations of its HOST and DEVICE components +added to its DIRECTORY component. This is useful for output translations." #+(or unix abcl) (when (and #+abcl (os-unix-p) (physical-pathname-p pathname)) (return-from directorize-pathname-host-device pathname)) @@ -2457,6 +2682,13 @@ pathname))) (defun* (translate-pathname*) (path absolute-source destination &optional root source) + "A wrapper around TRANSLATE-PATHNAME to be used by the ASDF output-translations facility. +PATH is the pathname to be translated. +ABSOLUTE-SOURCE is an absolute pathname to use as source for translate-pathname, +DESTINATION is either a function, to be called with PATH and ABSOLUTE-SOURCE, +or a relative pathname, to be merged with ROOT and used as destination for translate-pathname +or an absolute pathname, to be used as destination for translate-pathname. +In that last case, if ROOT is non-NIL, PATH is first transformated by DIRECTORIZE-PATHNAME-HOST-DEVICE." (declare (ignore source)) (cond ((functionp destination) @@ -2546,10 +2778,12 @@ ;;; Probing the filesystem (with-upgradability () (defun truename* (p) + "Nicer variant of TRUENAME that plays well with NIL and avoids logical pathname contexts" ;; avoids both logical-pathname merging and physical resolution issues (and p (handler-case (with-pathname-defaults () (truename p)) (file-error () nil)))) (defun safe-file-write-date (pathname) + "Safe variant of FILE-WRITE-DATE that may return NIL rather than raise an error." ;; If FILE-WRITE-DATE returns NIL, it's possible that ;; the user or some other agent has deleted an input file. ;; Also, generated files will not exist at the time planning is done @@ -2559,7 +2793,7 @@ ;; as if the file were very old. ;; (or should we treat the case in a different, special way?) (and pathname - (handler-case (file-write-date (translate-logical-pathname pathname)) + (handler-case (file-write-date (physicalize-pathname pathname)) (file-error () nil)))) (defun probe-file* (p &key truename) @@ -2581,7 +2815,7 @@ (if truename (probe-file p) (ignore-errors - (let ((pp (translate-logical-pathname p))) + (let ((pp (physicalize-pathname p))) (and #+(or cmu scl) (unix:unix-stat (ext:unix-namestring pp)) #+(and lispworks unix) (system:get-file-stat pp) @@ -2616,23 +2850,31 @@ (file-error () nil))))))) (defun directory-exists-p (x) + "Is X the name of a directory that exists on the filesystem?" (let ((p (probe-file* x :truename t))) (and (directory-pathname-p p) p))) (defun file-exists-p (x) + "Is X the name of a file that exists on the filesystem?" (let ((p (probe-file* x :truename t))) (and (file-pathname-p p) p))) (defun directory* (pathname-spec &rest keys &key &allow-other-keys) + "Return a list of the entries in a directory by calling DIRECTORY. +Try to override the defaults to not resolving symlinks, if implementation allows." (apply 'directory pathname-spec (append keys '#.(or #+allegro '(:directories-are-files nil :follow-symbolic-links nil) #+(or clozure digitool) '(:follow-links nil) #+clisp '(:circle t :if-does-not-exist :ignore) #+(or cmu scl) '(:follow-links nil :truenamep nil) + #+lispworks '(:link-transparency nil) #+sbcl (when (find-symbol* :resolve-symlinks '#:sb-impl nil) '(:resolve-symlinks nil)))))) (defun filter-logical-directory-results (directory entries merger) + "Given ENTRIES in a DIRECTORY, remove if the directory is logical +the entries which are physical yet when transformed by MERGER have a different TRUENAME. +This function is used as a helper to DIRECTORY-FILES to avoid invalid entries when using logical-pathnames." (if (logical-pathname-p directory) ;; Try hard to not resolve logical-pathname into physical pathnames; ;; otherwise logical-pathname users/lovers will be disappointed. @@ -2642,7 +2884,7 @@ ;; translating the LPN commute. (loop :for f :in entries :for p = (or (and (logical-pathname-p f) f) - (let* ((u (ignore-errors (funcall merger f)))) + (let* ((u (ignore-errors (call-function merger f)))) ;; The first u avoids a cumbersome (truename u) error. ;; At this point f should already be a truename, ;; but isn't quite in CLISP, for it doesn't have :version :newest @@ -2651,6 +2893,8 @@ entries)) (defun directory-files (directory &optional (pattern *wild-file*)) + "Return a list of the files in a directory according to the PATTERN, +which is not very portable to override. Try not resolve symlinks if implementation allows." (let ((dir (pathname directory))) (when (logical-pathname-p dir) ;; Because of the filtering we do below, @@ -2675,6 +2919,7 @@ :version (make-pathname-component-logical (pathname-version f)))))))) (defun subdirectories (directory) + "Given a DIRECTORY pathname designator, return a list of the subdirectories under it." (let* ((directory (ensure-directory-pathname directory)) #-(or abcl cormanlisp genera xcl) (wild (merge-pathnames* @@ -2712,6 +2957,9 @@ :directory (append prefix (make-pathname-component-logical (last dir))))))))))) (defun collect-sub*directories (directory collectp recursep collector) + "Given a DIRECTORY, call-function the COLLECTOR function designator +on the directory if COLLECTP returns true when CALL-FUNCTION'ed with the directory, +and recurse each of its subdirectories on which the RECURSEP returns true when CALL-FUNCTION'ed with them." (when (call-function collectp directory) (call-function collector directory)) (dolist (subdir (subdirectories directory)) @@ -2745,6 +2993,7 @@ :finally (return p)))))) (defun resolve-symlinks (path) + "Do a best effort at resolving symlinks in PATH, returning a partially or totally resolved PATH." #-allegro (truenamize path) #+allegro (if (physical-pathname-p path) @@ -2756,6 +3005,7 @@ Defaults to T.") (defun resolve-symlinks* (path) + "RESOLVE-SYMLINKS in PATH iff *RESOLVE-SYMLINKS* is T (the default)." (if *resolve-symlinks* (and path (resolve-symlinks path)) path))) @@ -2849,7 +3099,7 @@ (unless (pathnamep p) (return nil)) (check want-logical (logical-pathname-p p) "Expected a logical pathname") (check want-physical (physical-pathname-p p) "Expected a physical pathname") - (transform ensure-physical () (translate-logical-pathname p)) + (transform ensure-physical () (physicalize-pathname p)) (check ensure-physical (physical-pathname-p p) "Could not translate to a physical pathname") (check want-relative (relative-pathname-p p) "Expected a relative pathname") (check want-absolute (absolute-pathname-p p) "Expected an absolute pathname") @@ -2886,14 +3136,18 @@ ;;; Pathname defaults (with-upgradability () (defun get-pathname-defaults (&optional (defaults *default-pathname-defaults*)) + "Find the actual DEFAULTS to use for pathnames, including +resolving them with respect to GETCWD if the DEFAULTS were relative" (or (absolute-pathname-p defaults) (merge-pathnames* defaults (getcwd)))) (defun call-with-current-directory (dir thunk) + "call the THUNK in a context where the current directory was changed to DIR, if not NIL. +Note that this operation is usually NOT thread-safe." (if dir (let* ((dir (resolve-symlinks* (get-pathname-defaults (pathname-directory-pathname dir)))) - (*default-pathname-defaults* dir) - (cwd (getcwd))) + (cwd (getcwd)) + (*default-pathname-defaults* dir)) (chdir dir) (unwind-protect (funcall thunk) @@ -2908,13 +3162,18 @@ ;;; Environment pathnames (with-upgradability () (defun inter-directory-separator () + "What character does the current OS conventionally uses to separate directories?" (if (os-unix-p) #\: #\;)) (defun split-native-pathnames-string (string &rest constraints &key &allow-other-keys) + "Given a string of pathnames specified in native OS syntax, separate them in a list, +check constraints and normalize each one as per ENSURE-PATHNAME." (loop :for namestring :in (split-string string :separator (string (inter-directory-separator))) :collect (apply 'parse-native-namestring namestring constraints))) (defun getenv-pathname (x &rest constraints &key ensure-directory want-directory on-error &allow-other-keys) + "Extract a pathname from a user-configured environment variable, as per native OS, +check constraints and normalize as per ENSURE-PATHNAME." ;; For backward compatibility with ASDF 2, want-directory implies ensure-directory (apply 'parse-native-namestring (getenvp x) :ensure-directory (or ensure-directory want-directory) @@ -2922,16 +3181,23 @@ `(error "In (~S ~S), invalid pathname ~*~S: ~*~?" getenv-pathname ,x)) constraints)) (defun getenv-pathnames (x &rest constraints &key on-error &allow-other-keys) + "Extract a list of pathname from a user-configured environment variable, as per native OS, +check constraints and normalize each one as per ENSURE-PATHNAME." (apply 'split-native-pathnames-string (getenvp x) :on-error (or on-error `(error "In (~S ~S), invalid pathname ~*~S: ~*~?" getenv-pathnames ,x)) constraints)) (defun getenv-absolute-directory (x) + "Extract an absolute directory pathname from a user-configured environment variable, +as per native OS" (getenv-pathname x :want-absolute t :ensure-directory t)) (defun getenv-absolute-directories (x) + "Extract a list of absolute directories from a user-configured environment variable, +as per native OS" (getenv-pathnames x :want-absolute t :ensure-directory t)) (defun lisp-implementation-directory (&key truename) + "Where are the system files of the current installation of the CL implementation?" (declare (ignorable truename)) #+(or clozure ecl gcl mkcl sbcl) (let ((dir @@ -2947,6 +3213,7 @@ dir))) (defun lisp-implementation-pathname-p (pathname) + "Is the PATHNAME under the current installation of the CL implementation?" ;; Other builtin systems are those under the implementation directory (and (when pathname (if-let (impdir (lisp-implementation-directory)) @@ -2961,18 +3228,23 @@ ;;; Simple filesystem operations (with-upgradability () (defun ensure-all-directories-exist (pathnames) + "Ensure that for every pathname in PATHNAMES, we ensure its directories exist" (dolist (pathname pathnames) (when pathname - (ensure-directories-exist (translate-logical-pathname pathname))))) + (ensure-directories-exist (physicalize-pathname pathname))))) (defun rename-file-overwriting-target (source target) - #+clisp ;; But for a bug in CLISP 2.48, we should use :if-exists :overwrite and be atomic - (posix:copy-file source target :method :rename) + "Rename a file, overwriting any previous file with the TARGET name, +in an atomic way if the implementation allows." + #+clisp ;; in recent enough versions of CLISP, :if-exists :overwrite would make it atomic + (progn (funcall 'require "syscalls") + (symbol-call :posix :copy-file source target :method :rename)) #-clisp (rename-file source target #+clozure :if-exists #+clozure :rename-and-delete)) (defun delete-file-if-exists (x) + "Delete a file X if it already exists" (when x (handler-case (delete-file x) (file-error () nil)))) (defun delete-empty-directory (directory-pathname) @@ -2995,8 +3267,9 @@ #+sbcl #.(if-let (dd (find-symbol* :delete-directory :sb-ext nil)) `(,dd directory-pathname) ;; requires SBCL 1.0.44 or later `(progn (require :sb-posix) (symbol-call :sb-posix :rmdir directory-pathname))) - #-(or abcl allegro clisp clozure cmu cormanlisp digitool ecl gcl lispworks sbcl scl) - (error "~S not implemented on ~S" 'delete-empty-directory (implementation-type))) ; genera xcl + #+xcl (symbol-call :uiop :run-program `("rmdir" ,(native-namestring directory-pathname))) + #-(or abcl allegro clisp clozure cmu cormanlisp digitool ecl gcl lispworks sbcl scl xcl) + (error "~S not implemented on ~S" 'delete-empty-directory (implementation-type))) ; genera (defun delete-directory-tree (directory-pathname &key (validate nil validatep) (if-does-not-exist :error)) "Delete a directory including all its recursive contents, aka rm -rf. @@ -3061,19 +3334,24 @@ (:recycle :uiop/stream :asdf/stream :asdf) (:use :uiop/common-lisp :uiop/package :uiop/utility :uiop/os :uiop/pathname :uiop/filesystem) (:export - #:*default-stream-element-type* #:*stderr* #:setup-stderr + #:*default-stream-element-type* + #:*stdin* #:setup-stdin #:*stdout* #:setup-stdout #:*stderr* #:setup-stderr #:detect-encoding #:*encoding-detection-hook* #:always-default-encoding #:encoding-external-format #:*encoding-external-format-hook* #:default-encoding-external-format #:*default-encoding* #:*utf-8-external-format* #:with-safe-io-syntax #:call-with-safe-io-syntax #:safe-read-from-string #:with-output #:output-string #:with-input #:with-input-file #:call-with-input-file #:with-output-file #:call-with-output-file + #:null-device-pathname #:call-with-null-input #:with-null-input + #:call-with-null-output #:with-null-output #:finish-outputs #:format! #:safe-format! #:copy-stream-to-stream #:concatenate-files #:copy-file #:slurp-stream-string #:slurp-stream-lines #:slurp-stream-line #:slurp-stream-forms #:slurp-stream-form - #:read-file-string #:read-file-lines #:read-file-forms #:read-file-form #:safe-read-file-form + #:read-file-string #:read-file-line #:read-file-lines #:safe-read-file-line + #:read-file-forms #:read-file-form #:safe-read-file-form #:eval-input #:eval-thunk #:standard-eval-thunk + #:println #:writeln ;; Temporary files #:*temporary-directory* #:temporary-directory #:default-temporary-directory #:setup-temporary-directory @@ -3083,18 +3361,48 @@ (in-package :uiop/stream) (with-upgradability () - (defvar *default-stream-element-type* (or #+(or abcl cmu cormanlisp scl xcl) 'character :default) + (defvar *default-stream-element-type* + (or #+(or abcl cmu cormanlisp scl xcl) 'character + #+lispworks 'lw:simple-char + :default) "default element-type for open (depends on the current CL implementation)") + (defvar *stdin* *standard-input* + "the original standard input stream at startup") + + (defun setup-stdin () + (setf *stdin* + #.(or #+clozure 'ccl::*stdin* + #+(or cmu scl) 'system:*stdin* + #+ecl 'ext::+process-standard-input+ + #+sbcl 'sb-sys:*stdin* + '*standard-input*))) + + (defvar *stdout* *standard-output* + "the original standard output stream at startup") + + (defun setup-stdout () + (setf *stdout* + #.(or #+clozure 'ccl::*stdout* + #+(or cmu scl) 'system:*stdout* + #+ecl 'ext::+process-standard-output+ + #+sbcl 'sb-sys:*stdout* + '*standard-output*))) + (defvar *stderr* *error-output* "the original error output stream at startup") (defun setup-stderr () (setf *stderr* - #+allegro excl::*stderr* - #+clozure ccl::*stderr* - #-(or allegro clozure) *error-output*)) - (setup-stderr)) + #.(or #+allegro 'excl::*stderr* + #+clozure 'ccl::*stderr* + #+(or cmu scl) 'system:*stderr* + #+ecl 'ext::+process-error-output+ + #+sbcl 'sb-sys:*stderr* + '*error-output*))) + + ;; Run them now. In image.lisp, we'll register them to be run at image restart. + (setup-stdin) (setup-stdout) (setup-stderr)) ;;; Encodings (mostly hooks only; full support requires asdf-encodings) @@ -3113,9 +3421,9 @@ and falling back to utf-8 or latin1 if nothing is specified.") (defparameter *utf-8-external-format* - #+(and asdf-unicode (not clisp)) :utf-8 - #+(and asdf-unicode clisp) charset:utf-8 - #-asdf-unicode :default + (if (featurep :asdf-unicode) + (or #+clisp charset:utf-8 :utf-8) + :default) "Default :external-format argument to pass to CL:OPEN and also CL:LOAD or CL:COMPILE-FILE to best process a UTF-8 encoded file. On modern implementations, this will decode UTF-8 code points as CL characters. @@ -3124,6 +3432,8 @@ hopefully, if done consistently, that won't affect program behavior too much.") (defun always-default-encoding (pathname) + "Trivial function to use as *encoding-detection-hook*, +always 'detects' the *default-encoding*" (declare (ignore pathname)) *default-encoding*) @@ -3131,11 +3441,15 @@ "Hook for an extension to define a function to automatically detect a file's encoding") (defun detect-encoding (pathname) + "Detects the encoding of a specified file, going through user-configurable hooks" (if (and pathname (not (directory-pathname-p pathname)) (probe-file* pathname)) (funcall *encoding-detection-hook* pathname) *default-encoding*)) (defun default-encoding-external-format (encoding) + "Default, ignorant, function to transform a character ENCODING as a +portable keyword to an implementation-dependent EXTERNAL-FORMAT specification. +Load system ASDF-ENCODINGS to hook in a better one." (case encoding (:default :default) ;; for backward-compatibility only. Explicit usage discouraged. (:utf-8 *utf-8-external-format*) @@ -3145,16 +3459,20 @@ (defvar *encoding-external-format-hook* #'default-encoding-external-format - "Hook for an extension to define a mapping between non-default encodings -and implementation-defined external-format's") + "Hook for an extension (e.g. ASDF-ENCODINGS) to define a better mapping +from non-default encodings to and implementation-defined external-format's") (defun encoding-external-format (encoding) + "Transform a portable ENCODING keyword to an implementation-dependent EXTERNAL-FORMAT, +going through all the proper hooks." (funcall *encoding-external-format-hook* (or encoding *default-encoding*)))) ;;; Safe syntax (with-upgradability () - (defvar *standard-readtable* (copy-readtable nil)) + (defvar *standard-readtable* (with-standard-io-syntax *readtable*) + "The standard readtable, implementing the syntax specified by the CLHS. +It must never be modified, though only good implementations will even enforce that.") (defmacro with-safe-io-syntax ((&key (package :cl)) &body body) "Establish safe CL reader options around the evaluation of BODY" @@ -3169,10 +3487,10 @@ (funcall thunk)))) (defun safe-read-from-string (string &key (package :cl) (eof-error-p t) eof-value (start 0) end preserve-whitespace) + "Read from STRING using a safe syntax, as per WITH-SAFE-IO-SYNTAX" (with-safe-io-syntax (:package package) (read-from-string string eof-error-p eof-value :start start :end end :preserve-whitespace preserve-whitespace)))) - ;;; Output to a stream or string, FORMAT-style (with-upgradability () (defun call-with-output (output function) @@ -3269,6 +3587,40 @@ (declare (ignore element-type external-format if-exists if-does-not-exist)) `(call-with-output-file ,pathname #'(lambda (,var) ,@body) ,@keys))) +;;; Null device +(with-upgradability () + (defun null-device-pathname () + "Pathname to a bit bucket device that discards any information written to it +and always returns EOF when read from" + (cond + ((os-unix-p) #p"/dev/null") + ((os-windows-p) #p"NUL") ;; Q: how many Lisps accept the #p"NUL:" syntax? + (t (error "No /dev/null on your OS")))) + (defun call-with-null-input (fun &rest keys &key element-type external-format if-does-not-exist) + (declare (ignore element-type external-format if-does-not-exist)) + (apply 'call-with-input-file (null-device-pathname) fun keys)) + (defmacro with-null-input ((var &rest keys + &key element-type external-format if-does-not-exist) + &body body) + (declare (ignore element-type external-format if-does-not-exist)) + "Evaluate BODY in a context when VAR is bound to an input stream accessing the null device." + `(call-with-null-input #'(lambda (,var) ,@body) ,@keys)) + (defun call-with-null-output (fun + &key (element-type *default-stream-element-type*) + (external-format *utf-8-external-format*) + (if-exists :overwrite) + (if-does-not-exist :error)) + (call-with-output-file + (null-device-pathname) fun + :element-type element-type :external-format external-format + :if-exists if-exists :if-does-not-exist if-does-not-exist)) + (defmacro with-null-output ((var &rest keys + &key element-type external-format if-does-not-exist if-exists) + &body body) + "Evaluate BODY in a context when VAR is bound to an output stream accessing the null device." + (declare (ignore element-type external-format if-exists if-does-not-exist)) + `(call-with-null-output #'(lambda (,var) ,@body) ,@keys))) + ;;; Ensure output buffers are flushed (with-upgradability () (defun finish-outputs (&rest streams) @@ -3276,8 +3628,8 @@ Useful for portably flushing I/O before user input or program exit." ;; CCL notably buffers its stream output by default. (dolist (s (append streams - (list *stderr* *error-output* *standard-output* *trace-output* - *debug-io* *terminal-io* *debug-io* *query-io*))) + (list *stdout* *stderr* *error-output* *standard-output* *trace-output* + *debug-io* *terminal-io* *query-io*))) (ignore-errors (finish-output s))) (values)) @@ -3285,9 +3637,11 @@ "Just like format, but call finish-outputs before and after the output." (finish-outputs stream) (apply 'format stream format args) - (finish-output stream)) + (finish-outputs stream)) (defun safe-format! (stream format &rest args) + "Variant of FORMAT that is safe against both +dangerous syntax configuration and errors while printing." (with-safe-io-syntax () (ignore-errors (apply 'format! stream format args)) (finish-outputs stream)))) ; just in case format failed @@ -3317,6 +3671,7 @@ (when (< end buffer-size) (return)))))) (defun concatenate-files (inputs output) + "create a new OUTPUT file the contents of which a the concatenate of the INPUTS files." (with-open-file (o output :element-type '(unsigned-byte 8) :direction :output :if-exists :rename-and-delete) (dolist (input inputs) @@ -3325,25 +3680,32 @@ (copy-stream-to-stream i o :element-type '(unsigned-byte 8)))))) (defun copy-file (input output) + "Copy contents of the INPUT file to the OUTPUT file" ;; Not available on LW personal edition or LW 6.0 on Mac: (lispworks:copy-file i f) (concatenate-files (list input) output)) - (defun slurp-stream-string (input &key (element-type 'character)) + (defun slurp-stream-string (input &key (element-type 'character) stripped) "Read the contents of the INPUT stream as a string" - (with-open-stream (input input) - (with-output-to-string (output) - (copy-stream-to-stream input output :element-type element-type)))) + (let ((string + (with-open-stream (input input) + (with-output-to-string (output) + (copy-stream-to-stream input output :element-type element-type))))) + (if stripped (stripln string) string))) (defun slurp-stream-lines (input &key count) "Read the contents of the INPUT stream as a list of lines, return those lines. +Note: relies on the Lisp's READ-LINE, but additionally removes any remaining CR +from the line-ending if the file or stream had CR+LF but Lisp only removed LF. + Read no more than COUNT lines." (check-type count (or null integer)) (with-open-stream (input input) (loop :for n :from 0 :for l = (and (or (not count) (< n count)) (read-line input nil nil)) - :while l :collect l))) + ;; stripln: to remove CR when the OS sends CRLF and Lisp only remove LF + :while l :collect (stripln l)))) (defun slurp-stream-line (input &key (at 0)) "Read the contents of the INPUT stream as a list of lines, @@ -3396,6 +3758,14 @@ BEWARE: be sure to use WITH-SAFE-IO-SYNTAX, or some variant thereof" (apply 'call-with-input-file file 'slurp-stream-lines keys)) + (defun read-file-line (file &rest keys &key (at 0) &allow-other-keys) + "Open input FILE with option KEYS (except AT), +and read its contents as per SLURP-STREAM-LINE with given AT specifier. +BEWARE: be sure to use WITH-SAFE-IO-SYNTAX, or some variant thereof" + (apply 'call-with-input-file file + #'(lambda (input) (slurp-stream-line input :at at)) + (remove-plist-key :at keys))) + (defun read-file-forms (file &rest keys &key count &allow-other-keys) "Open input FILE with option KEYS (except COUNT), and read its contents as per SLURP-STREAM-FORMS with given COUNT. @@ -3412,6 +3782,13 @@ #'(lambda (input) (slurp-stream-form input :at at)) (remove-plist-key :at keys))) + (defun safe-read-file-line (pathname &rest keys &key (package :cl) &allow-other-keys) + "Reads the specified line from the top of a file using a safe standardized syntax. +Extracts the line using READ-FILE-LINE, +within an WITH-SAFE-IO-SYNTAX using the specified PACKAGE." + (with-safe-io-syntax (:package package) + (apply 'read-file-line pathname (remove-plist-key :package keys)))) + (defun safe-read-file-form (pathname &rest keys &key (package :cl) &allow-other-keys) "Reads the specified form from the top of a file using a safe standardized syntax. Extracts the form using READ-FILE-FORM, @@ -3448,10 +3825,20 @@ (let ((*read-eval* t)) (eval-thunk thunk)))))) +(with-upgradability () + (defun println (x &optional (stream *standard-output*)) + "Variant of PRINC that also calls TERPRI afterwards" + (princ x stream) (terpri stream) (values)) + + (defun writeln (x &rest keys &key (stream *standard-output*) &allow-other-keys) + "Variant of WRITE that also calls TERPRI afterwards" + (apply 'write x keys) (terpri stream) (values))) + ;;; Using temporary files (with-upgradability () (defun default-temporary-directory () + "Return a default directory to use for temporary files" (or (when (os-unix-p) (or (getenv-pathname "TMPDIR" :ensure-directory t) @@ -3460,71 +3847,99 @@ (getenv-pathname "TEMP" :ensure-directory t)) (subpathname (user-homedir-pathname) "tmp/"))) - (defvar *temporary-directory* nil) + (defvar *temporary-directory* nil "User-configurable location for temporary files") (defun temporary-directory () + "Return a directory to use for temporary files" (or *temporary-directory* (default-temporary-directory))) (defun setup-temporary-directory () + "Configure a default temporary directory to use." (setf *temporary-directory* (default-temporary-directory)) ;; basic lack fixed after gcl 2.7.0-61, but ending / required still on 2.7.0-64.1 #+(and gcl (not gcl2.6)) (setf system::*tmp-dir* *temporary-directory*)) (defun call-with-temporary-file (thunk &key + (want-stream-p t) (want-pathname-p t) prefix keep (direction :io) (element-type *default-stream-element-type*) - (external-format :default)) + (external-format *utf-8-external-format*)) + "Call a THUNK with STREAM and PATHNAME arguments identifying a temporary file. +The pathname will be based on appending a random suffix to PREFIX. +This utility will KEEP the file past its extent if and only if explicitly requested. +The file will be open with specified DIRECTION, ELEMENT-TYPE and EXTERNAL-FORMAT." #+gcl2.6 (declare (ignorable external-format)) (check-type direction (member :output :io)) + (assert (or want-stream-p want-pathname-p)) (loop :with prefix = (namestring (ensure-absolute-pathname (or prefix "tmp") #'temporary-directory)) + :with results = () :for counter :from (random (ash 1 32)) - :for pathname = (pathname (format nil "~A~36R" prefix counter)) :do + :for pathname = (pathname (format nil "~A~36R" prefix counter)) + :for okp = nil :do ;; TODO: on Unix, do something about umask ;; TODO: on Unix, audit the code so we make sure it uses O_CREAT|O_EXCL - ;; TODO: on Unix, use CFFI and mkstemp -- but asdf/driver is precisely meant to not depend on CFFI or on anything! Grrrr. - (with-open-file (stream pathname - :direction direction - :element-type element-type - #-gcl2.6 :external-format #-gcl2.6 external-format - :if-exists nil :if-does-not-exist :create) - (when stream - (return - (if keep - (funcall thunk stream pathname) - (unwind-protect - (funcall thunk stream pathname) - (ignore-errors (delete-file pathname))))))))) + ;; TODO: on Unix, use CFFI and mkstemp -- but UIOP is precisely meant to not depend on CFFI or on anything! Grrrr. + (unwind-protect + (progn + (with-open-file (stream pathname + :direction direction + :element-type element-type + #-gcl2.6 :external-format #-gcl2.6 external-format + :if-exists nil :if-does-not-exist :create) + (when stream + (setf okp pathname) + (when want-stream-p + (setf results + (multiple-value-list + (if want-pathname-p + (funcall thunk stream pathname) + (funcall thunk stream))))))) + (when okp + (if want-stream-p + (return (apply 'values results)) + (return (funcall thunk pathname))))) + (when (and okp (not keep)) + (ignore-errors (delete-file-if-exists okp)))))) (defmacro with-temporary-file ((&key (stream (gensym "STREAM") streamp) (pathname (gensym "PATHNAME") pathnamep) prefix keep direction element-type external-format) &body body) "Evaluate BODY where the symbols specified by keyword arguments -STREAM and PATHNAME are bound corresponding to a newly created temporary file -ready for I/O. Unless KEEP is specified, delete the file afterwards." +STREAM and PATHNAME (if respectively specified) are bound corresponding +to a newly created temporary file ready for I/O, as per CALL-WITH-TEMPORARY-FILE. +The STREAM will be closed if no binding is specified. +Unless KEEP is specified, delete the file afterwards." (check-type stream symbol) (check-type pathname symbol) - `(flet ((think (,stream ,pathname) - ,@(unless pathnamep `((declare (ignore ,pathname)))) - ,@(unless streamp `((when ,stream (close ,stream)))) + (assert (or streamp pathnamep)) + `(flet ((think (,@(when streamp `(,stream)) ,@(when pathnamep `(,pathname))) ,@body)) #-gcl (declare (dynamic-extent #'think)) (call-with-temporary-file #'think + :want-stream-p ,streamp + :want-pathname-p ,pathnamep ,@(when direction `(:direction ,direction)) ,@(when prefix `(:prefix ,prefix)) ,@(when keep `(:keep ,keep)) ,@(when element-type `(:element-type ,element-type)) - ,@(when external-format `(:external-format external-format))))) + ,@(when external-format `(:external-format ,external-format))))) + + (defun get-temporary-file (&key prefix) + (with-temporary-file (:pathname pn :keep t :prefix prefix) + pn)) ;; Temporary pathnames in simple cases where no contention is assumed (defun add-pathname-suffix (pathname suffix) + "Add a SUFFIX to the name of a PATHNAME, return a new pathname" (make-pathname :name (strcat (pathname-name pathname) suffix) :defaults pathname)) (defun tmpize-pathname (x) + "Return a new pathname modified from X by adding a trivial deterministic suffix" (add-pathname-suffix x "-ASDF-TMP")) (defun call-with-staging-pathname (pathname fun) @@ -3677,6 +4092,7 @@ stream)) (defun print-backtrace (&rest keys &key stream count) + "Print a backtrace" (declare (ignore stream count)) (with-safe-io-syntax (:package :cl) (let ((*print-readably* nil) @@ -3688,6 +4104,7 @@ (ignore-errors (apply 'raw-print-backtrace keys))))) (defun print-condition-backtrace (condition &key (stream *stderr*) count) + "Print a condition after a backtrace triggered by that condition" ;; We print the condition *after* the backtrace, ;; for the sake of who sees the backtrace at a terminal. ;; It is up to the caller to print the condition *before*, with some context. @@ -3697,10 +4114,12 @@ condition))) (defun fatal-condition-p (condition) + "Is the CONDITION fatal? It is if it matches any in *FATAL-CONDITIONS*" (match-any-condition-p condition *fatal-conditions*)) (defun handle-fatal-condition (condition) - "Depending on whether *LISP-INTERACTION* is set, enter debugger or die" + "Handle a fatal CONDITION: +depending on whether *LISP-INTERACTION* is set, enter debugger or die" (cond (*lisp-interaction* (invoke-debugger condition)) @@ -3710,10 +4129,12 @@ (die 99 "~A" condition)))) (defun call-with-fatal-condition-handler (thunk) + "Call THUNK in a context where fatal conditions are appropriately handled" (handler-bind (((satisfies fatal-condition-p) #'handle-fatal-condition)) (funcall thunk))) (defmacro with-fatal-condition-handler ((&optional) &body body) + "Execute BODY in a context where fatal conditions are appropriately handled" `(call-with-fatal-condition-handler #'(lambda () ,@body))) (defun shell-boolean-exit (x) @@ -3724,15 +4145,19 @@ ;;; Using image hooks (with-upgradability () (defun register-image-restore-hook (hook &optional (call-now-p t)) + "Regiter a hook function to be run when restoring a dumped image" (register-hook-function '*image-restore-hook* hook call-now-p)) (defun register-image-dump-hook (hook &optional (call-now-p nil)) + "Register a the hook function to be run before to dump an image" (register-hook-function '*image-dump-hook* hook call-now-p)) (defun call-image-restore-hook () + "Call the hook functions registered to be run when restoring a dumped image" (call-functions (reverse *image-restore-hook*))) (defun call-image-dump-hook () + "Call the hook functions registered to be run before to dump an image" (call-functions *image-dump-hook*))) @@ -3776,6 +4201,8 @@ ((:prelude *image-prelude*) *image-prelude*) ((:entry-point *image-entry-point*) *image-entry-point*) (if-already-restored '(cerror "RUN RESTORE-IMAGE ANYWAY"))) + "From a freshly restarted Lisp image, restore the saved Lisp environment +by setting appropriate variables, running various hooks, and calling any specified entry point." (when *image-restored-p* (if if-already-restored (call-function if-already-restored "Image already ~:[being ~;~]restored" (eq *image-restored-p* t)) @@ -3801,6 +4228,7 @@ ((:postlude *image-postlude*) *image-postlude*) ((:dump-hook *image-dump-hook*) *image-dump-hook*) #+clozure prepend-symbols #+clozure (purify t)) + "Dump an image of the current Lisp environment at pathname FILENAME, with various options" (declare (ignorable filename output-name executable)) (setf *image-dumped-p* (if executable :executable t)) (setf *image-restored-p* :in-regress) @@ -3867,6 +4295,7 @@ (entry-point () entry-point-p) build-args) (declare (ignorable destination object-files kind output-name prologue-code epilogue-code prelude preludep postlude postludep entry-point entry-point-p build-args)) + "On ECL, create an executable at pathname DESTINATION from the specified OBJECT-FILES and options" ;; Is it meaningful to run these in the current environment? ;; only if we also track the object files that constitute the "current" image, ;; and otherwise simulate dump-image, including quitting at the end. @@ -3893,7 +4322,8 @@ ;;; Some universal image restore hooks (with-upgradability () (map () 'register-image-restore-hook - '(setup-temporary-directory setup-stderr setup-command-line-arguments + '(setup-stdin setup-stdout setup-stderr + setup-command-line-arguments setup-temporary-directory #+abcl detect-os))) ;;;; ------------------------------------------------------------------------- ;;;; run-program initially from xcvb-driver. @@ -3909,7 +4339,7 @@ #:escape-token #:escape-command ;;; run-program - #:slurp-input-stream + #:slurp-input-stream #:vomit-output-stream #:run-program #:subprocess-error #:subprocess-error-code #:subprocess-error-command #:subprocess-error-process @@ -3989,16 +4419,17 @@ (when quote (princ #\" s))) (defun easy-sh-character-p (x) + "Is X an \"easy\" character that does not require quoting by the shell?" (or (alphanumericp x) (find x "+-_.,%@:/"))) (defun escape-sh-token (token &optional s) "Escape a string TOKEN within double-quotes if needed for use within a POSIX Bourne shell, outputing to S." - (escape-token token :stream s :quote #\" :good-chars - #'easy-sh-character-p + (escape-token token :stream s :quote #\" :good-chars #'easy-sh-character-p :escaper 'escape-sh-token-within-double-quotes)) (defun escape-shell-token (token &optional s) + "Escape a token for the current operating system shell" (cond ((os-unix-p) (escape-sh-token token s)) ((os-windows-p) (escape-windows-token token s)))) @@ -4033,43 +4464,74 @@ ;;;; Slurping a stream, typically the output of another program (with-upgradability () - (defgeneric slurp-input-stream (processor input-stream &key &allow-other-keys)) + (defun call-stream-processor (fun processor stream) + "Given FUN (typically SLURP-INPUT-STREAM or VOMIT-OUTPUT-STREAM, +a PROCESSOR specification which is either an atom or a list specifying +a processor an keyword arguments, call the specified processor with +the given STREAM as input" + (if (consp processor) + (apply fun (first processor) stream (rest processor)) + (funcall fun processor stream))) + + (defgeneric slurp-input-stream (processor input-stream &key) + (:documentation + "SLURP-INPUT-STREAM is a generic function with two positional arguments +PROCESSOR and INPUT-STREAM and additional keyword arguments, that consumes (slurps) +the contents of the INPUT-STREAM and processes them according to a method +specified by PROCESSOR. + +Built-in methods include the following: +* if PROCESSOR is a function, it is called with the INPUT-STREAM as its argument +* if PROCESSOR is a list, its first element should be a function. It will be applied to a cons of the + INPUT-STREAM and the rest of the list. That is (x . y) will be treated as + \(APPLY x y\) +* if PROCESSOR is an output-stream, the contents of INPUT-STREAM is copied to the output-stream, + per copy-stream-to-stream, with appropriate keyword arguments. +* if PROCESSOR is the symbol CL:STRING or the keyword :STRING, then the contents of INPUT-STREAM + are returned as a string, as per SLURP-STREAM-STRING. +* if PROCESSOR is the keyword :LINES then the INPUT-STREAM will be handled by SLURP-STREAM-LINES. +* if PROCESSOR is the keyword :LINE then the INPUT-STREAM will be handled by SLURP-STREAM-LINE. +* if PROCESSOR is the keyword :FORMS then the INPUT-STREAM will be handled by SLURP-STREAM-FORMS. +* if PROCESSOR is the keyword :FORM then the INPUT-STREAM will be handled by SLURP-STREAM-FORM. +* if PROCESSOR is T, it is treated the same as *standard-output*. If it is NIL, NIL is returned. + +Programmers are encouraged to define their own methods for this generic function.")) #-(or gcl2.6 genera) - (defmethod slurp-input-stream ((function function) input-stream &key &allow-other-keys) + (defmethod slurp-input-stream ((function function) input-stream &key) (funcall function input-stream)) - (defmethod slurp-input-stream ((list cons) input-stream &key &allow-other-keys) - (apply (first list) (cons input-stream (rest list)))) + (defmethod slurp-input-stream ((list cons) input-stream &key) + (apply (first list) input-stream (rest list))) #-(or gcl2.6 genera) (defmethod slurp-input-stream ((output-stream stream) input-stream - &key linewise prefix (element-type 'character) buffer-size &allow-other-keys) + &key linewise prefix (element-type 'character) buffer-size) (copy-stream-to-stream input-stream output-stream :linewise linewise :prefix prefix :element-type element-type :buffer-size buffer-size)) - (defmethod slurp-input-stream ((x (eql 'string)) stream &key &allow-other-keys) + (defmethod slurp-input-stream ((x (eql 'string)) stream &key stripped) (declare (ignorable x)) - (slurp-stream-string stream)) + (slurp-stream-string stream :stripped stripped)) - (defmethod slurp-input-stream ((x (eql :string)) stream &key &allow-other-keys) + (defmethod slurp-input-stream ((x (eql :string)) stream &key stripped) (declare (ignorable x)) - (slurp-stream-string stream)) + (slurp-stream-string stream :stripped stripped)) - (defmethod slurp-input-stream ((x (eql :lines)) stream &key count &allow-other-keys) + (defmethod slurp-input-stream ((x (eql :lines)) stream &key count) (declare (ignorable x)) (slurp-stream-lines stream :count count)) - (defmethod slurp-input-stream ((x (eql :line)) stream &key (at 0) &allow-other-keys) + (defmethod slurp-input-stream ((x (eql :line)) stream &key (at 0)) (declare (ignorable x)) (slurp-stream-line stream :at at)) - (defmethod slurp-input-stream ((x (eql :forms)) stream &key count &allow-other-keys) + (defmethod slurp-input-stream ((x (eql :forms)) stream &key count) (declare (ignorable x)) (slurp-stream-forms stream :count count)) - (defmethod slurp-input-stream ((x (eql :form)) stream &key (at 0) &allow-other-keys) + (defmethod slurp-input-stream ((x (eql :form)) stream &key (at 0)) (declare (ignorable x)) (slurp-stream-form stream :at at)) @@ -4077,6 +4539,10 @@ (declare (ignorable x)) (apply 'slurp-input-stream *standard-output* stream keys)) + (defmethod slurp-input-stream ((x null) stream &key) + (declare (ignorable x stream)) + nil) + (defmethod slurp-input-stream ((pathname pathname) input &key (element-type *default-stream-element-type*) @@ -4095,8 +4561,7 @@ :element-type element-type :buffer-size buffer-size :linewise linewise))) (defmethod slurp-input-stream (x stream - &key linewise prefix (element-type 'character) buffer-size - &allow-other-keys) + &key linewise prefix (element-type 'character) buffer-size) (declare (ignorable stream linewise prefix element-type buffer-size)) (cond #+(or gcl2.6 genera) @@ -4104,12 +4569,91 @@ #+(or gcl2.6 genera) ((output-stream-p x) (copy-stream-to-stream - input-stream output-stream + stream x :linewise linewise :prefix prefix :element-type element-type :buffer-size buffer-size)) (t (error "Invalid ~S destination ~S" 'slurp-input-stream x))))) +(with-upgradability () + (defgeneric vomit-output-stream (processor output-stream &key) + (:documentation + "VOMIT-OUTPUT-STREAM is a generic function with two positional arguments +PROCESSOR and OUTPUT-STREAM and additional keyword arguments, that produces (vomits) +some content onto the OUTPUT-STREAM, according to a method specified by PROCESSOR. + +Built-in methods include the following: +* if PROCESSOR is a function, it is called with the OUTPUT-STREAM as its argument +* if PROCESSOR is a list, its first element should be a function. + It will be applied to a cons of the OUTPUT-STREAM and the rest of the list. + That is (x . y) will be treated as \(APPLY x y\) +* if PROCESSOR is an input-stream, its contents will be copied the OUTPUT-STREAM, + per copy-stream-to-stream, with appropriate keyword arguments. +* if PROCESSOR is a string, its contents will be printed to the OUTPUT-STREAM. +* if PROCESSOR is T, it is treated the same as *standard-input*. If it is NIL, nothing is done. + +Programmers are encouraged to define their own methods for this generic function.")) + + #-(or gcl2.6 genera) + (defmethod vomit-output-stream ((function function) output-stream &key) + (funcall function output-stream)) + + (defmethod vomit-output-stream ((list cons) output-stream &key) + (apply (first list) output-stream (rest list))) + + #-(or gcl2.6 genera) + (defmethod vomit-output-stream ((input-stream stream) output-stream + &key linewise prefix (element-type 'character) buffer-size) + (copy-stream-to-stream + input-stream output-stream + :linewise linewise :prefix prefix :element-type element-type :buffer-size buffer-size)) + + (defmethod vomit-output-stream ((x string) stream &key fresh-line terpri) + (princ x stream) + (when fresh-line (fresh-line stream)) + (when terpri (terpri stream)) + (values)) + + (defmethod vomit-output-stream ((x (eql t)) stream &rest keys &key &allow-other-keys) + (declare (ignorable x)) + (apply 'vomit-output-stream *standard-input* stream keys)) + + (defmethod vomit-output-stream ((x null) stream &key) + (declare (ignorable x stream)) + (values)) + + (defmethod vomit-output-stream ((pathname pathname) input + &key + (element-type *default-stream-element-type*) + (external-format *utf-8-external-format*) + (if-exists :rename-and-delete) + (if-does-not-exist :create) + buffer-size + linewise) + (with-output-file (output pathname + :element-type element-type + :external-format external-format + :if-exists if-exists + :if-does-not-exist if-does-not-exist) + (copy-stream-to-stream + input output + :element-type element-type :buffer-size buffer-size :linewise linewise))) + + (defmethod vomit-output-stream (x stream + &key linewise prefix (element-type 'character) buffer-size) + (declare (ignorable stream linewise prefix element-type buffer-size)) + (cond + #+(or gcl2.6 genera) + ((functionp x) (funcall x stream)) + #+(or gcl2.6 genera) + ((input-stream-p x) + (copy-stream-to-stream + x stream + :linewise linewise :prefix prefix :element-type element-type :buffer-size buffer-size)) + (t + (error "Invalid ~S source ~S" 'vomit-output-stream x))))) + + ;;;; ----- Running an external program ----- ;;; Simple variant of run-program with no input, and capturing output ;;; On some implementations, may output to a temporary file... @@ -4124,215 +4668,531 @@ (subprocess-error-command condition) (subprocess-error-code condition))))) - (defun run-program (command - &key output ignore-error-status force-shell - (element-type *default-stream-element-type*) - (external-format :default) - &allow-other-keys) + ;;; Internal helpers for run-program + (defun %normalize-command (command) + "Given a COMMAND as a list or string, transform it in a format suitable +for the implementation's underlying run-program function" + (etypecase command + #+os-unix (string `("/bin/sh" "-c" ,command)) + #+os-unix (list command) + #+os-windows + (string + ;; NB: We do NOT add cmd /c here. You might want to. + #+(or allegro clisp) command + ;; On ClozureCL for Windows, we assume you are using + ;; r15398 or later in 1.9 or later, + ;; so that bug 858 is fixed http://trac.clozure.com/ccl/ticket/858 + #+clozure (cons "cmd" (strcat "/c " command)) + ;; NB: On other Windows implementations, this is utterly bogus + ;; except in the most trivial cases where no quoting is needed. + ;; Use at your own risk. + #-(or allegro clisp clozure) (list "cmd" "/c" command)) + #+os-windows + (list + #+allegro (escape-windows-command command) + #-allegro command))) + + (defun %active-io-specifier-p (specifier) + "Determines whether a run-program I/O specifier requires Lisp-side processing +via SLURP-INPUT-STREAM or VOMIT-OUTPUT-STREAM (return T), +or whether it's already taken care of by the implementation's underlying run-program." + (not (typep specifier '(or null string pathname (member :interactive :output) + #+(or cmu (and sbcl os-unix) scl) (or stream (eql t)) + #+lispworks file-stream)))) ;; not a type!? comm:socket-stream + + (defun %normalize-io-specifier (specifier &optional role) + "Normalizes a portable I/O specifier for %RUN-PROGRAM into an implementation-dependent +argument to pass to the internal RUN-PROGRAM" + (declare (ignorable role)) + (etypecase specifier + (null (or #+(or allegro lispworks) (null-device-pathname))) + (string (pathname specifier)) + (pathname specifier) + (stream specifier) + ((eql :stream) :stream) + ((eql :interactive) + #+allegro nil + #+clisp :terminal + #+(or clozure cmu ecl sbcl scl) t) + #+(or allegro clozure cmu ecl lispworks sbcl scl) + ((eql :output) + (if (eq role :error-output) + :output + (error "Wrong specifier ~S for role ~S" specifier role))))) + + (defun %interactivep (input output error-output) + (member :interactive (list input output error-output))) + + #+clisp + (defun clisp-exit-code (raw-exit-code) + (typecase raw-exit-code + (null 0) ; no error + (integer raw-exit-code) ; negative: signal + (t -1))) + + (defun %run-program (command + &rest keys + &key input (if-input-does-not-exist :error) + output (if-output-exists :overwrite) + error-output (if-error-output-exists :overwrite) + directory wait + #+allegro separate-streams + &allow-other-keys) + "A portable abstraction of a low-level call to the implementation's run-program or equivalent. +It spawns a subprocess that runs the specified COMMAND (a list of program and arguments). +INPUT, OUTPUT and ERROR-OUTPUT specify a portable IO specifer, +to be normalized by %NORMALIZE-IO-SPECIFIER. +It returns a process-info plist with possible keys: + PROCESS, EXIT-CODE, INPUT-STREAM, OUTPUT-STREAM, BIDIR-STREAM, ERROR-STREAM." + ;; NB: these implementations have unix vs windows set at compile-time. + (declare (ignorable if-input-does-not-exist if-output-exists if-error-output-exists)) + (assert (not (and wait (member :stream (list input output error-output))))) + #-(or allegro clozure cmu (and lispworks os-unix) sbcl scl) + (progn command keys directory + (error "run-program not available")) + #+(or allegro clisp clozure cmu (and lispworks os-unix) sbcl scl) + (let* ((%command (%normalize-command command)) + (%input (%normalize-io-specifier input :input)) + (%output (%normalize-io-specifier output :output)) + (%error-output (%normalize-io-specifier error-output :error-output)) + #+(and allegro os-windows) (interactive (%interactivep input output error-output)) + (process* + #+allegro + (multiple-value-list + (apply + 'excl:run-shell-command + #+os-unix (coerce (cons (first %command) %command) 'vector) + #+os-windows %command + :input %input + :output %output + :error-output %error-output + :directory directory :wait wait + #+os-windows :show-window #+os-windows (if interactive nil :hide) + :allow-other-keys t keys)) + #-allegro + (with-current-directory (#-sbcl directory) + #+clisp + (flet ((run (f &rest args) + (multiple-value-list + (apply f :input %input :output %output + :allow-other-keys t `(,@args ,@keys))))) + (assert (eq %error-output :terminal)) + ;;; since we now always return a code, we can't use this code path, anyway! + (etypecase %command + #+os-windows (string (run 'ext:run-shell-command %command)) + (list (run 'ext:run-program (car %command) + :arguments (cdr %command))))) + #+(or clozure cmu ecl sbcl scl) + (#-ecl progn #+ecl multiple-value-list + (apply + '#+(or cmu ecl scl) ext:run-program + #+clozure ccl:run-program #+sbcl sb-ext:run-program + (car %command) (cdr %command) + :input %input + :output %output + :error %error-output + :wait wait + :allow-other-keys t + (append + #+(or clozure cmu sbcl scl) + `(:if-input-does-not-exist ,if-input-does-not-exist + :if-output-exists ,if-output-exists + :if-error-exists ,if-error-output-exists) + #+sbcl `(:search t + :if-output-does-not-exist :create + :if-error-does-not-exist :create) + #-sbcl keys #+sbcl (if directory keys (remove-plist-key :directory keys))))) + #+(and lispworks os-unix) ;; note: only used on Unix in non-interactive case + (multiple-value-list + (apply + 'system:run-shell-command + (cons "/usr/bin/env" %command) ; lispworks wants a full path. + :input %input :if-input-does-not-exist if-input-does-not-exist + :output %output :if-output-exists if-output-exists + :error-output %error-output :if-error-output-exists if-error-output-exists + :wait wait :save-exit-status t :allow-other-keys t keys)))) + (process-info-r ())) + (flet ((prop (key value) (push key process-info-r) (push value process-info-r))) + #+allegro + (cond + (wait (prop :exit-code (first process*))) + (separate-streams + (destructuring-bind (in out err pid) process* + (prop :process pid) + (when (eq input :stream) (prop :input-stream in)) + (when (eq output :stream) (prop :output-stream out)) + (when (eq error-output :stream) (prop :error-stream err)))) + (t + (prop :process (third process*)) + (let ((x (first process*))) + (ecase (+ (if (eq input :stream) 1 0) (if (eq output :stream) 2 0)) + (0) + (1 (prop :input-stream x)) + (2 (prop :output-stream x)) + (3 (prop :bidir-stream x)))) + (when (eq error-output :stream) + (prop :error-stream (second process*))))) + #+clisp + (cond + (wait (prop :exit-code (clisp-exit-code (first process*)))) + (t + (ecase (+ (if (eq input :stream) 1 0) (if (eq output :stream) 2 0)) + (0) + (1 (prop :input-stream (first process*))) + (2 (prop :output-stream (first process*))) + (3 (prop :bidir-stream (pop process*)) + (prop :input-stream (pop process*)) + (prop :output-stream (pop process*)))))) + #+(or clozure cmu sbcl scl) + (progn + (prop :process process*) + (when (eq input :stream) + (prop :input-stream + #+clozure (ccl:external-process-input-stream process*) + #+(or cmu scl) (ext:process-input process*) + #+sbcl (sb-ext:process-input process*))) + (when (eq output :stream) + (prop :output-stream + #+clozure (ccl:external-process-output-stream process*) + #+(or cmu scl) (ext:process-output process*) + #+sbcl (sb-ext:process-output process*))) + (when (eq error-output :stream) + (prop :error-output-stream + #+clozure (ccl:external-process-error-stream process*) + #+(or cmu scl) (ext:process-error process*) + #+sbcl (sb-ext:process-error process*)))) + #+ecl + (destructuring-bind (stream code process) process* + (let ((mode (+ (if (eq input :stream) 1 0) (if (eq output :stream) 2 0)))) + (cond + ((zerop mode)) + ((null process*) (prop :exit-code -1)) + (t (prop (case mode (1 :input-stream) (2 :output-stream) (3 :bidir-stream)) stream)))) + (when code (prop :exit-code code)) + (when process (prop :process process))) + #+lispworks + (if wait + (prop :exit-code (first process*)) + (let ((mode (+ (if (eq input :stream) 1 0) (if (eq output :stream) 2 0)))) + (if (zerop mode) + (prop :process (first process*)) + (destructuring-bind (x err pid) process* + (prop :process pid) + (prop (ecase mode (1 :input-stream) (2 :output-stream) (3 :bidir-stream)) x) + (when (eq error-output :stream) (prop :error-stream err)))))) + (nreverse process-info-r)))) + + (defun %wait-process-result (process-info) + (or (getf process-info :exit-code) + (let ((process (getf process-info :process))) + (when process + ;; 1- wait + #+clozure (ccl::external-process-wait process) + #+(or cmu scl) (ext:process-wait process) + #+(and ecl os-unix) (ext:external-process-wait process) + #+sbcl (sb-ext:process-wait process) + ;; 2- extract result + #+allegro (sys:reap-os-subprocess :pid process :wait t) + #+clozure (nth-value 1 (ccl:external-process-status process)) + #+(or cmu scl) (ext:process-exit-code process) + #+ecl (nth-value 1 (ext:external-process-status process)) + #+lispworks (system:pid-exit-status process :wait t) + #+sbcl (sb-ext:process-exit-code process))))) + + (defun %check-result (exit-code &key command process ignore-error-status) + (unless ignore-error-status + (unless (eql exit-code 0) + (cerror "IGNORE-ERROR-STATUS" + 'subprocess-error :command command :code exit-code :process process))) + exit-code) + + (defun %call-with-program-io (gf tval stream-easy-p fun direction spec activep returner + &key element-type external-format &allow-other-keys) + ;; handle redirection for run-program and system + ;; SPEC is the specification for the subprocess's input or output or error-output + ;; TVAL is the value used if the spec is T + ;; GF is the generic function to call to handle arbitrary values of SPEC + ;; STREAM-EASY-P is T if we're going to use a RUN-PROGRAM that copies streams in the background + ;; (it's only meaningful on CMUCL, SBCL, SCL that actually do it) + ;; DIRECTION is :INPUT, :OUTPUT or :ERROR-OUTPUT for the direction of this io argument + ;; FUN is a function of the new reduced spec and an activity function to call with a stream + ;; when the subprocess is active and communicating through that stream. + ;; ACTIVEP is a boolean true if we will get to run code while the process is running + ;; ELEMENT-TYPE and EXTERNAL-FORMAT control what kind of temporary file we may open. + ;; RETURNER is a function called with the value of the activity. + ;; --- TODO (fare@tunes.org): handle if-output-exists and such when doing it the hard way. + (declare (ignorable stream-easy-p)) + (let* ((actual-spec (if (eq spec t) tval spec)) + (activity-spec (if (eq actual-spec :output) + (ecase direction + ((:input :output) + (error "~S not allowed as a ~S ~S spec" + :output 'run-program direction)) + ((:error-output) + nil)) + actual-spec))) + (labels ((activity (stream) + (call-function returner (call-stream-processor gf activity-spec stream))) + (easy-case () + (funcall fun actual-spec nil)) + (hard-case () + (if activep + (funcall fun :stream #'activity) + (with-temporary-file (:pathname tmp) + (ecase direction + (:input + (with-output-file (s tmp :if-exists :overwrite + :external-format external-format + :element-type element-type) + (activity s)) + (funcall fun tmp nil)) + ((:output :error-output) + (multiple-value-prog1 (funcall fun tmp nil) + (with-input-file (s tmp + :external-format external-format + :element-type element-type) + (activity s))))))))) + (typecase activity-spec + ((or null string pathname (eql :interactive)) + (easy-case)) + #+(or cmu (and sbcl os-unix) scl) ;; streams are only easy on implementations that try very hard + (stream + (if stream-easy-p (easy-case) (hard-case))) + (t + (hard-case)))))) + + (defmacro place-setter (place) + (when place + (let ((value (gensym))) + `#'(lambda (,value) (setf ,place ,value))))) + + (defmacro with-program-input (((reduced-input-var + &optional (input-activity-var (gensym) iavp)) + input-form &key setf stream-easy-p active keys) &body body) + `(apply '%call-with-program-io 'vomit-output-stream *standard-input* ,stream-easy-p + #'(lambda (,reduced-input-var ,input-activity-var) + ,@(unless iavp `((declare (ignore ,input-activity-var)))) + ,@body) + :input ,input-form ,active (place-setter ,setf) ,keys)) + + (defmacro with-program-output (((reduced-output-var + &optional (output-activity-var (gensym) oavp)) + output-form &key setf stream-easy-p active keys) &body body) + `(apply '%call-with-program-io 'slurp-input-stream *standard-output* ,stream-easy-p + #'(lambda (,reduced-output-var ,output-activity-var) + ,@(unless oavp `((declare (ignore ,output-activity-var)))) + ,@body) + :output ,output-form ,active (place-setter ,setf) ,keys)) + + (defmacro with-program-error-output (((reduced-error-output-var + &optional (error-output-activity-var (gensym) eoavp)) + error-output-form &key setf stream-easy-p active keys) + &body body) + `(apply '%call-with-program-io 'slurp-input-stream *error-output* ,stream-easy-p + #'(lambda (,reduced-error-output-var ,error-output-activity-var) + ,@(unless eoavp `((declare (ignore ,error-output-activity-var)))) + ,@body) + :error-output ,error-output-form ,active (place-setter ,setf) ,keys)) + + (defun %use-run-program (command &rest keys + &key input output error-output ignore-error-status &allow-other-keys) + ;; helper for RUN-PROGRAM when using %run-program + #+(or abcl cormanlisp gcl (and lispworks os-windows) mcl mkcl xcl) + (error "Not implemented on this platform") + (assert (not (member :stream (list input output error-output)))) + (let* ((active-input-p (%active-io-specifier-p input)) + (active-output-p (%active-io-specifier-p output)) + (active-error-output-p (%active-io-specifier-p error-output)) + (activity + (cond + (active-output-p :output) + (active-input-p :input) + (active-error-output-p :error-output) + (t nil))) + (wait (not activity)) + output-result error-output-result exit-code) + (with-program-output ((reduced-output output-activity) + output :keys keys :setf output-result + :stream-easy-p t :active (eq activity :output)) + (with-program-error-output ((reduced-error-output error-output-activity) + error-output :keys keys :setf error-output-result + :stream-easy-p t :active (eq activity :error-output)) + (with-program-input ((reduced-input input-activity) + input :keys keys + :stream-easy-p t :active (eq activity :input)) + (let ((process-info + (apply '%run-program command + :wait wait :input reduced-input :output reduced-output + :error-output (if (eq error-output :output) :output reduced-error-output) + keys))) + (labels ((get-stream (stream-name &optional fallbackp) + (or (getf process-info stream-name) + (when fallbackp + (getf process-info :bidir-stream)))) + (run-activity (activity stream-name &optional fallbackp) + (if-let (stream (get-stream stream-name fallbackp)) + (funcall activity stream) + (error 'subprocess-error + :code `(:missing ,stream-name) + :command command :process process-info)))) + (unwind-protect + (ecase activity + ((nil)) + (:input (run-activity input-activity :input-stream t)) + (:output (run-activity output-activity :output-stream t)) + (:error-output (run-activity error-output-activity :error-output-stream))) + (loop :for (() val) :on process-info :by #'cddr + :when (streamp val) :do (ignore-errors (close val))) + (setf exit-code + (%check-result (%wait-process-result process-info) + :command command :process process-info + :ignore-error-status ignore-error-status)))))))) + (values output-result error-output-result exit-code))) + + (defun %normalize-system-command (command) ;; helper for %USE-SYSTEM + (etypecase command + (string command) + (list (escape-shell-command + (if (os-unix-p) (cons "exec" command) command))))) + + (defun %redirected-system-command (command in out err directory) ;; helper for %USE-SYSTEM + (flet ((redirect (spec operator) + (let ((pathname + (typecase spec + (null (null-device-pathname)) + (string (pathname spec)) + (pathname spec) + ((eql :output) + (assert (equal operator "2>")) + (return-from redirect '(" 2>&1")))))) + (when pathname + (list " " operator " " + (escape-shell-token (native-namestring pathname))))))) + (multiple-value-bind (before after) + (let ((normalized (%normalize-system-command command))) + (if (os-unix-p) + (values '("exec") (list " ; " normalized)) + (values (list normalized) ()))) + (reduce/strcat + (append + before (redirect in "<") (redirect out ">") (redirect err "2>") + (when (and directory (os-unix-p)) `("cd " (escape-shell-token directory) " ; ")) + after))))) + + (defun %system (command &rest keys + &key input output error-output directory &allow-other-keys) + "A portable abstraction of a low-level call to libc's system()." + (declare (ignorable input output error-output directory keys)) + #+(or allegro clozure cmu (and lispworks os-unix) sbcl scl) + (%wait-process-result + (apply '%run-program (%normalize-system-command command) :wait t keys)) + #+(or abcl clisp cormanlisp ecl gcl (and lispworks os-windows) mkcl xcl) + (let ((%command (%redirected-system-command command input output error-output directory))) + #+(and lispworks os-windows) + (system:call-system %command :current-directory directory :wait t) + #-(and lispworks os-windows) + (with-current-directory ((unless (os-unix-p) directory)) + #+(or abcl xcl) (ext:run-shell-command %command) + #+clisp (clisp-exit-code (ext:shell %command)) + #+cormanlisp (win32:system %command) + #+ecl (let ((*standard-input* *stdin*) + (*standard-output* *stdout*) + (*error-output* *stderr*)) + (ext:system %command)) + #+gcl (lisp:system %command) + #+mcl (ccl::with-cstrs ((%%command %command)) (_system %%command)) + #+mkcl ;; PROBABLY BOGUS -- ask jcb + (multiple-value-bind (io process exit-code) + (mkcl:run-program #+windows %command #+windows () + #-windows "/bin/sh" #-windows (list "-c" %command) + :input t :output t))))) + + (defun %use-system (command &rest keys + &key input output error-output ignore-error-status &allow-other-keys) + ;; helper for RUN-PROGRAM when using %system + (let (output-result error-output-result exit-code) + (with-program-output ((reduced-output) + output :keys keys :setf output-result) + (with-program-error-output ((reduced-error-output) + error-output :keys keys :setf error-output-result) + (with-program-input ((reduced-input) input :keys keys) + (setf exit-code + (%check-result (apply '%system command + :input reduced-input :output reduced-output + :error-output reduced-error-output keys) + :command command + :ignore-error-status ignore-error-status))))) + (values output-result error-output-result exit-code))) + + (defun run-program (command &rest keys + &key ignore-error-status force-shell + (input nil inputp) (if-input-does-not-exist :error) + output (if-output-exists :overwrite) + (error-output nil error-output-p) (if-error-output-exists :overwrite) + (element-type #-clozure *default-stream-element-type* #+clozure 'character) + (external-format *utf-8-external-format*) + &allow-other-keys) "Run program specified by COMMAND, either a list of strings specifying a program and list of arguments, or a string specifying a shell command (/bin/sh on Unix, CMD.EXE on Windows). -Always call a shell (rather than directly execute the command) +Always call a shell (rather than directly execute the command when possible) if FORCE-SHELL is specified. -Signal a SUBPROCESS-ERROR if the process wasn't successful (exit-code 0), +Signal a continuable SUBPROCESS-ERROR if the process wasn't successful (exit-code 0), unless IGNORE-ERROR-STATUS is specified. -If OUTPUT is either NIL or :INTERACTIVE, then -return the exit status code of the process that was called. -if it was NIL, the output is discarded; -if it was :INTERACTIVE, the output and the input are inherited from the current process. - +If OUTPUT is a pathname, a string designating a pathname, or NIL designating the null device, +the file at that path is used as output. +If it's :INTERACTIVE, output is inherited from the current process. Otherwise, OUTPUT should be a value that is a suitable first argument to -SLURP-INPUT-STREAM. In this case, RUN-PROGRAM will create a temporary stream -for the program output. The program output, in that stream, will be processed -by SLURP-INPUT-STREAM, according to the using OUTPUT as the first argument. -RUN-PROGRAM will return whatever SLURP-INPUT-STREAM returns. E.g., using -:OUTPUT :STRING will have it return the entire output stream as a string. Use -ELEMENT-TYPE and EXTERNAL-FORMAT for the stream passed to the OUTPUT processor." - - ;; TODO: The current version does not honor :OUTPUT NIL on Allegro. Setting - ;; the :INPUT and :OUTPUT arguments to RUN-SHELL-COMMAND on ACL actually do - ;; what :OUTPUT :INTERACTIVE is advertised to do here. To get the behavior - ;; specified for :OUTPUT NIL, one would have to grab up the process output - ;; into a stream and then throw it on the floor. The consequences of - ;; getting this wrong seemed so much worse than having excess output that it - ;; is not currently implemented. - - ;; TODO: specially recognize :output pathname ? - (declare (ignorable ignore-error-status element-type external-format)) +SLURP-INPUT-STREAM (qv.), or a list of such a value and keyword arguments. +In this case, RUN-PROGRAM will create a temporary stream for the program output. +The program output, in that stream, will be processed by a call to SLURP-INPUT-STREAM, +using OUTPUT as the first argument (or the first element of OUTPUT, and the rest as keywords). +T designates the *STANDARD-OUTPUT* to be provided to SLURP-INPUT-STREAM. +The primary value resulting from that call (or NIL if no call was needed) +will be the first value returned by RUN-PROGRAM. +E.g., using :OUTPUT :STRING will have it return the entire output stream as a string. + +ERROR-OUTPUT is similar to OUTPUT, except that the resulting value is returned +as the second value of RUN-PROGRAM. T designates the *ERROR-OUTPUT*. +Also :OUTPUT means redirecting the error output to the output stream, and NIL is returned. + +INPUT is similar to OUTPUT, except that VOMIT-OUTPUT-STREAM is used, +no value is returned, and T designates the *STANDARD-INPUT*. + +Use ELEMENT-TYPE and EXTERNAL-FORMAT to specify how streams are created. + +One and only one of the stream slurping or vomiting may or may not happen +in parallel in parallel with the subprocess, depending on options and implementation. +Other streams are completely produced or consumed before or after the subprocess is spawned, +using temporary files. + +RUN-PROGRAM returns 3 values: +0- the result of the OUTPUT slurping if any, or NIL +1- the result of the ERROR-OUTPUT slurping if any, or NIL +2- either 0 if the subprocess exited with success status, +or an indication of failure via the EXIT-CODE of the process" + (declare (ignorable ignore-error-status)) #-(or abcl allegro clisp clozure cmu cormanlisp ecl gcl lispworks mcl sbcl scl xcl) (error "RUN-PROGRAM not implemented for this Lisp") - (labels (#+(or allegro clisp clozure cmu ecl (and lispworks os-unix) sbcl scl) - (run-program (command &key pipe interactive) - "runs the specified command (a list of program and arguments). - If using a pipe, returns two values: process and stream - If not using a pipe, returns one values: the process result; - also, inherits the output stream." - ;; NB: these implementations have unix vs windows set at compile-time. - (assert (not (and pipe interactive))) - (let* ((wait (not pipe)) - #-(and clisp os-windows) - (command - (etypecase command - #+os-unix (string `("/bin/sh" "-c" ,command)) - #+os-unix (list command) - #+os-windows - (string - ;; NB: We do NOT add cmd /c here. You might want to. - #+allegro command - ;; On ClozureCL for Windows, we assume you are using - ;; r15398 or later in 1.9 or later, - ;; so that bug 858 is fixed http://trac.clozure.com/ccl/ticket/858 - #+clozure (cons "cmd" (strcat "/c " command)) - ;; NB: On other Windows implementations, this is utterly bogus - ;; except in the most trivial cases where no quoting is needed. - ;; Use at your own risk. - #-(or allegro clozure) (list "cmd" "/c" command)) - #+os-windows - (list - #+(or allegro clozure) (escape-windows-command command) - #-(or allegro clozure) command))) - #+(and clozure os-windows) (command (list command)) - (process* - (multiple-value-list - #+allegro - (excl:run-shell-command - #+os-unix (coerce (cons (first command) command) 'vector) - #+os-windows command - :input nil - :output (and pipe :stream) :wait wait - #+os-windows :show-window #+os-windows (and (or (null output) pipe) :hide)) - #+clisp - (flet ((run (f &rest args) - (apply f `(,@args :input ,(when interactive :terminal) :wait ,wait :output - ,(if pipe :stream :terminal))))) - (etypecase command - #+os-windows (run 'ext:run-shell-command command) - (list (run 'ext:run-program (car command) - :arguments (cdr command))))) - #+lispworks - (system:run-shell-command - (cons "/usr/bin/env" command) ; lispworks wants a full path. - :input interactive :output (or (and pipe :stream) interactive) - :wait wait :save-exit-status (and pipe t)) - #+(or clozure cmu ecl sbcl scl) - (#+(or cmu ecl scl) ext:run-program - #+clozure ccl:run-program - #+sbcl sb-ext:run-program - (car command) (cdr command) - :input interactive :wait wait - :output (if pipe :stream t) - . #.(append - #+(or clozure cmu ecl sbcl scl) '(:error t) - ;; note: :external-format requires a recent SBCL - #+sbcl '(:search t :external-format external-format))))) - (process - #+allegro (if pipe (third process*) (first process*)) - #+ecl (third process*) - #-(or allegro ecl) (first process*)) - (stream - (when pipe - #+(or allegro lispworks ecl) (first process*) - #+clisp (first process*) - #+clozure (ccl::external-process-output process) - #+(or cmu scl) (ext:process-output process) - #+sbcl (sb-ext:process-output process)))) - (values process stream))) - #+(or allegro clisp clozure cmu ecl (and lispworks os-unix) sbcl scl) - (process-result (process pipe) - (declare (ignorable pipe)) - ;; 1- wait - #+(and clozure os-unix) (ccl::external-process-wait process) - #+(or cmu scl) (ext:process-wait process) - #+(and ecl os-unix) (ext:external-process-wait process) - #+sbcl (sb-ext:process-wait process) - ;; 2- extract result - #+allegro (if pipe (sys:reap-os-subprocess :pid process :wait t) process) - #+clisp process - #+clozure (nth-value 1 (ccl:external-process-status process)) - #+(or cmu scl) (ext:process-exit-code process) - #+ecl (nth-value 1 (ext:external-process-status process)) - #+lispworks (if pipe (system:pipe-exit-status process :wait t) process) - #+sbcl (sb-ext:process-exit-code process)) - (check-result (exit-code process) - #+clisp - (setf exit-code - (typecase exit-code (integer exit-code) (null 0) (t -1))) - (unless (or ignore-error-status - (equal exit-code 0)) - (error 'subprocess-error :command command :code exit-code :process process)) - exit-code) - (use-run-program () - #-(or abcl cormanlisp gcl (and lispworks os-windows) mcl mkcl xcl) - (let* ((interactive (eq output :interactive)) - (pipe (and output (not interactive)))) - (multiple-value-bind (process stream) - (run-program command :pipe pipe :interactive interactive) - (if (and output (not interactive)) - (unwind-protect - (slurp-input-stream output stream) - (when stream (close stream)) - (check-result (process-result process pipe) process)) - (unwind-protect - (check-result - #+(or allegro lispworks) ; when not capturing, returns the exit code! - process - #-(or allegro lispworks) (process-result process pipe) - process)))))) - (system-command (command) - (etypecase command - (string (if (os-windows-p) (format nil "cmd /c ~A" command) command)) - (list (escape-shell-command - (if (os-unix-p) (cons "exec" command) command))))) - (redirected-system-command (command out) - (format nil (if (os-unix-p) "exec > ~*~A ; ~2:*~A" "~A > ~A") - (system-command command) (native-namestring out))) - (system (command &key interactive) - (declare (ignorable interactive)) - #+(or abcl xcl) (ext:run-shell-command command) - #+allegro - (excl:run-shell-command - command - :input nil - :output nil - :error-output :output ; write STDERR to output, too - :wait t - #+os-windows :show-window #+os-windows (unless (or interactive (eq output t)) :hide)) - #+(or clisp clozure cmu (and lispworks os-unix) sbcl scl) - (process-result (run-program command :pipe nil :interactive interactive) nil) - #+ecl (ext:system command) - #+cormanlisp (win32:system command) - #+gcl (lisp:system command) - #+(and lispworks os-windows) - (system:call-system-showing-output - command :show-cmd (or interactive (eq output t)) :prefix "" :output-stream nil) - #+mcl (ccl::with-cstrs ((%command command)) (_system %command)) - #+mkcl (nth-value 2 - (mkcl:run-program #+windows command #+windows () - #-windows "/bin/sh" (list "-c" command) - :input nil :output nil))) - (call-system (command-string &key interactive) - (check-result (system command-string :interactive interactive) nil)) - (use-system () - (let ((interactive (eq output :interactive))) - (if (and output (not interactive)) - (with-temporary-file (:pathname tmp :direction :output) - (call-system (redirected-system-command command tmp)) - (with-open-file (stream tmp - :direction :input - :if-does-not-exist :error - :element-type element-type - #-gcl2.6 :external-format #-gcl2.6 external-format) - (slurp-input-stream output stream))) - (call-system (system-command command) :interactive interactive))))) - (if (and (not force-shell) - #+(or clisp ecl) ignore-error-status - #+(or abcl cormanlisp gcl (and lispworks os-windows) mcl mkcl xcl) nil) - (use-run-program) - (use-system))))) - + (flet ((default (x xp output) (cond (xp x) ((eq output :interactive) :interactive)))) + (apply (if (or force-shell + #+(or clisp ecl) (or (not ignore-error-status) t) + #+clisp (eq error-output :interactive) + #+(or abcl clisp) (eq :error-output :output) + #+(and lispworks os-unix) (%interactivep input output error-output) + #+(or abcl cormanlisp gcl (and lispworks os-windows) mcl mkcl xcl) t) + '%use-system '%use-run-program) + command + :input (default input inputp output) + :error-output (default error-output error-output-p output) + :if-input-does-not-exist if-input-does-not-exist + :if-output-exists if-output-exists + :if-error-output-exists if-error-output-exists + :element-type element-type :external-format external-format + keys)))) ;;;; ------------------------------------------------------------------------- ;;;; Support to build (compile and load) Lisp files @@ -4346,6 +5206,7 @@ #:*compile-file-warnings-behaviour* #:*compile-file-failure-behaviour* #:*output-translation-function* #:*optimization-settings* #:*previous-optimization-settings* + #:*base-build-directory* #:compile-condition #:compile-file-error #:compile-warned-error #:compile-failed-error #:compile-warned-warning #:compile-failed-warning #:check-lisp-compile-results #:check-lisp-compile-warnings @@ -4379,13 +5240,20 @@ "How should ASDF react if it encounters a failure (per the ANSI spec of COMPILE-FILE) when compiling a file, which includes any non-style-warning warning. Valid values are :error, :warn, and :ignore. -Note that ASDF ALWAYS raises an error if it fails to create an output file when compiling.")) +Note that ASDF ALWAYS raises an error if it fails to create an output file when compiling.") + (defvar *base-build-directory* nil + "When set to a non-null value, it should be an absolute directory pathname, +which will serve as the *DEFAULT-PATHNAME-DEFAULTS* around a COMPILE-FILE, +what more while the input-file is shortened if possible to ENOUGH-PATHNAME relative to it. +This can help you produce more deterministic output for FASLs.")) ;;; Optimization settings (with-upgradability () - (defvar *optimization-settings* nil) - (defvar *previous-optimization-settings* nil) + (defvar *optimization-settings* nil + "Optimization settings to be used by PROCLAIM-OPTIMIZATION-SETTINGS") + (defvar *previous-optimization-settings* nil + "Optimization settings saved by PROCLAIM-OPTIMIZATION-SETTINGS") (defun get-optimization-settings () "Get current compiler optimization settings, ready to PROCLAIM again" #-(or clisp clozure cmu ecl sbcl scl) @@ -4414,6 +5282,7 @@ #+sbcl (progn (defun sb-grovel-unknown-constant-condition-p (c) + "Detect SB-GROVEL unknown-constant conditions on older versions of SBCL" (and (typep c 'sb-int:simple-style-warning) (string-enclosed-p "Couldn't grovel for " @@ -4459,16 +5328,18 @@ ;;;; ----- Filtering conditions while building ----- (with-upgradability () (defun call-with-muffled-compiler-conditions (thunk) + "Call given THUNK in a context where uninteresting conditions and compiler conditions are muffled" (call-with-muffled-conditions thunk (append *uninteresting-conditions* *uninteresting-compiler-conditions*))) (defmacro with-muffled-compiler-conditions ((&optional) &body body) - "Run BODY where uninteresting compiler conditions are muffled" + "Trivial syntax for CALL-WITH-MUFFLED-COMPILER-CONDITIONS" `(call-with-muffled-compiler-conditions #'(lambda () ,@body))) (defun call-with-muffled-loader-conditions (thunk) + "Call given THUNK in a context where uninteresting conditions and loader conditions are muffled" (call-with-muffled-conditions thunk (append *uninteresting-conditions* *uninteresting-loader-conditions*))) (defmacro with-muffled-loader-conditions ((&optional) &body body) - "Run BODY where uninteresting compiler and additional loader conditions are muffled" + "Trivial syntax for CALL-WITH-MUFFLED-LOADER-CONDITIONS" `(call-with-muffled-loader-conditions #'(lambda () ,@body)))) @@ -4494,6 +5365,8 @@ (defun check-lisp-compile-warnings (warnings-p failure-p &optional context-format context-arguments) + "Given the warnings or failures as resulted from COMPILE-FILE or checking deferred warnings, +raise an error or warning as appropriate" (when failure-p (case *compile-file-failure-behaviour* (:warn (warn 'compile-failed-warning @@ -4519,6 +5392,7 @@ (defun check-lisp-compile-results (output warnings-p failure-p &optional context-format context-arguments) + "Given the results of COMPILE-FILE, raise an error or warning as appropriate" (unless output (error 'compile-file-error :context-format context-format :context-arguments context-arguments)) (check-lisp-compile-warnings warnings-p failure-p context-format context-arguments))) @@ -4531,6 +5405,8 @@ ;;; See their respective docstrings. (with-upgradability () (defun reify-simple-sexp (sexp) + "Given a simple SEXP, return a representation of it as a portable SEXP. +Simple means made of symbols, numbers, characters, simple-strings, pathnames, cons cells." (etypecase sexp (symbol (reify-symbol sexp)) ((or number character simple-string pathname) sexp) @@ -4538,6 +5414,7 @@ (simple-vector (vector (mapcar 'reify-simple-sexp (coerce sexp 'list)))))) (defun unreify-simple-sexp (sexp) + "Given the portable output of REIFY-SIMPLE-SEXP, return the simple SEXP it represents" (etypecase sexp ((or symbol number character simple-string pathname) sexp) (cons (cons (unreify-simple-sexp (car sexp)) (unreify-simple-sexp (cdr sexp)))) @@ -4789,6 +5666,8 @@ (terpri s)))) (defun warnings-file-type (&optional implementation-type) + "The pathname type for warnings files on given IMPLEMENTATION-TYPE, +where NIL designates the current one" (case (or implementation-type *implementation-type*) ((:acl :allegro) "allegro-warnings") ;;((:clisp) "clisp-warnings") @@ -4798,21 +5677,27 @@ ((:scl) "scl-warnings"))) (defvar *warnings-file-type* nil - "Type for warnings files") + "Pathname type for warnings files, or NIL if disabled") (defun enable-deferred-warnings-check () + "Enable the saving of deferred warnings" (setf *warnings-file-type* (warnings-file-type))) (defun disable-deferred-warnings-check () + "Disable the saving of deferred warnings" (setf *warnings-file-type* nil)) (defun warnings-file-p (file &optional implementation-type) + "Is FILE a saved warnings file for the given IMPLEMENTATION-TYPE? +If that given type is NIL, use the currently configured *WARNINGS-FILE-TYPE* instead." (if-let (type (if implementation-type (warnings-file-type implementation-type) *warnings-file-type*)) (equal (pathname-type file) type))) (defun check-deferred-warnings (files &optional context-format context-arguments) + "Given a list of FILES in which deferred warnings were saved by CALL-WITH-DEFERRED-WARNINGS, +re-intern and raise any warnings that are still meaningful." (let ((file-errors nil) (failure-p nil) (warnings-p nil)) @@ -4853,6 +5738,9 @@ |# (defun call-with-saved-deferred-warnings (thunk warnings-file) + "If WARNINGS-FILE is not nil, record the deferred-warnings around a call to THUNK +and save those warnings to the given file for latter use, +possibly in a different process. Otherwise just call THUNK." (if warnings-file (with-compilation-unit (:override t) (unwind-protect @@ -4864,21 +5752,22 @@ (funcall thunk))) (defmacro with-saved-deferred-warnings ((warnings-file) &body body) - "If WARNINGS-FILE is not nil, records the deferred-warnings around the BODY -and saves those warnings to the given file for latter use, -possibly in a different process. Otherwise just run the BODY." + "Trivial syntax for CALL-WITH-SAVED-DEFERRED-WARNINGS" `(call-with-saved-deferred-warnings #'(lambda () ,@body) ,warnings-file))) ;;; from ASDF (with-upgradability () (defun current-lisp-file-pathname () + "Portably return the PATHNAME of the current Lisp source file being compiled or loaded" (or *compile-file-pathname* *load-pathname*)) (defun load-pathname () - *load-pathname*) + "Portably return the LOAD-PATHNAME of the current source file or fasl" + *load-pathname*) ;; see magic for GCL in uiop/common-lisp (defun lispize-pathname (input-file) + "From a INPUT-FILE pathname, return a corresponding .lisp source pathname" (make-pathname :type "lisp" :defaults input-file)) (defun compile-file-type (&rest keys) @@ -4888,9 +5777,11 @@ #+(or ecl mkcl) (pathname-type (apply 'compile-file-pathname "foo" keys))) (defun call-around-hook (hook function) + "Call a HOOK around the execution of FUNCTION" (call-function (or hook 'funcall) function)) (defun compile-file-pathname* (input-file &rest keys &key output-file &allow-other-keys) + "Variant of COMPILE-FILE-PATHNAME that works well with COMPILE-FILE*" (let* ((keys (remove-plist-keys `(#+(and allegro (not (version>= 8 2))) :external-format ,@(unless output-file '(:output-file))) keys))) @@ -4959,16 +5850,17 @@ (multiple-value-bind (output-truename warnings-p failure-p) (with-saved-deferred-warnings (warnings-file) (with-muffled-compiler-conditions () - (or #-(or ecl mkcl) - (apply 'compile-file input-file :output-file tmp-file - #+sbcl (if emit-cfasl (list* :emit-cfasl tmp-cfasl keywords) keywords) - #-sbcl keywords) - #+ecl (apply 'compile-file input-file :output-file - (if object-file - (list* object-file :system-p t keywords) - (list* tmp-file keywords))) - #+mkcl (apply 'compile-file input-file - :output-file object-file :fasl-p nil keywords)))) + (with-enough-pathname (input-file :defaults *base-build-directory*) + (or #-(or ecl mkcl) + (apply 'compile-file input-file :output-file tmp-file + #+sbcl (if emit-cfasl (list* :emit-cfasl tmp-cfasl keywords) keywords) + #-sbcl keywords) + #+ecl (apply 'compile-file input-file :output-file + (if object-file + (list* object-file :system-p t keywords) + (list* tmp-file keywords))) + #+mkcl (apply 'compile-file input-file + :output-file object-file :fasl-p nil keywords))))) (cond ((and output-truename (flet ((check-flag (flag behaviour) @@ -4999,6 +5891,7 @@ (values output-truename warnings-p failure-p)))) (defun load* (x &rest keys &key &allow-other-keys) + "Portable wrapper around LOAD that properly handles loading from a stream." (etypecase x ((or pathname string #-(or allegro clozure gcl2.6 genera) stream) (apply 'load x @@ -5021,6 +5914,7 @@ ;;; Links FASLs together (with-upgradability () (defun combine-fasls (inputs output) + "Combine a list of FASLs INPUTS into a single FASL OUTPUT" #-(or abcl allegro clisp clozure cmu lispworks sbcl scl xcl) (error "~A does not support ~S~%inputs ~S~%output ~S" (implementation-type) 'combine-fasls inputs output) @@ -5081,8 +5975,10 @@ (condition-arguments c)))))) (defun get-folder-path (folder) - (or ;; this semi-portably implements a subset of the functionality of lispworks' sys:get-folder-path - #+(and lispworks mswindows) (sys:get-folder-path folder) + "Semi-portable implementation of a subset of LispWorks' sys:get-folder-path, +this function tries to locate the Windows FOLDER for one of +:LOCAL-APPDATA, :APPDATA or :COMMON-APPDATA." + (or #+(and lispworks mswindows) (sys:get-folder-path folder) ;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData (ecase folder (:local-appdata (getenv-absolute-directory "LOCALAPPDATA")) @@ -5091,6 +5987,7 @@ (subpathname* (getenv-absolute-directory "ALLUSERSPROFILE") "Application Data/")))))) (defun user-configuration-directories () + "Determine user configuration directories" (let ((dirs `(,@(when (os-unix-p) (cons @@ -5105,6 +6002,7 @@ :from-end t :test 'equal))) (defun system-configuration-directories () + "Determine system user configuration directories" (cond ((os-unix-p) '(#p"/etc/common-lisp/")) ((os-windows-p) @@ -5112,23 +6010,28 @@ (list it))))) (defun in-first-directory (dirs x &key (direction :input)) + "Determine system user configuration directories" (loop :with fun = (ecase direction ((nil :input :probe) 'probe-file*) ((:output :io) 'identity)) :for dir :in dirs - :thereis (and dir (funcall fun (merge-pathnames* x (ensure-directory-pathname dir)))))) + :thereis (and dir (funcall fun (subpathname (ensure-directory-pathname dir) x))))) (defun in-user-configuration-directory (x &key (direction :input)) + "return pathname under user configuration directory, subpathname X" (in-first-directory (user-configuration-directories) x :direction direction)) (defun in-system-configuration-directory (x &key (direction :input)) + "return pathname under system configuration directory, subpathname X" (in-first-directory (system-configuration-directories) x :direction direction)) (defun configuration-inheritance-directive-p (x) + "Is X a configuration inheritance directive?" (let ((kw '(:inherit-configuration :ignore-inherited-configuration))) (or (member x kw) (and (length=n-p x 1) (member (car x) kw))))) (defun report-invalid-form (reporter &rest args) + "Report an invalid form according to REPORTER and various ARGS" (etypecase reporter (null (apply 'error 'invalid-configuration args)) @@ -5139,10 +6042,12 @@ (cons (apply 'apply (append reporter args))))) - (defvar *ignored-configuration-form* nil) + (defvar *ignored-configuration-form* nil + "Have configuration forms been ignored while parsing the configuration?") (defun validate-configuration-form (form tag directive-validator &key location invalid-form-reporter) + "Validate a configuration FORM" (unless (and (consp form) (eq (car form) tag)) (setf *ignored-configuration-form* t) (report-invalid-form invalid-form-reporter :form form :location location) @@ -5171,6 +6076,7 @@ (return (nreverse x)))) (defun validate-configuration-file (file validator &key description) + "Validate a configuration file for conformance of its form with the validator function" (let ((forms (read-file-forms file))) (unless (length=n-p forms 1) (error (compatfmt "~@~%") @@ -5203,6 +6109,7 @@ :inherit-configuration))) (defun resolve-relative-location (x &key ensure-directory wilden) + "Given a designator X for an relative location, resolve it to a pathname" (ensure-pathname (etypecase x (pathname x) @@ -5241,6 +6148,7 @@ "A specification as per RESOLVE-LOCATION of where the user keeps his FASL cache") (defun compute-user-cache () + "Compute the location of the default user-cache for translate-output objects" (setf *user-cache* (flet ((try (x &rest sub) (and x `(,x ,@sub)))) (or @@ -5253,6 +6161,7 @@ (register-image-restore-hook 'compute-user-cache) (defun resolve-absolute-location (x &key ensure-directory wilden) + "Given a designator X for an absolute location, resolve it to a pathname" (ensure-pathname (etypecase x (pathname x) @@ -5293,6 +6202,7 @@ (:ensure-directory boolean)) t) resolve-location)) (defun* (resolve-location) (x &key ensure-directory wilden directory) + "Resolve location designator X into a PATHNAME" ;; :directory backward compatibility, until 2014-01-16: accept directory as well as ensure-directory (loop* :with dirp = (or directory ensure-directory) :with (first . rest) = (if (atom x) (list x) x) @@ -5310,6 +6220,7 @@ :finally (return path))) (defun location-designator-p (x) + "Is X a designator for a location?" (flet ((absolute-component-p (c) (typep c '(or string pathname (member :root :home :here :user-cache)))) @@ -5321,26 +6232,25 @@ (and (consp x) (absolute-component-p (first x)) (every #'relative-component-p (rest x)))))) (defun location-function-p (x) + "Is X the specification of a location function?" (and (length=n-p x 2) - (eq (car x) :function) - (or (symbolp (cadr x)) - (and (consp (cadr x)) - (eq (caadr x) 'lambda) - (length=n-p (cadadr x) 2))))) + (eq (car x) :function))) (defvar *clear-configuration-hook* '()) (defun register-clear-configuration-hook (hook-function &optional call-now-p) + "Register a function to be called when clearing configuration" (register-hook-function '*clear-configuration-hook* hook-function call-now-p)) (defun clear-configuration () + "Call the functions in *CLEAR-CONFIGURATION-HOOK*" (call-functions *clear-configuration-hook*)) (register-image-dump-hook 'clear-configuration) - ;; If a previous version of ASDF failed to read some configuration, try again. (defun upgrade-configuration () + "If a previous version of ASDF failed to read some configuration, try again now." (when *ignored-configuration-form* (clear-configuration) (setf *ignored-configuration-form* nil)))) @@ -5388,17 +6298,19 @@ #+(or ecl mkcl) (defun compile-file-keeping-object (&rest args) (apply #'compile-file* args))) ;;;; --------------------------------------------------------------------------- -;;;; Re-export all the functionality in asdf/driver +;;;; Re-export all the functionality in UIOP (uiop/package:define-package :uiop/driver (:nicknames :uiop :asdf/driver :asdf-driver :asdf-utils) (:use :uiop/common-lisp :uiop/package :uiop/utility - :uiop/os :uiop/pathname :uiop/stream :uiop/filesystem :uiop/image + :uiop/os :uiop/pathname :uiop/stream :uiop/filesystem :uiop/image :uiop/run-program :uiop/lisp-build :uiop/configuration :uiop/backward-driver) (:reexport - ;; NB: excluding asdf/common-lisp - ;; which include all of CL with compatibility modifications on select platforms. + ;; NB: excluding uiop/common-lisp + ;; which include all of CL with compatibility modifications on select platforms, + ;; that could cause potential conflicts for packages that would :use (cl uiop) + ;; or :use (closer-common-lisp uiop), etc. :uiop/package :uiop/utility :uiop/os :uiop/pathname :uiop/stream :uiop/filesystem :uiop/image :uiop/run-program :uiop/lisp-build @@ -5409,7 +6321,7 @@ (asdf/package:define-package :asdf/upgrade (:recycle :asdf/upgrade :asdf) - (:use :asdf/common-lisp :asdf/driver) + (:use :uiop/common-lisp :uiop) (:export #:asdf-version #:*previous-asdf-versions* #:*asdf-version* #:asdf-message #:*verbose-out* @@ -5457,13 +6369,13 @@ ;; "3.4.5.67" would be a development version in the official upstream of 3.4.5. ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 - (asdf-version "3.0.2") + (asdf-version "3.0.3") (existing-version (asdf-version))) (setf *asdf-version* asdf-version) (when (and existing-version (not (equal asdf-version existing-version))) (push existing-version *previous-asdf-versions*) - (when (or *load-verbose* *verbose-out*) - (format *trace-output* + (when (or *verbose-out* *load-verbose*) + (format (or *verbose-out* *trace-output*) (compatfmt "~&~@<; ~@;Upgrading ASDF ~@[from version ~A ~]to version ~A~@:>~%") existing-version asdf-version))))) @@ -5483,7 +6395,7 @@ #:inherit-source-registry #:process-source-registry ;; source-registry #:process-source-registry-directive #:trivial-system-p ;; bundle - ;; NB: it's too late to do anything about asdf-driver functions! + ;; NB: it's too late to do anything about uiop functions! )) (uninterned-symbols '(#:*asdf-revision* #:around #:asdf-method-combination @@ -5548,8 +6460,8 @@ ;;;; Components (asdf/package:define-package :asdf/component - (:recycle :asdf/component :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade) + (:recycle :asdf/component :asdf/defsystem :asdf/find-system :asdf) + (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export #:component #:component-find-path #:component-name #:component-pathname #:component-relative-pathname @@ -5574,6 +6486,10 @@ #:module-components ;; backward-compatibility. DO NOT USE. #:sub-components + ;; conditions + #:system-definition-error ;; top level, moved here because this is the earliest place for it. + #:duplicate-names + ;; Internals we'd like to share with the ASDF package, especially for upgrade purposes #:name #:version #:description #:long-description #:author #:maintainer #:licence #:components-by-name #:components @@ -5607,7 +6523,24 @@ ;; Backward compatible way of computing the FILE-TYPE of a component. ;; TODO: find users, have them stop using that, remove it for ASDF4. - (defgeneric (source-file-type) (component system))) + (defgeneric (source-file-type) (component system)) + + (define-condition system-definition-error (error) () + ;; [this use of :report should be redundant, but unfortunately it's not. + ;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function + ;; over print-object; this is always conditions::%print-condition for + ;; condition objects, which in turn does inheritance of :report options at + ;; run-time. fortunately, inheritance means we only need this kludge here in + ;; order to fix all conditions that build on it. -- rgr, 28-Jul-02.] + #+cmu (:report print-object)) + + (define-condition duplicate-names (system-definition-error) + ((name :initarg :name :reader duplicate-names-name)) + (:report (lambda (c s) + (format s (compatfmt "~@") + (duplicate-names-name c)))))) + + (when-upgrading (:when (find-class 'component nil)) (defmethod reinitialize-instance :after ((c component) &rest initargs &key) @@ -5838,7 +6771,7 @@ (asdf/package:define-package :asdf/system (:recycle :asdf :asdf/system) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade :asdf/component) + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component) (:export #:system #:proto-system #:system-source-file #:system-source-directory #:system-relative-pathname @@ -5948,9 +6881,9 @@ ;;;; Stamp cache (asdf/package:define-package :asdf/cache - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade) + (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export #:get-file-stamp #:compute-file-stamp #:register-file-stamp - #:consult-asdf-cache #:do-asdf-cache + #:consult-asdf-cache #:do-asdf-cache #:normalize-namestring #:call-with-asdf-cache #:with-asdf-cache #:*asdf-cache*)) (in-package :asdf/cache) @@ -5988,29 +6921,39 @@ (defmacro with-asdf-cache ((&key override) &body body) `(call-with-asdf-cache #'(lambda () ,@body) :override ,override)) - (defun compute-file-stamp (file) - (safe-file-write-date file)) - - (defun register-file-stamp (file &optional (stamp (compute-file-stamp file))) - (set-asdf-cache-entry `(get-file-stamp ,file) (list stamp))) + (defun normalize-namestring (pathname) + (let ((resolved (resolve-symlinks* + (ensure-absolute-pathname + (physicalize-pathname pathname) + 'get-pathname-defaults)))) + (with-pathname-defaults () (namestring resolved)))) + + (defun compute-file-stamp (normalized-namestring) + (with-pathname-defaults () + (safe-file-write-date normalized-namestring))) + + (defun register-file-stamp (file &optional (stamp nil stampp)) + (let* ((namestring (normalize-namestring file)) + (stamp (if stampp stamp (compute-file-stamp namestring)))) + (set-asdf-cache-entry `(get-file-stamp ,namestring) (list stamp)))) (defun get-file-stamp (file) - (do-asdf-cache `(get-file-stamp ,file) (compute-file-stamp file)))) - + (let ((namestring (normalize-namestring file))) + (do-asdf-cache `(get-file-stamp ,namestring) (compute-file-stamp namestring))))) ;;;; ------------------------------------------------------------------------- ;;;; Finding systems (asdf/package:define-package :asdf/find-system (:recycle :asdf/find-system :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/cache) (:export #:remove-entry-from-registry #:coerce-entry-to-directory #:coerce-name #:primary-system-name #:coerce-filename #:find-system #:locate-system #:load-asd #:with-system-definitions #:system-registered-p #:register-system #:registered-systems #:clear-system #:map-systems - #:system-definition-error #:missing-component #:missing-requires #:missing-parent + #:missing-component #:missing-requires #:missing-parent #:formatted-system-definition-error #:format-control #:format-arguments #:sysdef-error #:load-system-definition-error #:error-name #:error-pathname #:error-condition #:*system-definition-search-functions* #:search-for-system-definition @@ -6026,15 +6969,6 @@ (with-upgradability () (declaim (ftype (function (&optional t) t) initialize-source-registry)) ; forward reference - (define-condition system-definition-error (error) () - ;; [this use of :report should be redundant, but unfortunately it's not. - ;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function - ;; over print-object; this is always conditions::%print-condition for - ;; condition objects, which in turn does inheritance of :report options at - ;; run-time. fortunately, inheritance means we only need this kludge here in - ;; order to fix all conditions that build on it. -- rgr, 28-Jul-02.] - #+cmu (:report print-object)) - (define-condition missing-component (system-definition-error) ((requires :initform "(unnamed)" :reader missing-requires :initarg :requires) (parent :initform nil :reader missing-parent :initarg :parent))) @@ -6134,7 +7068,7 @@ (setf *system-definition-search-functions* (append ;; Remove known-incompatible sysdef functions from old versions of asdf. - (remove-if #'(lambda (x) (member x '(contrib-sysdef-search sysdef-find-asdf))) + (remove-if #'(lambda (x) (member x '(contrib-sysdef-search sysdef-find-asdf sysdef-preloaded-system-search))) *system-definition-search-functions*) ;; Tuck our defaults at the end of the list if they were absent. ;; This is imperfect, in case they were removed on purpose, @@ -6142,14 +7076,16 @@ ;; to upgrade asdf before he does such a thing rather than after. (remove-if #'(lambda (x) (member x *system-definition-search-functions*)) '(sysdef-central-registry-search - sysdef-source-registry-search - sysdef-preloaded-system-search))))) + sysdef-source-registry-search))))) (cleanup-system-definition-search-functions) (defun search-for-system-definition (system) - (some (let ((name (coerce-name system))) #'(lambda (x) (funcall x name))) - (cons 'find-system-if-being-defined - *system-definition-search-functions*))) + (block () + (let ((name (coerce-name system))) + (flet ((try (f) (if-let ((x (funcall f name))) (return x)))) + (try 'find-system-if-being-defined) + (map () #'try *system-definition-search-functions*) + (try 'sysdef-preloaded-system-search))))) (defvar *central-registry* nil "A list of 'system directory designators' ASDF uses to find systems. @@ -6177,7 +7113,7 @@ :truename truename)) (return file)) #-(or clisp genera) ; clisp doesn't need it, plain genera doesn't have read-sequence(!) - (when (os-windows-p) + (when (and (os-windows-p) (physical-pathname-p defaults)) (let ((shortcut (make-pathname :defaults defaults :case :local @@ -6252,7 +7188,9 @@ (setf (gethash (coerce-name system-name) *preloaded-systems*) keys)) (register-preloaded-system "asdf" :version *asdf-version*) + (register-preloaded-system "uiop" :version *asdf-version*) (register-preloaded-system "asdf-driver" :version *asdf-version*) + (register-preloaded-system "asdf-defsystem" :version *asdf-version*) (defmethod find-system ((name null) &optional (error-p t)) (declare (ignorable name)) @@ -6267,7 +7205,8 @@ (defun find-system-if-being-defined (name) (when *systems-being-defined* - (gethash (coerce-name name) *systems-being-defined*))) + ;; notable side effect: mark the system as being defined, to avoid infinite loops + (ensure-gethash (coerce-name name) *systems-being-defined* nil))) (defun call-with-system-definitions (thunk) (if *systems-being-defined* @@ -6298,7 +7237,7 @@ (*print-readably* nil) (*default-pathname-defaults* ;; resolve logical-pathnames so they won't wreak havoc in parsing namestrings. - (pathname-directory-pathname (translate-logical-pathname pathname)))) + (pathname-directory-pathname (physicalize-pathname pathname)))) (handler-bind ((error #'(lambda (condition) (error 'load-system-definition-error @@ -6319,13 +7258,13 @@ (read-file-form version-pathname))) (old-version (asdf-version))) (or (version<= old-version version) - (let ((old-pathname - (if-let (pair (system-registered-p "asdf")) - (system-source-file (cdr pair)))) - (key (list pathname old-version))) - (unless (gethash key *old-asdf-systems*) - (setf (gethash key *old-asdf-systems*) t) - (warn "~@<~ + (ensure-gethash + (list pathname old-version) *old-asdf-systems* + #'(lambda () + (let ((old-pathname + (if-let (pair (system-registered-p "asdf")) + (system-source-file (cdr pair))))) + (warn "~@<~ You are using ASDF version ~A ~:[(probably from (require \"asdf\") ~ or loaded by quicklisp)~;from ~:*~S~] and have an older version of ASDF ~ ~:[(and older than 2.27 at that)~;~:*~A~] registered at ~S. ~ @@ -6347,7 +7286,8 @@ then you might indeed want to either install and register a more recent version, ~ or use :ignore-inherited-configuration to avoid registering the old one. ~ Please consult ASDF documentation and/or experts.~@:>~%" - old-version old-pathname version pathname))))))) + old-version old-pathname version pathname) + t))))))) (defun locate-system (name) "Given a system NAME designator, try to locate where to load the system from. @@ -6384,6 +7324,10 @@ (defmethod find-system ((name string) &optional (error-p t)) (with-system-definitions () + (let ((primary-name (primary-system-name name))) + (unless (or (equal name primary-name) + (nth-value 1 (gethash primary-name *systems-being-defined*))) + (find-system primary-name nil))) (loop (restart-case (multiple-value-bind (foundp found-system pathname previous previous-time) @@ -6402,8 +7346,8 @@ (or (pathname-equal pathname previous-pathname) (and pathname previous-pathname (pathname-equal - (translate-logical-pathname pathname) - (translate-logical-pathname previous-pathname)))) + (physicalize-pathname pathname) + (physicalize-pathname previous-pathname)))) (stamp<= stamp previous-time)))))) ;; only load when it's a pathname that is different or has newer content, and not an old asdf (load-asd pathname :name name))) @@ -6426,7 +7370,7 @@ (asdf/package:define-package :asdf/find-component (:recycle :asdf/find-component :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/find-system) (:export #:find-component @@ -6556,7 +7500,7 @@ (asdf/package:define-package :asdf/operation (:recycle :asdf/operation :asdf/action :asdf) ;; asdf/action for FEATURE pre 2.31.5. - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade) + (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export #:operation #:operation-original-initargs #:original-initargs ;; backward-compatibility only. DO NOT USE. @@ -6591,11 +7535,8 @@ (with-upgradability () (defparameter *operations* (make-hash-table :test 'equal)) (defun make-operation (operation-class &rest initargs) - (let ((key (cons operation-class initargs))) - (multiple-value-bind (operation foundp) (gethash key *operations*) - (if foundp operation - (setf (gethash key *operations*) - (apply 'make-instance operation-class initargs)))))) + (ensure-gethash (cons operation-class initargs) *operations* + (list* 'make-instance operation-class initargs))) (defgeneric find-operation (context spec) (:documentation "Find an operation by resolving the SPEC in the CONTEXT")) @@ -6620,7 +7561,7 @@ (asdf/package:define-package :asdf/action (:nicknames :asdf-action) (:recycle :asdf/action :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system #:asdf/cache :asdf/find-system :asdf/find-component :asdf/operation) (:export #:action #:define-convenience-action-methods @@ -6937,8 +7878,8 @@ (asdf/package:define-package :asdf/lisp-action (:recycle :asdf/lisp-action :asdf) (:intern #:proclamations #:flags) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade - :asdf/cache :asdf/component :asdf/system :asdf/find-component :asdf/find-system + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/cache + :asdf/component :asdf/system :asdf/find-component :asdf/find-system :asdf/operation :asdf/action) (:export #:try-recompiling @@ -7187,7 +8128,7 @@ (asdf/package:define-package :asdf/plan (:recycle :asdf/plan :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/operation :asdf/system :asdf/cache :asdf/find-system :asdf/find-component :asdf/operation :asdf/action :asdf/lisp-action) @@ -7635,14 +8576,15 @@ (asdf/package:define-package :asdf/operate (:recycle :asdf/operate :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/operation :asdf/action :asdf/find-system :asdf/find-component :asdf/lisp-action :asdf/plan) (:export #:operate #:oos #:*systems-being-operated* #:build-system - #:load-system #:load-systems #:compile-system #:test-system #:require-system + #:load-system #:load-systems #:load-systems* + #:compile-system #:test-system #:require-system #:*load-system-operation* #:module-provide-asdf #:component-loaded-p #:already-loaded-systems)) (in-package :asdf/operate) @@ -7752,9 +8694,13 @@ (apply 'operate *load-system-operation* system keys) t) + (defun load-systems* (systems &rest keys) + "Loading multiple systems at once." + (dolist (s systems) (apply 'load-system s keys))) + (defun load-systems (&rest systems) "Loading multiple systems at once." - (map () 'load-system systems)) + (load-systems* systems)) (defun compile-system (system &rest args &key force force-not verbose version &allow-other-keys) "Shorthand for `(asdf:operate 'asdf:compile-op system)`. See OPERATE for details." @@ -7848,7 +8794,7 @@ (asdf/package:define-package :asdf/backward-internals (:recycle :asdf/backward-internals :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/system :asdf/component :asdf/operation :asdf/find-system :asdf/action :asdf/lisp-action) (:export ;; for internal use @@ -7938,7 +8884,7 @@ (asdf/package:define-package :asdf/defsystem (:recycle :asdf/defsystem :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/cache :asdf/find-system :asdf/find-component :asdf/lisp-action :asdf/operate :asdf/backward-internals) @@ -7946,7 +8892,7 @@ #:defsystem #:register-system-definition #:class-for-type #:*default-component-class* #:determine-system-directory #:parse-component-form - #:duplicate-names #:non-toplevel-system #:non-system-system + #:non-toplevel-system #:non-system-system #:sysdef-error-component #:check-component-input)) (in-package :asdf/defsystem) @@ -8001,12 +8947,6 @@ ;;; Check inputs (with-upgradability () - (define-condition duplicate-names (system-definition-error) - ((name :initarg :name :reader duplicate-names-name)) - (:report (lambda (c s) - (format s (compatfmt "~@") - (duplicate-names-name c))))) - (define-condition non-system-system (system-definition-error) ((name :initarg :name :reader non-system-system-name) (class-name :initarg :class-name :reader non-system-system-class-name)) @@ -8055,10 +8995,12 @@ (case (first form) ((:read-file-form) (destructuring-bind (subpath &key (at 0)) (rest form) - (safe-read-file-form (subpathname pathname subpath) :at at :package :asdf-user))) + (safe-read-file-form (subpathname pathname subpath) + :at at :package :asdf-user))) ((:read-file-line) (destructuring-bind (subpath &key (at 0)) (rest form) - (read-file-lines (subpathname pathname subpath) :at at))) + (safe-read-file-line (subpathname pathname subpath) + :at at))) (otherwise (invalid)))) (t @@ -8161,7 +9103,7 @@ (defsystem-dependencies (loop :for spec :in defsystem-depends-on :collect (resolve-dependency-spec nil spec)))) (setf (gethash name *systems-being-defined*) system) - (apply 'load-systems defsystem-dependencies) + (load-systems* defsystem-dependencies) ;; We change-class AFTER we loaded the defsystem-depends-on ;; since the class might be defined as part of those. (let ((class (class-for-type nil class))) @@ -8182,7 +9124,7 @@ (asdf/package:define-package :asdf/bundle (:recycle :asdf/bundle :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation :asdf/action :asdf/lisp-action :asdf/plan :asdf/operate) (:export @@ -8284,7 +9226,7 @@ ((member :binary :dll :lib :shared-library :static-library :program :object :program) (compile-file-type :type bundle-type)) ((eql :binary) "image") - ((eql :dll) (cond ((os-unix-p) "so") ((os-windows-p) "dll"))) + ((eql :dll) (cond ((os-macosx-p) "dylib") ((os-unix-p) "so") ((os-windows-p) "dll"))) ((member :lib :static-library) (cond ((os-unix-p) "a") ((os-windows-p) "lib"))) ((eql :program) (cond ((os-unix-p) nil) ((os-windows-p) "exe"))))) @@ -8674,7 +9616,7 @@ (asdf/package:define-package :asdf/concatenate-source (:recycle :asdf/concatenate-source :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/component :asdf/operation :asdf/system :asdf/find-system :asdf/defsystem :asdf/action :asdf/lisp-action :asdf/bundle) @@ -8728,15 +9670,18 @@ (when (typep c 'cl-source-file) (let ((e (component-encoding c))) (unless (equal e encoding) - (pushnew e other-encodings :test 'equal))) - (let ((a (around-compile-hook c))) - (unless (equal a around-compile) - (pushnew a other-around-compile :test 'equal))) + (let ((a (assoc e other-encodings))) + (if a (push (component-find-path c) (cdr a)) + (push (list a (component-find-path c)) other-encodings))))) + (unless (equal around-compile (around-compile-hook c)) + (push (component-find-path c) other-around-compile)) (input-files (make-operation 'compile-op) c)) :into inputs :finally (when other-encodings - (warn "~S uses encoding ~A but has sources that use these encodings: ~A" - operation encoding other-encodings)) + (warn "~S uses encoding ~A but has sources that use these encodings:~{ ~A~}" + operation encoding + (mapcar #'(lambda (x) (cons (car x) (list (reverse (cdr x))))) + other-encodings))) (when other-around-compile (warn "~S uses around-compile hook ~A but has sources that use these hooks: ~A" operation around-compile other-around-compile)) @@ -8760,7 +9705,7 @@ (asdf/package:define-package :asdf/output-translations (:recycle :asdf/output-translations :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade) + (:use :uiop/common-lisp :uiop :asdf/upgrade) (:export #:*output-translations* #:*output-translations-parameter* #:invalid-output-translation @@ -8954,10 +9899,7 @@ (cond ((location-function-p dst) (funcall collect - (list trusrc - (if (symbolp (second dst)) - (fdefinition (second dst)) - (eval (second dst)))))) + (list trusrc (ensure-function (second dst))))) ((eq dst t) (funcall collect (list trusrc t))) (t @@ -9042,7 +9984,7 @@ :return (translate-pathname* p absolute-source destination root source) :finally (return p))))) - ;; Hook into asdf/driver's output-translation mechanism + ;; Hook into uiop's output-translation mechanism #-cormanlisp (setf *output-translation-function* 'apply-output-translations) @@ -9220,15 +10162,13 @@ Please use UIOP:RUN-PROGRAM instead." (let ((command (apply 'format nil control-string args))) (asdf-message "; $ ~A~%" command) - (handler-case - (progn - (run-program command :force-shell t :ignore-error-status nil :output *verbose-out*) - 0) - (subprocess-error (c) - (let ((code (subprocess-error-code c))) - (typecase code - (integer code) - (t 255)))))))) + (let ((exit-code + (ignore-errors + (nth-value 2 (run-program command :force-shell t :ignore-error-status t + :output *verbose-out*))))) + (typecase exit-code + ((integer 0 255) exit-code) + (t 255)))))) (with-upgradability () (defvar *asdf-verbose* nil)) ;; backward-compatibility with ASDF2 only. Unused. @@ -9254,7 +10194,7 @@ (asdf/package:define-package :asdf/source-registry (:recycle :asdf/source-registry :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade :asdf/find-system) + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system) (:export #:*source-registry-parameter* #:*default-source-registries* #:invalid-source-registry @@ -9575,7 +10515,7 @@ #:split #:make-collector #:loaded-systems ; makes for annoying SLIME completion #:output-files-for-system-and-operation) ; obsolete ASDF-BINARY-LOCATION function - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade :asdf/cache + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/cache :asdf/component :asdf/system :asdf/find-system :asdf/find-component :asdf/operation :asdf/action :asdf/lisp-action :asdf/output-translations :asdf/source-registry @@ -9587,7 +10527,7 @@ #:oos #:operate #:make-plan #:perform-plan #:sequential-plan #:system-definition-pathname #:with-system-definitions #:search-for-system-definition #:find-component #:component-find-path - #:compile-system #:load-system #:load-systems + #:compile-system #:load-system #:load-systems #:load-systems* #:require-system #:test-system #:clear-system #:operation #:make-operation #:find-operation #:upward-operation #:downward-operation #:sideway-operation #:selfward-operation @@ -9737,7 +10677,7 @@ (asdf/package:define-package :asdf/footer (:recycle :asdf/footer :asdf) - (:use :asdf/common-lisp :asdf/driver :asdf/upgrade + (:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system :asdf/find-component :asdf/operation :asdf/action :asdf/lisp-action :asdf/operate :asdf/bundle :asdf/concatenate-source :asdf/output-translations :asdf/source-registry Index: sbcl/contrib/asdf/asdf.texinfo =================================================================== --- sbcl.orig/contrib/asdf/asdf.texinfo 2013-09-12 21:53:38.544055561 +0200 +++ sbcl/contrib/asdf/asdf.texinfo 2013-12-23 16:57:40.006323583 +0100 @@ -274,7 +274,7 @@ (null "1.0")))) @end lisp -If it returns @code{NIL} then ASDF is not installed. +If it returns @code{nil} then ASDF is not installed. Otherwise it should return a string. If it returns @code{"1.0"}, then it can actually be any version before 1.77 or so, or some buggy variant of 1.x. @@ -509,11 +509,11 @@ Note the trailing slash: when searching for a system, ASDF will evaluate each entry of the central registry and coerce the result to a pathname@footnote{ -ASDF will indeed call @code{EVAL} on each entry. -It will also skip entries that evaluate to @code{NIL}. +ASDF will indeed call @code{eval} on each entry. +It will also skip entries that evaluate to @code{nil}. Strings and pathname objects are self-evaluating, -in which case the @code{EVAL} step does nothing; +in which case the @code{eval} step does nothing; but you may push arbitrary SEXP onto the central registry, that will be evaluated to compute e.g. things that depend on the value of shell variables or the identity of the user. @@ -732,10 +732,12 @@ it must be able to find and load that system's definition. @xref{Configuring ASDF,,Configuring ASDF to find your systems}. +@findex already-loaded-systems + For the advanced users, note that @code{require-system} calls @code{load-system} -with keyword arguments @code{:force-not (loaded-systems)}. -@code{loaded-systems} returns a list of the names of loaded systems. +with keyword arguments @code{:force-not (already-loaded-systems)}. +@code{already-loaded-systems} returns a list of the names of loaded systems. @code{load-system} applies @code{operate} with the operation from @code{*load-system-operation*}, which by default is @code{load-op}, the system, and any provided keyword arguments. @@ -935,7 +937,7 @@ In this case @code{...} would expand to something like @lisp -(find-component (find-system "foo") "mod") +(find-component "foo" "mod") @end lisp For more details on the syntax of such forms, see @ref{The defsystem @@ -993,15 +995,19 @@ other-component-type := symbol-by-name (@pxref{The defsystem grammar,,Component types}) +# This is used in :depends-on, as opposed to ``dependency,'' +# which is used in :in-order-to dependency-def := simple-component-name - | ( :feature name ) + | (feature @var{feature-name}) | ( :version simple-component-name version-specifier) +# ``dependency'' is used in :in-order-to, as opposed to +# ``dependency-def'' dependency := (dependent-op @var{requirement}+) requirement := (required-op @var{required-component}+) - | (feature feature-name) + | (:feature @var{feature-name}) dependent-op := operation-name -required-op := operation-name | feature +required-op := operation-name simple-component-name := string | symbol @@ -1064,7 +1070,7 @@ Typically this is used to load an ASDF extension that is used in the system definition. -@subsection Weakly depends on +@subsection Weakly depends on @cindex :weakly-depends-on We do @emph{NOT} recommend you use this feature. @@ -1155,9 +1161,11 @@ Pathname objects may be given to override the path for a component. Such objects are typically specified using reader macros such as @code{#p} or @code{#.(make-pathname ...)}. -Note however, that @code{#p...} is a shorthand for @code{#.(parse-namestring ...)} +Note however, that @code{#p...} is +a shorthand for @code{#.(parse-namestring ...)} and that the behavior of @code{parse-namestring} is completely non-portable, -unless you are using Common Lisp @code{logical-pathname}s +unless you are using Common Lisp @code{logical-pathname}s, +which themselves involve other non-portable behavior (@pxref{The defsystem grammar,,Using logical pathnames}, below). Pathnames made with @code{#.(make-pathname ...)} can usually be done more easily with the string syntax above. @@ -1413,7 +1421,7 @@ that are part of building your software. Though they manipulate @code{action}s, most of these functions do not take as an argument -a reified pair (a CONS cell) of an operation and a component; +a reified pair (a @code{cons} cell) of an operation and a component; instead, they usually take two separate arguments, which allows to take advantage of the power CLOS-style multiple dispatch for fun and profit. @@ -1524,7 +1532,7 @@ To see what @code{operate} would do, you can use: @example -(asdf::traverse (make-instance operation-class initargs ...) (find-system system-name)) +(asdf:traverse operation-class system-name) @end example @end deffn @@ -1545,55 +1553,62 @@ (asdf:operate 'asdf:@var{operation-name} :@var{system-name} @{@var{operation-options ...}@}) @end lisp -@deffn Operation @code{compile-op} @Akey @code{proclamations} +@deffn Operation @code{compile-op} This operation compiles the specified component. -If proclamations are supplied, they will be proclaimed. -This is a good place to specify optimization settings. - -When creating a new component type, -you should provide methods for @code{compile-op}. - -When @code{compile-op} is invoked, -component dependencies often cause some parts of the system -to be loaded as well as compiled. -Invoking @code{compile-op} -does not necessarily load all the parts of the system, though; -use @code{load-op} to load a system. +A @code{cl-source-file} will be @code{compile-file}'d. +All the children and dependencies of a system or module +will be recursively compiled by @code{compile-op}. + +@code{compile-op} depends on @code{prepare-op} which +itself depends on a @code{load-op} of all of a component's dependencies, +as well as of its parent's dependencies. +When @code{operate} is called on @code{compile-op}, +all these dependencies will be loaded as well as compiled; +yet, some parts of the system main remain unloaded, +because nothing depends on them. +Use @code{load-op} to load a system. @end deffn -@deffn Operation @code{load-op} @Akey @code{proclamations} +@deffn Operation @code{load-op} -This operation loads a system. - -The default methods for @code{load-op} compile files before loading them. -For parity, your own methods on new component types should probably do so too. +This operation loads the compiled code for a specified component. +A @code{cl-source-file} will have its compiled fasl @code{load}ed, +which fasl is the output of @code{compile-op} that @code{load-op} depends on. +All the children and dependencies of a system or module +will be recursively loaded by @code{load-op}. + +@code{load-op} depends on @code{prepare-op} which +itself depends on a @code{load-op} of all of a component's dependencies, +as well as of its parent's dependencies. @end deffn -@deffn Operation @code{parent-load-op} @Akey @code{proclamations} - -This operation ensures that the dependencies -of a module, and its parent, and so on, are loaded (as per @code{load-op}) -before the components within that module may be operated upon. +@deffn Operation @code{prepare-op} -By default, all operations depend on this @code{parent-operation} -for actions on components to depend on this ``parent operation'' being acted on the parent. - -The default methods for @code{load-op} compile files before loading them. -For parity, your own methods on new component types should probably do so too. +This operation ensures that the dependencies of a component +and its recursive parents are loaded (as per @code{load-op}), +as a prerequisite before @code{compile-op} and @code{load-op} operations +may be performed on a given component. @end deffn -@deffn Operation @code{load-source-op} - -This operation will load the source for the files in a module -even if the source files have been compiled. -Systems sometimes have knotty dependencies -which require that sources are loaded -before they can be compiled. -This is how you do that. +@deffn Operation @code{load-source-op}, @code{prepare-source-op} -If you are creating a component type, -you need to implement this operation --- at least, where meaningful. +@code{load-source-op} will load the source for the files in a module +rather than they compiled fasl output. +It has a @code{prepare-source-op} analog to @code{prepare-op}, +that ensures the dependencies are themselves loaded via @code{load-source-op}. + +There is no provision in ASDF for ensuring that +some components are always loaded as source, while others are always compiled. +While this idea often comes up in discussions, +it actually doesn't play well with either the linking model of ECL +or with various bundle operations (see below), and is eventually not workable; +also the dependency model of ASDF would have to be modified incompatibly +to allow for such trick. +If your code doesn't compile cleanly, fix it. +If compilation makes it slow, use @code{declaim} or @code{eval-when} +to adjust your compiler settings, +or eschew compilation by @code{eval}uating a quoted source form at load-time. @end deffn @anchor{test-op} @@ -1616,44 +1631,122 @@ People typically define @code{test-op} methods like thus: @example -(defmethod perform ((o asdf:test-op) (s (eql (asdf:find-system @var{:mysystem})))) - (asdf:load-system @var{:mysystem}) - (eval (read-from-string "(some expression that runs the tests)")) - t) +(defmethod perform ((o asdf:test-op) + (s (eql (asdf:find-system @var{:my-system})))) + (asdf:load-system @var{:my-system-test}) + (funcall (read-from-string "my-system-test:test-suite"))) @end example -@end deffn - -@deffn Operation @code{load-fasl-op} -This operation will load and create if need be -a single fasl file for all the files in each loaded system. -(Its compilation-only equivalent is @code{asdf::fasl-op}.) +Using @code{load-system} in the perform method +rather than an @code{:in-order-to} dependency, +is sometimes necessary for backward compatibility with ASDF 2 and older, +to avoid circular dependencies that could arise +because of the way these old versions propagate dependencies. -Once you have created such a fasl, -you can use @code{precompiled-system} to deliver it in a way -that is compatible with clients having asdf dependencies -on your system whether it is distributed as source of as a single binary. - -On your build platform, you run something like that: +If you don't care for compatibility with ASDF 2, +you could use the following options in your @code{defsystem} form: @example -@code{(asdf:operate 'load-fasl-op @var{:mysystem})} + :in-order-to ((test-op (load-op :my-system-test))) + :perform (test-op (o c) (symbol-call :my-system-test :test-suite)) @end example +@end deffn + +@deffn Operation @code{fasl-op}, @code{monolithic-fasl-op}, @code{load-fasl-op}, @code{binary-op}, @code{monolithic-binary-op}, @code{lib-op}, @code{monolithic-lib-op}, @code{dll-op}, @code{monolithic-dll-op}, @code{program-op} + +These are ``bundle'' operations, that can create a single-file ``bundle'' +for all the contents of each system in an application, +or for the entire application. + +@code{fasl-op} will create a single fasl file for each of the systems needed, +grouping all its many fasls in one, +so you can deliver each system as a single fasl. +@code{monolithic-fasl-op} will create a single fasl file for target system +and all its dependencies, +so you can deliver your entire application as a single fasl. +@code{load-fasl-op} will load the output of @code{fasl-op} +(though if it the output is not up-to-date, +it will load the intermediate fasls indeed as part of building it); +this matters a lot on ECL, where the dynamic linking involved in loading +tens of individual fasls can be noticeably more expensive +than loading a single one. -And on your delivery platform, a form like this is evaluated -in a prologue or at some point before you save your image: +Once you have created a fasl with @code{fasl-op}, +you can use @code{precompiled-system} to deliver it in a way +that is compatible with clients having dependencies on your system, +whether it is distributed as source or as a single binary; +the @file{.asd} file to be delivered with the fasl will look like this: @example (defsystem :mysystem :class :precompiled-system :fasl (some expression that will evaluate to a pathname)) @end example - -Of course, @emph{before} you define such systems, -you should not forget to @code{(asdf:clear-configuration)}. - -@code{load-fasl-op} is available on all actively supported Lisp implementations, -and on those implementations only, and only since ASDF 3. +Or you can use @code{binary-op} to let ASDF create such a system for you +as well as the @code{fasl-op} output, or @code{monolithic-binary-op}. +This allows you to deliver code for your systems or applications +as a single file. +Of course, if you want to test the result in the current image, +@emph{before} you try to use any newly created @file{.asd} files, +you should not forget to @code{(asdf:clear-configuration)} +or at least @code{(asdf:clear-source-registry)}, +so it re-populates the source-registry from the filesystem. + +The @code{program-op} operation will create an executable program +from the specified system and its dependencies. +You can use UIOP for its pre-image-dump hooks, its post-image-restore hooks, +and its access to command-line arguments. +And you can specify an entry point @code{my-app:main} +by specifying in your @code{defsystem} +the option @code{:entry-point "my-app:main"}. +Depending on your implementation, +running @code{(asdf:operate 'asdf:program-op :my-app)} +may quit the current Lisp image upon completion. +See the example in +@file{test/hello-world-example.asd} and @file{test/hello.lisp}, +as built and tested by +@file{test/test-program.script} and @file{test/make-hello-world.lisp}. + +There is also @code{lib-op} +for building a linkable @file{.a} file (Windows: @file{.lib}) +from all linkable object dependencies (FFI files, and on ECL, Lisp files too), +and its monolithic equivalent @code{monolithic-lib-op}. +And there is also @code{dll-op} +(respectively its monolithic equivalent @code{monolithic-lib-op}) +for building a linkable @file{.so} file +(Windows: @file{.dll}, MacOS X: @file{.dynlib}) +to create a single dynamic library +for all the extra FFI code to be linked into each of your systems +(respectively your entire application). + +All these ``bundle'' operations are available since ASDF 3 +on all actively supported Lisp implementations, +but may be unavailable on unmaintained legacy implementations. This functionality was previously available for select implementations, as part of a separate system @code{asdf-bundle}, -itself descended from @code{asdf-ecl}. +itself descended from the ECL-only @code{asdf-ecl}. + +The pathname of the output of bundle operations +is subject to output-translation as usual, +unless the operation is equal to +the @code{:build-operation} argument to @code{defsystem}. +This behavior is not very satisfactory and may change in the future. +Maybe you have suggestions on how to better configure it? +@end deffn + +@deffn Operation @code{concatenate-source-op}, @code{monolithic-concatenate-source-op}, @code{load-concatenated-source-op}, @code{compile-concatenated-source-op}, @code{load-compiled-concatenated-source-op}, @code{monolithic-load-concatenated-source-op}, @code{monolithic-compile-concatenated-source-op}, @code{monolithic-load-compiled-concatenated-source-op} + +These operation, as their respective names indicate, +consist in concatenating all @code{cl-source-file} source files in a system +(or in a system and all its dependencies, if monolithic), +in the order defined by dependencies, +then loading the result, or compiling then loading the result. + +These operations are useful to deliver a system or application +as a single source file, +and for testing that said file loads properly, or compiles then loads properly. + +ASDF itself is notably delivered as a single source file this way +using @code{monolithic-concatenate-source-op}, +transcluding a prelude and the @code{uiop} library +before the @code{asdf/defsystem} system itself. @end deffn @@ -1672,57 +1765,48 @@ ``global asdf operation name registry'', but also want to avoid name clashes. -An operation must provide methods for the following generic functions -when invoked with an object of type @code{source-file}: -@emph{FIXME describe this better} +Your operation @emph{must} usually provide methods +for one or more of the following generic functions: @itemize -@item @code{input-files} -ASDF has a pretty clever default @code{input-files} mechanism. -You only need create a method if there are multiple ultimate input files, -and/or the bottom one doesn't depend -on the @code{component-pathname} of the component. - -@item @code{output-files} -The @code{output-files} method determines where the method will put its files. -It returns two values, a list of pathnames, and a boolean. -If the boolean is @code{T} then the pathnames are marked -not be translated by enclosing @code{:around} methods. -If the boolean is @code{NIL} then enclosing @code{:around} methods -may translate these pathnames, e.g. to ensure object files -are somehow stored in some implementation-dependent cache. - @item @code{perform} -The @code{perform} method must call @code{output-files} -to find out where to put its files, -because the user is allowed to override. -@item @code{output-files} -for local policy @code{explain} +Unless your operation, like @code{prepare-op}, +is for dependency propagation only, +the most important function for which to define a method +is usually @code{perform}, +which will be called to perform the operation on a specified component, +after all dependencies have been performed. -@item @code{operation-done-p} -You only need to define a method on that function -if you can detect conditions that invalidate previous runs of the operation, -even though no filesystem timestamp has changed, -in which case you return @code{nil} (the default is @code{t}). +The @code{perform} method must call @code{output-files} (see below) +to find out where to put its files, +because the user is allowed to override the method +or tweak the output-translation mechanism. +Perform should only use the primary value returned by @code{output-files}. +If one and only one output file is expected, +it can call @code{output-file} that checks that this is the case +and returns the first and only list element. -For instance, the method for @code{test-op} always returns @code{nil}, -so that tests are always run afresh. -Of course, the @code{test-op} for your system could depend -on a deterministically repeatable @code{test-report-op}, -and just read the results from the report files. +@item @code{output-files} +If your perform method has any output, +you must define a method for this function. +for ASDF to determine where the outputs of performing operation lie. + +Your method may return two values, a list of pathnames, and a boolean. +If the boolean is @code{nil} (or you fail to return multiple values), +then enclosing @code{:around} methods may translate these pathnames, +e.g. to ensure object files are somehow stored +in some implementation-dependent cache. +If the boolean is @code{t} then the pathnames are marked +not be translated by the enclosing @code{:around} method. @item @code{component-depends-on} -When you add new operations, you probably need to explain -how they relate to loading, compiling, testing, etc., -in terms of dependencies between actions. - -That's where you typically define methods on @code{component-depends-on}. -Your method will take as arguments -some properly specialized operation -and a component denoting a current action, -and return a list of entries, -denoting the children actions that the current action depends on. +If the action of performing the operation on a component has dependencies, +you must define a method on @code{component-depends-on}. + +Your method will take as specialized arguments +an operation and a component which together identify an action, +and return a list of entries describing actions that this action depends on. The format of entries is described below. It is @emph{strongly} advised that @@ -1730,29 +1814,53 @@ to the results of your method, or ``interesting'' failures will likely occur, unless you're a true specialist of ASDF internals. +It is unhappily too late to compatibly use the @code{append} method combination, +but conceptually that's the protocol that is being manually implemented. Each entry returned by @code{component-depends-on} is itself a list. -The first element of an entry is the name of an operation: -a symbol that you can use with @code{make-instance} -(ASDF will instead use with @code{asdf::make-sub-operation}), -to create a related operation for use in a build plan. -For instance, @code{load-op} and @code{compile-op} +The first element of an entry is an operation designator: +either an operation object designating itself, or +a symbol that names an operation class +(that ASDF will instantiate using @code{make-operation}). +For instance, @code{load-op}, @code{compile-op} and @code{prepare-op} are common such names, denoting the respective operations. -The rest of an entry is a list of identifiers -each denote a component such that -the pair of the previous operation and this component -is a children action of current action. - -Identifiers follow the @code{defsystem} grammar -previously documented. -The main format for identifiers is a string or symbol -(that will be downcase as per @code{coerce-name}), -and looked up against the sibling list of the parent module's children components, -as per @code{find-component}. -As a special case, @code{nil} denotes the parent itself. -Other syntaxes are allowed, for instance to specify a component with a version. +The rest of each entry is a list of component designators: +either a component object designating itself, +or an identifier to be used with @code{find-component}. +@code{find-component} will be called with the current component's parent as parent, +and the identifier as second argument. +The identifier is typically a string, +a symbol (to be downcased as per @code{coerce-name}), +or a list of strings or symbols. +In particular, the empty list @code{nil} denotes the parent itself. + +@end itemize + +An operation @emph{may} provide methods for the following generic functions: + +@itemize + +@item @code{input-files} +A method for this function is often not needed, +since ASDF has a pretty clever default @code{input-files} mechanism. +You only need create a method if there are multiple ultimate input files, +and/or the bottom one doesn't depend +on the @code{component-pathname} of the component. + +@item @code{operation-done-p} +You only need to define a method on that function +if you can detect conditions that invalidate previous runs of the operation, +even though no filesystem timestamp has changed, +in which case you return @code{nil} (the default is @code{t}). + +For instance, the method for @code{test-op} always returns @code{nil}, +so that tests are always run afresh. +Of course, the @code{test-op} for your system could depend +on a deterministically repeatable @code{test-report-op}, +and just read the results from the report files, +in which case you could have this method return @code{t}. @end itemize @@ -1765,6 +1873,7 @@ @cindex component @cindex system @cindex system designator +@cindex component designator @vindex *system-definition-search-functions* A @dfn{component} represents a source file or @@ -1772,12 +1881,16 @@ A @dfn{system} is (roughly speaking) a top-level component that can be found via @code{find-system}. -A @dfn{system designator} is a string or symbol -and behaves just like any other component name +A @dfn{system designator} is a system itself, +or a string or symbol that behaves just like any other component name (including with regard to the case conversion rules for component names). +A @dfn{component designator}, relative to a base component, +is either a component itself, +or a string or symbol, +or a list of designators. -@defun find-system system-designator &optional (error-p t) +@defun find-system system-designator @Aoptional (error-p t) Given a system designator, @code{find-system} finds and returns a system. If no system is found, an error of type @@ -1822,6 +1935,36 @@ @var{foo} in the corresponding file @var{foo.asd}. @end defun +@defun find-component base path + +Given a @var{base} component (or designator for such), +and a @var{path}, find the component designated by the @var{path} +starting from the @var{base}. + +If @var{path} is a component object, it designates itself, +independently from the base. + +If @var{path} is a string, or symbol denoting a string via @code{coerce-name}, +then @var{base} is resolved to a component object, +which must be a system or module, +and the designated component is the child named by the @var{path}. + +If @var{path} is a @code{cons} cell, +@code{find-component} with the base and the @code{car} of the @var{path}, +and the resulting object is used as the base for a tail call +to @code{find-component} with the @code{car} of the @var{path}. + +If @var{base} is a component object, it designates itself. + +If @var{base} is null, then @var{path} is used as the base, with @code{nil} as the path. + +If @var{base} is a string, or symbol denoting a string via @code{coerce-name}, +it designates a system as per @code{find-system}. + +If @var{base} is a @code{cons} cell, it designates the component found by +@code{find-component} with its @code{car} as base and @code{cdr} as path. +@end defun + @menu * Common attributes of components:: @@ -2116,7 +2259,7 @@ @lisp (defmethod component-pathname ((component unportable-cl-source-file)) (merge-pathnames* - (coerce-pathname (format nil "~(~A~)/" (asdf:implementation-type))) + (parse-unix-namestring (format nil "~(~A~)/" (asdf:implementation-type))) (call-next-method))) @end lisp @@ -2269,7 +2412,7 @@ is related to a digest of its individual contents, and not to other files in the same intended project. For these people, ASDF 3 allows to eschew the @code{TRUENAME} mechanism, -by setting the variable @var{asdf:*resolve-symlinks*} to @code{NIL}. +by setting the variable @var{asdf:*resolve-symlinks*} to @code{nil}. PS: Yes, if you haven't read Vernor Vinge's short but great classic ``True Names... and Other Dangers'' then you're in for a treat. @@ -2394,7 +2537,7 @@ RELATIVE-COMPONENT-DESIGNATOR := (RELATIVE-COMPONENT-DESIGNATOR RELATIVE-COMPONENT-DESIGNATOR ...) | - STRING | ;; relative directory pathname as interpreted by coerce-pathname. + STRING | ;; relative directory pathname as interpreted by parse-unix-namestring. ;; In output translations, if last component, **/*.*.* is added PATHNAME | ;; pathname; unless last component, directory is assumed. :IMPLEMENTATION | ;; directory based on implementation, e.g. sbcl-1.0.45-linux-x64 @@ -2432,7 +2575,7 @@ that determine the order in which these entries will be read. Also, the type of these files is conventionally @code{"conf"} and as a limitation to some implementations (e.g. GNU clisp), -the type cannot be @code{NIL}. +the type cannot be @code{nil}. Directories may be included by specifying a directory pathname or namestring in an @code{:include} directive, e.g.: @@ -2573,7 +2716,7 @@ You may extend or override configuration from the environment and configuration files with the given @var{PARAMETER}, which can be - @code{NIL} (no configuration override), + @code{nil} (no configuration override), or a SEXP (in the SEXP DSL), a string (as in the string DSL), a pathname (of a file or directory with configuration), @@ -2600,7 +2743,7 @@ Every time you use ASDF's @code{find-system}, or anything that uses it (such as @code{operate}, @code{load-system}, etc.), -@code{ensure-source-registry} is called with parameter NIL, +@code{ensure-source-registry} is called with parameter @code{nil}, which the first time around causes your configuration to be read. If you change a configuration file, you need to explicitly @code{initialize-source-registry} again, @@ -2898,7 +3041,7 @@ You may use @code{#+features} to customize the configuration file. -The second designator of a mapping may be @code{NIL}, indicating that files are not mapped +The second designator of a mapping may be @code{nil}, indicating that files are not mapped to anything but themselves (same as if the second designator was the same as the first). When the first designator is @code{t}, @@ -2987,7 +3130,7 @@ the names of files in such a directory begin with two digits that determine the order in which these entries will be read. Also, the type of these files is conventionally @code{"conf"} -and as a limitation of some implementations, the type cannot be @code{NIL}. +and as a limitation of some implementations, the type cannot be @code{nil}. Directories may be included by specifying a directory pathname or namestring in an @code{:include} directive, e.g.: @@ -3061,7 +3204,7 @@ You may extend or override configuration from the environment and configuration files with the given @var{PARAMETER}, which can be - @code{NIL} (no configuration override), + @code{nil} (no configuration override), or a SEXP (in the SEXP DSL), a string (as in the string DSL), a pathname (of a file or directory with configuration), @@ -3100,7 +3243,7 @@ Every time you use ASDF's @code{output-files}, or anything that uses it (that may compile, such as @code{operate}, @code{perform}, etc.), -@code{ensure-output-translations} is called with parameter NIL, +@code{ensure-output-translations} is called with parameter @code{nil}, which the first time around causes your configuration to be read. If you change a configuration file, you need to explicitly @code{initialize-output-translations} again, @@ -3179,6 +3322,11 @@ useful for system definition and development. @section Controlling file compilation +@cindex :around-compile +@cindex around-compile keyword +@cindex compile-check keyword +@cindex :compile-check +@findex compile-file* When declaring a component (system, module, file), you can specify a keyword argument @code{:around-compile function}. @@ -3382,39 +3530,7 @@ @section Miscellaneous Functions -Most of these functions are not exported by ASDF anymore, -but only used for private purposes of ASDF. -Please use ASDF-UTILS for the same functions exported from a stable library. - -@defun coerce-pathname name @Akey type defaults - -This function (available starting with ASDF 2.012.11) -takes an argument, and portably interprets it as a pathname. -If the argument @var{name} is a pathname or @code{nil}, it is passed through; -if it's a symbol, it's interpreted as a string by downcasing it; -if it's a string, it is first separated using @code{/} into substrings; -the leading substrings denote subdirectories of a relative pathname. -If @var{type} is @code{:directory} or the string ends with @code{/}, -the last substring is also a subdirectory; -if @var{type} is a string, it is used as the type of the pathname, and -the last substring is the name component of the pathname; -if @var{type} is @code{nil}, the last substring specifies both name and type components -of the pathname, with the last @code{.} separating them, or only the name component -if there's no last @code{.} or if there is only one dot and it's the first character. -The host, device and version components come from @var{defaults}, which defaults to -@var{*default-pathname-defaults*}; but that shouldn't matter if you use @code{merge-pathnames*}. - -@end defun - -@defun merge-pathnames* @Akey specified defaults - -This function is a replacement for @code{merge-pathnames} that uses the host and device -from the @var{defaults} rather than the @var{specified} pathname when the latter -is a relative pathname. This allows ASDF and its users to create and use relative pathnames -without having to know beforehand what are the host and device -of the absolute pathnames they are relative to. - -@end defun +These functions are exported by ASDF for your convenience. @defun system-relative-pathname system name @Akey type @@ -3479,42 +3595,208 @@ look at the beginning of @file{asdf.lisp} to see what it does. @end defun -@defun run-program +@defun register-preloaded-system name @Arest keys +A system with name @var{name}, +created by @code{make-instance} with extra keys @var{keys} +(e.g. @code{:version}), +is registered as @emph{preloaded}. +That is, its code has already been loaded into the current image, +and if at some point some other system @code{:depends-on} it yet no source code is found, +it is considered as already provided, +and ASDF will not raise a @code{missing-component} error. + +This function is particularly useful if you distribute your code +as fasls with either @code{fasl-op} or @code{monolithic-fasl-op}, +and want to register systems so that dependencies will work uniformly +whether you're using your software from source or from fasl. +@end defun + +@defun run-shell-command control-string @Arest args + +This function is obsolete and present only for the sake of backwards-compatibility: +``If it's not backwards, it's not compatible''. We @emph{strongly} discourage its use. +Its current behavior is only well-defined on Unix platforms +(which include MacOS X and cygwin). On Windows, anything goes. +The following documentation is only for the purpose of your migrating away from it +in a way that preserves semantics. + +Instead we recommend the use @code{run-program}, described in the next section, and +available as part of ASDF since ASDF 3. + +@code{run-shell-command} takes as arguments a format @code{control-string} +and arguments to be passed to @code{format} after this control-string +to produce a string. +This string is a command that will be evaluated with a POSIX shell if possible; +yet, on Windows, some implementations will use CMD.EXE, +while others (like SBCL) will make an attempt at invoking a POSIX shell +(and fail if it is not present). +@end defun + +@section Some Utility Functions -run-program takes a @var{COMMAND} argument that is either -a list of a program path and its arguments, +The below functions are not exported by ASDF itself, but by UIOP, available since ASDF 3. +Some of them have precursors in ASDF 2, but we recommend +you rely on ASDF 3 for active developments. +UIOP provides many, many more utility functions, and we recommend +you read its README and sources for more information. + + +@defun parse-unix-namestring name @Akey type defaults dot-dot ensure-directory @AallowOtherKeys +Coerce NAME into a PATHNAME using standard Unix syntax. + +Unix syntax is used whether or not the underlying system is Unix; +on such non-Unix systems it is only usable but for relative pathnames; +but especially to manipulate relative pathnames portably, it is of crucial +to possess a portable pathname syntax independent of the underlying OS. +This is what @code{parse-unix-namestring} provides, and why we use it in ASDF. + +When given a @code{pathname} object, just return it untouched. +When given @code{nil}, just return @code{nil}. +When given a non-null @code{symbol}, first downcase its name and treat it as a string. +When given a @code{string}, portably decompose it into a pathname as below. + +@code{#\/} separates directory components. + +The last @code{#\/}-separated substring is interpreted as follows: +1- If @var{type} is @code{:directory} or @var{ensure-directory} is true, + the string is made the last directory component, and its @code{name} and @code{type} are @code{nil}. + if the string is empty, it's the empty pathname with all slots @code{nil}. +2- If @var{type} is @code{nil}, the substring is a file-namestring, + and its @code{name} and @code{type} are separated by @code{split-name-type}. +3- If @var{type} is a string, it is the given @code{type}, and the whole string is the @code{name}. + +Directory components with an empty name the name @code{.} are removed. +Any directory named @code{..} is read as @var{dot-dot}, +which must be one of @code{:back} or @code{:up} and defaults to @code{:back}. + +@code{host}, @code{device} and @code{version} components are taken from @var{defaults}, +which itself defaults to @code{*nil-pathname*}, also used if @var{defaults} is @code{nil}. +No host or device can be specified in the string itself, +which makes it unsuitable for absolute pathnames outside Unix. + +For relative pathnames, these components (and hence the defaults) won't matter +if you use @code{merge-pathnames*} but will matter if you use @code{merge-pathnames}, +which is an important reason to always use @code{merge-pathnames*}. + +Arbitrary keys are accepted, and the parse result is passed to @code{ensure-pathname} +with those keys, removing @var{type}, @var{defaults} and @var{dot-dot}. +When you're manipulating pathnames that are supposed to make sense portably +even though the OS may not be Unixish, we recommend you use @code{:want-relative t} +to throw an error if the pathname is absolute +@end defun + +@defun merge-pathnames* specified @Aoptional defaults + +This function is a replacement for @code{merge-pathnames} that uses the host and device +from the @var{defaults} rather than the @var{specified} pathname when the latter +is a relative pathname. This allows ASDF and its users to create and use relative pathnames +without having to know beforehand what are the host and device +of the absolute pathnames they are relative to. + +@end defun + +@defun subpathname pathname subpath @Akey type + +This function takes a @var{pathname} and a @var{subpath} and a @var{type}. +If @var{subpath} is already a @code{pathname} object (not namestring), +and is an absolute pathname at that, it is returned unchanged; +otherwise, @var{subpath} is turned into a relative pathname with given @var{type} +as per @code{parse-unix-namestring} with @code{:want-relative t :type }@var{type}, +then it is merged with the @code{pathname-directory-pathname} of @var{pathname}, +as per @code{merge-pathnames*}. + +We strongly encourage the use of this function +for portably resolving relative pathnames in your code base. +@end defun + +@defun subpathname* pathname subpath @Akey type + +This function returns @code{nil} if the base @var{pathname} is @code{nil}, +otherwise acts like @code{subpathname}. +@end defun + +@defun run-program command @Akey ignore-error-status force-shell input output error-output + if-input-does-not-exist if-output-exists if-error-output-exists + element-type external-format @AallowOtherKeys + +@code{run-program} takes a @var{command} argument that is either +a list of a program name or path and its arguments, or a string to be executed by a shell. It spawns the command, waits for it to return, verifies that it exited cleanly (unless told not too below), and optionally captures and processes its output. It accepts many keyword arguments to configure its behavior. -@code{output} is its most important argument; +@code{run-program} returns three values: the first for the output, +the second for the error-output, and the third for the return value. +(Beware that before ASDF 3.0.2.11, it didn't handle input or error-output, +and returned only one value, +the one for the output if any handler was specified, or else the exit code; +please upgrade ASDF, or at least UIOP, to rely on the new enhanced behavior.) + +@var{output} is its most important argument; it specifies how the output is captured and processed. -If it is @code{nil}, then the output is not captured. -If it is @code{:interactive}, then -input and output are inherited from the current process, -which the subprocess can control until it exits. -Otherwise, the output is captured and redirected to a stream, -and processed by @code{slurp-input-stream} with the object as first argument. -See below. +If it is @code{nil}, then the output is redirected to the null device, +that will discard it. +If it is @code{:interactive}, then it is inherited from the current process +(beware: this may be different from your @var{*standard-output*}, +and under SLIME will be on your @code{*inferior-lisp*} buffer). +If it is @code{t}, output goes to your current @var{*standard-output*} stream. +Otherwise, @var{output} should be a value that is a suitable first argument to +@code{slurp-input-stream} (see below), or +a list of such a value and keyword arguments. +In this case, @code{run-program} will +create a temporary stream for the program output; +the program output, in that stream, +will be processed by a call to @code{slurp-input-stream}, +using @var{output} as the first argument +(or if it's a list the first element of @var{output} and the rest as keywords). +The primary value resulting from that call +(or @code{nil} if no call was needed) +will be the first value returned by @code{run-program}. +E.g., using @code{:output :string} +will have it return the entire output stream as a string. +And using @code{:output '(:string :stripped t)} +will have it return the same string stripped of any ending newline. + +@var{error-output} is similar to @var{output}, except that +the resulting value is returned as the second value of @code{run-program}. +@code{t} designates the @var{*error-output*}. +Also @code{:output} means redirecting the error output to the output stream, +in which case @code{nil} is returned. + +@var{input} is similar to @var{output}, except that +@code{vomit-output-stream} is used, no value is returned, +and @code{t} designates the @var{*standard-input*}. @code{element-type} and @code{external-format} are passed on -to your Lisp implementation, when available, for creation of the output stream. +to your Lisp implementation, when applicable, for creation of the output stream. + +One and only one of the stream slurping or vomiting may or may not happen +in parallel in parallel with the subprocess, +depending on options and implementation, +and with priority being given to output processing. +Other streams are completely produced or consumed +before or after the subprocess is spawned, using temporary files. @code{force-shell} forces evaluation of the command through a shell, even if it was passed as a list rather than a string. +If a shell is used, it is @file{/bin/sh} on Unix or @file{CMD.EXE} on Windows, +except on implementations that (erroneously, IMNSHO) +insist on consulting @code{$SHELL} like clisp. @code{ignore-error-status} causes @code{run-program} to not raise an error if the spawned program exits in error. Following POSIX convention, an error is anything but a normal exit with status code zero. +By default, an error of type @code{subprocess-error} is raised in this case. -run-program works on all platforms supported by ASDF, except Genera. +@code{run-program} works on all platforms supported by ASDF, except Genera. +See the source code for more documentation. @end defun -@defun slurp-input-stream +@defun slurp-input-stream processor input-stream @Akey It's a generic function of two arguments, a target object and an input stream, and accepting keyword arguments. @@ -3526,62 +3808,42 @@ a list of the input stream. If the object is an output stream, the contents of the input stream are copied to it. -If the linewise argument is provided, copying happens line by line, -and an optional prefix is printed before each line. -Otherwise, copying happen based on a buffer of size buffer-size, -using the element-type. - -If the object is 'string or :string, the content is captured into a string -of the given element-type. +If the @var{linewise} keyword argument is provided, copying happens line by line, +and an optional @var{prefix} is printed before each line. +Otherwise, copying happen based on a buffer of size @var{buffer-size}, +using the specified @var{element-type}. + +If the object is @code{'string} or @code{:string}, the content is captured into a string. +Accepted keywords include the @var{element-type} and a flag @var{stripped}, +which when true causes any single line ending to be removed as per @code{uiop:stripln}. -If the object is :lines, the content is captured as a list of strings, -one per line, without line ending. If the count argument is provided, +If the object is @code{:lines}, the content is captured as a list of strings, +one per line, without line ending. If the @var{count} keyword argument is provided, it is a maximum count of lines to be read. -If the object is :line, the content is capture as with :lines above, -and then its sub-object is extracted with the path argument, -which defaults to 0, extracting the first line. +If the object is @code{:line}, the content is capture as with @code{:lines} above, +and then its sub-object is extracted with the @var{at} argument, +which defaults to @code{0}, extracting the first line. A number will extract the corresponding line. -See the documentation for asdf-driver:sub-object. +See the documentation for @code{uiop:access-at}. -If the object is :forms, the content is captured as a list of S-expressions, +If the object is @code{:forms}, the content is captured as a list of S-expressions, as read by the Lisp reader. -If the count argument is provided, +If the @var{count} argument is provided, it is a maximum count of lines to be read. We recommend you control the syntax with such macro as -asdf-driver:with-safe-io-syntax. +@code{uiop:with-safe-io-syntax}. -If the object is :form, the content is capture as with :forms above, -and then its sub-object is extracted with the path argument, -which defaults to 0, extracting the first form. +If the object is @code{:form}, the content is capture as with @code{:forms} above, +and then its sub-object is extracted with the @var{at} argument, +which defaults to @code{0}, extracting the first form. A number will extract the corresponding form. -See the documentation for asdf-driver:sub-object. +See the documentation for @code{uiop:access-at}. We recommend you control the syntax with such macro as -asdf-driver:with-safe-io-syntax. +@code{uiop:with-safe-io-syntax}. @end defun -@defun run-shell-command - -This function is obsolete and present only for the sake of backwards-compatibility: -``If it's not backwards, it's not compatible''. We strongly discourage its use. -Its current behavior is only well-defined on Unix platforms -(which include MacOS X and cygwin). On Windows, anything goes. -The following documentation is only for the purpose of your migrating away from it -in a way that preserves semantics. - -Instead we recommend the use @code{run-program} above -available as part of ASDF since ASDF 3. - -@code{run-shell-command} takes as arguments a @code{format} control-string -and arguments to be passed to @code{format} after this control-string -to produce a string. -This string is a command that will be evaluated with a POSIX shell if possible; -yet, on Windows, some implementations will use CMD.EXE, -while others (like SBCL) will make an attempt at invoking a POSIX shell -(and fail if it is not present). -@end defun - @node Getting the latest version, FAQ, Miscellaneous additional functionality, Top @comment node-name, next, previous, up debian/patches/set-debian-version.patch0000644000000000000000000000074312256052366015347 0ustar Origin: debian Last-Update: 2011-01-01 Index: sbcl/version.lisp-expr =================================================================== --- sbcl.orig/version.lisp-expr 2012-11-16 19:04:45.000000000 -0800 +++ sbcl/version.lisp-expr 2012-11-16 19:04:58.365392663 -0800 @@ -1,4 +1,4 @@ ;;; This file is auto-generated using generate-version.sh. Every time ;;; you re-run make.sh, this file will be overwritten if you are ;;; working from a Git checkout. -"1.1.14" +"1.1.14.debian" debian/patches/debian-changes-1:1.0.45.0-10000644000000000000000000000566412214415675014604 0ustar Description: Upstream changes introduced in version 1:1.0.45.0-1 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . sbcl (1:1.0.45.0-1) experimental; urgency=low . * New Upstream Version * Rework install target * Add kfreebsd support * Move to format 3.0 (quilt) * Runn the tests . The person named in the Author field signed this changelog entry. Author: Christoph Egger --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- sbcl-1.0.45.0.orig/contrib/asdf-module.mk +++ sbcl-1.0.45.0/contrib/asdf-module.mk @@ -30,9 +30,11 @@ all: $(EXTRA_ALL_TARGETS) $(SBCL) --eval '(defvar *system* "$(SYSTEM)")' --load ../asdf-stub.lisp --eval '(quit)' test: all - echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM))" \ - "(asdf:operate (quote asdf:test-op) :$(SYSTEM))" | \ - $(SBCL) --eval '(load "../asdf/asdf")' + echo Not doing ANY tests XXX +# +# echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM))" \ +# "(asdf:operate (quote asdf:test-op) :$(SYSTEM))" | \ +# $(SBCL) --eval '(load "../asdf/asdf")' # KLUDGE: There seems to be no portable way to tell tar to not to # preserve owner, so chown after installing for the current user. --- sbcl-1.0.45.0.orig/doc/manual/Makefile +++ sbcl-1.0.45.0/doc/manual/Makefile @@ -59,8 +59,8 @@ html: html-stamp html-stamp: $(DOCFILES) docstrings @rm -rf $(HTMLDIRS) @rm -f $(HTMLFILES) -# $(MAKEINFO) $(I_FLAGS) --html --css-include=style-multi.css $(SBCLTEXI) -# $(MAKEINFO) --html --css-include=style-multi.css $(ASDFTEXI) + $(MAKEINFO) $(I_FLAGS) --no-split --html --css-include=style-multi.css $(SBCLTEXI) + $(MAKEINFO) --html --css-include=style-multi.css $(ASDFTEXI) $(MAKEINFO) $(I_FLAGS) --html --no-split --css-include=style-single.css $(SBCLTEXI) $(MAKEINFO) --html --no-split --css-include=style-single.css $(ASDFTEXI) touch html-stamp --- sbcl-1.0.45.0.orig/src/runtime/GNUmakefile +++ sbcl-1.0.45.0/src/runtime/GNUmakefile @@ -39,7 +39,7 @@ include genesis/Makefile.features # Commonly used variables in Config are: ARCH_SRC, ASSEM_SRC, GC_SRC, # OS_SRC, OS_LIBS, OS_OBJS, OS_CLEAN_FILES include Config - +CFLAGS += -DSBCL_HOME='"/usr/lib/sbcl/"' COMMON_SRC = alloc.c backtrace.c breakpoint.c coreparse.c \ dynbind.c funcall.c gc-common.c globals.c interr.c interrupt.c \ largefile.c monitor.c os-common.c parse.c print.c purify.c \ debian/patches/svref-fix-66ee499237be5778b44b0d7b2de396562137228e0000644000000000000000000000456212214415675017655 0ustar commit 66ee499237be5778b44b0d7b2de396562137228e Author: Paul Khuong Date: Sat Mar 30 19:22:46 2013 +0100 Fix a compilation failure on svref of a symbol macro Introduced in 0892423b (faster SVREF and (SETF SVREF) compilation) Thanks to James M. Lawrence for the quick report, with a reduced test case. diff --git a/NEWS b/NEWS index 0774be8..0357268 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,8 @@ ;;;; -*- coding: utf-8; fill-column: 78 -*- +changes relative to sbcl-1.1.6 + * bug fix: svref/(setf svref) on symbol macros don't crash the compiler + anymore. (Minimal test case provided by James M. Lawrence on sbcl-devel) + changes in sbcl-1.1.6 relative to sbcl-1.1.5: * enhancement: the continuable error when defknown-ing over extant fndb entries can be ignored by passing :overwrite-fndb-silently t diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index a595e63..d70cdb5 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -1023,7 +1023,7 @@ (define-source-transform svref (vector index) (let ((elt-type (or (when (symbolp vector) (let ((var (lexenv-find vector vars))) - (when var + (when (lambda-var-p var) (type-specifier (array-type-declared-element-type (lambda-var-type var)))))) t))) @@ -1036,7 +1036,7 @@ (define-source-transform %svset (vector index value) (let ((elt-type (or (when (symbolp vector) (let ((var (lexenv-find vector vars))) - (when var + (when (lambda-var-p var) (type-specifier (array-type-declared-element-type (lambda-var-type var)))))) t))) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 833c5ee..1a4fc7d 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4378,3 +4378,8 @@ (with-test (:name :second-open-coded) (let ((fun (compile nil `(lambda (x) (second x))))) (assert (not (ctu:find-named-callees fun))))) + +(with-test (:name :svref-of-symbol-macro) + (compile nil `(lambda (x) + (symbol-macrolet ((sv x)) + (values (svref sv 0) (setf (svref sv 0) 99)))))) debian/patches/series0000644000000000000000000000030512256052664012040 0ustar set-debian-version.patch dont-split-doc.patch #debian-changes-1:1.0.45.0-1 sbcl-kfreebsd.patch disable-version-build.patch #texinfo5-eca54df9cd4917ddf1edf485d6beed0e2fad681f.diff update-asdf.patch debian/patches/dont-split-doc.patch0000644000000000000000000000111412256052264014477 0ustar Origin: debian Forwarded: no Last-Update: 2010 Work around for too long filenames which make dpkg fail Index: sbcl/doc/manual/Makefile =================================================================== --- sbcl.orig/doc/manual/Makefile 2013-12-07 16:50:20.623032690 +0100 +++ sbcl/doc/manual/Makefile 2013-12-07 16:50:20.615032651 +0100 @@ -89,7 +89,7 @@ info: $(INFOFILES) %.info: %.texinfo $(DOCFILES) docstrings - $(MAKEINFO) $(I_FLAGS) $< + $(MAKEINFO) --no-split $(I_FLAGS) $< # Texinfo docstring snippets # Note: assumes contrib module names are the same as the names of debian/sbcl.sh0000644000000000000000000000306612214415675010461 0ustar #!/bin/sh if [ ! -f /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp ] ; then cat < /dev/null mv sbcl-new.core sbcl.core || (echo FAILED ; cp sbcl-dist.core sbcl.core ) ) ;; remove-clc) echo $0 removing clc-enabled image cp /usr/lib/sbcl/sbcl-dist.core /usr/lib/sbcl/sbcl.core ;; rebuild) echo $0 rebuilding... shift echo rebuilding $1 /usr/bin/sbcl --noinform --sysinit ${RCFILE} --userinit /dev/null \ --disable-debugger \ --eval \ "(handler-case (progn (asdf:operate 'asdf:compile-op (quote $1)) (sb-unix:unix-exit 0)) (error (e) (ignore-errors (format t \"~&Build error: ~A~%\" e)) (finish-output) (sb-unix:unix-exit 1)))" || build_error ;; remove) echo $0 removing packages... shift while [ ! -z "$1" ] ; do rm -rf "/var/cache/common-lisp-controller/*/sbcl/${1}" shift done ;; *) echo $0 unkown command $1 echo known commands: rebuild, remove, install-clc, and remove-clc exit 1 ;; esac exit 0 debian/rules0000755000000000000000000001354112214415675010261 0ustar #!/usr/bin/make -f LOCALE_PATH=debian/tmpdir/usr/lib/locale LOCALE_NAME=en_US LOCALE_CHARSET=UTF-8 HOME = $(shell pwd) export HOME export SHELL=/bin/bash export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS export sbcl_arch=$(shell dpkg-architecture -qDEB_BUILD_ARCH |sed s/i386/x86/) ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) ifeq (${ARCH},powerpc) CFLAGS:=-O2 endif pkg=sbcl TARGET=debian/sbcl SOURCE_TARGET=debian/sbcl-source DOC_TARGET=debian/sbcl-doc DESTDIR=$(CURDIR)/debian/tmp/usr ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) FEATURES=":sb-core-compression" ifeq (,$(BOOTSTRAPHOME)) BOOTSTRAPHOME=/usr endif HOST_SBCL=$(BOOTSTRAPHOME)/bin/sbcl HOST_CORE=$(BOOTSTRAPHOME)/lib/sbcl/sbcl.core ifneq (,$(filter x86 amd64,$(sbcl_arch))) FEATURES += " :sb-thread :sb-futex" endif ifneq (,$(filter kfreebsd-%,$(sbcl_arch))) FEATURES += " :os-provides-dlopen" endif configure: configure-stamp configure-stamp: echo "(lambda (features) (setf features (union features (list $(FEATURES)))))" > customize-target-features.lisp cat customize-target-features.lisp dh_testdir touch configure-stamp build: configure-stamp build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: configure-stamp dh_testdir # create the locale: mkdir -p ${LOCALE_PATH} localedef -i "${LOCALE_NAME}" -f "${LOCALE_CHARSET}" "${LOCALE_PATH}/${LOCALE_NAME}.${LOCALE_CHARSET}" export LC_ALL=${LOCALE_NAME}.${LOCALE_CHARSET} export LANG=en_US.UTF-8 export LOCPATH=${LOCALE_PATH} # Using the locale +echo environment: env +echo # make scripts runable chmod a+x ./src/runtime/linux-nm ./make.sh ./clean.sh ./tools-for-build/canonicalize-whitespace chmod a+x ./tools-for-build/whitespacely-canonical-filenames ./tools-for-build/grep-noncanonical-whitespace chmod a+x ./tools-for-build/check-canonical-whitespace ./tools-for-build/canonicalize-whitespace-1 echo "using sbcl to rebuild with core /usr/lib/sbcl/sbcl-dist.core, checking" ls -l $(HOST_SBCL) $(HOST_CORE) CFLAGS="-DSBCL_HOME=`pwd`/stage1/ -O2" GNUMAKE=make ./make.sh "$(HOST_SBCL) --core $(HOST_CORE) --sysinit /dev/null --userinit /dev/null --disable-debugger" mkdir stage1 mv output/sbcl.core stage1/stage1.cor_ mv src/runtime/sbcl stage1/stage1 # save stage1 tar cvf stage1.tar stage1/ rm -rf stage1 || true sh clean.sh || true # restore stage1 tar xvf stage1.tar rm stage1.tar echo "rebuild again with new version" CFLAGS="-DSBCL_HOME=/usr/lib/sbcl/ -O2" GNUMAKE=make ./make.sh --prefix="/usr/" --xc-host="`pwd`/stage1/stage1 --core `pwd`/stage1/stage1.cor_ --sysinit /dev/null --userinit /dev/null --disable-debugger" make -C doc/internals all html # start running tests -GNUMAKE=make sh -c 'cd tests && sh ./run-tests.sh' || printf "the tests failed\n" src/runtime/sbcl --core output/sbcl.core --eval '(sb-ext:set-sbcl-source-location "/usr/share/sbcl-source/")' \ --eval '(sb-ext:save-lisp-and-die "output/sbcl.core")' # see what the result is touch build-arch-stamp build-indep: build-indep-stamp build-indep-stamp: dh_testdir cd doc/manual && make docstrings && make touch build-indep-stamp clean: dh_testdir dh_testroot rm -rf target || true rm -rf stage1 || true rm -rf debian/tmpdir || true rm -rf .fontconfig || true # Add here commands to clean up after the build process. GNUMAKE=make sh clean.sh || true (cd src/runtime ; touch Config ; make clean ) || true # clean up CVS stuff rmdir contrib/systems/ obj/ output/ || true make -C doc/internals clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs INSTALL_ROOT="$(DESTDIR)" sh install.sh dh_install cp debian/binfmt $(TARGET)/usr/share/binfmts/sbcl cp debian/sbcl-run $(TARGET)/usr/lib/sbcl chmod a+x $(TARGET)/usr/lib/sbcl/sbcl-run find $(TARGET)/usr/lib/sbcl/ -type f -name \*.c -exec chmod -x '{}' \; # move the indep stuff dh_installinfo -psbcl-doc $(DESTDIR)/share/info/sbcl.info rm $(DESTDIR)/share/info/asdf.info $(DESTDIR)/share/info/sbcl.info rm $(DESTDIR)/share/doc/sbcl/asdf.pdf cp debian/index-docs.html \ $(DOC_TARGET)/usr/share/doc/sbcl-doc/html/index.html rm -f $(SOURCE_TARGET)/usr/share/sbcl-source/contrib/asdf-install/asdf-install rm -f $(SOURCE_TARGET)/usr/share/sbcl-source/contrib/asdf/LICENSE find $(SOURCE_TARGET)/usr/share/sbcl-source -type f -name \*.fasl -or -name \*.o -or -name \*.log \ -or -name \*.so -or -name a.out | xargs rm find $(SOURCE_TARGET)/usr/share/sbcl-source/ -type f -name \*.c -exec chmod -x '{}' \; rm $(SOURCE_TARGET)/usr/share/sbcl-source/src/runtime/sbcl rm $(SOURCE_TARGET)/usr/share/sbcl-source/src/runtime/sbcl.nm # Build architecture-independent files here. binary-indep: build install dh_testdir -i dh_testroot -i dh_installchangelogs -i dh_installdocs -i dh_installexamples -i dh_installdebconf -i dh_installcron -i dh_installinfo -i dh_installman -i dh_link -i dh_lintian -i dh_compress -i -X *.html dh_fixperms -i find $(TARGET) $(SOURCE_TARGET) $(DOC_TARGET) -name .cvsignore -print0 | xargs -t0 rm -rf || true find $(TARGET) $(SOURCE_TARGET) $(DOC_TARGET) -name CVS -print0 | xargs -t0 rm -rf || true dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. binary-arch: build install dh_testdir -a dh_testroot -a dh_installchangelogs -a dh_installdocs -a dh_installexamples -a find $(TARGET) $(SOURCE_TARGET) $(DOC_TARGET) -name CVS -or -name .cvsignore -print0 | xargs -t0 rm -rf || true dh_installman -a dh_strip -a dh_link -a dh_lintian -a dh_compress -a dh_fixperms -a dh_lisp sbcl dh_installdeb -a dh_shlibdeps -a # add the FASL version of this release to substvars stage1/stage1 --core stage1/stage1.cor_ --load "debian/fasl-version.lisp" dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/sbcl-source.lintian-overrides0000644000000000000000000000010312214415675014770 0ustar sbcl-source: copyright-should-refer-to-common-license-file-for-gpl debian/sbcl-source.dirs0000644000000000000000000000006212214415675012277 0ustar usr/share/sbcl-source usr/share/lintian/overrides debian/cvs-deb0000644000000000000000000000011012214415675010433 0ustar #!/bin/sh CVSROOT=`cat CVS/Root` cvs-buildpackage -F -uc -us -rfakeroot debian/sbcl-source.install0000644000000000000000000000007412214415675013007 0ustar src /usr/share/sbcl-source/ contrib /usr/share/sbcl-source/ debian/ld-script.alpha-linux0000644000000000000000000002070312214415675013244 0ustar /* GNU ld version 2.14.90.0.7 20031029 Debian GNU/Linux Supported emulations: elf64alpha alpha using internal linker script Purpose of this script: The original script from upstream states: "This script allegedly has the same effect as -taso would do on Digital Unix - that is, it forces stuff into the low 2Gb where 32-bit pointers can find it" This is actually not the full truth, as GNU ld on Alpha also supports the "-taso" switch, which forces everything to 32bit addresses, but this is not quite the desired effect: with -taso, also shared libraries are mapped to short addresses, such that they take up addresses that SBCL wants to mmap its core memory image to. Although there'd be still enough space for SBCL's mmap when -taso is used. For this, src/compiler/alpha/parms.lisp would have to be adapted. But there is no reason to squeeze _everything_ to 32bit, since only the Lisp side relies not it somehow. With this linker script the shared libraries are mapped to the upper (> 32bit) addresses, leaving more clearance for the Lisp side in the lower memory area for SBCL. -- René van Bevern , Sat, 15 Jul 2006 14:20:24 +0200 */ /* Script for -z combreloc: combine and sort reloc sections */ OUTPUT_FORMAT("elf64-alpha", "elf64-alpha", "elf64-alpha") OUTPUT_ARCH(alpha) ENTRY(_start) SEARCH_DIR("/usr/alpha-linux/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); /* Do we need any of these for elf? __DYNAMIC = 0; */ SECTIONS { /* Read-only sections, merged into text segment: */ PROVIDE (__executable_start = 0x08048000); . = 0x08048000 + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } .gnu.version_d : { *(.gnu.version_d) } .gnu.version_r : { *(.gnu.version_r) } .rel.dyn : { *(.rel.init) *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) *(.rel.fini) *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) *(.rel.ctors) *(.rel.dtors) *(.rel.got) *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } .rela.dyn : { *(.rela.init) *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) *(.rela.fini) *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) *(.rela.ctors) *(.rela.dtors) *(.rela.got) *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } .rel.plt : { *(.rel.plt) } .rela.plt : { *(.rela.plt) } .init : { KEEP (*(.init)) } =0x0000fe2f1f04ff47 .text : { *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) } =0x0000fe2f1f04ff47 .fini : { KEEP (*(.fini)) } =0x0000fe2f1f04ff47 PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } .reginfo : { *(.reginfo) } .eh_frame_hdr : { *(.eh_frame_hdr) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x2000); /* Ensure the __preinit_array_start label is properly aligned. We could instead move the label definition inside the section, but the linker would then create the section even if it turns out to be empty, which isn't pretty. */ . = ALIGN(64 / 8); PROVIDE (__preinit_array_start = .); .preinit_array : { *(.preinit_array) } PROVIDE (__preinit_array_end = .); PROVIDE (__init_array_start = .); .init_array : { *(.init_array) } PROVIDE (__init_array_end = .); PROVIDE (__fini_array_start = .); .fini_array : { *(.fini_array) } PROVIDE (__fini_array_end = .); .data : { *(.data .data.* .gnu.linkonce.d.*) SORT(CONSTRUCTORS) } .data1 : { *(.data1) } .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } .eh_frame : { KEEP (*(.eh_frame)) } .gcc_except_table : { *(.gcc_except_table) } .dynamic : { *(.dynamic) } .ctors : { /* gcc uses crtbegin.o to find the start of the constructors, so we make sure it is first. Because this is a wildcard, it doesn't matter if the user does not actually link against crtbegin.o; the linker won't look for a file to match a wildcard. The wildcard also means that it doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin*.o(.ctors)) /* We don't want to include the .ctor section from from the crtend.o file until after the sorted ctors. The .ctor section from the crtend file contains the end of ctors marker and it must be last */ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) } .dtors : { KEEP (*crtbegin*.o(.dtors)) KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } .jcr : { KEEP (*(.jcr)) } .plt : { *(.plt) } .got : { *(.got.plt) *(.got) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ .sdata : { *(.sdata .sdata.* .gnu.linkonce.s.*) } _edata = .; PROVIDE (edata = .); __bss_start = .; .sbss : { PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .); *(.dynsbss) *(.sbss .sbss.* .gnu.linkonce.sb.*) *(.scommon) PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); } .bss : { *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ . = ALIGN(64 / 8); } . = ALIGN(64 / 8); _end = .; PROVIDE (end = .); . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ /* DWARF 1 */ .debug 0 : { *(.debug) } .line 0 : { *(.line) } /* GNU DWARF 1 extensions */ .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_sfnames 0 : { *(.debug_sfnames) } /* DWARF 1.1 and DWARF 2 */ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } /* SGI/MIPS DWARF 2 extensions */ .debug_weaknames 0 : { *(.debug_weaknames) } .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } /DISCARD/ : { *(.note.GNU-stack) } } debian/watch0000644000000000000000000000007712214415675010232 0ustar version=3 http://sf.net/sbcl/sbcl-([0-9.]*)-source\.tar\.bz2 debian/sbcl-doc.doc-base.sbcl-internals0000644000000000000000000000054712214415675015207 0ustar Document: sbcl-internals Title: SBCL Internals Manual Author: William Harold Newman Abstract: This manual describes the internals of SBCL Section: Programming Format: HTML Index: /usr/share/doc/sbcl-doc/html/sbcl-internals/index.html Files: /usr/share/doc/sbcl-doc/html/sbcl-internals/*.html Format: PDF Files: /usr/share/doc/sbcl-doc/sbcl-internals.pdf.gz debian/sbcl-doc.doc-base.sbcl0000644000000000000000000000045712214415675013212 0ustar Document: sbcl Title: SBCL User Manual Author: William Harold Newman Abstract: This manual describes the usage of SBCL Section: Programming Format: HTML Index: /usr/share/doc/sbcl-doc/html/sbcl.html Files: /usr/share/doc/sbcl-doc/html/sbcl.html Format: PDF Files: /usr/share/doc/sbcl-doc/sbcl.pdf.gz debian/README.Debian0000644000000000000000000000117012214415675011235 0ustar Steel Bank Common Lisp for Debian --------------------------------- To execute an SBCL executables like "normal" programs on Debian GNU/Linux, install the package binfmt-support and use a kernel that has support for "miscellaneous binary formats". This is the default for Debian Linux kernels. Compile your program using: (compile-file "file1.lisp") (compile-file "file2.lisp") "Link" it using cat, in the same order as you would load them: cat file1.fasl file2.fasl > program Make it executable: chmod a+x program And have fun: ./program [arguments ...] -- René van Bevern , Sun Aug 28 18:35:15 2005 debian/index-docs.html0000644000000000000000000000066212214415675012124 0ustar SBCL related documentation

Available SBCL documentation

debian/postinst0000644000000000000000000000174212214415675011007 0ustar #! /bin/sh # postinst script for sbcl set -e # Source debconf library. . /usr/share/debconf/confmodule # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/share/doc/packaging-manual/ # case "$1" in configure) if [ -x /usr/sbin/update-binfmts ]; then update-binfmts --import sbcl \ || true fi ;; abort-upgrade|abort-remove|abort-deconfigure) rm /usr/lib/sbcl/sbcl-new.core /usr/lib/sbcl/sbcl.core \ > /dev/null 2>&1 || true ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac #DEBHELPER# exit 0 debian/fasl-version.lisp0000644000000000000000000000117712214415675012504 0ustar ;;;; Find out the FASL version of this SBCL release and dump it to the ;;;; debian/sbcl.substvars variable, so it can be used in ;;;; debian/control ;;;; ;;;; Packages that want to provide binary SBCL FASLs can then depend ;;;; on sbcl-fasl-XX ;;;; ;;;; -- René van Bevern , Sat Sep 3 19:23:20 2005 (with-open-file (substvars "debian/sbcl.substvars" :direction :output :if-exists :append :if-does-not-exist :create) (format substvars "~&sbcl:fasl-version=sbcl-fasl-loader-~A~%" sb-fasl:+fasl-file-version+)) (sb-ext:quit) debian/copyright0000644000000000000000000000163212214415675011132 0ustar This package was downloaded from http://sbcl.sf.net/ SBCL is derived from CMU CL, which was released into the public domain, subject only to the BSD-style "free, but credit must be given and copyright notices must be retained" licenses in the LOOP macro (from MIT and Symbolics) and in the PCL implementation of CLOS (from Xerox). After CMU CL was was released into the public domain, it was maintained by volunteers, who continued the tradition of releasing their work into the public domain. All changes to SBCL since the fork from CMU CL have been released into the public domain in jurisdictions where this is possible, or under the FreeBSD licence where not. Exceptions are: - src/runtime/ld-script.alpha-linux: GPL v2 (from binutils package) Thus, there are no known obstacles to copying, using, and modifying SBCL freely, as long as copyright notices of MIT, Symbolics, Xerox and Gerd Moellmann are retained. debian/compat0000644000000000000000000000000212214415675010373 0ustar 7