--- gforth/engine/engine.c 2002/12/19 23:12:07 1.50 +++ gforth/engine/engine.c 2003/01/26 20:56:38 1.58 @@ -64,7 +64,13 @@ #define SEEK_SET 0 #endif -#define IOR(flag) ((flag)? -512-errno : 0) +#ifndef HAVE_FSEEKO +#define fseeko fseek +#endif + +#ifndef HAVE_FTELLO +#define ftello ftell +#endif struct F83Name { struct F83Name *next; /* the link field for old hands */ @@ -74,14 +80,6 @@ struct F83Name { #define F83NAME_COUNT(np) ((np)->countetc & 0x1f) -struct Longname { - struct Longname *next; /* the link field for old hands */ - Cell countetc; - char name[0]; -}; - -#define LONGNAME_COUNT(np) ((np)->countetc & (((~((UCell)0))<<3)>>3)) - #define NULLC '\0' #ifdef MEMCMP_AS_SUBROUTINE @@ -198,7 +196,7 @@ extern int gforth_memcmp(const char * s1 /* normal engine */ #define VARIANT(v) (v) #define JUMP(target) goto I_noop -#define LABEL(name) I_##name: +#define LABEL(name) J_##name: asm(""); I_##name: #elif ENGINE==2 /* variant with padding between VM instructions for finding out @@ -206,7 +204,7 @@ extern int gforth_memcmp(const char * s1 #define engine engine2 #define VARIANT(v) (v) #define JUMP(target) goto I_noop -#define LABEL(name) J_##name: asm(".skip 16"); I_##name: +#define LABEL(name) J_##name: SKIP16; I_##name: #define IN_ENGINE2 #elif ENGINE==3 @@ -215,7 +213,7 @@ extern int gforth_memcmp(const char * s1 #define engine engine3 #define VARIANT(v) ((v)^0xffffffff) #define JUMP(target) goto K_lit -#define LABEL(name) I_##name: +#define LABEL(name) J_##name: asm(""); I_##name: #else #error illegal ENGINE value #endif /* ENGINE */ @@ -262,19 +260,17 @@ Label *engine(Xt *ip0, Cell *sp0, Cell * /* the following entry is normally unused; it is there because its index indicates a does-handler */ CPU_DEP1, -#define INST_ADDR(name) (Label)&&I_##name +#define INST_ADDR(name) ((Label)&&I_##name) #include "prim_lab.i" #undef INST_ADDR (Label)&&after_last, (Label)0, -#define INST_ADDR(name) (Label)&&K_##name +#define INST_ADDR(name) ((Label)&&K_##name) #include "prim_lab.i" #undef INST_ADDR -#ifdef IN_ENGINE2 -#define INST_ADDR(name) (Label)&&J_##name +#define INST_ADDR(name) ((Label)&&J_##name) #include "prim_lab.i" #undef INST_ADDR -#endif }; #ifdef CPU_DEP2 CPU_DEP2