openbsd-ports/devel/libffi/patches/patch-testsuite_libffi_call_float2_c
jasper 9bf295a421 import libffi 3.0.8
FFI stands for Foreign Function Interface. A foreign function interface
is the popular name for the interface that allows code written in one
language to call code written in another language. The libffi library
really only provides the lowest, machine dependent layer of a fully
featured foreign function interface. A layer must exist above libffi
that handles type conversions for values passed between the two
languages.

successfully tested on seven arches by me. other arches are disabled for now as
they need more work (mips64) or haven't been tested yet.
2009-09-23 20:55:46 +00:00

18 lines
817 B
Plaintext

$OpenBSD: patch-testsuite_libffi_call_float2_c,v 1.1.1.1 2009/09/23 20:55:46 jasper Exp $
The %Lf printf format expects "long double", so cast args accordingly.
Patch from NetBSD.
--- testsuite/libffi.call/float2.c.orig Sat Sep 19 15:40:48 2009
+++ testsuite/libffi.call/float2.c Sat Sep 19 15:41:30 2009
@@ -44,7 +44,7 @@ int main (void)
/* This is ifdef'd out for now. long double support under SunOS/gcc
is pretty much non-existent. You'll get the odd bus error in library
routines like printf(). */
- printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON);
+ printf ("%Lf, %Lf, %Lf, %Lf\n", (long double)ld, (long double)ldblit(f), (long double)ld - ldblit(f), (long double)LDBL_EPSILON);
#endif
/* These are not always the same!! Check for a reasonable delta */