public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* [patch] libffii, fix build for powerpc where DOUBLE equal LONGDOUBLE
@ 2013-02-02 16:36 Andreas Tobler
  0 siblings, 0 replies; only message in thread
From: Andreas Tobler @ 2013-02-02 16:36 UTC (permalink / raw)
  To: GCC Patches, libffi-discuss

Hi,

I'm going to apply the patch below if there are no objections.

On PowerPC FreeBSD we have DOUBLE = LONGDOUBLE, so w/o the below the
compilation fails with a double 'case' entry.
Something went wrong with the latest upstream patch. And I didn't have a
chance to test earlier.

Ok?

TIA,
Andreas

2013-02-02  Andreas Tobler  <andreast@fgznet.ch>

	* src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix case where
	DOUBLE equal LONGDOUBLE.

Index: src/powerpc/ffi.c
===================================================================
--- src/powerpc/ffi.c	(revision 195611)
+++ src/powerpc/ffi.c	(working copy)
@@ -664,9 +664,11 @@
   switch (type)
     {
 #ifndef __NO_FPRS__
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
     case FFI_TYPE_LONGDOUBLE:
       flags |= FLAG_RETURNS_128BITS;
       /* Fall through.  */
+#endif
     case FFI_TYPE_DOUBLE:
       flags |= FLAG_RETURNS_64BITS;
       /* Fall through.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-02 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-02 16:36 [patch] libffii, fix build for powerpc where DOUBLE equal LONGDOUBLE Andreas Tobler

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 read-only IMAP folder(s) and NNTP newsgroup(s).