cppcheck: fix musl.

This commit is contained in:
Enno Boland 2015-08-29 16:47:49 +02:00
parent ddf317c0b3
commit 1b0e95aaa5
3 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,11 @@
--- cli/cppcheckexecutor.cpp.orig
+++ cli/cppcheckexecutor.cpp
@@ -51,7 +51,7 @@
#endif
#endif
-#if !defined(NO_UNIX_BACKTRACE_SUPPORT) && defined(USE_UNIX_SIGNAL_HANDLING) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__NetBSD__) && !defined(__SVR4) && !defined(__QNX__)
+#if !defined(NO_UNIX_BACKTRACE_SUPPORT) && defined(USE_UNIX_SIGNAL_HANDLING) && defined (__GLIBC__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__NetBSD__) && !defined(__SVR4) && !defined(__QNX__)
#define USE_UNIX_BACKTRACE_SUPPORT
#include <cxxabi.h>
#include <execinfo.h>

View file

@ -0,0 +1,21 @@
--- gui/main.cpp.orig
+++ gui/main.cpp
@@ -57,12 +57,18 @@
QSettings* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app);
// Set data dir..
+ if ((settings->value("DATADIR", QString()).toString()).isEmpty())
+ settings->setValue("DATADIR", "/usr/share/cppcheck");
+
foreach(const QString arg, app.arguments()) {
if (arg.startsWith("--data-dir=")) {
settings->setValue("DATADIR", arg.mid(11));
return 0;
}
}
+
+ if ((settings->value(SETTINGS_LANGUAGE, QString()).toString()).isEmpty())
+ settings->setValue(SETTINGS_LANGUAGE, "en");
TranslationHandler* th = new TranslationHandler(&app);
th->SetLanguage(settings->value(SETTINGS_LANGUAGE, th->SuggestLanguage()).toString());

View file

@ -1,7 +1,7 @@
# Template file for 'cppcheck' # Template file for 'cppcheck'
pkgname=cppcheck pkgname=cppcheck
version=1.69 version=1.69
revision=2 revision=3
hostmakedepends="libxslt docbook-xsl" hostmakedepends="libxslt docbook-xsl"
short_desc="Static analysis of C/C++ code" short_desc="Static analysis of C/C++ code"
maintainer="Juan RP <xtraeme@voidlinux.eu>" maintainer="Juan RP <xtraeme@voidlinux.eu>"