diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2014-06-13 08:44:34 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2014-06-13 08:44:34 (GMT) |
commit | 25ba47bc97bd7dd3f9f9ee0c13d04c1ea041dd7b (patch) | |
tree | 026e71e579c4da4d16e95433028458a977d7ba6d | |
parent | 4ccb865c70f977a4a97d75df3d6e792c8cbdfdd8 (diff) | |
download | hdf5-25ba47bc97bd7dd3f9f9ee0c13d04c1ea041dd7b.zip hdf5-25ba47bc97bd7dd3f9f9ee0c13d04c1ea041dd7b.tar.gz hdf5-25ba47bc97bd7dd3f9f9ee0c13d04c1ea041dd7b.tar.bz2 |
[svn-r25274] Adds #defines that ensures that DllMain is only compiled in when the thread-safe shared library is built on Windows.
Fixes HDFFV-8837.
Tested on 64-bit Windows 7 with VS2012.
-rw-r--r-- | src/H5.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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*/ |