From: brarcher Date: Wed, 25 Dec 2013 03:05:07 +0000 (+0000) Subject: cmake: remove unnecessary checks X-Git-Tag: 0.10.0~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f9b5f86d72b9703968950f2cfc7128dd18e9d52;p=check cmake: remove unnecessary checks These checks are checking for things that Check never uses. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@969 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 39961b2..8d823d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,96 +88,39 @@ endmacro(ck_check_include_file) ck_check_include_file("sys/types.h" HAVE_SYS_TYPES_H) # Alphabetize the rest unless there's a compelling reason -ck_check_include_file("ctype.h" HAVE_CTYPE_H) -ck_check_include_file("copyfile.h" HAVE_COPYFILE_H) -ck_check_include_file("direct.h" HAVE_DIRECT_H) -ck_check_include_file("dlfcn.h" HAVE_DLFCN_H) ck_check_include_file("errno.h" HAVE_ERRNO_H) ck_check_include_file("inttypes.h" HAVE_INTTYPES_H) -ck_check_include_file("io.h" HAVE_IO_H) ck_check_include_file("limits.h" HAVE_LIMITS_H) -ck_check_include_file("locale.h" HAVE_LOCALE_H) -ck_check_include_file("memory.h" HAVE_MEMORY_H) -ck_check_include_file("poll.h" HAVE_POLL_H) -ck_check_include_file("process.h" HAVE_PROCESS_H) ck_check_include_file("signal.h" HAVE_SIGNAL_H) ck_check_include_file("stdarg.h" HAVE_STDARG_H) ck_check_include_file("stdint.h" HAVE_STDINT_H) ck_check_include_file("stdlib.h" HAVE_STDLIB_H) ck_check_include_file("string.h" HAVE_STRING_H) ck_check_include_file("strings.h" HAVE_STRINGS_H) -ck_check_include_file("sys/cdefs.h" HAVE_SYS_CDEFS_H) -ck_check_include_file("sys/poll.h" HAVE_SYS_POLL_H) -ck_check_include_file("sys/select.h" HAVE_SYS_SELECT_H) -ck_check_include_file("sys/stat.h" HAVE_SYS_STAT_H) ck_check_include_file("sys/time.h" HAVE_SYS_TIME_H) -ck_check_include_file("sys/wait.h" HAVE_SYS_WAIT_H) ck_check_include_file("time.h" HAVE_TIME_H) -ck_check_include_file("unistd.h" HAVE_UNISTD_H) -ck_check_include_file("utime.h" HAVE_UTIME_H) -ck_check_include_file("wchar.h" HAVE_WCHAR_H) -ck_check_include_file("wctype.h" HAVE_WCTYPE_H) -ck_check_include_file("windows.h" HAVE_WINDOWS_H) -# Following files need windows.h, so we should test it after windows.h test. -ck_check_include_file("wincrypt.h" HAVE_WINCRYPT_H) -ck_check_include_file("winioctl.h" HAVE_WINIOCTL_H) ############################################################################### # Check functions -check_function_exists(ctime_r HAVE_CTIME_R) -check_function_exists(fcntl HAVE_FCNTL) check_function_exists(fork HAVE_FORK) -check_function_exists(fstat HAVE_FSTAT) check_function_exists(getenv HAVE_GETENV) check_function_exists(getpid HAVE_GETPID) check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) -check_function_exists(gmtime_r HAVE_GMTIME_R) check_function_exists(localtime_r HAVE_DECL_LOCALTIME_R) check_function_exists(localtime_s HAVE_LOCALTIME_S) -check_function_exists(lstat HAVE_LSTAT) check_function_exists(malloc HAVE_MALLOC) -check_function_exists(mbrtowc HAVE_MBRTOWC) -check_function_exists(mbsnrtowcs HAVE_MBSNRTOWCS) -check_function_exists(memmove HAVE_MEMMOVE) -check_function_exists(mkdir HAVE_MKDIR) -check_function_exists(mkstemp HAVE_MKSTEMP) -check_function_exists(poll HAVE_POLL) check_function_exists(putenv HAVE_DECL_PUTENV) check_function_exists(realloc HAVE_REALLOC) -check_function_exists(select HAVE_SELECT) check_function_exists(setenv HAVE_DECL_SETENV) -check_function_exists(setlocale HAVE_SETLOCALE) check_function_exists(sigaction HAVE_SIGACTION) check_function_exists(sleep HAVE_DECL_SLEEP) check_function_exists(snprintf HAVE_SNPRINTF) -check_function_exists(strchr HAVE_STRCHR) check_function_exists(strdup HAVE_DECL_STRDUP) -check_function_exists(strftime HAVE_STRFTIME) check_function_exists(strerror HAVE_STRERROR) -check_function_exists(strerror_r HAVE_STRERROR_R) -check_function_exists(strncpy_s HAVE_STRNCPY_S) -check_function_exists(strrchr HAVE_STRRCHR) check_function_exists(strsignal HAVE_DECL_STRSIGNAL) -check_function_exists(timegm HAVE_TIMEGM) -check_function_exists(tzset HAVE_TZSET) check_function_exists(unsetenv HAVE_DECL_UNSETENV) -check_function_exists(utime HAVE_UTIME) -check_function_exists(vfork HAVE_VFORK) -check_function_exists(vprintf HAVE_VPRINTF) -check_function_exists(wcrtomb HAVE_WCRTOMB) -check_function_exists(wcscmp HAVE_WCSCMP) -check_function_exists(wcscpy HAVE_WCSCPY) -check_function_exists(wcslen HAVE_WCSLEN) -check_function_exists(wcsnrtombs HAVE_WCSNRTOMBS) -check_function_exists(wctomb HAVE_WCTOMB) -check_function_exists(wmemcmp HAVE_WMEMCMP) -check_function_exists(wmemcpy HAVE_WMEMCPY) -check_function_exists(_ctime64_s HAVE__CTIME64_S) -check_function_exists(_fseeki64 HAVE__FSEEKI64) -check_function_exists(_get_timezone HAVE__GET_TIMEZONE) check_function_exists(_getpid HAVE__GETPID) check_function_exists(_localtime64_s HAVE__LOCALTIME64_S) -check_function_exists(_mkgmtime64 HAVE__MKGMTIME64) check_function_exists(_putenv HAVE__PUTENV) check_function_exists(_strdup HAVE__STRDUP) @@ -268,45 +211,6 @@ if(NOT HAVE_CLOCKID_T) set(clockid_t int) endif(NOT HAVE_CLOCKID_T) # -check_type_size(dev_t DEV_T) -if(NOT HAVE_DEV_T) - if(MSVC) - set(dev_t "unsigned int") - endif(MSVC) -endif(NOT HAVE_DEV_T) -# -check_type_size(gid_t GID_T) -if(NOT HAVE_GID_T) - if(WIN32) - set(gid_t "short") - else(WIN32) - set(gid_t "unsigned int") - endif(WIN32) -endif(NOT HAVE_GID_T) -# -check_type_size(id_t ID_T) -if(NOT HAVE_ID_T) - if(WIN32) - set(id_t "short") - else(WIN32) - set(id_t "unsigned int") - endif(WIN32) -endif(NOT HAVE_ID_T) -# -check_type_size(mode_t MODE_T) -if(NOT HAVE_MODE_T) - if(WIN32) - set(mode_t "unsigned short") - else(WIN32) - set(mode_t "int") - endif(WIN32) -endif(NOT HAVE_MODE_T) -# -check_type_size(off_t OFF_T) -if(NOT HAVE_OFF_T) - set(off_t "__int64") -endif(NOT HAVE_OFF_T) -# check_type_size(size_t SIZE_T) if(NOT HAVE_SIZE_T) if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) @@ -325,15 +229,6 @@ if(NOT HAVE_SSIZE_T) endif("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) endif(NOT HAVE_SSIZE_T) # -check_type_size(uid_t UID_T) -if(NOT HAVE_UID_T) - if(WIN32) - set(uid_t "short") - else(WIN32) - set(uid_t "unsigned int") - endif(WIN32) -endif(NOT HAVE_UID_T) -# check_type_size(pid_t PID_T) if(NOT HAVE_PID_T) if(WIN32) @@ -347,29 +242,6 @@ check_type_size(timer_t TIMER_T) if(NOT HAVE_TIMER_T) set(timer_t int) endif(NOT HAVE_TIMER_T) -# -check_type_size(intptr_t INTPTR_T) -if(NOT HAVE_INTPTR_T) - if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - set(intptr_t "int64_t") - else() - set(intptr_t "int32_t") - endif() -endif(NOT HAVE_INTPTR_T) -# -check_type_size(uintptr_t UINTPTR_T) -if(NOT HAVE_UINTPTR_T) - if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - set(uintptr_t "uint64_t") - else() - set(uintptr_t "uint32_t") - endif() -endif(NOT HAVE_UINTPTR_T) -# -check_type_size(wchar_t SIZEOF_WCHAR_T) -if(HAVE_SIZEOF_WCHAR_T) - set(HAVE_WCHAR_T 1) -endif(HAVE_SIZEOF_WCHAR_T) ############################################################################### # Check libraries