libffi fix

Closes PR 13707
This commit is contained in:
Matthew Flatt 2013-04-25 08:07:10 -06:00
parent ab9caeb05c
commit fa297566f1
2 changed files with 9 additions and 1 deletions

View File

@ -20,6 +20,9 @@ Local changes:
* In "x86/darwin.S", added ".long 0" after ".LFE3:" to avoid
linker problems compiling with gcc-4.0 on Mac OS X 10.7.
* In "x86/ffi.c" for Win32, don't try to align stack for
stdcall, fastcall, or thiscall.
========== libffi_msvc directory =====================================
This directory is synced from the CTypes repository

View File

@ -315,7 +315,12 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
cif->bytes += 4 * sizeof(ffi_arg);
#endif
cif->bytes = (cif->bytes + 15) & ~0xF;
#ifdef X86_WIN32
if ((cif->abi != FFI_STDCALL)
&& (cif->abi != FFI_FASTCALL)
&& (cif->abi != FFI_THISCALL))
#endif
cif->bytes = (cif->bytes + 15) & ~0xF;
return FFI_OK;
}