From 819361859153ed4a58598864015d84b9a1fea9e6 Mon Sep 17 00:00:00 2001
From: pw <pw>
Date: Wed, 5 Feb 1997 18:13:01 +0000
Subject: [PATCH] initial post 1.3.7 merge

---
 hemlock/macros.lisp    |  4 ++--
 lisp/Config.hp700_ux90 | 12 +++++-------
 lisp/gc.c              |  6 ++++--
 lisp/interrupt.c       |  7 +++++--
 lisp/purify.c          | 18 +++++++++++-------
 lisp/undefineds.h      | 32 +++++++++++++++-----------------
 tools/mk-lisp          | 21 ++-------------------
 7 files changed, 44 insertions(+), 56 deletions(-)

diff --git a/hemlock/macros.lisp b/hemlock/macros.lisp
index d2c149ebf..daa2f06cd 100644
--- a/hemlock/macros.lisp
+++ b/hemlock/macros.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/macros.lisp,v 1.6 1994/10/31 04:50:12 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/macros.lisp,v 1.7 1997/02/05 18:08:03 pw Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -383,7 +383,7 @@
 (eval-when (compile load eval)
 (defun command-case-tag (tag key-event char)
   (cond ((and (characterp tag) (standard-char-p tag))
-	 `(char= ,char ,tag))
+	 `(and ,char (char= ,char ,tag)))
 	((and (symbolp tag) (keywordp tag))
 	 `(logical-key-event-p ,key-event ,tag))
 	(t
diff --git a/lisp/Config.hp700_ux90 b/lisp/Config.hp700_ux90
index 904f48e88..7b8fb028d 100644
--- a/lisp/Config.hp700_ux90
+++ b/lisp/Config.hp700_ux90
@@ -1,5 +1,4 @@
-CPPFLAGS = -Dparisc -I. \
-	-I/usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.05/2.7.0/include \
+CPPFLAGS = -Dparisc -I. -I/usr/local/lib/gcc-lib/hppa1.1-hp-hpux/2.6.0/include \
 	-I/usr/include -I/usr/include/X11R5
 LINK.o = gcc $(LDFLAGS) $(TARGET_ARCH)
 CC = gcc
@@ -7,12 +6,11 @@ NM = hpux-nm
 CFLAGS = -O
 ASFLAGS = -O -DNEW_FORMAT
 UNDEFSYMPATTERN=-u &
-ASSEM_SRC = hppa-assem.s
+ASSEM_SRC = hppa-assem.S
 ARCH_SRC = hppa-arch.c
 OS_SRC = hpux-os.c
 OS_LINK_FLAGS= -Wl,-a,archive
-OS_LIBS= -lBSD
-
-%.o: %.s
-	cc -Dparisc -c $< -o $@
+OS_LIBS= -lBSD /lib/pa1.1/libm.a
 
+%.o: %.S
+	$(PREPROCESS.S) $< | as -o $@
diff --git a/lisp/gc.c b/lisp/gc.c
index 1e6b540a7..a458235de 100644
--- a/lisp/gc.c
+++ b/lisp/gc.c
@@ -1,7 +1,7 @@
 /*
  * Stop and Copy GC based on Cheney's algorithm.
  *
- * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gc.c,v 1.9 1994/10/24 20:02:41 ram Exp $
+ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/gc.c,v 1.10 1997/02/05 18:01:13 pw Exp $
  * 
  * Written by Christopher Hoover.
  */
@@ -483,8 +483,10 @@ static void scavenge_interrupt_context(struct sigcontext *context)
 	for (i = 0; i < (sizeof(boxed_registers) / sizeof(int)); i++) {
 		int index;
 	        lispobj foo;
-
+		
 		index = boxed_registers[i];
+		if (index==reg_NFP)
+		  continue;
                 foo = SC_REG(context,index);
                 scavenge((lispobj *) &foo, 1);
                 SC_REG(context,index) = foo;
diff --git a/lisp/interrupt.c b/lisp/interrupt.c
index d89f90d36..a4837f32e 100644
--- a/lisp/interrupt.c
+++ b/lisp/interrupt.c
@@ -1,4 +1,4 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.6 1997/01/21 00:28:13 ram Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.7 1997/02/05 18:01:15 pw Exp $ */
 
 /* Interrupt handing magic. */
 
@@ -61,7 +61,10 @@ void
 fake_foreign_function_call(struct sigcontext *context)
 {
     int context_index;
-    
+#ifndef i386
+    lispobj oldcont;
+#endif
+
     /* Get current LISP state from context */
 #ifdef reg_ALLOC
     current_dynamic_space_free_pointer = (lispobj *)SC_REG(context, reg_ALLOC);
diff --git a/lisp/purify.c b/lisp/purify.c
index 687686a70..d5b12ae6b 100644
--- a/lisp/purify.c
+++ b/lisp/purify.c
@@ -1,6 +1,6 @@
 /* Purify. */
 
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/purify.c,v 1.7 1997/01/21 00:28:13 ram Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/purify.c,v 1.8 1997/02/05 18:01:18 pw Exp $ */
 
 /* This file has been hacked a bunch by Werkowski as part of
  * the x86 port. Stack direction changes as well as more conservative
@@ -325,13 +325,14 @@ static lispobj ptrans_code(lispobj thing)
     code = (struct code *)PTR(thing);
     nwords = HeaderValue(code->header) + fixnum_value(code->code_size);
 
+#if defined(i386)
     /* Moving machine code around does not work on the x86 port, but
        byte compiled function code blocks can be moved.  Perhaps for
        all byte compiled code blocks the entry_points slot is nil.
        Check and print a warning. */
     if ( (code->entry_points) != NIL )
       fprintf(stderr,"** ptrans_code(%x)\n",thing);
-
+#endif
     new = (struct code *)read_only_free;
     read_only_free += CEILING(nwords, 2);
 
@@ -394,10 +395,10 @@ static lispobj ptrans_func(lispobj thing, lispobj header)
     if (TypeOf(header) == type_FunctionHeader ||
         TypeOf(header) == type_ClosureFunctionHeader) {
 
-      /* Moving code around is not good on the x86 port; print a
-	 warning. */
+#if defined(i386)
+      /* Moving code around is not good on the x86 port; print a warning. */
       fprintf(stderr,"ptrans_function(%x, %x)\n",thing,header);
-
+#endif
 	/* We can only end up here if the code object has not been */
         /* scavenged, because if it had been scavenged, forwarding pointers */
         /* would have been left behind for all the entry points. */
@@ -954,17 +955,20 @@ int purify(lispobj static_roots, lispobj read_only_roots)
     SetSymbolValue(STATIC_SPACE_FREE_POINTER, (lispobj)static_free);
     
 #if !defined(ibmrt) && !defined(i386)
+    /* normal case for most ports */
     current_dynamic_space_free_pointer = current_dynamic_space;
-#endif
-
+#else
 #if defined X86_CGC_ACTIVE_P
+    /* X86 using CGC */
     if(SymbolValue(X86_CGC_ACTIVE_P) != T)
       SetSymbolValue(ALLOCATION_POINTER, (lispobj)current_dynamic_space);
     else
       cgc_free_heap();
 #else
+    /* ibmrt or X86 using GC */
     SetSymbolValue(ALLOCATION_POINTER, (lispobj)current_dynamic_space);
 #endif
+#endif
 
 #ifdef PRINTNOISE
     printf(" Done.]\n");
diff --git a/lisp/undefineds.h b/lisp/undefineds.h
index c98a25794..7004dbc24 100644
--- a/lisp/undefineds.h
+++ b/lisp/undefineds.h
@@ -1,5 +1,5 @@
 /* Routines that must be linked into the core for lisp to work. */
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/undefineds.h,v 1.9 1997/01/21 00:28:13 ram Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/undefineds.h,v 1.10 1997/02/05 18:01:19 pw Exp $ */
 
 /* Pick up all the syscalls. */
 accept,
@@ -31,30 +31,30 @@ fork,
 fstat,
 fsync,
 ftruncate,
-#if !defined(hpux) && !defined(SVR4)
+#if !defined(hpux) && !defined(SVR4) || defined(SOLARIS25)
 getdtablesize,
 #endif
 getegid,
 geteuid,
 getgid,
 getgroups,
-#ifndef SOLARIS
+#if !defined (SOLARIS) || defined(SOLARIS25)
 gethostid,
 #endif
 gethostname,
 getitimer,
-#if !defined(hpux) && !defined(SVR4)
+#if !defined(hpux) && !defined(SVR4) || defined(SOLARIS25)
 getpagesize,
 #endif
 getpeername,
 getpgrp,
 getpid,
 getppid,
-#ifndef SVR4
+#if !defined(SVR4)  ||  defined(SOLARIS25)
 getpriority,
 #endif
 getrlimit,
-#ifndef SOLARIS
+#if !defined(SOLARIS) ||  defined(SOLARIS25)
 getrusage,
 #endif
 getsockname,
@@ -99,21 +99,21 @@ send,
 sendmsg,
 sendto,
 setgroups,
-#if !defined(SUNOS) && !defined(SOLARIS)
+#if !defined(SUNOS) && !defined(SOLARIS) ||  defined(SOLARIS25)
 sethostid,
 #endif
-#ifndef SVR4
+#if !defined(SVR4) ||  defined(SOLARIS25)
 sethostname,
 #endif
 setitimer,
 setpgrp,
-#ifndef SVR4
+#if !defined(SVR4) ||  defined(SOLARIS25)
 setpriority,
 #endif
-#ifdef mach
+#if !defined(mach) && !defined(SOLARIS) && !defined(__FreeBSD__)
 setquota,
 #endif
-#if !defined(hpux) && !defined(SVR4)
+#if !defined(hpux) && !defined(SVR4) ||  defined(SOLARIS25)
 setregid,
 setreuid,
 #endif
@@ -128,7 +128,7 @@ sigpause,
 #if !defined(ibmrt) && !defined(hpux) && !defined(SVR4) && !defined(i386)
 sigreturn,
 #endif
-#if !defined SVR4 && !defined __FreeBSD__
+#if !defined(SVR4) && !defined(__FreeBSD__)
 sigsetmask,
 #ifndef __linux__
 sigstack,
@@ -164,11 +164,11 @@ utimes,
 #ifndef irix
 vfork,
 #endif
-#if !defined osf1 && !defined __FreeBSD__
+#if !defined(osf1) && !defined(__FreeBSD__)
 vhangup,
 #endif
 wait,
-#ifndef SOLARIS
+#if !defined(SOLARIS) ||  defined(SOLARIS25)
 wait3,
 #endif
 write,
@@ -187,11 +187,9 @@ atan2,
 sinh,
 cosh,
 tanh,
-#ifndef hpux
 asinh,
 acosh,
 atanh,
-#endif
 exp,
 #ifndef hpux
 expm1,
@@ -229,7 +227,7 @@ dlclose,
 dlerror,
 #endif
 #endif
-#ifndef SOLARIS
+#if !defined (SOLARIS) ||  defined(SOLARIS25)
 getwd,
 #endif
 ttyname
diff --git a/tools/mk-lisp b/tools/mk-lisp
index c39350d20..3a21ca64f 100755
--- a/tools/mk-lisp
+++ b/tools/mk-lisp
@@ -2,30 +2,13 @@
 #
 #  mk-lisp -- script for building full lisp cores.
 #
-# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/mk-lisp,v 1.16 1993/08/03 11:08:42 ram Exp $
+# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/Attic/mk-lisp,v 1.17 1997/02/05 18:13:01 pw Exp $
 
+# ignore historical option
 if ($#argv) then
     if ($argv[1] == "-now") then
-	set later = 0
 	shift
-    else
-	set later = 1
     endif
-else
-    set later = 1
-endif
-
-if ($later) then
-    set delay = (205 45 15 0)
-    set msg = ("in 5 minutes" "in 1 minute" "in 15 seconds" "now")
-  nextmsg:
-    foreach name (`who | sed -e 's/\([^ ]*\)  *\([^ ]*\) .*/\1:\2/'`)
-	echo Building core $msg[1] | write `echo $name | sed -e 's/:/ /'`
-    end
-    sleep $delay[1]
-    shift delay
-    shift msg
-    if ($#delay) goto nextmsg
 endif
 
 if ($#argv) then
-- 
GitLab