From c9dd646e87ef73c961b62e1eb1ba3fae0f4a6174 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Mon, 22 Feb 1999 11:26:42 +0000 Subject: [PATCH] Post Linux-Alpha patch cleanup. --- code/unix-glibc2.lisp | 5 +++-- lisp/Linux-os.c | 23 +++-------------------- lisp/Linux-os.h | 28 +++++++++------------------- 3 files changed, 15 insertions(+), 41 deletions(-) diff --git a/code/unix-glibc2.lisp b/code/unix-glibc2.lisp index faeec949e..0cd7e27a9 100644 --- a/code/unix-glibc2.lisp +++ b/code/unix-glibc2.lisp @@ -5,12 +5,13 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix-glibc2.lisp,v 1.4 1999/02/20 15:54:39 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix-glibc2.lisp,v 1.5 1999/02/22 11:26:42 dtc Exp $") ;;; ;;; ********************************************************************** ;;; ;;; This file contains the UNIX low-level support for glibc2. Based -;;; on unix.lisp 1.56, converted for glibc2 by Peter Van Eynde (1998) +;;; on unix.lisp 1.56, converted for glibc2 by Peter Van Eynde (1998). +;;; Alpha support by Julian Dolby, 1999. ;;; ;;; All the functions with #+nil in front are work in progress, ;;; and mostly don't work. diff --git a/lisp/Linux-os.c b/lisp/Linux-os.c index 5135dea28..4d19474df 100644 --- a/lisp/Linux-os.c +++ b/lisp/Linux-os.c @@ -13,8 +13,9 @@ * Much hacked by Paul Werkowski * Morfed from the FreeBSD file by Peter Van Eynde (July 1996) * GENCGC support by Douglas Crosher, 1996, 1997. + * Alpha support by Julian Dolby, 1999. * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.6 1999/02/20 15:54:42 pw Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.7 1999/02/22 11:26:41 dtc Exp $ * */ @@ -105,7 +106,7 @@ os_init(void) #endif } -#ifndef __alpha__ +#ifdef i386 int #if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6) sc_reg(struct sigcontext *c, int offset) @@ -335,21 +336,3 @@ os_install_interrupt_handlers(void) interrupt_install_low_level_handler(SIGSEGV,sigsegv_handler); interrupt_install_low_level_handler(SIGBUS,sigbus_handler); } - -#if 0 -/* functions that disapear ! */ -#define Force_Fct(fct) int * Force_ ## fct (void) {return &fct;} - -Force_Fct(select) -Force_Fct(stat) -Force_Fct(lstat) -Force_Fct(fstat) -Force_Fct(socket) -Force_Fct(connect) -Force_Fct(listen) -Force_Fct(recv) -Force_Fct(accept) -Force_Fct(bind) -#endif - - diff --git a/lisp/Linux-os.h b/lisp/Linux-os.h index d14837dca..50dcad082 100644 --- a/lisp/Linux-os.h +++ b/lisp/Linux-os.h @@ -1,9 +1,11 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.h,v 1.8 1999/02/20 15:54:42 pw Exp $ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.h,v 1.9 1999/02/22 11:26:42 dtc Exp $ This code was written as part of the CMU Common Lisp project at Carnegie Mellon University, and has been placed in the public domain. Morfed from the FreeBSD file by Peter Van Eynde (July 1996) + Alpha support by Julian Dolby, 1999. + */ #include <stdlib.h> @@ -60,7 +62,7 @@ typedef struct sigcontext_struct sigcontext; so there is no need to define the following for Alpha Linux */ -#ifndef __alpha__ +#ifdef i386 #if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6) #define HANDLER_ARGS int signal, struct sigcontext contextstruct @@ -70,13 +72,7 @@ typedef struct sigcontext_struct sigcontext; #define GET_CONTEXT int code=0; struct sigcontext_struct *context=&contextstruct; #endif -#endif /* __alpha__ */ - -#ifdef i386 #define setfpucw(cw) asm("fldcw %0" : : "m" (cw)); -#endif - -#if 0 #define sigvec sigaction #define sv_mask sa_mask @@ -94,8 +90,6 @@ typedef struct sigcontext_struct sigcontext; #else #define sigcontext sigcontext_struct #endif -#define sa_sigaction sa_handler -#define SA_SIGINFO 0 #define sc_efl eflags #define sc_eax eax @@ -107,16 +101,12 @@ typedef struct sigcontext_struct sigcontext; #define sc_esi esi #define sc_edi edi -#endif /* 0 */ +#define SA_SIGINFO 0 + +#endif /* i386 */ #ifdef alpha #define uc_sigmask sc_mask -#else -#define uc_sigmask oldmask -#define sc_pc eip -#define sc_mask oldmask -#define sc_efl eflags -#define sc_sp esp -#endif +#endif /* alpha */ + #define sa_sigaction sa_handler -#define SA_SIGINFO 0 -- GitLab