On Thu, Aug 19, 2010 at 3:53 PM, Gabriel Dos Reis <g...@cs.tamu.edu> wrote:

> understand correctly, there might be two libffi floating around: one
> that ECL wants, and one that comes with GNU Compiler suite.  [...]
> What is the relation between --enable-shared and --with-dffi?
>

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

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

--with-dffi is only needed when you want to do FFI operations from the
command line or interpreted code.

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.

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to