[MLton] cvs commit: Indirect C calls.

Stephen Weeks MLton@mlton.org
Thu, 23 Sep 2004 12:38:11 -0700


> Please try out doc/examples/ffi/iimport.sml, especially on non x86
> platforms.

Here's what I learned trying iimport.sml on various platforms.

------------------------------------------------------------
Cygwin	OK, but -link-opt -ldl isn't needed because dlopen and friends
	are available in libcygwin.  Also, I needed to change the
	library file name from "libm.so" to "cygwin1.dll".

Darwin	can't test.  :-(

{Free,Net,Open}BSD
	OK, but -link-opt -ldl isn't needed because dlopen and friends
	are available in libc.

Linux	OK

MinGW	Doesn't work.  I'm not sure where to get dlopen and friends.
	Brent, do you have any ideas here?

Solaris	OK, but -link-opt -ldl isn't needed because it's already in
	bin/mlton.
------------------------------------------------------------

To make things easier, I've taken the -link-opt -ldl out of
ffi/Makefile and put a -target-link-opt linux -ldl in bin/mlton.  I
also tweaked iimport.sml so it loads the right file on Cygwin.