On Thu, Aug 19, 2010 at 3:53 PM, Gabriel Dos Reis <span dir="ltr"><<a href="mailto:gdr@cs.tamu.edu">gdr@cs.tamu.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
understand correctly, there might be two libffi floating around: one<br>
that ECL wants, and one that comes with GNU Compiler suite. [...]<br>
What is the relation between --enable-shared and --with-dffi?<br>
</blockquote></div><br>--with-dffi is a feature that allows to call an arbitrary C function from interpreted code. The only thing one needs is a pointer to the function and a list of argument types. Data types are translated from lisp to C by ECL and the function call is performed by libffi.<br>
<br>--with-dffi is only useful when combined with --enable-shared, because the later allows finding out shared libraries, loading them and retrieving pointers to their C functions, which DFFI may then use as described before.<br clear="all">
<br>--with-dffi is only needed when you want to do FFI operations from the command line or interpreted code.<br><br>As for the coexistence of both libraries, my feeling is that libffi is a very quickly evolving library. Now, I only have libffi as shipped with Debian and with OS X and they more or less look the same, and indeed ECL builds just fine in both platforms with --with-dffi enabled. Cygwin and mingw may be either shipping a much older or much newer version, or a version with some functionality removed due to security reasons (arbitrary function calls? callbacks?), I really can not tell.<br>
<br>Juanjo<br><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>