This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libffi 3.2.1 and master, can't build with Visual Studio 2012


âHello,

I would like to inform you it's not possible to build libffi 3.2.1Âwith Visual Studio 2012 anymore as it's not a C99 compiler.

In src/x86/ffi.c,Â

 -Âsrc/x86/ffi.c doesn't compile because
  -Âcommit 098dca6b31e declares "size_t z" variables not at the beginning of blocks whichÂis possible in C99 only
  - commit 5d6340ef2cf8 moves "int i" variable declaration from beginning to middle of block
  - this appears to be fixed in master by commit b21ec1ce783â though

- for libffi master branch, starting with commit b9ac94f3af9b1c, the now uses designated initializers, e.g:

static const struct abi_params abi_params[FFI_LAST_ABI] = {
  [FFI_SYSV] = { 1, 0 },
  [FFI_THISCALL] = { 1, 1, { R_ECX } },
  [FFI_FASTCALL] = { 1, 2, { R_ECX, R_EDX } },
  [FFI_STDCALL] = { 1, 0 },
  [FFI_PASCAL] = { -1, 0 },
  [FFI_REGISTER] = { -1, 3, { R_EAX, R_EDX, R_ECX } },
  [FFI_MS_CDECL] = { 1, 0 }
};


What do you think? Do you want to impose compiling libffi with a C99 compiler?

Regards,
Gregory


PS: The problems mentioned happen independently of the recent questions around Visual Studio supporting C99's complex types.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]