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

db4
Slava Pestov 2008-03-29 05:30:48 -05:00
commit a00e325b96
4 changed files with 31 additions and 1 deletions

10
vm/os-solaris-x86.32.h Normal file
View File

@ -0,0 +1,10 @@
#include <ucontext.h>
INLINE void *ucontext_stack_pointer(void *uap)
{
ucontext_t *ucontext = (ucontext_t *)uap;
return (void *)ucontext->uc_mcontext.gregs[ESP];
}
#define UAP_PROGRAM_COUNTER(ucontext) \
(((ucontext_t *)(ucontext))->uc_mcontext.gregs[EIP])

10
vm/os-solaris-x86.64.h Normal file
View File

@ -0,0 +1,10 @@
#include <ucontext.h>
INLINE void *ucontext_stack_pointer(void *uap)
{
ucontext_t *ucontext = (ucontext_t *)uap;
return (void *)ucontext->uc_mcontext.gregs[RSP];
}
#define UAP_PROGRAM_COUNTER(ucontext) \
(((ucontext_t *)(ucontext))->uc_mcontext.gregs[RIP])

View File

@ -1,2 +1,4 @@
#define UNKNOWN_TYPE_P(file) 1
#define DIRECTORY_P(file) 0
extern char **environ;

View File

@ -95,8 +95,16 @@
#endif
#elif defined(__SVR4) && defined(sun)
#define FACTOR_OS_STRING "solaris"
#if defined(FACTOR_X86)
#include "os-solaris-x86.32.h"
#elif defined(FACTOR_AMD64)
#incluide "os-solaris-x86.64.h"
#else
#error "Unsupported Solaris flavor"
#endif
#include "os-solaris.h"
#include "os-unix-ucontext.h"
#else
#error "Unsupported OS"
#endif