--- a/cmake/CheckIncludeFiles.cmake +++ b/cmake/CheckIncludeFiles.cmake @@ -50,4 +50,11 @@ CHECK_INCLUDE_FILES (ucontext.h HAVE_FILE_UCONTEXT_H) IF(NOT HAVE_FILE_UCONTEXT_H) CHECK_INCLUDE_FILES (sys/ucontext.h HAVE_FILE_UCONTEXT_H) + CHECK_FUNCTION_EXISTS (getcontext HAVE_GETCONTEXT) + CHECK_FUNCTION_EXISTS (makecontext HAVE_MAKECONTEXT) + CHECK_FUNCTION_EXISTS (setcontext HAVE_SETCONTEXT) + CHECK_FUNCTION_EXISTS (swapcontext HAVE_SWAPCONTEXT) + IF(NOT HAVE_GETCONTEXT OR NOT HAVE_MAKECONTEXT OR NOT HAVE_SETCONTEXT OR NOT HAVE_SWAPCONTEXT) + SET(HAVE_UCONTEXT_H 0 CACHE INTERNAL "") + ENDIF() ENDIF() --- a/cmake/CheckTypes.cmake +++ b/cmake/CheckTypes.cmake @@ -21,7 +21,6 @@ CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T) SET(CMAKE_EXTRA_INCLUDE_FILES sys/types.h) CHECK_TYPE_SIZE(uint SIZEOF_UINT) -CHECK_TYPE_SIZE(uint SIZEOF_USHORT) CHECK_TYPE_SIZE(ulong SIZEOF_ULONG) CHECK_TYPE_SIZE(int8 SIZEOF_INT8) CHECK_TYPE_SIZE(uint8 SIZEOF_UINT8)