Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2008-04-09 16:58:18 -05:00
commit 1a625385ce
5 changed files with 21 additions and 10 deletions

View File

@ -89,6 +89,11 @@ set_md5sum() {
set_gcc() {
case $OS in
openbsd) ensure_program_installed egcc; CC=egcc;;
netbsd) if [[ $WORD -eq 64 ]] ; then
CC=/usr/pkg/gcc34/bin/gcc
else
CC=gcc
fi ;;
*) CC=gcc;;
esac
}
@ -185,6 +190,7 @@ find_architecture() {
i386) ARCH=x86;;
i686) ARCH=x86;;
amd64) ARCH=x86;;
ppc64) ARCH=ppc;;
*86) ARCH=x86;;
*86_64) ARCH=x86;;
"Power Macintosh") ARCH=ppc;;

View File

@ -1,4 +1,12 @@
#include <ucontext.h>
#define FRAME_RETURN_ADDRESS(frame) *((XT *)(frame_successor(frame) + 1) + 1)
INLINE void *ucontext_stack_pointer(void *uap)
{
ucontext_t *ucontext = (ucontext_t *)uap;
return (void *)ucontext->uc_mcontext.uc_regs->gregs[PT_R1];
}
#define UAP_PROGRAM_COUNTER(ucontext) \
(((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])

View File

@ -16,3 +16,9 @@ DLLEXPORT void c_to_factor_toplevel(CELL quot);
extern char ***_NSGetEnviron(void);
#define environ (*_NSGetEnviron())
#endif
INLINE void *ucontext_stack_pointer(void *uap)
{
ucontext_t *ucontext = (ucontext_t *)uap;
return ucontext->uc_stack.ss_sp;
}

View File

@ -1,7 +0,0 @@
#include <ucontext.h>
INLINE void *ucontext_stack_pointer(void *uap)
{
ucontext_t *ucontext = (ucontext_t *)uap;
return ucontext->uc_stack.ss_sp;
}

View File

@ -27,7 +27,6 @@
#include "os-unix.h"
#ifdef __APPLE__
#include "os-unix-ucontext.h"
#include "os-macosx.h"
#include "mach_signal.h"
@ -84,7 +83,6 @@
#if defined(FACTOR_X86)
#include "os-linux-x86.32.h"
#elif defined(FACTOR_PPC)
#include "os-unix-ucontext.h"
#include "os-linux-ppc.h"
#elif defined(FACTOR_ARM)
#include "os-linux-arm.h"