diff --git a/modules/libcom/src/flex/Makefile b/modules/libcom/src/flex/Makefile index 20cce5d30..5c6f41bfe 100644 --- a/modules/libcom/src/flex/Makefile +++ b/modules/libcom/src/flex/Makefile @@ -29,7 +29,6 @@ e_flex_SRCS += nfa.c e_flex_SRCS += sym.c e_flex_SRCS += tblcmp.c e_flex_SRCS += parse.c -e_flex_OBJS += epicsTempFile$(OBJ) PROD_HOST += e_flex diff --git a/modules/libcom/src/flex/flex.c b/modules/libcom/src/flex/flex.c index faf61ed19..6abb9597f 100644 --- a/modules/libcom/src/flex/flex.c +++ b/modules/libcom/src/flex/flex.c @@ -43,8 +43,14 @@ char copyright[] = #endif /* not lint */ -#include "epicsTempFile.h" -#undef epicsExportSharedSymbols +#ifdef EPICS_BUILD_DLL +# undef EPICS_BUILD_DLL +#endif +#ifdef EPICS_CALL_DLL +# undef EPICS_CALL_DLL +#endif + +#include "epicsTempFile.c" static char flex_version[] = "2.3"; diff --git a/modules/libcom/src/flex/flexdef.h b/modules/libcom/src/flex/flexdef.h index cf972b274..c14260ccb 100644 --- a/modules/libcom/src/flex/flexdef.h +++ b/modules/libcom/src/flex/flexdef.h @@ -43,6 +43,12 @@ #include #include +#ifdef _WIN32 +# include +#else +# include +#endif + #ifdef __GNUC__ #define NORETURN __attribute__((noreturn)) #else @@ -824,12 +830,5 @@ extern int yylex (); /* The Unix kernel calls used here */ -extern int read (int, char*, int); -#ifndef _WIN32 -extern int unlink (char*); -#endif -extern int write (int, char*, int); - - #endif /* INC_flexdef_H */ diff --git a/modules/libcom/src/yacc/antelope.c b/modules/libcom/src/yacc/antelope.c index 5475874ed..620035799 100644 --- a/modules/libcom/src/yacc/antelope.c +++ b/modules/libcom/src/yacc/antelope.c @@ -10,6 +10,13 @@ #include "defs.h" /* Need this before the Com library can build it */ +#ifdef EPICS_BUILD_DLL +# undef EPICS_BUILD_DLL +#endif +#ifdef EPICS_CALL_DLL +# undef EPICS_CALL_DLL +#endif + #include "epicsTempFile.c" char dflag;