aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjylefort <jylefort@FreeBSD.org>2006-02-08 11:45:45 +0800
committerjylefort <jylefort@FreeBSD.org>2006-02-08 11:45:45 +0800
commit5a6b9503111f2aed4015bbe9a251bd79cc18fd4f (patch)
treeb1d61b164cd7b8a6213b7dfc46d02eb97c232a0c
parent1e1da84c30b705eca4b70b9682d7bb26e027b146 (diff)
downloadfreebsd-ports-gnome-5a6b9503111f2aed4015bbe9a251bd79cc18fd4f.tar.gz
freebsd-ports-gnome-5a6b9503111f2aed4015bbe9a251bd79cc18fd4f.tar.zst
freebsd-ports-gnome-5a6b9503111f2aed4015bbe9a251bd79cc18fd4f.zip
Fix build on 4.x
PR: ports/92878 Submitted by: Tod McQuillin <devin@spamcop.net>
-rw-r--r--math/gnumeric/files/patch-plugins_fn-financial_functions.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/math/gnumeric/files/patch-plugins_fn-financial_functions.c b/math/gnumeric/files/patch-plugins_fn-financial_functions.c
new file mode 100644
index 000000000000..06a43b84db72
--- /dev/null
+++ b/math/gnumeric/files/patch-plugins_fn-financial_functions.c
@@ -0,0 +1,35 @@
+--- plugins/fn-financial/functions.c- Mon Feb 6 13:36:33 2006
++++ plugins/fn-financial/functions.c Mon Feb 6 13:38:17 2006
+@@ -1736,13 +1736,14 @@
+ gnm_float pmt = value_get_as_float (argv[2]);
+ gnm_float fv = argv[3] ? value_get_as_float (argv[3]) : 0;
+ int type = value_get_paytype (argv[4]);
++ gnm_float pvif, fvifa;
+
+ if (!is_valid_paytype (type))
+ return value_new_error_VALUE (ei->pos);
+
+ /* Calculate the PVIF and FVIFA */
+- gnm_float pvif = calculate_pvif (rate, nper);
+- gnm_float fvifa = calculate_fvifa (rate, nper);
++ pvif = calculate_pvif (rate, nper);
++ fvifa = calculate_fvifa (rate, nper);
+
+ if (pvif == 0)
+ return value_new_error_DIV0 (ei->pos);
+@@ -2007,12 +2008,13 @@
+ gnm_float pmt = value_get_as_float (argv[2]);
+ gnm_float pv = argv[3] ? value_get_as_float (argv[3]) : 0.;
+ int type = value_get_paytype (argv[4]);
++ gnm_float pvif, fvifa;
+
+ if (!is_valid_paytype (type))
+ return value_new_error_VALUE (ei->pos);
+
+- gnm_float pvif = calculate_pvif (rate, nper);
+- gnm_float fvifa = calculate_fvifa (rate, nper);
++ pvif = calculate_pvif (rate, nper);
++ fvifa = calculate_fvifa (rate, nper);
+
+ return value_new_float (-((pv * pvif) + pmt *
+ (1.0 + rate * type) * fvifa));