This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix long double handling


[Please Cc: me on replies, I'm not subscribed to the list]

On x86 32 bit, we get this error:

src/x86/ffi.c: In function 'ffi_prep_cif_machdep':
src/x86/ffi.c:137: error: duplicate case value
src/x86/ffi.c:136: error: previously used here
make[3]: *** [src/x86/ffi.lo] Error 1

due to the fact that we don't HAVE_LONG_DOUBLE. Fix it.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>

---
 src/x86/ffi.c |    3 +++
 1 file changed, 3 insertions(+)

Index: libffi-3.0.7/src/x86/ffi.c
===================================================================
--- libffi-3.0.7.orig/src/x86/ffi.c
+++ libffi-3.0.7/src/x86/ffi.c
@@ -31,6 +31,7 @@
 #ifndef __x86_64__
 
 #include <ffi.h>
+#include <fficonfig.h>
 #include <ffi_common.h>
 
 #include <stdlib.h>
@@ -134,7 +135,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif 
     case FFI_TYPE_SINT64:
     case FFI_TYPE_FLOAT:
     case FFI_TYPE_DOUBLE:
+#ifdef HAVE_LONG_DOUBLE
     case FFI_TYPE_LONGDOUBLE:
+#endif
       cif->flags = (unsigned) cif->rtype->type;
       break;
 
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]