Commit 7d2478568ed9f03cbf57627f449a2d2cf4d1571c

Anthony Green 2014-03-25T16:12:17

Merge pull request #110 from joshtriplett/w64 Fix 64-bit Windows support

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