Pulled in libffi from gcc trunk.

Fixed build and install for standalone use.
This commit is contained in:
tromey
2006-12-24 23:12:15 +00:00
parent e7ba089659
commit e680ecfbfc
222 changed files with 68102 additions and 11622 deletions

View File

@@ -1,3 +1,10 @@
/* Area: ffi_call
Purpose: Check strlen function call.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run } */
#include "ffitest.h"
static size_t my_strlen(char *s)
@@ -5,18 +12,17 @@ static size_t my_strlen(char *s)
return (strlen(s));
}
int
main ()
int main (void)
{
ffi_cif cif;
ffi_type *args[1];
void *values[1];
int rint FFI_ALIGN_RVALUE;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
ffi_arg rint;
char *s;
args[0] = &ffi_type_pointer;
values[0] = (void*) &s;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
&ffi_type_sint, args) == FFI_OK);