[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.
This commit is contained in:
Dana Robinson 2014-06-13 03:44:34 -05:00
parent 4ccb865c70
commit 25ba47bc97

View File

@ -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*/