From 613398bcfe771f4b90a3712140d074f521292619 Mon Sep 17 00:00:00 2001 From: radare Date: Sun, 1 May 2016 22:46:22 +0200 Subject: [PATCH 1/2] Fix `cmake .` --- llvm/CMakeLists.txt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 8d9c4fe..2b79297 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -139,20 +139,6 @@ if(WIN32 AND NOT UNIX) endif() include(CPack) -# Sanity check our source directory to make sure that we are not trying to -# generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make -# sure that we don't have any stray generated files lying around in the tree -# (which would end up getting picked up by header search, instead of the correct -# versions). -if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) - message(FATAL_ERROR "In-source builds are not allowed. -CMake would overwrite the makefiles distributed with LLVM. -Please create a directory and run cmake from there, passing the path -to this source directory as the last argument. -This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. -Please delete them.") -endif() - string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) if (CMAKE_BUILD_TYPE AND From f1e56ec237671dde4f6264743001180b7e7b85d7 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 2 May 2016 00:24:19 +0200 Subject: [PATCH 2/2] Fix ks_errno signature to return ks_err instead of uint --- include/keystone/keystone.h | 2 +- llvm/keystone/ks.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/keystone/keystone.h b/include/keystone/keystone.h index 28ce0ce..cc31d98 100644 --- a/include/keystone/keystone.h +++ b/include/keystone/keystone.h @@ -224,7 +224,7 @@ ks_err ks_close(ks_engine *ks); @return: error code of ks_err enum type (KS_ERR_*, see above) */ KEYSTONE_EXPORT -unsigned int ks_errno(ks_engine *ks); +ks_err ks_errno(ks_engine *ks); /* diff --git a/llvm/keystone/ks.cpp b/llvm/keystone/ks.cpp index eab3b10..eabd4e1 100644 --- a/llvm/keystone/ks.cpp +++ b/llvm/keystone/ks.cpp @@ -33,9 +33,9 @@ unsigned int ks_version(unsigned int *major, unsigned int *minor) KEYSTONE_EXPORT -unsigned int ks_errno(ks_engine *ks) +ks_err ks_errno(ks_engine *ks) { - return ks->errnum; + return (ks_err)ks->errnum; }