[MLton] Re: [MLton-commit] r4570

Matthew Fluet fluet@cs.cornell.edu
Tue, 23 May 2006 17:15:39 -0400 (EDT)


> Hrm - apparently this stub is needed by mlprof
> ----------------------------------------------------------------------
>
> +// This is not windows
> +__attribute__ ((noreturn))
> +C_Errno_t(C_PId_t) MLton_Process_cwait (__attribute__ ((unused)) C_PId_t pid,
> +                                        __attribute__ ((unused)) Ref(C_Status_t) status) {
> +        die("MLton_Process_cwait not implemented");
> +}

This is a resurgence of the issue described here:
   http://mlton.org/pipermail/mlton/2006-February/028462.html

It's not an unexpected change, mostly arising from the fact that 
the MLton_Process_cwait import is auto-generated in basis-ffi.sml, and so 
there wasn't a natural place to express the conditional binding that fixed 
the problem before:
   http://mlton.org/pipermail/mlton/2006-February/028462.html

It would be easy enough to add a basis-ffi.2.sml that rebinds PrimitiveFFI 
along with the conditional bindings like above, although I still think it 
is a good idea that libmlton.a have fallback functions in case the 
optimizer doesn't drop the function.