CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE_IN_LIBEXECINFO)
CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME)
-if(NOT WIN32) # We don't want to have winpthread-1.dll in the jarfile
- CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD)
- CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB)
- CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB)
- CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB)
- CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB)
-endif()
+CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD)
+CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB)
+CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB)
+CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB)
+CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB)
+
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")
#ifdef _XBT_WIN32 /* defined if this is a windows system, 32bits or 64bits) */
#include <windows.h>
-typedef DWORD xbt_os_thread_key_t;
-#else /* assume that every non-windows system is POSIX-compatible */
+#endif
#include <pthread.h>
typedef pthread_key_t xbt_os_thread_key_t;
-#endif
-
/** Calls pthread_atfork() if present, and raise an exception otherwise.
*
* The only known user of this wrapper is mmalloc_preinit(), but it is absolutely mandatory there: