Files
haikuports/dev-util/cppcheck/patches/cppcheck-1.85.patchset
2018-10-30 06:43:00 +00:00

102 lines
3.6 KiB
Plaintext

From b4973d8327b89e44c43fc696f5454821c0a665f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 5 Apr 2018 17:55:26 +0200
Subject: Haiku patches
diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp
index 8da7086..f259391 100644
--- a/cli/cppcheckexecutor.cpp
+++ b/cli/cppcheckexecutor.cpp
@@ -52,7 +52,7 @@
# include <ucontext.h>
# undef _XOPEN_SOURCE
-#elif !defined(__OpenBSD__)
+#elif !defined(__OpenBSD__) && !defined(__HAIKU__)
# include <ucontext.h>
#endif
#ifdef __linux__
diff --git a/cli/filelister.cpp b/cli/filelister.cpp
index 52a9400..7e51de4 100644
--- a/cli/filelister.cpp
+++ b/cli/filelister.cpp
@@ -204,6 +204,7 @@ static void addFiles2(std::map<std::string, std::size_t> &files,
new_path = path + '/' + dir_result->d_name;
+#ifndef __HAIKU__
if (dir_result->d_type == DT_DIR || (dir_result->d_type == DT_UNKNOWN && FileLister::isDirectory(new_path))) {
if (recursive && !ignored.match(new_path)) {
addFiles2(files, new_path, extra, recursive, ignored);
@@ -213,6 +214,7 @@ static void addFiles2(std::map<std::string, std::size_t> &files,
files[new_path] = file_stat.st_size;
}
}
+#endif
}
closedir(dir);
} else
diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp
index f0534d5..028a28f 100644
--- a/cli/threadexecutor.cpp
+++ b/cli/threadexecutor.cpp
@@ -143,7 +143,7 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result)
bool ThreadExecutor::checkLoadAverage(size_t nchildren)
{
-#if defined(__CYGWIN__) || defined(__QNX__) // getloadavg() is unsupported on Cygwin, Qnx.
+#if defined(__CYGWIN__) || defined(__QNX__) || defined(__HAIKU__) // getloadavg() is unsupported on Cygwin, Qnx, Haiku.
return true;
#else
if (!nchildren || !_settings.loadAverage) {
diff --git a/cmake/compileroptions.cmake b/cmake/compileroptions.cmake
index ef41288..8c74b42 100644
--- a/cmake/compileroptions.cmake
+++ b/cmake/compileroptions.cmake
@@ -5,9 +5,13 @@ set(EXTRA_C_FLAGS_DEBUG "-DDEBUG")
if (USE_CLANG)
set (CMAKE_C_COMPILER_ID "Clang")
set (CMAKE_CXX_COMPILER_ID "Clang")
- set (CMAKE_C_COMPILER "/usr/bin/clang")
- set (CMAKE_CXX_COMPILER "/usr/bin/clang++")
-
+ if (NOT HAIKU)
+ set (CMAKE_C_COMPILER "/usr/bin/clang")
+ set (CMAKE_CXX_COMPILER "/usr/bin/clang++")
+ else (NOT HAIKU)
+ set (CMAKE_C_COMPILER "/bin/clang")
+ set (CMAKE_CXX_COMPILER "/bin/clang++")
+ endif (NOT HAIKU)
set (CMAKE_C_FLAGS "-std=c99")
set (CMAKE_C_FLAGS_DEBUG "-g")
set (CMAKE_C_FLAGS_RELEASE "-O2")
--
2.16.2
From 7d641cef19798b763ed81c9a844bc2bca6f93345 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 15 Aug 2018 20:23:10 +0200
Subject: Data Path
diff --git a/cmake/compilerDefinitions.cmake b/cmake/compilerDefinitions.cmake
index 7179c68..992a2bb 100644
--- a/cmake/compilerDefinitions.cmake
+++ b/cmake/compilerDefinitions.cmake
@@ -5,5 +5,9 @@ if (UNIX)
if (HAVE_RULES)
add_definitions(-DHAVE_RULES -DTIXML_USE_STL)
endif()
- add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
+ if (NOT HAIKU)
+ add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
+ else()
+ add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/data/${PROJECT_NAME}")
+ endif()
endif()
--
2.16.4