This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
testsuite fixes (for OpenBSD)
- From: Jasper Lievisse Adriaanse <jasper at humppa dot nl>
- To: libffi-discuss at sources dot redhat dot com
- Date: Mon, 5 Oct 2009 09:33:26 +0200
- Subject: testsuite fixes (for OpenBSD)
hi,
please find attached two patches that'll give the testsuite a better
chance to complete on OpenBSD. There is still an issue with
unwindtest{,_ffi_call}.cc, but that's worth another email.
Both the regression tests below now pass on OpenBSD.
Cheers,
Jasper
--
"Intelligence should guide our actions, but in harmony with the
texture of the situation at hand"
-- Francisco Varela
The %Lf printf format expects "long double", so cast args accordingly.
--- testsuite/libffi.call/float2.c.orig Sun Oct 4 16:09:40 2009
+++ testsuite/libffi.call/float2.c Mon Oct 5 07:19:28 2009
@@ -45,7 +45,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 */
Fix regression test, due to "comparison between signed and unsigned"
--- testsuite/libffi.call/return_uc.c.orig Sat Sep 19 16:11:15 2009
+++ testsuite/libffi.call/return_uc.c Sat Sep 19 16:11:19 2009
@@ -32,7 +32,7 @@ int main (void)
uc < (unsigned char) '\xff'; uc++)
{
ffi_call(&cif, FFI_FN(return_uc), &rint, values);
- CHECK(rint == (signed int) uc);
+ CHECK(rint == (unsigned int) uc);
}
exit(0);
}