* [Qemu-devel] Patch: trunc undefined in Solaris 9/Sparc
@ 2007-03-07 12:51 Ben Taylor
0 siblings, 0 replies; only message in thread
From: Ben Taylor @ 2007-03-07 12:51 UTC (permalink / raw)
To: Qemu-devel
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-07 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-07 12:51 [Qemu-devel] Patch: trunc undefined in Solaris 9/Sparc Ben Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).