Commit f22c38bbd93bcc0c04bf26c3e414556b3177c385

Anthony Green 2011-11-18T15:13:41

Update variadic patch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/patches/variadic b/patches/variadic
index f9efba4..5559ae3 100644
--- a/patches/variadic
+++ b/patches/variadic
@@ -348,6 +348,16 @@ Index: libffi/testsuite/libffi.call/cls_double_va.c
  		arg_types) == FFI_OK);
  
  	args[0] = &format;
+@@ -49,6 +50,9 @@ int main (void)
+ 	printf("res: %d\n", (int) res);
+ 	// { dg-output "\nres: 4" }
+ 
++	/* The call to cls_double_va_fn is static, so have to use a normal prep_cif */
++	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, arg_types) == FFI_OK);
++
+ 	CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL, code) == FFI_OK);
+ 
+ 	res	= ((int(*)(char*, double))(code))(format, doubleArg);
 Index: libffi/testsuite/libffi.call/cls_longdouble_va.c
 ===================================================================
 --- libffi.orig/testsuite/libffi.call/cls_longdouble_va.c