public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* libffi 3.2.1 and master, can't build with Visual Studio 2012
@ 2014-11-18 15:23 Grégory Pakosz
  2014-11-18 16:02 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Grégory Pakosz @ 2014-11-18 15:23 UTC (permalink / raw)
  To: libffi-discuss; +Cc: nield.a.d, rth

​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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-21 18:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 15:23 libffi 3.2.1 and master, can't build with Visual Studio 2012 Grégory Pakosz
2014-11-18 16:02 ` Richard Henderson
2014-11-18 17:14   ` Grégory Pakosz
2015-04-21 18:15     ` Grégory Pakosz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).