--- /dev/null
+include(CheckCXXSourceCompiles)
+
+function(check_compiles RESULT_VAR TEST)
+
+ unset(SOURCE)
+ foreach(HEADER IN LISTS ARGN)
+ string(APPEND SOURCE "#include <${HEADER}>\n")
+ endforeach()
+ string(APPEND SOURCE "
+ int main() {
+ ${TEST}
+ return 0;
+ }
+ ")
+ check_cxx_source_compiles("${SOURCE}" ${RESULT_VAR})
+endfunction()
include(CheckDecl)
include(CheckDependency)
include(CheckHeader)
+include(CheckCompiles)
include(CheckType)
include(CheckStdatomic)
set(HAVE_DTRACE 1)
endif()
-##uuid
+## uuid
if(BUILD_TESTING)
check_dependency(LIBUUID uuid uuid/uuid.h)
endif()
check_decl(rcvtimeo sys/socket.h)
check_decl(sndtimeo sys/socket.h)
check_decl(strerror_r string.h)
+check_compiles(HAVE_STRERROR_R_CHAR_P "char x, y = *strerror_r(0,&x,1);" string.h)
check_decl(strerror string.h)
check_decl(abi::__cxa_demangle cxxabi.h)
set(HAVE_GCC_ABI_DEMANGLE ${HAVE_ABI____CXA_DEMANGLE})
#cmakedefine HAVE_STDLIB_H 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRERROR_R 1
+#cmakedefine HAVE_STRERROR_R_CHAR_P 1
#cmakedefine HAVE_STRINGS_H 1
#cmakedefine HAVE_SYS_SOCKET_H 1
#cmakedefine HAVE_SYS_TIME_H 1