summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5.c b/src/H5.c
index 9ece760..af8b668 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -842,7 +842,8 @@ H5free_memory(void *mem)
} /* end H5free_memory() */
-#ifdef H5_HAVE_WIN32_API
+#if defined(H5_HAVE_THREADSAFE) && defined(H5_BUILT_AS_DYNAMIC_LIB) \
+ && defined(H5_HAVE_WIN32_API) && defined(H5_HAVE_WIN_THREADS)
/*-------------------------------------------------------------------------
* Function: DllMain
*
@@ -851,6 +852,9 @@ H5free_memory(void *mem)
* NOTE: The main purpose of this is for handling Win32 thread cleanup
* on thread/process detach.
*
+ * Only enabled when the shared Windows library is built with
+ * thread safety enabled.
+ *
* Return: TRUE on success, FALSE on failure
*
*-------------------------------------------------------------------------
@@ -897,4 +901,4 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
return fOkay;
}
-#endif /* H5_HAVE_WIN32_API */
+#endif /* H5_HAVE_WIN32_API && H5_BUILT_AS_DYNAMIC_LIB && H5_HAVE_WIN_THREADS && H5_HAVE_THREADSAFE*/