version 1.152, 2005/08/02 12:00:52
|
version 1.153, 2005/08/21 22:09:15
|
Line 88 void engine_callback(Xt* fcall, void * a
|
Line 88 void engine_callback(Xt* fcall, void * a
|
} |
} |
#endif |
#endif |
|
|
|
#ifdef HAS_LIBFFI |
|
Cell *RP; |
|
Address LP; |
|
|
|
#include <ffi.h> |
|
|
|
void ** clist; |
|
void * ritem; |
|
|
|
void ffi_callback(ffi_cif * cif, void * resp, void ** args, Xt * ip) |
|
{ |
|
Cell *rp = RP; |
|
Cell *sp = SP; |
|
Float *fp = FP; |
|
Address lp = LP; |
|
|
|
clist = args; |
|
ritem = resp; |
|
|
|
engine(ip, sp, rp, fp, lp); |
|
|
|
/* restore global variables */ |
|
RP = rp; |
|
SP = sp; |
|
FP = fp; |
|
LP = lp; |
|
} |
|
#endif |
|
|
#ifdef GFORTH_DEBUGGING |
#ifdef GFORTH_DEBUGGING |
/* define some VM registers as global variables, so they survive exceptions; |
/* define some VM registers as global variables, so they survive exceptions; |
global register variables are not up to the task (according to the |
global register variables are not up to the task (according to the |
Line 1819 SIZE arguments consist of an integer fol
|
Line 1848 SIZE arguments consist of an integer fol
|
void print_diag() |
void print_diag() |
{ |
{ |
|
|
#if !defined(HAVE_GETRUSAGE) || !defined(HAS_FFCALL) |
#if !defined(HAVE_GETRUSAGE) || (!defined(HAS_FFCALL) && !defined(HAS_LIBFFI)) |
fprintf(stderr, "*** missing functionality ***\n" |
fprintf(stderr, "*** missing functionality ***\n" |
#ifndef HAVE_GETRUSAGE |
#ifndef HAVE_GETRUSAGE |
" no getrusage -> CPUTIME broken\n" |
" no getrusage -> CPUTIME broken\n" |
#endif |
#endif |
#ifndef HAS_FFCALL |
#if !defined(HAS_FFCALL) && !defined(HAS_LIBFFI) |
" no ffcall -> only old-style foreign function calls (no fflib.fs)\n" |
" no ffcall -> only old-style foreign function calls (no fflib.fs)\n" |
#endif |
#endif |
); |
); |