From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 17 15:30:19 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FCDF16A4CE for ; Sat, 17 Jul 2004 15:30:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D4EC43D39 for ; Sat, 17 Jul 2004 15:30:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i6HFUIFb055770 for ; Sat, 17 Jul 2004 15:30:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6HFUIEp055769; Sat, 17 Jul 2004 15:30:18 GMT (envelope-from gnats) Resent-Date: Sat, 17 Jul 2004 15:30:18 GMT Resent-Message-Id: <200407171530.i6HFUIEp055769@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yi-Hsuan Hsin (Michael Hsin) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 126B116A4CE for ; Sat, 17 Jul 2004 15:27:45 +0000 (GMT) Received: from Ada.mhsin.org (mhsin.csie.ntu.edu.tw [140.112.31.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7268843D41 for ; Sat, 17 Jul 2004 15:27:44 +0000 (GMT) (envelope-from mhsin@mhsin.org) Received: by Ada.mhsin.org (Postfix, from userid 1701) id 01372FFD2; Sat, 17 Jul 2004 23:27:42 +0800 (CST) Message-Id: <20040717152742.01372FFD2@Ada.mhsin.org> Date: Sat, 17 Jul 2004 23:27:42 +0800 (CST) From: Yi-Hsuan Hsin (Michael Hsin) To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: harald.wille@students.jku.at Subject: ports/69195: [PATCH] misc/wmweather+ causes FP exception (divide by zero) on -CURRENT boxes X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Yi-Hsuan Hsin \(Michael Hsin\)" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2004 15:30:19 -0000 >Number: 69195 >Category: ports >Synopsis: [PATCH] misc/wmweather+ causes FP exception (divide by zero) on -CURRENT boxes >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 17 15:30:18 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Yi-Hsuan Hsin (Michael Hsin) >Release: FreeBSD 5.2-CURRENT i386 >Organization: NTU CSIE >Environment: System: FreeBSD Eliza.mhsin.org 5.2-CURRENT FreeBSD 5.2-CURRENT #12: Sat Jul 17 00:36:58 CST 2004 root@Eliza.mhsin.org:/usr/obj/usr/src/sys/Eliza i386 >Description: In files/patch-convert.h, defined NAN as 0/0, which will cause FP exception (divide by zero) on -CURRENT boxes (but works fine on some -STABLEs, I don't know why). To define NAN as 0.0/0 is ok, but I think system definition of NAN (in math.h) will be better. >How-To-Repeat: Build and install misc/wmweather+, run it (on -CURRENT boxes). >Fix: Include math.h in convert.h, and do not define NAN as 0/0. --- patch-convert.h.orig Sat Apr 12 04:37:09 2003 +++ patch-convert.h Sat Jul 17 23:24:58 2004 @@ -1,11 +1,8 @@ --- convert.h.orig Fri Sep 6 04:04:06 2002 +++ convert.h Fri Apr 11 02:07:44 2003 -@@ -12,6 +12,8 @@ - * x<0 is used for rh, pressure, and windspeed - */ - -+#define NAN 0/0 +@@ -1,3 +1,5 @@ ++#include + - /* Calculations */ - int rh_C(int temp_C, int dewpt_C); - int rh_F(int temp_F, int dewpt_F); + #ifndef PI + # define PI 3.1415926535897932384626433832795029L + #endif >Release-Note: >Audit-Trail: >Unformatted: