diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-04-11 20:55:09 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-04-11 20:55:09 (GMT) |
commit | 46c8a9f06fb4bc700a6a5c73bc569369a58a6bf5 (patch) | |
tree | 69ff4c82129dd10e5c7af20c4348968bee073826 /config/cmake | |
parent | 57e65197486beffc8aeb1c32e132bc4136990eab (diff) | |
download | hdf5-46c8a9f06fb4bc700a6a5c73bc569369a58a6bf5.zip hdf5-46c8a9f06fb4bc700a6a5c73bc569369a58a6bf5.tar.gz hdf5-46c8a9f06fb4bc700a6a5c73bc569369a58a6bf5.tar.bz2 |
[svn-r20473] Add message that H5_HAVE_WIN_THREADS requires WINVER >= 0x600 (VISTA or WIN7)
Bring r20472 from trunk
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/H5pubconf.h.in | 3 | ||||
-rw-r--r-- | config/cmake/HDF5Tests.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 0dbd1ec..cd05639 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -294,6 +294,9 @@ /* Define to 1 if you have the <pthread.h> header file. */ #cmakedefine H5_HAVE_PTHREAD_H @H5_HAVE_PTHREAD_H@ +/* Define to 1 if you have the 'InitOnceExecuteOnce' function. */ +#cmakedefine H5_HAVE_WIN_THREADS @H5_HAVE_WIN_THREADS@ + /* Define to 1 if you have the `random' function. */ #cmakedefine H5_HAVE_RANDOM @H5_HAVE_RANDOM@ diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c index ea4a648..55e91a4 100644 --- a/config/cmake/HDF5Tests.c +++ b/config/cmake/HDF5Tests.c @@ -384,4 +384,21 @@ int main () #endif /* HAVE_GPFS */ +#ifdef HAVE_WIN_THREADS + +#include <windows.h> +int main () +{ + BOOL first_init_g=INIT_ONCE_STATIC_INIT; + BOOL CALLBACK win32_first_thread_init(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContext); + BOOL ret=FALSE; + + ret=InitOnceExecuteOnce(&first_init_g, win32_first_thread_init, NULL, NULL); + exit(ret ? 0 : 1); +} +BOOL CALLBACK +win32_first_thread_init(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContext) +{return TRUE;} + +#endif /* HAVE_WIN_THREADS */ |