From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOvcj-0005gi-6h for qemu-devel@nongnu.org; Wed, 07 Mar 2007 07:52:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOvcg-0005ey-CK for qemu-devel@nongnu.org; Wed, 07 Mar 2007 07:52:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOvcf-0005er-UD for qemu-devel@nongnu.org; Wed, 07 Mar 2007 07:52:02 -0500 Received: from eastrmmtao101.cox.net ([68.230.240.7]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HOvcZ-0005Sq-IL for qemu-devel@nongnu.org; Wed, 07 Mar 2007 07:51:55 -0500 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao101.cox.net (InterMail vM.7.05.02.00 201-2174-114-20060621) with ESMTP id <20070307125155.CFLU2563.eastrmmtao101.cox.net@eastrmimpo02.cox.net> for ; Wed, 7 Mar 2007 07:51:55 -0500 Message-ID: <20591109.1173271913761.JavaMail.root@eastrmwml08.mgt.cox.net> Date: Wed, 7 Mar 2007 7:51:53 -0500 From: Ben Taylor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Patch: trunc undefined in Solaris 9/Sparc Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu-devel@nongnu.org This fix was suggested by Juergen Kiel, and appears to work on my Solaris 9/Sparc V490. --- fpu/softfloat-native.c.ORIG 2007-03-07 07:30:28.662257000 -0500 +++ fpu/softfloat-native.c 2007-03-07 07:30:44.595051000 -0500 @@ -221,6 +221,12 @@ /*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision operations. *----------------------------------------------------------------------------*/ +#if ( defined(__sun__) && ( HOST_SOLARIS < 10 )) +double trunc(double x) +{ + return x < 0 ? -floor(-x) : floor(x); +} +#endif float64 float64_trunc_to_int( float64 a STATUS_PARAM ) { return trunc(a);