I have updated the very cool Ffidl extension
to support Darwin/Mac OS X, as well as modernized it in other ways:
- updates for 2005 versions of libffi & ffcall
- TEA 3.2 buildsystem, testsuite
- support for Tcl 8.4, TclpDlopen, Tcl_WideInt
- fixes for 64bit LP64
- callouts & callbacks are created/used relative to current namespace
(for unqualified names)
- addition of [ffidl::stubsymbol] for Tcl/Tk symbol resolution via
- callbacks can be called anytime, not just from inside callouts
(using Tcl_BackgroundError to report errors)
the testsuite is just the existing tests wrapped into .test files.
updated docs at
source tarball at
full source tarball, also including libffi and ffcall sources at:
Ffidl either uses unmodified ffcall 1.10:
or the HEAD of libffi from the gcc CVS:
with a small patch to the buildsystem to make it build standalone (i.e.
without relying on the gcc sourcetree structure):
Note that libffi is under BSD license but ffcall is GPLd.
the diff of ffidl.c against the 0.5 version is available for info:
Mac OS X ffidl binaries (with libffi) are available as installer
package or tarball:
I have tested & exercised this quite extensively on Mac OS X 10.3 (with
both libffi and ffcall), and have verified that it builds and passes
the testsuite on Windows XP with MinGW (in Virtual PC on my Mac...)
I have also built ffidl and run the testsuite on all the machines in
the sourceforge compilefarm:
hosts passing the testuite with both libffi and ffcall:
host core dumping when running the testsuite (with both libffi and
hosts passing the testuite with ffcall, but where building the libffi
the last two may be fixable by reverting to an earlier version of libffi
I will post an example of how to use Ffidl to access Carbon APIs on Mac
OS X in a separate post to tcl-mac.
Hope this is useful, enjoy!
** Daniel A. Steffen ** "And now for something completely
** Dept. of Mathematics ** different" Monty Python
** Macquarie University ** <mailto:steffen@...>
** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/>