From owner-freebsd-ports@FreeBSD.ORG Sun Sep 18 16:08:08 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD8BF16A41F; Sun, 18 Sep 2005 16:08:08 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCF4D43D45; Sun, 18 Sep 2005 16:07:57 +0000 (GMT) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3) with ESMTP id j8IG7kXk019768; Sun, 18 Sep 2005 18:07:46 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id j8IG7kpj019766; Sun, 18 Sep 2005 18:07:46 +0200 Received: from saturn.kn-bremen.de (localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.1/8.13.1) with ESMTP id j8IFx6Wb031647; Sun, 18 Sep 2005 17:59:06 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.1/8.13.1/Submit) id j8IFx5cN031646; Sun, 18 Sep 2005 17:59:05 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sun, 18 Sep 2005 17:59:05 +0200 To: freebsd-ports@freebsd.org, freebsd-emulation@freebsd.org Message-ID: <20050918155905.GA31500@saturn.kn-bremen.de> Mail-Followup-To: freebsd-ports@freebsd.org, freebsd-emulation@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: fixing emulators/qemu on 4.x X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2005 16:08:09 -0000 Can someone who runs 4.x please test the following patch to fix the emulators/qemu port? And while you're at it, it would be nice if you could test kqemu as well... (WITH_KQEMU) Thanx, Juergen Index: files/patch-libmath4 @@ -0,0 +1,45 @@ +Index: qemu/bsd/i386/s_ldexpl.c +@@ -2,6 +2,30 @@ + #include + #include + ++/* 4.x doesnt have isfinite */ ++#ifndef isfinite ++#define isfinite __isfinitel ++ ++union IEEEl2bits { ++ long double e; ++ struct { ++ unsigned int manl :32; ++ unsigned int manh :32; ++ unsigned int exp :15; ++ unsigned int sign :1; ++ unsigned int junk :16; ++ } bits; ++}; ++ ++static int __isfinitel(long double x) ++{ ++ union IEEEl2bits u; ++ ++ u.e = x; ++ return (u.bits.exp != 32767); ++} ++#endif ++ + long double __ldexpl(long double x, int expn) + { + long double res; +Index: qemu/bsd/i386/s_round.c +@@ -29,6 +29,11 @@ + + #include + ++/* 4.x doesnt have isfinite */ ++#ifndef isfinite ++#define isfinite(x) (!isnan(x) && !isinf(x)) ++#endif ++ + double + round(double x) + {