From owner-freebsd-gnome@FreeBSD.ORG Mon Feb 6 05:58:17 2006 Return-Path: X-Original-To: gnome@FreeBSD.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E1E216A420; Mon, 6 Feb 2006 05:58:17 +0000 (GMT) (envelope-from root@distalzou.net) Received: from mail.distalzou.net (203.141.139.231.user.ad.il24.net [203.141.139.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28CE643D45; Mon, 6 Feb 2006 05:58:16 +0000 (GMT) (envelope-from root@distalzou.net) Received: from root by mail.distalzou.net with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1F5zOC-0009NW-6E; Mon, 06 Feb 2006 14:58:16 +0900 To: FreeBSD-gnats-submit@freebsd.org From: Tod McQuillin X-send-pr-version: 3.113 X-GNATS-Notify: Message-Id: Date: Mon, 06 Feb 2006 14:58:16 +0900 Cc: gnome@FreeBSD.org Subject: [PATCH] math/gnumeric: [Fix build on 4.x] X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2006 05:58:17 -0000 >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@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 ---