From: Ben Taylor <sol10x86@cox.net>
To: Qemu-devel@nongnu.org
Subject: [Qemu-devel] Patch: trunc undefined in Solaris 9/Sparc
Date: Wed, 7 Mar 2007 7:51:53 -0500 [thread overview]
Message-ID: <20591109.1173271913761.JavaMail.root@eastrmwml08.mgt.cox.net> (raw)
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 other threads:[~2007-03-07 12:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20591109.1173271913761.JavaMail.root@eastrmwml08.mgt.cox.net \
--to=sol10x86@cox.net \
--cc=Qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).