--- gforth/prim 1997/09/13 12:04:58 1.6 +++ gforth/prim 1998/07/28 12:29:37 1.10 @@ -1327,7 +1327,7 @@ a_addr = (Cell *)DOES_CODE(xt); code-address! c_addr xt -- gforth code_address_store ""Creates a code field with code address c_addr at xt"" MAKE_CF(xt, c_addr); -CACHE_FLUSH(xt,PFA(0)); +CACHE_FLUSH(xt,(size_t)PFA(0)); : ! ; @@ -1335,7 +1335,7 @@ does-code! a_addr xt -- gforth does_cod ""creates a code field at xt for a defining-word-defined word; a_addr is the start of the Forth code after DOES>"" MAKE_DOES_CF(xt, a_addr); -CACHE_FLUSH(xt,PFA(0)); +CACHE_FLUSH(xt,(size_t)PFA(0)); : dodoes: over ! cell+ ! ; @@ -1343,7 +1343,7 @@ does-handler! a_addr -- gforth does_hand ""creates a DOES>-handler at address a_addr. a_addr usually points just behind a DOES>."" MAKE_DOES_HANDLER(a_addr); -CACHE_FLUSH(a_addr,DOES_HANDLER_SIZE); +CACHE_FLUSH((caddr_t)a_addr,DOES_HANDLER_SIZE); : drop ; @@ -2004,19 +2004,22 @@ define(argclist, \ icall(argnum) define(icall, `icall$1 argflist($1)u -- uret gforth -uret = ((Cell(*)(argdlist($1)))u)(argclist($1)); +uret = (SYSCALL(Cell(*)(argdlist($1)))u)(argclist($1)); ') define(fcall, `fcall$1 argflist($1)u -- rret gforth -rret = ((Float(*)(argdlist($1)))u)(argclist($1)); +rret = (SYSCALL(Float(*)(argdlist($1)))u)(argclist($1)); ') open-lib c_addr1 u1 -- u2 gforth open_lib #if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) -u2=(UCell) dlopen(cstr(c_addr1, u1, 1), RTLD_LAZY); +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif +u2=(UCell) dlopen(cstr(c_addr1, u1, 1), RTLD_GLOBAL | RTLD_LAZY); #else # ifdef HAVE_LIBKERNEL32 u2 = (Cell) GetModuleHandle(cstr(c_addr1, u1, 1));