Subject: pkg/23479: math/guppi fails to build under -current
To: None <gnats-bugs@gnats.netbsd.org>
From: Ron Roskens <roskens@elfin.net>
List: netbsd-bugs
Date: 11/18/2003 10:46:19
>Number:         23479
>Category:       pkg
>Synopsis:       math/guppi fails to build under -current
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 18 16:47:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ron Roskens
>Release:        NetBSD 1.6ZE
>Organization:
>Environment:
	
	
System: NetBSD hysteria.tx.elfin.net 1.6ZE NetBSD 1.6ZE (GENERIC) #0: Sun Nov 9 00:33:03 CST 2003 root@speedy.tx.elfin.net:/obj/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
On 2003.10.26, a patch to /usr/include/math.h was made which defined INFINITY.
Guppi sources attempt to also define it inside src/libguppispecfns/const.c.

>How-To-Repeat:
Under a -current built with sources after 2003.10.26, do
# cd pkgsrc/math/guppi
# make

>Fix:
Add the following patch:

====
$NetBSD$

--- src/libguppispecfns/const.c.orig	2001-05-05 13:16:23.000000000 -0500
+++ src/libguppispecfns/const.c	2003-11-18 10:02:40.000000000 -0600
@@ -93,11 +93,13 @@
 double LOGSQ2 = 3.46573590279972654709E-1;	/* log(2)/2 */
 double THPIO4 = 2.35619449019234492885;	/* 3*pi/4 */
 double TWOOPI = 6.36619772367581343075535E-1;	/* 2/pi */
+#ifndef INFINITY
 #ifdef INFINITIES
 double INFINITY = 1.0 / 0.0;	/* 99e999; */
 #else
 double INFINITY = 1.79769313486231570815E308;	/* 2**1024*(1-MACHEP) */
 #endif
+#endif
 
 #ifdef MINUSZERO
 double NEGZERO = -0.0;
====
>Release-Note:
>Audit-Trail:
>Unformatted: