diff --git a/src/sbbs3/telnet.c b/src/sbbs3/telnet.c index ee59b402667aec43567d652d22c073a880d76451..442337d2e5ee765b26b35ab3ba42781b1e19ce21 100644 --- a/src/sbbs3/telnet.c +++ b/src/sbbs3/telnet.c @@ -39,7 +39,7 @@ #include "gen_defs.h" #include "telnet.h" -const char *telnet_cmd_desc(uchar cmd) +const char* DLLCALL telnet_cmd_desc(uchar cmd) { static char unknown[32]; @@ -112,7 +112,7 @@ char* telnet_option_descriptions[]={ ,"TN3270E" }; -const char *telnet_opt_desc(uchar opt) +const char* DLLCALL telnet_opt_desc(uchar opt) { static char unknown[32]; diff --git a/src/sbbs3/telnet.h b/src/sbbs3/telnet.h index a3842d6b1571a413a362b350f9cee987582e0f1d..9225fd11a7f77b11f246a7a0ea031b17338c042d 100644 --- a/src/sbbs3/telnet.h +++ b/src/sbbs3/telnet.h @@ -110,11 +110,36 @@ enum { #define TELNET_MODE_ECHO (1<<1) #define TELNET_MODE_GATE (1<<2) // Pass-through telnet commands/responses +#ifdef DLLEXPORT +#undef DLLEXPORT +#endif +#ifdef DLLCALL +#undef DLLCALL +#endif + +#ifdef _WIN32 + #ifdef SBBS_EXPORTS + #define DLLEXPORT __declspec(dllexport) + #else + #define DLLEXPORT __declspec(dllimport) + #endif + #ifdef __BORLANDC__ + #define DLLCALL __stdcall + #else + #define DLLCALL + #endif +#else + #define DLLEXPORT + #define DLLCALL +#endif + #ifdef __cplusplus extern "C" { #endif -const char *telnet_cmd_desc(uchar cmd); -const char *telnet_opt_desc(uchar opt); + +DLLEXPORT const char* DLLCALL telnet_cmd_desc(uchar cmd); +DLLEXPORT const char* DLLCALL telnet_opt_desc(uchar opt); + #ifdef __cplusplus } #endif \ No newline at end of file