foreign import stdcall "wrapper" on non-x86

Simon Marlow simonmar at microsoft.com
Wed Jan 12 05:05:40 EST 2005


On 11 January 2005 20:24, Wolfgang Thaller wrote:

> Testcase ffi012 segfaults at runtime on non-x86 platforms.
> 
> via-C compilation warns about an ignored stdcall attribute, and
> createAdjustor simply returns NULL.
> How should this be fixed?
> 	1.) Make createAdjustor barf instead of segfault.
> 	2.) Make createAdjustor silently use ccall.
> 	3.) Make DsForeign handle this by
> 		a) aborting with an error when stdcall is used on
non-Win32
> 		b) treating stdcall as a synonym for ccall on non-Win32
> 		c) like b, but issue a warning.

I've made it an error to use stdcall if the target is non-x86.  Is that
ok?

Cheers,
	Simon


More information about the Cvs-ghc mailing list