+if( WIN32 AND NOT CYGWIN )
+ # We consider Cygwin as another Unix
+ set(PURE_WINDOWS 1)
+endif()
+
include(CheckIncludeFile)
include(CheckLibraryExists)
include(CheckSymbolExists)
check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
check_include_file(memory.h HAVE_MEMORY_H)
check_include_file(ndir.h HAVE_NDIR_H)
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
check_include_file(pthread.h HAVE_PTHREAD_H)
endif()
check_include_file(setjmp.h HAVE_SETJMP_H)
check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
# library checks
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
check_symbol_exists(strcmp string.h HAVE_STRCMP)
check_symbol_exists(strdup string.h HAVE_STRDUP)
check_symbol_exists(strrchr string.h HAVE_STRRCHR)
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
endif()
check_symbol_exists(sbrk unistd.h HAVE_SBRK)
check_symbol_exists(memcpy string.h HAVE_MEMCPY)
check_symbol_exists(memmove string.h HAVE_MEMMOVE)
check_symbol_exists(setenv stdlib.h HAVE_SETENV)
-if ( LLVM_ON_WIN32 )
+if( PURE_WINDOWS )
check_symbol_exists(_chsize_s io.h HAVE__CHSIZE_S)
endif()
if( HAVE_ARGZ_H )