[MLton] Compiling mlton on MacOS
John Reppy
jhr@cs.uchicago.edu
Fri, 2 Jan 2004 16:59:27 -0600
I made some progress on the port, before hitting an MLRISC bug in SML/NJ
(I hope to get that fixed for 110.45). Do you want my diffs so far, or
do you
want to wait until I get a working version?
There are a couple of things that I think could be improved in the
porting
process. One is that you should move to testing features instead of
operating
system in your header files. For example, for this
MLton_Rlimit_virtualMemorySize
constant, the test is
#if (defined (__FreeBSD__) || defined (__NetBSD__) ||
defined(__APPLE__))
#define MLton_Rlimit_virtualMemorySize RLIMIT_DATA
#elif (defined (__CYGWIN__) || defined (__linux__) || defined
(__sun__))
#define MLton_Rlimit_virtualMemorySize RLIMIT_AS
#else
#error MLton_Rlimit_virtualMemorySize not defined
#endif
when the following would be more robust
#if defined(RLIMIT_AS)
#define MLton_Rlimit_virtualMemorySize RLIMIT_AS
#elif defined(RLIMIT_DATA
#define MLton_Rlimit_virtualMemorySize RLIMIT_DATA
#else
#error MLton_Rlimit_virtualMemorySize not defined
#endif
In the long run, I think that you should consider using autoconf.
Also, the files bin/platform and build/lib/platform are identical. Do
you really
need both?
- John