0.pre7.140:
authorWilliam Harold Newman <william.newman@airmail.net>
Wed, 16 Jan 2002 23:54:29 +0000 (23:54 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Wed, 16 Jan 2002 23:54:29 +0000 (23:54 +0000)
merged SB-C-CALL into SB-ALIEN (since the rationale for
C-CALL being an extension of "basic" SB-ALIEN isn't
obviously compelling)
...deleted various notes about the distinction between
packages at egrep matches to '\<c-call'
...mentioned the change in the FFI quasichapter of the
user manual
...s/c-call/alien/ at matches to 'sb.c-call'
...remembered to add SB-C-CALL nickname for backwards
compatibility
There seems no longer to be any reason that VOID or
WEAK-POINTER-P needs to be re-exported from SB-KERNEL.
It doesn't make all that much sense to reexport
LOAD-FOREIGN and LOAD-1-FOREIGN from SB-EXT.
Remove the old set-the-cold-package-nickname support from
set-up-cold-packages.lisp and friends, since it's
unused and not quite right anyway and much too
annoying to fix (messing with renaming SB!FOO
nicknames to SB-FOO nicknames, ick). The SB-FOO
nickname needed is this backwards compatibility
hack, and it can be hacked in at init time.

19 files changed:
NEWS
doc/ffi.sgml
package-data-list.lisp-expr
src/code/debug-int.lisp
src/code/foreign.lisp
src/code/gc.lisp
src/code/host-c-call.lisp
src/code/purify.lisp
src/code/run-program.lisp
src/code/save.lisp
src/code/target-allocate.lisp
src/code/target-c-call.lisp
src/code/target-package.lisp
src/code/target-signal.lisp
src/code/time.lisp
src/code/unix.lisp
src/cold/set-up-cold-packages.lisp
src/cold/warm.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 5e9979a..de64b47 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -908,51 +908,62 @@ changes in sbcl-0.7.0 relative to sbcl-0.6.13:
   :SB-PROPAGATE-FUN-TYPE are no longer considered to be optional
   features. Instead, the code that they used to control is always
   built into the system.
-* minor incompatible change: The debugger prompt sequence now goes
-  "5]", "5[2]", "5[3]", etc. as you get deeper into recursive calls
-  to the debugger command loop, instead of the old "5]", "5]]",
-  "5]]]" sequence. (I was motivated to do this when squabbles between
-  ILISP and SBCL left me very deeply nested in the debugger. In the
-  short term, this change will probably provoke more ILISP/SBCL 
-  squabbles, but hopefully it will be an improvement in the long run.)
-* minor incompatible change: The CHAR-NAME of unprintable ASCII
-  characters which, unlike e.g. #\Newline and #\Tab, don't have names
-  specified in the ANSI Common Lisp standard, is now based on their
-  ASCII symbolic names (#\Nul, #\Soh, #\Stx, etc.) The old CMU CL
-  names (#\Null, #\^a, #\^b, etc.) are still accepted by NAME-CHAR.
-?? Old operator names in the style DEF-FOO are now deprecated in
-  favor of new corresponding names DEFINE-FOO, for consistency with
-  the naming convention used in the ANSI standard (DEFSTRUCT, DEFVAR,
-  DEFINE-CONDITION, DEFINE-MODIFY-MACRO..). This mostly affects
-  internal symbols, but a few supported extensions like
-  SB-ALIEN:DEF-ALIEN-FUNCTION are also affected.
-?? minor incompatible change: SB-C-CALL and SB-ALIEN no longer exist
-  as separate packages. The external symbols of both packages have
-  moved into a new SB-FFI package. Almost all old code should still
-  continue to work without immediate update, as SB-C-CALL and SB-ALIEN
-  names will be retained as nicknames for that package for some time.
-* minor incompatible change (part of a bug fix by Christophe Rhodes
-  to DIRECTORY behavior): DIRECTORY no longer implicitly promotes
-  NIL slots of its pathname argument to :WILD, and in particular
-  asking for the contents of a directory, which you used to be able
-  to do without explicit wildcards, e.g. (DIRECTORY "/tmp/"), 
-  now needs explicit wildcards, e.g. (DIRECTORY "/tmp/*.*").
-* minor incompatible change: DEFINE-ALIEN-FUNCTION (also known by 
-  the old deprecated name DEF-ALIEN-FUNCTION) now does DECLAIM FTYPE
-  for the defined function, since declaiming return types involving
-  aliens is (1) annoyingly messy to do by hand and (2) vital 
-  to efficient compilation of code which calls such functions (and
-  since people writing calls-to-C code aren't likely to be bothered
-  by implicit assumptions of static typing).
+* There are several incompatible changes:
+  ** The old implementation of EVAL, has been largely discarded (as
+     per the discussion of the "IR1 interpreter" above). In its place
+     is code which still interprets a few special cases, but which in 
+     the general case calls COMPILE and then FUNCALLs the result.
+     Besides the obvious changes in performance tradeoffs (that
+     the cost per form passed to EVAL has gone up, and 
+     the cost per form executed by EVAL has gone down), this
+     can be considered an "incompatible" change because there
+     are no longer any interpreted function objects. 
+     COMPILED-FUNCTION-P is now synonymous with FUNCTIONP, and 
+     doing COMPILE on the output of interactive DEFUN is now a no-op.
+  ** The debugger prompt sequence now goes "5]", "5[2]", "5[3]",
+     etc. as you get deeper into recursive calls to the debugger
+     command loop, instead of the old "5]", "5]]", "5]]]"
+     sequence. (I was motivated to do this when squabbles between
+     ILISP and SBCL left me very deeply nested in the debugger. In the
+     short term, this change will probably provoke more ILISP/SBCL 
+     squabbles, but hopefully it will be an improvement in the long run.)
+  ** The CHAR-NAME of unprintable ASCII characters which, unlike
+     e.g. #\Newline and #\Tab, don't have names specified in the
+     ANSI Common Lisp standard, is now based on their ASCII symbolic
+     names (#\Nul, #\Soh, #\Stx, etc.) The old CMU-CL-style names
+     (#\Null, #\^a, #\^b, etc.) are still accepted by NAME-CHAR, but
+     are no longer used for output.
+  ** Old operator names in the style DEF-FOO are now deprecated in
+     favor of new corresponding names DEFINE-FOO, for consistency with
+     the naming convention used in the ANSI standard (DEFSTRUCT, DEFVAR,
+     DEFINE-CONDITION, DEFINE-MODIFY-MACRO..). This mostly affects
+     internal symbols, but a few supported extensions like
+     SB-ALIEN:DEF-ALIEN-FUNCTION are also affected. (So e.g.
+     DEF-ALIEN-FUNCTION becomes DEFINE-ALIEN-FUNCTION.)
+  ** SB-C-CALL has been merged into SB-ALIEN. Almost all old code
+     should still continue to work without immediate update, as
+     SB-C-CALL is now a (deprecated) nickname for SB-ALIEN.
+  ** As part of a bug fix by Christophe Rhodes to DIRECTORY behavior,
+     DIRECTORY no longer implicitly promotes NIL slots of its
+     pathname argument to :WILD. In particular, asking for the
+     contents of a directory, which you used to be able
+     to do without explicit wildcards, e.g. (DIRECTORY "/tmp/"), 
+     now needs explicit wildcards, e.g. (DIRECTORY "/tmp/*.*").
+  ** SB-ALIEN:DEFINE-ALIEN-FUNCTION (also known by the old deprecated
+     name DEF-ALIEN-FUNCTION) now does DECLAIM FTYPE for the defined
+     function, since declaiming return types involving aliens is
+     (1) annoyingly messy to do by hand and (2) vital to efficient
+     compilation of code which calls such functions.
+  ** SB-ALIEN:LOAD-FOREIGN and SB-ALIEN:LOAD-1-FOREIGN are no
+     longer reexported by the SB-EXT package. They're solely useful
+     for alien code, so it seems more logical that you should get
+     them from the SB-ALIEN package, not in SB-EXT.
 * The value of INTERNAL-TIME-UNITS-PER-SECOND has been increased
   from 100 to 1000.
 * The default value of *BYTES-CONSED-BETWEEN-GCS* has been 
   doubled, to 4 million. (If your application spends a lot of time
   GCing and you have a lot of RAM, you might want to experiment with
   increasing it even more.)
-* The interpreter, EVAL, has been rewritten. Now it calls the
-  native compiler for the difficult cases, where it used to call
-  the old specialized IR1 interpreter code. 
 * The doc/cmucl/ directory, containing old CMU CL documentation
   from the time of the fork, is no longer part of the base system.
   SourceForge has shut down its anonymous FTP service, and with it
index 8db7573..498fd19 100644 (file)
@@ -5,18 +5,21 @@ function interface should be reviewed, reformatted in DocBook,
 lightly edited for &SBCL;, and substituted into this manual. But in
 the meantime, the original &CMUCL; manual is still 95+% correct for
 the &SBCL; version of the foreign function interface. (The main
-difference is that the package names have changed from
-<quote><literal>ALIEN</></> and <quote><literal>C-CALL</></> to
-<quote><literal>SB-ALIEN</></> and <quote><literal>SB-C-CALL</></>.)
+difference is that the package names have changed. CMU CL's FFI
+is in two packages named <quote><literal>ALIEN</></> and
+<quote><literal>C-CALL</></>. The corresponding SBCL FFI is
+in a single package named 
+<quote><literal>SB-ALIEN</></>.)
         <!-- FIXME: Oh, and I seem to remember that the CMUCL manual
             was out of date about how to test for a null pointer,
             there's a builtin operator to do it, you don't need to
             do the nasty idiom the manual says you need to do. -->
        <!-- FIXME: Also, the CMU CL alien documentation claims you
-            can just do (DEFINE-ALIEN-VARIABLE "errno" INT), which fails
-            with modern multithreading hacks. -->
-       <!-- FIXME: Also, LOAD-FOREIGN isn't implemented as of sbcl-0.6.7,
-            but LOAD-1-FOREIGN is. -->
+            can just do (DEFINE-ALIEN-VARIABLE "errno" INT), but it's
+            wrong. That fails with the multithreading hacks hacks
+            now built into the C library. -->
+       <!-- FIXME: Also, we support not only LOAD-FOREIGN but
+            also LOAD-1-FOREIGN. -->
 See the sections
 <itemizedlist>
   <listitem><para>Type Translations</></>
index 5b4f352..9fe3e92 100644 (file)
@@ -3,14 +3,15 @@
 ;;;; the specifications of target packages, except for a few things
 ;;;; which are handled elsewhere by other mechanisms:
 ;;;;   * the creation of the trivial SB-SLOT-ACCESSOR-NAME package
-;;;;   * any SHADOWing hackery
+;;;;   * any SHADOWing and nickname hackery
 ;;;;   * the standard, non-SBCL-specific packages COMMON-LISP,
 ;;;;     COMMON-LISP-USER, and KEYWORD
 ;;;;
 ;;;; The packages are named SB!FOO here and elsewhere in
-;;;; cross-compilation, in order to avoid collision with corresponding
-;;;; SB-FOO packages in the cross-compilation host. They're renamed to
-;;;; SB-FOO later, after the danger of collision has passed.
+;;;; cross-compilation, in order to avoid collision with possible
+;;;; corresponding SB-FOO packages in the cross-compilation host.
+;;;; They're renamed to SB-FOO later, after we've departed from the xc
+;;;; mothership and the danger of namespace collision is past.
 
 ;;;; This software is part of the SBCL system. See the README file for
 ;;;; more information.
 
 (#s(sb-cold:package-data
     :name "SB!ALIEN"
-    :doc "public: the ALIEN foreign function interface"
+    :doc "public: the ALIEN foreign function interface (If you're
+porting CMU CL code, note that this package corresponds roughly to a union
+of the packages ALIEN and C-CALL at the time of the SBCL fork. SB-C-CALL
+is a deprecated nickname to help ease the transition from older versions
+of SBCL which maintained the CMU-CL-style split into two packages.)"
     :use ("CL" "SB!EXT" "SB!INT" "SB!SYS" "SB!ALIEN-INTERNALS")
-    :reexport ("ARRAY" "BOOLEAN" "DOUBLE-FLOAT" "LONG-FLOAT" "FUNCTION"
-               "INTEGER" "SINGLE-FLOAT" "UNION"  "SYSTEM-AREA-POINTER"
-               "VALUES" "*")
+    :reexport ("ARRAY" "BOOLEAN" "CHAR" "DOUBLE-FLOAT"
+              "FLOAT" "FUNCTION" "INTEGER" "LONG-FLOAT"
+              "SINGLE-FLOAT"
+              ;; FIXME: Do we really want to reexport
+              ;; SYSTEM-AREA-POINTER here? Why?
+              "SYSTEM-AREA-POINTER"
+               "UNION"  "VALUES" "*")
     :export ("ADDR" "ALIEN" "ALIEN-FUNCALL" "ALIEN-SAP" "ALIEN-SIZE" 
-            "CAST"
+            "CAST" "C-STRING"
             "DEFINE-ALIEN-ROUTINE" "DEFINE-ALIEN-TYPE" "DEFINE-ALIEN-VARIABLE"
 
             ;; FIXME: These old names don't match the DEFFOO - vs. -
             ;; DEFINE-FOO convention used in the ANSI spec, and so
-            ;; were deprecated in sbcl-0.pre7, ca. 2001-12-12. After
-            ;; a year or so they can go away completely.
+            ;; were deprecated in sbcl-0.7.0. After a year or so
+            ;; they can go away completely.
             "DEF-ALIEN-ROUTINE" "DEF-ALIEN-TYPE" "DEF-ALIEN-VARIABLE"
 
-             "DEREF"
+             "DEREF" "DOUBLE"
             "ENUM" "EXTERN-ALIEN"
-            "FREE-ALIEN" 
-             "LOAD-FOREIGN" "LOAD-1-FOREIGN"
+            "FREE-ALIEN"
+            "GET-ERRNO"
+            "INT" 
+             "LOAD-FOREIGN" "LOAD-1-FOREIGN" "LONG"
             "MAKE-ALIEN"
             "NULL-ALIEN"
-             "SAP-ALIEN" "SIGNED" "SLOT" "STRUCT"
+             "SAP-ALIEN" "SHORT" "SIGNED" "SLOT" "STRUCT"
              "UNSIGNED"
+            "UNSIGNED-CHAR" "UNSIGNED-INT" "UNSIGNED-LONG" "UNSIGNED-SHORT"
+            "VOID"
             "WITH-ALIEN"))
 
  #s(sb-cold:package-data
               "VM-SUPPORT-ROUTINES-LOCATION-NUMBER"))
 
  #s(sb-cold:package-data
-    :name "SB!C-CALL"
-    ;; FIXME: Why not just put this stuff into SB-ALIEN? Or maybe
-    ;; just glom this and SB-ALIEN together into SB-FFI?
-    :doc "public: some types used with ALIENs"
-    :use ("CL" "SB!SYS" "SB!ALIEN-INTERNALS" "SB!ALIEN" "SB!INT" "SB!EXT")
-    :reexport ("FLOAT" "CHAR")
-    :export ("C-STRING" "DOUBLE" "GET-ERRNO" "INT" "LONG"
-             "SHORT" "UNSIGNED-CHAR" "UNSIGNED-INT"
-             "UNSIGNED-LONG" "UNSIGNED-SHORT" "VOID"))
-
- #s(sb-cold:package-data
     :name "SB!DEBUG"
     :doc
 "sorta public: Eventually this should become the debugger interface, with
@@ -456,7 +458,7 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
  #s(sb-cold:package-data
     :name "SB!FASL"
     :doc "private: stuff related to FASL load/dump logic (and GENESIS)"
-    :use ("CL" "SB!ALIEN" "SB!ASSEM" "SB!BIGNUM" "SB!C" "SB!C-CALL"
+    :use ("CL" "SB!ALIEN" "SB!ASSEM" "SB!BIGNUM" "SB!C"
           "SB!EXT" "SB!INT" "SB!KERNEL" "SB!SYS")
     :export ("*ASSEMBLER-ROUTINES*"
              "+BACKEND-FASL-FILE-IMPLEMENTATION+"
@@ -493,15 +495,13 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
  #s(sb-cold:package-data
     :name "SB!IMPL"
     :doc "private: a grab bag of implementation details"
-    :use ("CL" "SB!ALIEN" "SB!BIGNUM" "SB!C-CALL" "SB!DEBUG" "SB!EXT"
+    :use ("CL" "SB!ALIEN" "SB!BIGNUM" "SB!DEBUG" "SB!EXT"
           "SB!FASL" "SB!GRAY" "SB!INT" "SB!KERNEL" "SB!SYS"))
 
  #s(sb-cold:package-data
     :name "SB!EXT"
     :doc "public: miscellaneous supported extensions to the ANSI Lisp spec"
-    ;; FIXME: Why don't we just USE-PACKAGE %KERNEL here instead of importing?
-    :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!INT" "SB!SYS" "SB!GRAY")
-    :reexport ("LOAD-FOREIGN" "LOAD-1-FOREIGN")
+    :use ("CL" "SB!ALIEN" "SB!INT" "SB!SYS" "SB!GRAY")
     :export (;; Information about how the program was invoked is
              ;; nonstandard but very useful.
              "*POSIX-ARGV*" "POSIX-GETENV" "POSIX-ENVIRON"
@@ -650,7 +650,7 @@ Lisp extension proposal by David N. Gray"
 "private: miscellaneous unsupported extensions to the ANSI spec. Much of
 the stuff in here originated in CMU CL's EXTENSIONS package and is
 retained, possibly temporariliy, because it might be used internally."
-    :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!GRAY" "SB!FASL" "SB!SYS")
+    :use ("CL" "SB!ALIEN" "SB!GRAY" "SB!FASL" "SB!SYS")
     :export ("*AFTER-SAVE-INITIALIZATIONS*" "*BEFORE-SAVE-INITIALIZATIONS*"
 
             ;; lambda list keyword extensions
@@ -888,8 +888,7 @@ integration' (said CMU CL architecture.tex) and that probably was and
 is a good idea, but see SB-SYS re. blurring of boundaries."
     :use ("CL" "SB!ALIEN" "SB!ALIEN-INTERNALS" "SB!BIGNUM"
           "SB!EXT" "SB!FASL" "SB!INT" "SB!SYS" "SB!GRAY")
-    :import-from (("SB!C-CALL" "VOID"))
-    :reexport ("DEF!STRUCT" "DEF!MACRO" "VOID" "WEAK-POINTER-P")
+    :reexport ("DEF!STRUCT" "DEF!MACRO")
     :export ("%ACOS" "%ACOSH" "%ARRAY-AVAILABLE-ELEMENTS"
              "%ARRAY-DATA-VECTOR" "%ARRAY-DIMENSION"
              "%ARRAY-DISPLACED-P"
@@ -1527,7 +1526,7 @@ stable Unix interface suitable for the end user.
 This package only tries to implement what happens to be
 needed by the current implementation of SBCL, and makes
 no guarantees of interface stability."
-    :use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!EXT" "SB!INT" "SB!SYS")
+    :use ("CL" "SB!ALIEN" "SB!EXT" "SB!INT" "SB!SYS")
     :export (;; wrappers around Unix stuff to give just what Lisp needs
             "UID-USERNAME"
 
@@ -1660,8 +1659,7 @@ no guarantees of interface stability."
 "internal: the default place to hide information about the hardware and data
 structure representations"
     :use ("CL" "SB!ALIEN" "SB!ALIEN-INTERNALS" "SB!ASSEM" "SB!C"
-          "SB!C-CALL" "SB!EXT" "SB!FASL" "SB!INT" "SB!KERNEL"
-          "SB!SYS" "SB!UNIX")
+          "SB!EXT" "SB!FASL" "SB!INT" "SB!KERNEL" "SB!SYS" "SB!UNIX")
     :export ("*ASSEMBLY-UNIT-LENGTH*" "*PRIMITIVE-OBJECTS*"
              "AFTER-BREAKPOINT-TRAP"
              "ANY-REG-SC-NUMBER" "ARRAY-DATA-SLOT" "ARRAY-DIMENSIONS-OFFSET"
index 6987328..3858678 100644 (file)
 ;;; returns the overwritten bits. You must call this in a context in
 ;;; which GC is disabled, so that Lisp doesn't move objects around
 ;;; that C is pointing to.
-(sb!alien:define-alien-routine "breakpoint_install" sb!c-call:unsigned-long
-  (code-obj sb!c-call:unsigned-long)
-  (pc-offset sb!c-call:int))
+(sb!alien:define-alien-routine "breakpoint_install" sb!alien:unsigned-long
+  (code-obj sb!alien:unsigned-long)
+  (pc-offset sb!alien:int))
 
 ;;; This removes the break instruction and replaces the original
 ;;; instruction. You must call this in a context in which GC is disabled
 ;;; so Lisp doesn't move objects around that C is pointing to.
-(sb!alien:define-alien-routine "breakpoint_remove" sb!c-call:void
-  (code-obj sb!c-call:unsigned-long)
-  (pc-offset sb!c-call:int)
-  (old-inst sb!c-call:unsigned-long))
+(sb!alien:define-alien-routine "breakpoint_remove" sb!alien:void
+  (code-obj sb!alien:unsigned-long)
+  (pc-offset sb!alien:int)
+  (old-inst sb!alien:unsigned-long))
 
-(sb!alien:define-alien-routine "breakpoint_do_displaced_inst" sb!c-call:void
+(sb!alien:define-alien-routine "breakpoint_do_displaced_inst" sb!alien:void
   (scp (* os-context-t))
-  (orig-inst sb!c-call:unsigned-long))
+  (orig-inst sb!alien:unsigned-long))
 
 ;;;; breakpoint handlers (layer between C and exported interface)
 
index 96b0cde..f854494 100644 (file)
 
 
 (sb-alien:define-alien-routine dlopen system-area-pointer
-  (file sb-c-call:c-string) (mode sb-c-call:int))
+  (file sb-alien:c-string) (mode sb-alien:int))
 (sb-alien:define-alien-routine dlsym system-area-pointer
   (lib system-area-pointer)
-  (name sb-c-call:c-string))
-(sb-alien:define-alien-routine dlerror sb-c-call:c-string)
+  (name sb-alien:c-string))
+(sb-alien:define-alien-routine dlerror sb-alien:c-string)
 
 ;;; Ensure that we've opened our own binary so we can dynamically resolve 
 ;;; symbols in the C runtime.  
index f66fbe1..d3bcd13 100644 (file)
@@ -239,13 +239,13 @@ function should notify the user that the system has finished GC'ing.")
 \f
 ;;;; internal GC
 
-(sb!alien:define-alien-routine collect-garbage sb!c-call:int
-  #!+gencgc (last-gen sb!c-call:int))
+(sb!alien:define-alien-routine collect-garbage sb!alien:int
+  #!+gencgc (last-gen sb!alien:int))
 
-(sb!alien:define-alien-routine set-auto-gc-trigger sb!c-call:void
-  (dynamic-usage sb!c-call:unsigned-long))
+(sb!alien:define-alien-routine set-auto-gc-trigger sb!alien:void
+  (dynamic-usage sb!alien:unsigned-long))
 
-(sb!alien:define-alien-routine clear-auto-gc-trigger sb!c-call:void)
+(sb!alien:define-alien-routine clear-auto-gc-trigger sb!alien:void)
 
 ;;; This variable contains the function that does the real GC. This is
 ;;; for low-level GC experimentation. Do not touch it if you do not
index b0b143b..b7730f1 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
 ;;;; files for more information.
 
-(in-package "SB!C-CALL")
+(in-package "SB!ALIEN")
 
 (/show0 "host-c-call.lisp 12")
 
index 4d27fe5..caf6991 100644 (file)
@@ -9,9 +9,9 @@
 
 (in-package "SB!KERNEL")
 
-(sb!alien:define-alien-routine ("purify" %purify) sb!c-call:void
-  (static-roots sb!c-call:unsigned-long)
-  (read-only-roots sb!c-call:unsigned-long))
+(sb!alien:define-alien-routine ("purify" %purify) sb!alien:void
+  (static-roots sb!alien:unsigned-long)
+  (read-only-roots sb!alien:unsigned-long))
 
 ;;; Compact the info environment. This is written with gratuitous
 ;;; recursion to make sure that our (and compact-info-environment's)
index 4dbcc55..9bd487d 100644 (file)
 \f
 ;;;; Import wait3(2) from Unix.
 
-(sb-alien:define-alien-routine ("wait3" c-wait3) sb-c-call:int
-  (status sb-c-call:int :out)
-  (options sb-c-call:int)
-  (rusage sb-c-call:int))
+(sb-alien:define-alien-routine ("wait3" c-wait3) sb-alien:int
+  (status sb-alien:int :out)
+  (options sb-alien:int)
+  (rusage sb-alien:int))
 
 (defconstant wait-wnohang #-svr4 1 #+svr4 #o100)
 (defconstant wait-wuntraced #-svr4 2 #+svr4 4)
 #-hpux
 ;;; Find the current foreground process group id.
 (defun find-current-foreground-process (proc)
-  (sb-alien:with-alien ((result sb-c-call:int))
+  (sb-alien:with-alien ((result sb-alien:int))
     (multiple-value-bind
          (wonp error)
        (sb-unix:unix-ioctl (sb-sys:fd-stream-fd (process-pty proc))
 #+FreeBSD
 (define-alien-type nil
   (struct sgttyb
-         (sg-ispeed sb-c-call:char)    ; input speed
-         (sg-ospeed sb-c-call:char)    ; output speed
-         (sg-erase sb-c-call:char)     ; erase character
-         (sg-kill sb-c-call:char)      ; kill character
-         (sg-flags sb-c-call:short)))  ; mode flags
+         (sg-ispeed sb-alien:char)     ; input speed
+         (sg-ospeed sb-alien:char)     ; output speed
+         (sg-erase sb-alien:char)      ; erase character
+         (sg-kill sb-alien:char)       ; kill character
+         (sg-flags sb-alien:short)))   ; mode flags
 #+OpenBSD
 (define-alien-type nil
   (struct sgttyb
-         (sg-four sb-c-call:int)
-         (sg-chars (array sb-c-call:char 4))
-         (sg-flags sb-c-call:int)))
+         (sg-four sb-alien:int)
+         (sg-chars (array sb-alien:char 4))
+         (sg-flags sb-alien:int)))
 
 ;;; Find an unused pty. Return three values: the file descriptor for
 ;;; the master side of the pty, the file descriptor for the slave side
             ,@body)
        (sb-sys:deallocate-system-memory ,sap ,size)))))
 
-(sb-alien:define-alien-routine spawn sb-c-call:int
-  (program sb-c-call:c-string)
-  (argv (* sb-c-call:c-string))
-  (envp (* sb-c-call:c-string))
-  (pty-name sb-c-call:c-string)
-  (stdin sb-c-call:int)
-  (stdout sb-c-call:int)
-  (stderr sb-c-call:int))
+(sb-alien:define-alien-routine spawn sb-alien:int
+  (program sb-alien:c-string)
+  (argv (* sb-alien:c-string))
+  (envp (* sb-alien:c-string))
+  (pty-name sb-alien:c-string)
+  (stdin sb-alien:int)
+  (stdout sb-alien:int)
+  (stderr sb-alien:int))
 
 ;;; Is UNIX-FILENAME the name of a file that we can execute?
 (defun unix-filename-is-executable-p (unix-filename)
                             ((zerop result)
                              (return))))
                     (sb-alien:with-alien ((buf (sb-alien:array
-                                                sb-c-call:char
+                                                sb-alien:char
                                                 256)))
                       (multiple-value-bind
                           (count errno)
index ea67cfb..cf3eeff 100644 (file)
@@ -18,7 +18,7 @@
 ;;;; SAVE-LISP-AND-DIE itself
 
 (sb!alien:define-alien-routine "save" (sb!alien:boolean)
-  (file sb!c-call:c-string)
+  (file sb!alien:c-string)
   (initial-fun (sb!alien:unsigned #.sb!vm:n-word-bits)))
 
 ;;; FIXME: When this is run without the PURIFY option,
index 71f5ad8..25ac6ff 100644 (file)
 
 (sb!alien:define-alien-routine ("os_allocate" allocate-system-memory)
                               system-area-pointer
-  (bytes sb!c-call:unsigned-long))
+  (bytes sb!alien:unsigned-long))
 
 (sb!alien:define-alien-routine ("os_allocate_at" allocate-system-memory-at)
                               system-area-pointer
   (address system-area-pointer)
-  (bytes sb!c-call:unsigned-long))
+  (bytes sb!alien:unsigned-long))
 
 (sb!alien:define-alien-routine ("os_reallocate" reallocate-system-memory)
                               system-area-pointer
   (old system-area-pointer)
-  (old-size sb!c-call:unsigned-long)
-  (new-size sb!c-call:unsigned-long))
+  (old-size sb!alien:unsigned-long)
+  (new-size sb!alien:unsigned-long))
 
 (sb!alien:define-alien-routine ("os_deallocate" deallocate-system-memory)
-                              sb!c-call:void
+                              sb!alien:void
   (addr system-area-pointer)
-  (bytes sb!c-call:unsigned-long))
+  (bytes sb!alien:unsigned-long))
index 4b70eaf..d9575b8 100644 (file)
@@ -1,5 +1,10 @@
-;;;; This file contains some extensions to the Alien facility to
-;;;; simplify importing C interfaces.
+;;;; FIXME: This file and host-c-call.lisp are separate from the
+;;;; rest of the alien source code for historical reasons: CMU CL
+;;;; made a distinction between the stuff in the C-CALL package and
+;;;; stuff in the ALIEN package. There's no obvious boundary
+;;;; there, though, and SBCL doesn't try to make this distinction,
+;;;; so it might make sense to just merge these files in with the
+;;;; rest of the SB-ALIEN code.
 
 ;;;; This software is part of the SBCL system. See the README file for
 ;;;; more information.
@@ -10,7 +15,7 @@
 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
 ;;;; files for more information.
 
-(in-package "SB!C-CALL")
+(in-package "SB!ALIEN")
 \f
 ;;;; extra types
 
 (define-alien-type-translator void ()
   (parse-alien-type '(values) (sb!kernel:make-null-lexenv)))
 \f
-#+nil 
-(define-alien-routine strlen integer
-  (s (* char)))
-
 (defun %naturalize-c-string (sap)
   (declare (type system-area-pointer sap))
   (with-alien ((ptr (* char) sap))
index 8ef4ca9..127e2ea 100644 (file)
                :use '("COMMON-LISP"
                       ;; ANSI encourages us to put extension packages
                       ;; in the USE list of COMMON-LISP-USER.
-                      "SB!ALIEN" "SB!C-CALL" "SB!DEBUG"
+                      "SB!ALIEN" "SB!ALIEN" "SB!DEBUG"
                       "SB!EXT" "SB!GRAY" "SB!PROFILE"))
 
   ;; Now do the *!DEFERRED-USE-PACKAGES*.
index 1ae74ff..447d181 100644 (file)
@@ -18,9 +18,9 @@
 ;;;; system calls that deal with signals
 
 #!-sb-fluid (declaim (inline real-unix-kill))
-(sb!alien:define-alien-routine ("kill" real-unix-kill) sb!c-call:int
-  (pid sb!c-call:int)
-  (signal sb!c-call:int))
+(sb!alien:define-alien-routine ("kill" real-unix-kill) sb!alien:int
+  (pid sb!alien:int)
+  (signal sb!alien:int))
 
 ;;; Send the signal SIGNAL to the process with process id PID. SIGNAL
 ;;; should be a valid signal number or a keyword of the standard UNIX
@@ -29,9 +29,9 @@
   (real-unix-kill pid (unix-signal-number signal)))
 
 #!-sb-fluid (declaim (inline real-unix-killpg))
-(sb!alien:define-alien-routine ("killpg" real-unix-killpg) sb!c-call:int
-  (pgrp sb!c-call:int)
-  (signal sb!c-call:int))
+(sb!alien:define-alien-routine ("killpg" real-unix-killpg) sb!alien:int
+  (pgrp sb!alien:int)
+  (signal sb!alien:int))
 
 ;;; Send the signal SIGNAL to the all the process in process group
 ;;; PGRP. SIGNAL should be a valid signal number or a keyword of the
 ;;; but you might also consider doing things the SBCL way and moving
 ;;; this kind of C-level work down to C wrapper functions.)
 (sb!alien:define-alien-routine ("sigsetmask" unix-sigsetmask)
-                              sb!c-call:unsigned-long
-  (mask sb!c-call:unsigned-long))
+                              sb!alien:unsigned-long
+  (mask sb!alien:unsigned-long))
 \f
 ;;;; C routines that actually do all the work of establishing signal handlers
 (sb!alien:define-alien-routine ("install_handler" install-handler)
-                              sb!c-call:unsigned-long
-  (signal sb!c-call:int)
-  (handler sb!c-call:unsigned-long))
+                              sb!alien:unsigned-long
+  (signal sb!alien:int)
+  (handler sb!alien:unsigned-long))
 \f
 ;;;; interface to enabling and disabling signal handlers
 
index f9acccc..33d39cd 100644 (file)
@@ -82,9 +82,9 @@
 ;;; Returns two values:
 ;;;  - the minutes west of GMT.
 ;;;  - T if daylight savings is in effect, NIL if not.
-(sb!alien:define-alien-routine get-timezone sb!c-call:void
-  (when sb!c-call:long :in)
-  (minutes-west sb!c-call:int :out)
+(sb!alien:define-alien-routine get-timezone sb!alien:void
+  (when sb!alien:long :in)
+  (minutes-west sb!alien:int :out)
   (daylight-savings-p sb!alien:boolean :out))
 
 ;;; Subtract from the returned Internal-Time to get the universal
index ec2c638..3624f60 100644 (file)
            (tm-gmtoff long) ;  Seconds east of UTC.
            (tm-zone c-string))) ; Timezone abbreviation.
 
-(define-alien-routine get-timezone sb!c-call:void
-  (when sb!c-call:long :in)
-  (minutes-west sb!c-call:int :out)
+(define-alien-routine get-timezone sb!alien:void
+  (when sb!alien:long :in)
+  (minutes-west sb!alien:int :out)
   (daylight-savings-p sb!alien:boolean :out))
 
 (defun unix-get-minutes-west (secs)
index 9db2eeb..d3c1e2b 100644 (file)
@@ -16,7 +16,6 @@
 ;;; able to express features which we don't happen to use.
 (export '(package-data
          package-data-name
-         package-data-nicknames
          package-data-export
          package-data-reexport
          package-data-import-from
@@ -26,8 +25,6 @@
   (name (error "missing PACKAGE-DATA-NAME datum"))
   ;; a doc string
   (doc (error "missing PACKAGE-DOC datum"))
-  ;; a list of string designators for package nicknames
-  nicknames
   ;; a tree containing names for exported symbols which'll be set up at package
   ;; creation time, and NILs, which are ignored. (This is a tree in order to
   ;; allow constructs like '("ENOSPC" #!+LINUX ("EDQUOT" "EISNAM" "ENAVAIL"
     (dolist (package-data package-data-list)
       (let* ((package (make-package
                       (package-data-name package-data)
-                      :nicknames (package-data-nicknames package-data)
+                      ;; Note: As of 0.7.0, the only nicknames we use
+                      ;; for our implementation packages are hacks
+                      ;; not needed at cross-compile time (e.g. the
+                      ;; deprecated SB-C-CALL nickname for SB-ALIEN).
+                      ;; So support for nicknaming during xc is gone,
+                      ;; since any nicknames are hacked in during
+                      ;; cold init.
+                      :nicknames nil
                       :use nil)))
        #-clisp ; As of "2.27 (released 2001-07-17) (built 3215971334)"
                ; CLISP didn't support DOCUMENTATION on PACKAGE values.
index 8199d50..7a615fc 100644 (file)
                          new-package-name
                          (package-nicknames package)))))))
 
+;;; FIXME: This nickname is a deprecated hack for backwards
+;;; compatibility with code which assumed the CMU-CL-style
+;;; SB-ALIEN/SB-C-CALL split. That split went away and was deprecated
+;;; in 0.7.0, so we should get rid of this nickname after a while.
+(let ((package (find-package "SB-ALIEN")))
+  (rename-package package
+                 (package-name package)
+                 (cons "SB-C-CALL" (package-nicknames package))))
+
 ;;; KLUDGE: This is created here (instead of in package-data-list.lisp-expr)
 ;;; because it doesn't have any symbols in it, so even if it's
 ;;; present at cold load time, genesis thinks it's unimportant
index 15fc096..3c71cd7 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.pre7.139"
+"0.pre7.140"