Re: FFI



Aleksej Saushev <asau@xxxxxxxx> wrote:
Josh Grams <josh@xxxxxxxxxxx> writes:

There is also libffi (which has been merged into gcc, I think, but
isn't usually installed as a user library). I don't know as much
about it. At first glance, it doesn't look so good (I can't tell
whether it works on Windows, and it's definitely missing variadic
functions and bitfields and maybe callbacks).

You're completely mistaken:
a) ffcall is still developed, but it wasn't released (write Bruno
a polite reminder to help it);
b) libffi isn't bundled with gcc (though it was in past).

Not all Linux distros bundle libffi as part of their gcc packages, but
it is bundled with gcc.

Libffi works on Windows. Bitfields and callbacks are fine. Variadic
functions is an interesting point, but AFAICR no ABI I use treats them
any differently from functions with fixed arity. Does Windows? I
can't remember.

Andrew.
.



Relevant Pages

  • Re: FFI
    ... At first glance, it doesn't look so good (I can't tell ... Not all Linux distros bundle libffi as part of their gcc packages, ...
    (comp.lang.forth)
  • Re: FFI
    ... At first glance, it doesn't look so good (I can't tell ... Not all Linux distros bundle libffi as part of their gcc packages, ...
    (comp.lang.forth)
  • Re: IsBadWritePtr equivalent?
    ... an implementation of "IsBadWritePtr" for gcc to run the app on ... IsBadWritePtr in Windows, basically verifies that the calling process ... The IsBadXxxPtr() functions check to see if the memory being pointed to ...
    (comp.lang.c)
  • Re: Different code behaviour in Unix & Windows
    ... Please post compiler versions for both Windows and Linux. ... gcc --version will pop the version number for gcc. ... algorithm guarantees that the final result will fit into `a`. ...
    (comp.lang.c)
  • Re: OT: Simple to use programming environment for Windows
    ... Runs under Windows, if only in a DOS box. ... Unix shell, but I have used command line environments before (I wrote my ... The gcc files on the net are .tar.gz so I assume this is some zip file ...
    (sci.math)