qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Patch: trunc undefined in Solaris 9/Sparc


From: Ben Taylor
Subject: [Qemu-devel] Patch: trunc undefined in Solaris 9/Sparc
Date: Wed, 7 Mar 2007 7:51:53 -0500

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);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]