use COMMON-LISP and COMMON-LISP-USER packages instead of cltl1 LISP and USER packages.

Pascal J. Bourguignon [2015-04-18 00:21]
use COMMON-LISP and COMMON-LISP-USER packages instead of cltl1 LISP and USER packages.
Filename
lib/c_decl.h
src/compiler/clcload.lisp
src/compiler/clicc.lisp
src/compiler/p0init.lisp
src/compiler/p1main.lisp
src/compiler/sexport.lisp
src/runtime/c/foreign.c
src/runtime/lisp/lisp.lisp
src/runtime/lisp2c/lisp.h
src/test/ai-course.lisp
src/test/arrays.lisp
src/test/bindings.lisp
src/test/clos-test.lisp
src/test/eval.lisp
src/test/expert.lisp
src/test/lambda.lisp
src/test/search.lisp
src/test/side-effect.lisp
src/test/testmain.lisp
src/test/time.lisp
src/test/y-fac.lisp
diff --git a/lib/c_decl.h b/lib/c_decl.h
index cd1dbcd..20803e3 100644
--- a/lib/c_decl.h
+++ b/lib/c_decl.h
@@ -28,6 +28,7 @@

 #include <stdio.h>
 #include <setjmp.h>
+#include <string.h> // memcpy

 /*------------------------------------------------------------------------------
  * Konfiguration
diff --git a/src/compiler/clcload.lisp b/src/compiler/clcload.lisp
index c0376c0..72e0038 100644
--- a/src/compiler/clcload.lisp
+++ b/src/compiler/clcload.lisp
@@ -33,7 +33,7 @@
 (pushnew (directory-namestring ccl:*loading-file-source-file*)
          ccl:*module-search-path* :test #'pathname-match-p)

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; System-spezifische Dinge
@@ -75,7 +75,7 @@

 (in-package "FFI")

-(lisp:export
+(cl:export
  '(c-array c-char c-char-p c-double c-double-p c-enum c-float c-float-p c-fun
    c-handle c-int c-int-p c-long c-long-double c-long-double-p c-long-p c-ptr
    c-short c-short-p c-string c-string-p c-struct c-union c-unsigned-char
@@ -86,7 +86,7 @@
    make-lisp-string sys-include user-include)
  "FFI")

-(lisp:in-package "USER")
+(cl:in-package "CL-USER")

 ;;------------------------------------------------------------------------------
 ;; Definition der Funktion rt::c-getenv
@@ -181,7 +181,7 @@

 (in-package "CLICC-LISP")

-(lisp:export '(
+(cl:export '(
           &allow-other-keys &aux &body &environment &key &optional
           &rest &whole * ** *** *break-on-signals* *compile-file-pathname*
           *compile-file-truename* *compile-print* *compile-verbose* *debug-io*
@@ -381,7 +381,7 @@
         "CLICC-LISP"
         )

-(lisp:in-package "USER")
+(cl:in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 (unless (find-package "CLICC-USER")
@@ -391,10 +391,12 @@
 ;; Den Rest in das Package CLICC
 ;;------------------------------------------------------------------------------
 (unless (find-package "CLICC")
-  (make-package "CLICC" :use '(#-mcl "LISP"
-                               #+mcl "COMMON-LISP"
-                               #+CLOS "CLOS"
-                               #+(and PCL (not CLTL2))  "PCL")))
+  (make-package "CLICC" :use '("COMMON-LISP"
+                               ;; #-mcl "LISP"
+                               ;; #+mcl "COMMON-LISP"
+                               ;; #+CLOS "CLOS"
+                               ;; #+(and PCL (not CLTL2))  "PCL"
+                               )))

 (in-package "CLICC")

@@ -406,7 +408,7 @@

 (import
  '(do-lisp-module do-inline-module ask-runtime compile-clicc clicc do-clicc)
- "USER")
+ "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Eigenen Backquote Reader installieren, um eine normierte Darstellung
@@ -474,7 +476,7 @@
   (let* ((lisp-package (find-package "LISP"))
          (lisp-name (package-name lisp-package))
          (lisp-nick (package-nicknames lisp-package))
-         (user-package (find-package "USER"))
+         (user-package (find-package "CL-USER"))
          (user-name (package-name user-package))
          (user-nick (package-nicknames user-package))
          (*package* *package*)
@@ -495,11 +497,11 @@
            (rename-package "CLICC" "original-clicc")
            (when (find-package "CLICC-CLICC")
              (rename-package "CLICC-CLICC" "CLICC"))
-           (rename-package "CLICC-LISP" "LISP")
-           (rename-package "CLICC-USER" "USER")
+           (rename-package "CLICC-LISP" "COMMON-LISP")
+           (rename-package "CLICC-USER" "COMMON-LISP-USER")
            (do-clicc))
-      (rename-package "LISP" "CLICC-LISP" '("L"))
-      (rename-package "USER" "CLICC-USER")
+      (rename-package "COMMON-LISP" "CLICC-LISP" '("L"))
+      (rename-package "COMMON-LISP-USER" "CLICC-USER")
       (when (find-package "CLICC")
         #+allegro-v4.1 (rename-package "CLICC" "CLICC")
         (rename-package "CLICC" "CLICC-CLICC"))
diff --git a/src/compiler/clicc.lisp b/src/compiler/clicc.lisp
index 8719d79..9d30917 100644
--- a/src/compiler/clicc.lisp
+++ b/src/compiler/clicc.lisp
@@ -26,11 +26,11 @@
 ;;; $Id: clicc.lisp,v 1.19 1994/11/25 14:52:56 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "LISP" :nicknames '("CLICC-LISP" "L") :use ())
-(in-package "USER")                     ; Damit es dieses Package wirklich gibt
-(lisp:in-package "RT" :use ())
-(lisp:in-package "FFI" :use ())
-(lisp:export
+(in-package "CL-LISP" :nicknames '("CLICC-LISP" "L") :use ())
+(in-package "CL-USER")                     ; Damit es dieses Package wirklich gibt
+(cl:in-package "RT" :use ())
+(cl:in-package "FFI" :use ())
+(cl:export
  '(c-array c-char c-char-p c-double c-double-p c-enum c-float c-float-p c-fun
    c-handle c-int c-int-p c-long c-long-double c-long-double-p c-long-p c-ptr
    c-short c-short-p c-string c-string-p c-struct c-union c-unsigned-char
@@ -41,7 +41,7 @@
    make-lisp-string sys-include user-include)
  "FFI")

-(lisp:in-package "CLICC" :use '("LISP"))
+(cl:in-package "CLICC" :use '("LISP"))

 ;;------------------------------------------------------------------------------
 (require "clcmain")
diff --git a/src/compiler/p0init.lisp b/src/compiler/p0init.lisp
index e24a7a2..b344d06 100644
--- a/src/compiler/p0init.lisp
+++ b/src/compiler/p0init.lisp
@@ -34,8 +34,8 @@

   (setq *LOCAL-ENVIRONMENT* (make-instance 'env))
   (setq *keyword-package* (find-package "KEYWORD"))
-  (setq *lisp-package* (find-package "LISP"))
-  (setq *user-package* (find-package "USER"))
+  (setq *lisp-package* (find-package "COMMON-LISP"))
+  (setq *user-package* (find-package "COMMON-LISP-USER"))
   (setq *runtime-package* (find-package "RT"))
   (setq *ffi-package* (find-package "FFI"))
   (setq *interface-file-queue* (empty-queue))
diff --git a/src/compiler/p1main.lisp b/src/compiler/p1main.lisp
index 0c3cc3c..d263b04 100644
--- a/src/compiler/p1main.lisp
+++ b/src/compiler/p1main.lisp
@@ -47,7 +47,7 @@
 ;;------------------------------------------------------------------------------
 (defun init-pass1 ()
   (setq *CLICC-REQUIRED*  ())           ; Liste der uebersetzten Module
-  (setq *PACKAGE* (find-package (if *lisp-module* "LISP" "USER")))
+  (setq *PACKAGE* (find-package (if *lisp-module* "COMMON-LISP" "COMMON-LISP-USER")))
   (let ((name (if *module-compiler*
                   (pathname-name *FILENAME*)
                   "main")))
@@ -136,8 +136,8 @@
 ;;------------------------------------------------------------------------------
 (defun p1-end ()
   (unless (slot-boundp *module* 'package)
-    (setf (?package *module*) (find-package "USER"))
-    (add-q (find-package "USER") (?package-list *module*)))
+    (setf (?package *module*) (find-package "COMMON-LISP-USER"))
+    (add-q (find-package "COMMON-LISP-USER") (?package-list *module*)))
   (when *lisp-module*
     (addnew-q (find-package "RT") (?package-list *module*))
     (addnew-q (find-package "FFI") (?package-list *module*)))
@@ -214,9 +214,9 @@
                        (L::find-package
                         ,(package-name (second (?package-list *module*))))))))

-               (if (member (find-package "USER") (?package-list *module*))
+               (if (member (find-package "COMMON-LISP-USER") (?package-list *module*))
                    (list (init-sym/packg)
-                         (p1-form `(L:use-package "LISP" "USER"))
+                         (p1-form `(L:use-package "COMMON-LISP" "COMMON-LISP-USER"))
                          set-*package*)
                    (list (init-sym/packg)
                          set-*package*))))))
diff --git a/src/compiler/sexport.lisp b/src/compiler/sexport.lisp
index 07cc43c..919ed68 100644
--- a/src/compiler/sexport.lisp
+++ b/src/compiler/sexport.lisp
@@ -387,7 +387,7 @@
                     (package-name (p1-eval package-form))
                     (if (slot-boundp *module* 'package)
                         (package-name (?package *module*))
-                        "USER")))))))
+                        "COMMON-LISP-USER")))))))

       ;; Die EXPORTs angeben
       ;; -------------------
diff --git a/src/runtime/c/foreign.c b/src/runtime/c/foreign.c
index d7a1159..3624e6b 100644
--- a/src/runtime/c/foreign.c
+++ b/src/runtime/c/foreign.c
@@ -38,7 +38,22 @@
 #include "sys.h"

 #include <limits.h>
+
+#ifdef LINUX
 #include <values.h>
+#else
+#include <math.h> /* MAXFLOAT */
+#ifndef DBL_MAX
+#define DBL_MAX		1.79769313486231470e+308
+#endif
+#ifndef MAXFLOAT
+#define MAXFLOAT	FLT_MAX
+#endif
+#ifndef MAXDOUBLE
+#define MAXDOUBLE	DBL_MAX
+#endif
+#endif
+
 #define MIN_CHAR SCHAR_MIN
 #define MAX_CHAR SCHAR_MAX
 #define MAX_UNSIGNED_CHAR UCHAR_MAX
diff --git a/src/runtime/lisp/lisp.lisp b/src/runtime/lisp/lisp.lisp
index acc62a4..1c90d4c 100644
--- a/src/runtime/lisp/lisp.lisp
+++ b/src/runtime/lisp/lisp.lisp
@@ -87,7 +87,7 @@
                                    size))
                        nil)
                       (t (error "array type: illegal size ~a" size)))
-                    `(lisp::array-internal ,type ,size))
+                    `(array-internal ,type ,size))
     :superclasses ())
 (def-built-in VECTOR
   :type-expander
@@ -137,7 +137,7 @@
                             (null (cdr high)))
                        (setq high (1- high)))
                       (t (error "integer type: illegal limit ~a" high)))
-                    `(lisp::integer-internal ,low ,high))
+                    `(integer-internal ,low ,high))
     :superclasses (rational))

 (def-built-in SEQUENCE
@@ -189,7 +189,7 @@
                      (or (eq '* x) (and (integerp x) (plusp x)))) size))
      nil)
     (t (error "array type: illegal size ~a" size)))
-   `(lisp::simple-array-internal ,type ,size))
+   `(simple-array-internal ,type ,size))

 (deftype SIMPLE-BIT-VECTOR (&optional size) `(simple-array bit (,size)))
 (deftype SIMPLE-STRING (&optional size) `(simple-array standard-char (,size)))
diff --git a/src/runtime/lisp2c/lisp.h b/src/runtime/lisp2c/lisp.h
index 57aa859..849cc82 100644
--- a/src/runtime/lisp2c/lisp.h
+++ b/src/runtime/lisp2c/lisp.h
@@ -1,3 +1,4 @@
+#include "inline.h"

 extern CL_INIT KClisp[];
 extern CL_INIT Slisp[];
diff --git a/src/test/ai-course.lisp b/src/test/ai-course.lisp
index 68238d7..b99f57c 100644
--- a/src/test/ai-course.lisp
+++ b/src/test/ai-course.lisp
@@ -26,7 +26,7 @@
 ;;; $Id: ai-course.lisp,v 1.15 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Die Funktion `Partitionen' liefert zu einer nichtleeren Menge die Menge aller
diff --git a/src/test/arrays.lisp b/src/test/arrays.lisp
index d58ce75..2a9629c 100644
--- a/src/test/arrays.lisp
+++ b/src/test/arrays.lisp
@@ -26,7 +26,7 @@
 ;;; $Id: arrays.lisp,v 1.4 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Anlegen, Displacen, Ajdusten und Zugriff auf Arrays.
diff --git a/src/test/bindings.lisp b/src/test/bindings.lisp
index 96c11b4..a3ed524 100644
--- a/src/test/bindings.lisp
+++ b/src/test/bindings.lisp
@@ -26,7 +26,7 @@
 ;;; $Id: bindings.lisp,v 1.5 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Funktionsdefinitionen zu den Bindungstests:
diff --git a/src/test/clos-test.lisp b/src/test/clos-test.lisp
index 89d06a9..1c4871a 100644
--- a/src/test/clos-test.lisp
+++ b/src/test/clos-test.lisp
@@ -26,7 +26,7 @@
 ;;; $Id: clos-test.lisp,v 1.8 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Klassendefinitionen
diff --git a/src/test/eval.lisp b/src/test/eval.lisp
index e7ce4b9..77d015e 100644
--- a/src/test/eval.lisp
+++ b/src/test/eval.lisp
@@ -29,7 +29,7 @@
 (unless (find-package "EVAL") (make-package "EVAL" :use NIL))
 (in-package "EVAL" :use NIL)

-(lisp:import '(lisp:defmacro lisp:&rest lisp:progn lisp:defun lisp:quote
+(cl:import '(cl:defmacro lisp:&rest lisp:progn lisp:defun lisp:quote
                lisp:if lisp:null lisp:setf lisp:getf lisp:symbol-plist
                lisp:car lisp:function lisp:cdr
                lisp:let lisp:unless lisp:error lisp:cond lisp:consp
@@ -58,23 +58,23 @@

 (defun eval (sexpr)
   (cond
-    ((consp sexpr) (lisp:apply (symbol-function (car sexpr))
+    ((consp sexpr) (cl:apply (symbol-function (car sexpr))
                                (mapcar #'eval (cdr sexpr))))
     ((symbolp sexpr) (symbol-value sexpr))
     (T sexpr)))

 (defun funcall (f &rest args)
   (if (symbolp f)
-      (lisp:apply (symbol-function f) args)
-      (lisp:apply f args)))
+      (cl:apply (symbol-function f) args)
+      (cl:apply f args)))

 (defun apply (f &rest args)
   (if (symbolp f)
-      (lisp:apply #'lisp:apply (symbol-function f) args)
-      (lisp:apply #'lisp:apply f args)))
+      (cl:apply #'cl:apply (symbol-function f) args)
+      (cl:apply #'cl:apply f args)))


-(lisp:export '(declare-funcallable symbol-function fboundp eval funcall apply))
+(cl:export '(declare-funcallable symbol-function fboundp eval funcall apply))


-(lisp:provide "eval")
+(cl:provide "eval")
diff --git a/src/test/expert.lisp b/src/test/expert.lisp
index 5db9b22..9a5ef9e 100644
--- a/src/test/expert.lisp
+++ b/src/test/expert.lisp
@@ -26,7 +26,7 @@
 ;;; $Id: expert.lisp,v 1.7 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;**************************** S T R E A M S ***********************************

diff --git a/src/test/lambda.lisp b/src/test/lambda.lisp
index 73118df..efa373a 100644
--- a/src/test/lambda.lisp
+++ b/src/test/lambda.lisp
@@ -29,7 +29,7 @@
 ;;; $Id: lambda.lisp,v 1.5 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Definition einer benannten Funktion mit allen Parameterarten:
diff --git a/src/test/search.lisp b/src/test/search.lisp
index 97dfadc..cc5b873 100644
--- a/src/test/search.lisp
+++ b/src/test/search.lisp
@@ -29,7 +29,7 @@
 ;;; $Id: search.lisp,v 1.5 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; The basic class, PROBLEM, contains a single-instance variable to hold
diff --git a/src/test/side-effect.lisp b/src/test/side-effect.lisp
index 3db339b..18e7c92 100644
--- a/src/test/side-effect.lisp
+++ b/src/test/side-effect.lisp
@@ -26,7 +26,7 @@
 ;;; $Id: side-effect.lisp,v 1.7 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Definitionen zu den Bindungstests:
diff --git a/src/test/testmain.lisp b/src/test/testmain.lisp
index 27d53d0..0656fca 100644
--- a/src/test/testmain.lisp
+++ b/src/test/testmain.lisp
@@ -27,7 +27,7 @@
 ;;; $Id: testmain.lisp,v 1.21 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")


 ;;------------------------------------------------------------------------------
diff --git a/src/test/time.lisp b/src/test/time.lisp
index a8d12a0..a778662 100644
--- a/src/test/time.lisp
+++ b/src/test/time.lisp
@@ -27,7 +27,8 @@
 ;;; $Revision: 1.2 $
 ;;; $Id: time.lisp,v 1.2 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------
-(in-package "USER" :use '("LISP" "FFI"))
+(in-package "COMMON-LISP-USER")
+(use-package '("COMMON-LISP" "FFI"))

 (load-foreign "time.def")

diff --git a/src/test/y-fac.lisp b/src/test/y-fac.lisp
index 322deb6..f82b475 100644
--- a/src/test/y-fac.lisp
+++ b/src/test/y-fac.lisp
@@ -27,7 +27,7 @@
 ;;; $Id: y-fac.lisp,v 1.8 1994/11/22 14:45:44 hk Exp $
 ;;;-----------------------------------------------------------------------------

-(in-package "USER")
+(in-package "COMMON-LISP-USER")

 ;;------------------------------------------------------------------------------
 ;; Implementation der Fakultaetsfunktions mittels des Y-Kombinators
ViewGit