Small problems?

Stephen Weeks MLton@research.nj.nec.com
Fri, 5 Nov 1999 10:28:14 -0800 (PST)


> The function MLTON_overflow is there, but I see there are 3 functions
> with
> assembler code, and it looks like jumps to an MLTON_overflow label.
> Any ideas as to what I can do about this?

I don't know why it's not working, but those functions are only used
if you run mlton -DDETECT_OVERFLOW.  The default for MLton is to not
do this, so, I would say that the easiest thing is to drop the
functions for now and to put a compile time error message on line 373
in mlton-lib.h instead of the signatures for those functions.

> Later I suspect that I will also run into the well known main function
> problem. In Windows applications, the main function must be
> WinMain - and I think it even has different arguments than the usual
> C main function. Where should I modify the compiler to change this?

No need to modify the compiler :-)
Line 151 of mlton-lib.h defines MLTON_main, which is what is emitted
by the compiler to define the main function.  You should be able to
change this macro to suit your needs.