mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
Include shlwapi.h explicitly on Windows (#2407)
* Include shlwapi.h explicitly * Add shlwapi library to LINK_LIB when header is detected Looking for StrStrIA in the shlwapi library is not reliable due to stdcall on mingw32.
This commit is contained in:
parent
5543d6eb36
commit
720e04e196
@ -131,6 +131,8 @@ CHECK_INCLUDE_FILE_CONCAT ("netdb.h" ${HDF_PREFIX}_HAVE_NETDB_H)
|
||||
CHECK_INCLUDE_FILE_CONCAT ("arpa/inet.h" ${HDF_PREFIX}_HAVE_ARPA_INET_H)
|
||||
if (WINDOWS)
|
||||
CHECK_INCLUDE_FILE_CONCAT ("shlwapi.h" ${HDF_PREFIX}_HAVE_SHLWAPI_H)
|
||||
# Checking for StrStrIA in the library is not relaible for mingw32 to stdcall
|
||||
set (LINK_LIBS ${LINK_LIBS} "shlwapi")
|
||||
endif ()
|
||||
|
||||
## Check for non-standard extension quadmath.h
|
||||
@ -156,10 +158,6 @@ if (MINGW OR NOT WINDOWS)
|
||||
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname ${HDF_PREFIX}_HAVE_LIBWSOCK32)
|
||||
endif ()
|
||||
|
||||
if (WINDOWS)
|
||||
CHECK_LIBRARY_EXISTS_CONCAT ("shlwapi" StrStrIA ${HDF_PREFIX}_HAVE_SHLWAPI)
|
||||
endif ()
|
||||
|
||||
# UCB (BSD) compatibility library
|
||||
CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB)
|
||||
|
||||
|
@ -125,6 +125,7 @@
|
||||
#include <direct.h> /* For _getcwd() */
|
||||
#include <io.h> /* POSIX I/O */
|
||||
#include <winsock2.h> /* For GetUserName() */
|
||||
#include <shlwapi.h> /* For StrStrIA */
|
||||
|
||||
#ifdef H5_HAVE_THREADSAFE
|
||||
#include <process.h> /* For _beginthread() */
|
||||
|
Loading…
x
Reference in New Issue
Block a user