[MLton] Problem with MinGW
   
    Wesley W. Terpstra
     
    terpstra@gkec.informatik.tu-darmstadt.de
       
    Fri, 9 Jun 2006 00:02:49 +0200
    
    
  
On Jun 8, 2006, at 11:29 PM, Wesley W. Terpstra wrote:
> This is indeed the problem!
I might be jumping the gun here.
I don't know calling conventions at all, but I thought a 16 bit value  
gets promoted to a 32 bit one?
Why is the mode being pushw'd? Yes mode_t is an unsigned short, but  
does that mean only 16 bits on the stack?
Also, open() is one of the few functions defined with varargs; this  
might be a complicating factor.
It's just that by adding a pushw, my patch might also be construed as  
promoting the 16 bit value to 32 bits.
Admittedly, the runtime printf()s it as zero either way, so perhaps  
this doesn't matter.