summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TSRM/TSRM.c4
-rw-r--r--TSRM/TSRM.dsp4
-rw-r--r--TSRM/TSRM.h14
3 files changed, 16 insertions, 6 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 364ce4b240..a154cbb6a3 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -56,7 +56,7 @@ static int tsrm_debug_status;
/* Startup TSRM (call once for the entire process) */
-int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
+TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
{
tsrm_tls_table_size = expected_threads;
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
@@ -82,7 +82,7 @@ int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
/* Shutdown TSRM (call once for the entire process) */
-void tsrm_shutdown()
+TSRM_FUNC void tsrm_shutdown()
{
int i;
diff --git a/TSRM/TSRM.dsp b/TSRM/TSRM.dsp
index 28d7152215..2c9f10edd1 100644
--- a/TSRM/TSRM.dsp
+++ b/TSRM/TSRM.dsp
@@ -41,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
@@ -64,7 +64,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index 086b2cfffc..8674a5d027 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -29,12 +29,22 @@
typedef int ts_rsrc_id;
+#if WIN32||WINNT
+# ifdef TSRM_EXPORTS
+# define TSRM_API __declspec(dllexport)
+# else
+# define TSRM_API __declspec(dllimport)
+# endif
+#else
+# define TSRM_API
+#endif
+
/* Define TSRM_FUNC */
#ifdef __cplusplus
-#define TSRM_FUNC extern "C"
+#define TSRM_FUNC extern "C" TSRM_API
#else
-#define TSRM_FUNC
+#define TSRM_FUNC TSRM_API
#endif