Fix building with Clang for Darwin (OS X 10.6+ and iOS

4.0+)
This commit is contained in:
Zachary Waldowski
2012-04-05 12:32:41 -04:00
committed by Anthony Green
parent 3afaa9a34a
commit 39dccddb60
14 changed files with 6960 additions and 5 deletions

BIN
testsuite/libffi.call/a.out Executable file

Binary file not shown.

View File

@@ -9,6 +9,7 @@
static int promotion(signed char sc, signed short ss,
unsigned char uc, unsigned short us)
{
printf ("%d + %d + %d + %d\n", (int) sc, (int) ss, (int) uc, (int) us);
int r = (int) sc + (int) ss + (int) uc + (int) us;
return r;
@@ -50,6 +51,7 @@ int main (void)
for (us = 0; us <= 60000; us += 10000)
{
ul++;
printf ("%d + %d + %d + %d\n", (int) sc, (int) ss, (int) uc, (int) us);
ffi_call(&cif, FFI_FN(promotion), &rint, values);
CHECK((int)rint == (signed char) sc + (signed short) ss +
(unsigned char) uc + (unsigned short) us);