diff --git a/motorApp/NewportSrc/hxp_drivers.cpp b/motorApp/NewportSrc/hxp_drivers.cpp index 9e69ab73..0ca5211c 100644 --- a/motorApp/NewportSrc/hxp_drivers.cpp +++ b/motorApp/NewportSrc/hxp_drivers.cpp @@ -9,17 +9,13 @@ #include #include "Socket.h" +#define epicsExportSharedSymbols +#include +#include "XPS_C8_drivers.h" #ifdef _WIN32 - #define DLL __declspec(dllexport) - #include "strtok_r.h" -#else - #define DLL +#include "strtok_r.h" #endif -#include "hxp_drivers.h" - - - #define SIZE_SMALL 1024 #define SIZE_NOMINAL 1024 #define SIZE_BIG 2048 @@ -36,7 +32,6 @@ extern "C" #endif - #define DLL_VERSION "Library version for HXP Firmware V1.3.x" /************************************************************************* diff --git a/motorApp/NewportSrc/hxp_drivers.h b/motorApp/NewportSrc/hxp_drivers.h index 03f70df7..09ddc3e5 100644 --- a/motorApp/NewportSrc/hxp_drivers.h +++ b/motorApp/NewportSrc/hxp_drivers.h @@ -5,26 +5,25 @@ * XPS functions * *************************************************/ -#ifdef _WIN32 - #ifndef DLL - #ifdef _DLL /* _DLL is defined by EPICS if we are being compiled to call DLLs */ - #define DLL __declspec(dllimport) - #else - #define DLL - #endif - #endif -#else - #define DLL - #define __stdcall +#define DLL epicsShareFunc + +#if !defined(_WIN32) && !defined(CYGWIN32) +#define __stdcall #endif + +#ifdef __rtems__ + #include "strtok_r.h" +#endif + #ifdef __cplusplus extern "C" { #else -#typedef int bool; /* C does not know bool, only C++ */ +typedef int bool; /* C does not know bool, only C++ */ #endif + DLL int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); DLL void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout); DLL void __stdcall HXPTCP_CloseSocket(int SocketIndex);