From 95dadf0341e9a47b448ab30f51c33c60c451a207 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 4 Jan 2009 07:23:03 +0000 Subject: [PATCH] 1.0.24.20: misc HPPA & HPUX updates * "To make it compile and run". * Config.hppa-hpux missed from 1.0.24.18. * Patch by Larry Valkama. --- src/runtime/Config.hppa-hpux | 37 +++++++++++++++++++++++++++++++++++++ src/runtime/breakpoint.c | 2 +- src/runtime/cheneygc.c | 4 ++-- src/runtime/interrupt.c | 8 ++++++++ src/runtime/time.c | 5 +++++ version.lisp-expr | 2 +- 6 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/runtime/Config.hppa-hpux diff --git a/src/runtime/Config.hppa-hpux b/src/runtime/Config.hppa-hpux new file mode 100644 index 0000000..fec282b --- /dev/null +++ b/src/runtime/Config.hppa-hpux @@ -0,0 +1,37 @@ +# -*- makefile -*- for the C-level run-time support for SBCL + +# This software is part of the SBCL system. See the README file for +# more information. +# +# This software is derived from the CMU CL system, which was +# written at Carnegie Mellon University and released into the +# public domain. The software is in the public domain and is +# provided with absolutely no warranty. See the COPYING and CREDITS +# files for more information. + +LINKFLAGS += -v +# avoid native tools +NM = /usr/local/bin/nm +CC = /usr/local/bin/gcc + +ASSEM_SRC = hppa-assem.S ldso-stubs.S +ARCH_SRC = hppa-arch.c +OS_SRC = hpux-os.c hppa-hpux-os.c + +OS_LIBS = + +CFLAGS += -D_POSIX_SOURCE -D_HPUX_SOURCE + +ifdef LISP_FEATURE_LARGEFILE + CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +endif + +ifdef LISP_FEATURE_SB_THREAD + OS_LIBS += -lpthread +endif + +GC_SRC = cheneygc.c + +# Nothing to do for after-grovel-headers. +.PHONY: after-grovel-headers +after-grovel-headers: diff --git a/src/runtime/breakpoint.c b/src/runtime/breakpoint.c index f7f9e90..18f96d8 100644 --- a/src/runtime/breakpoint.c +++ b/src/runtime/breakpoint.c @@ -104,7 +104,7 @@ static long compute_offset(os_context_t *context, lispobj code) else { unsigned long code_start; struct code *codeptr = (struct code *)native_pointer(code); -#ifdef parisc +#ifdef LISP_FEATURE_HPPA unsigned long pc = *os_context_pc_addr(context) & ~3; #else unsigned long pc = *os_context_pc_addr(context); diff --git a/src/runtime/cheneygc.c b/src/runtime/cheneygc.c index 4253892..2ba6250 100644 --- a/src/runtime/cheneygc.c +++ b/src/runtime/cheneygc.c @@ -597,7 +597,7 @@ void set_auto_gc_trigger(os_vm_size_t dynamic_usage) lose("set_auto_gc_trigger: tried to set gc trigger too high! (0x%08lx)\n", (unsigned long)dynamic_usage); -#if defined(SUNOS) || defined(SOLARIS) +#if defined(SUNOS) || defined(SOLARIS) || defined(LISP_FEATURE_HPUX) os_invalidate(addr, length); #else os_protect(addr, length, 0); @@ -617,7 +617,7 @@ void clear_auto_gc_trigger(void) addr = (os_vm_address_t)current_auto_gc_trigger; length = dynamic_space_size + (os_vm_address_t)current_dynamic_space - addr; -#if defined(SUNOS) || defined(SOLARIS) +#if defined(SUNOS) || defined(SOLARIS) || defined(LISP_FEATURE_HPUX) /* don't want to force whole space into swapping mode... */ os_validate(addr, length); #else diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index e72bdd9..1e95741 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -86,8 +86,10 @@ sigaddset_deferrable(sigset_t *s) sigaddset(s, SIGTSTP); sigaddset(s, SIGCHLD); sigaddset(s, SIGIO); +#ifndef LISP_FEATURE_HPUX sigaddset(s, SIGXCPU); sigaddset(s, SIGXFSZ); +#endif sigaddset(s, SIGVTALRM); sigaddset(s, SIGPROF); sigaddset(s, SIGWINCH); @@ -281,6 +283,12 @@ fake_foreign_function_call(os_context_t *context) lose("dead in fake_foreign_function_call, context = %x\n", context); } #endif +/* why doesnt PPC and SPARC do something like this: */ +#if defined(LISP_FEATURE_HPPA) + if ((long)dynamic_space_free_pointer & 4) { + lose("dead in fake_foreign_function_call, context = %x, d_s_f_p = %x\n", context, dynamic_space_free_pointer); + } +#endif #endif #ifdef reg_BSP current_binding_stack_pointer = diff --git a/src/runtime/time.c b/src/runtime/time.c index 82ffab2..7b4b167 100644 --- a/src/runtime/time.c +++ b/src/runtime/time.c @@ -18,6 +18,11 @@ #include "sbcl.h" #include "runtime.h" +#ifdef LISP_FEATURE_HPUX +struct tm *gmtime_r(const time_t *timer, struct tm *result); +struct tm *localtime_r(const time_t *timer, struct tm *result); +#endif + void get_timezone(time_t when, int *secwest, boolean *dst) { struct tm ltm, gtm; diff --git a/version.lisp-expr b/version.lisp-expr index 297a8de..000af67 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.24.19" +"1.0.24.20" -- 1.7.10.4