diff options
author | Anthony Green <green@moxielogic.com> | 2014-03-25 16:12:17 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2014-03-25 16:12:17 -0400 |
commit | 7d2478568ed9f03cbf57627f449a2d2cf4d1571c (patch) | |
tree | 43762b317f77d7244c624e008e0e11fe5b77bd4f /src | |
parent | beab5f334d9ec5b8b91d1cc727d1029b40358e7e (diff) | |
parent | 56be47f87629e31afbcb0774aa65735f539ee972 (diff) | |
download | libffi-7d2478568ed9f03cbf57627f449a2d2cf4d1571c.tar.gz |
Merge pull request #110 from joshtriplett/w64
Fix 64-bit Windows support
Diffstat (limited to 'src')
-rw-r--r-- | src/x86/ffi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/x86/ffi.c b/src/x86/ffi.c index a02a8a1..79407ae 100644 --- a/src/x86/ffi.c +++ b/src/x86/ffi.c @@ -309,7 +309,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { if (((*ptr)->alignment - 1) & cif->bytes) cif->bytes = ALIGN(cif->bytes, (*ptr)->alignment); - cif->bytes += ALIGN((*ptr)->size, FFI_SIZEOF_ARG); + cif->bytes += (unsigned)ALIGN((*ptr)->size, FFI_SIZEOF_ARG); } #ifdef X86_WIN64 @@ -318,7 +318,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) #endif #ifndef X86_WIN32 +#ifndef X86_WIN64 if (cif->abi != FFI_STDCALL && cif->abi != FFI_THISCALL && cif->abi != FFI_FASTCALL) +#endif cif->bytes = (cif->bytes + 15) & ~0xF; #endif |