--- gforth/engine/main.c 2008/05/04 17:04:58 1.206 +++ gforth/engine/main.c 2008/07/03 12:29:05 1.207 @@ -62,11 +62,11 @@ typedef enum prim_num { Cell *gforth_SP; Float *gforth_FP; Address gforth_UP=NULL; - -#ifdef HAS_FFCALL Cell *gforth_RP; Address gforth_LP; +#ifdef HAS_FFCALL + #include va_alist gforth_clist; @@ -93,39 +93,6 @@ void gforth_callback(Xt* fcall, void * a } #endif -#ifdef HAS_LIBFFI -Cell *gforth_RP; -Address gforth_LP; - -#include - -void ** gforth_clist; -void * gforth_ritem; - -void gforth_callback(ffi_cif * cif, void * resp, void ** args, void * ip) -{ - Cell *rp1 = gforth_RP; - Cell *sp = gforth_SP; - Float *fp = gforth_FP; - Address lp = gforth_LP; - void ** clist = gforth_clist; - void * ritem = gforth_ritem; - - gforth_clist = args; - gforth_ritem = resp; - - gforth_engine((Xt *)ip, sp, rp1, fp, lp sr_call); - - /* restore global variables */ - gforth_RP = rp1; - gforth_SP = sp; - gforth_FP = fp; - gforth_LP = lp; - gforth_clist = clist; - gforth_ritem = ritem; -} -#endif - #ifdef GFORTH_DEBUGGING /* define some VM registers as global variables, so they survive exceptions; global register variables are not up to the task (according to the @@ -2217,14 +2184,11 @@ SIZE arguments consist of an integer fol static void print_diag() { -#if !defined(HAVE_GETRUSAGE) || (!defined(HAS_FFCALL) && !defined(HAS_LIBFFI)) +#if !defined(HAVE_GETRUSAGE) fprintf(stderr, "*** missing functionality ***\n" #ifndef HAVE_GETRUSAGE " no getrusage -> CPUTIME broken\n" #endif -#if !defined(HAS_FFCALL) && !defined(HAS_LIBFFI) - " no ffcall -> only old-style foreign function calls (no fflib.fs)\n" -#endif ); #endif if((relocs < nonrelocs) ||