[PATCH] math/gnumeric: [Fix build on 4.x]

Tod McQuillin devin at spamcop.net
Sun Feb 5 21:58:17 PST 2006


>Submitter-Id:	current-users
>Originator:	Tod McQuillin
>Organization:	
>Confidential:	no 
>Synopsis:	[PATCH] math/gnumeric: [Fix build on 4.x]
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 4.11-STABLE i386
>Environment:
System: FreeBSD plexi.pun-pun.prv 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Dec 15 19:04:55 JST 2005
>Description:
This fixes a couple of C99isms to allow gnumeric to build
successfully on FreeBSD 4.x / gcc 2.95

Added file(s):
- files/patch-plugins_fn-financial_functions.c

Port maintainer (gnome at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- gnumeric-1.6.2.patch begins here ---
Index: files/patch-plugins_fn-financial_functions.c
===================================================================
RCS file: files/patch-plugins_fn-financial_functions.c
diff -N files/patch-plugins_fn-financial_functions.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins_fn-financial_functions.c	6 Feb 2006 04:38:23 -0000
@@ -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));
--- gnumeric-1.6.2.patch ends here ---



More information about the freebsd-gnome mailing list