summaryrefslogtreecommitdiff
path: root/finance/gnucash/patches
diff options
context:
space:
mode:
Diffstat (limited to 'finance/gnucash/patches')
-rw-r--r--finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c22
-rw-r--r--finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c16
-rw-r--r--finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c35
-rw-r--r--finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp37
4 files changed, 110 insertions, 0 deletions
diff --git a/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c b/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c
new file mode 100644
index 00000000000..fbc1e096711
--- /dev/null
+++ b/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-gnucash_gnome-utils_gnc-date-edit.c,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+Fix build with clang
+error: array subscript is of type 'char'
+
+--- gnucash/gnome-utils/gnc-date-edit.c.orig 2018-12-25 22:43:08.000000000 +0000
++++ gnucash/gnome-utils/gnc-date-edit.c
+@@ -1113,12 +1113,12 @@ gnc_date_edit_get_date_internal (GNCDate
+ temp = gnc_strtok_r (NULL, ": ", &tokp);
+ if (temp)
+ {
+- if (isdigit (*temp))
++ if (isdigit ((unsigned char)*temp))
+ {
+ tm.tm_min = atoi (temp);
+ flags = gnc_strtok_r (NULL, ": ",
+ &tokp);
+- if (flags && isdigit (*flags))
++ if (flags && isdigit ((unsigned char)*flags))
+ {
+ tm.tm_sec = atoi (flags);
+ flags = gnc_strtok_r (NULL,
diff --git a/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c b/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c
new file mode 100644
index 00000000000..50ae190406f
--- /dev/null
+++ b/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-gnucash_gnome-utils_gnc-menu-extensions.c,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+Fix build with clang
+error: array subscript is of type 'char'
+
+--- gnucash/gnome-utils/gnc-menu-extensions.c.orig 2018-12-25 22:43:08.000000000 +0000
++++ gnucash/gnome-utils/gnc-menu-extensions.c
+@@ -221,7 +221,7 @@ gnc_ext_gen_action_name (const gchar *na
+ // 'Mum & ble12' => 'Mumble___ble12'
+ for ( extChar = name; *extChar != '\0'; extChar++ )
+ {
+- if ( ! isalnum( *extChar ) )
++ if ( ! isalnum((unsigned char) *extChar ) )
+ g_string_append_c( actionName, '_' );
+ g_string_append_c( actionName, *extChar );
+ }
diff --git a/finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c b/finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c
new file mode 100644
index 00000000000..8fb74311682
--- /dev/null
+++ b/finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-libgnucash_app-utils_calculation_expression__parser.c,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+is* takes a char argument.
+
+--- libgnucash/app-utils/calculation/expression_parser.c.orig 2018-12-25 22:43:08.000000000 +0000
++++ libgnucash/app-utils/calculation/expression_parser.c
+@@ -768,7 +768,7 @@ next_token (parser_env_ptr pe)
+ const char *str_parse = pe->parse_str;
+ void *number;
+
+- while (isspace (*str_parse))
++ while (isspace ((unsigned char)*str_parse))
+ str_parse++;
+
+ pe->asn_op = EOS;
+@@ -812,7 +812,7 @@ next_token (parser_env_ptr pe)
+ add_token( pe, STR_TOKEN );
+ }
+ /* test for name */
+- else if (isalpha (*str_parse)
++ else if (isalpha ((unsigned char)*str_parse)
+ || (*str_parse == '_'))
+ {
+ int funcFlag = 0;
+@@ -833,8 +833,8 @@ next_token (parser_env_ptr pe)
+ }
+ while ((*str_parse == '_')
+ || (*str_parse == '(')
+- || isalpha (*str_parse)
+- || isdigit (*str_parse));
++ || isalpha ((unsigned char)*str_parse)
++ || isdigit ((unsigned char)*str_parse));
+
+ *nstr = EOS;
+ if ( funcFlag )
diff --git a/finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp b/finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp
new file mode 100644
index 00000000000..0e560d91899
--- /dev/null
+++ b/finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp
@@ -0,0 +1,37 @@
+$NetBSD: patch-libgnucash_engine_qoflog.cpp,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+Fix error level type confusion.
+
+--- libgnucash/engine/qoflog.cpp.orig 2018-12-25 22:43:08.000000000 +0000
++++ libgnucash/engine/qoflog.cpp
+@@ -429,22 +429,22 @@ qof_log_level_to_string(QofLogLevel log_
+ const char *level_str;
+ switch (log_level)
+ {
+- case G_LOG_LEVEL_ERROR:
+- level_str = "ERROR";
++ case QOF_LOG_FATAL:
++ level_str = "FATAL";
+ break;
+- case G_LOG_LEVEL_CRITICAL:
+- level_str = "CRIT";
++ case QOF_LOG_ERROR:
++ level_str = "ERROR";
+ break;
+- case G_LOG_LEVEL_WARNING:
++ case QOF_LOG_WARNING:
+ level_str = "WARN";
+ break;
+- case G_LOG_LEVEL_MESSAGE:
++ case QOF_LOG_MESSAGE:
+ level_str = "MESSG";
+ break;
+- case G_LOG_LEVEL_INFO:
++ case QOF_LOG_INFO:
+ level_str = "INFO";
+ break;
+- case G_LOG_LEVEL_DEBUG:
++ case QOF_LOG_DEBUG:
+ level_str = "DEBUG";
+ break;
+ default: