Win-GHC with GnuWin32 toolset--Mingw32 replacement
Neil Mitchell
ndmitchell at gmail.com
Mon Jan 8 11:20:59 EST 2007
Hi
> For the next step, the move to DLLs produced by NativeGen, GHC uses
> what Windows calls the __cdecl calling convention (caller performs
> stack cleanup, underscore '_' prepended to function name), while to
> my knowledge DLLs require the __stdcall calling convention (callee
> performs stack cleanup, same '_' prepended and commercial-at '@' and
> number of bytes stack space appended).
Windows supports __fastdecl, __cdecl and __stdcall equally. All the
Windows API's are stdcall, apart from one or two functions which are
cdecl (those which take variable argument lists). VB 6 can only do
stdcall calls. Delphi by default does fastcall, Visual Studio by
default does cdecl - both can call any of the 3. Some tools only work
with stdcall, but most have a reasonably broad support.
I'm not sure changing from cdecl is all that necessary.
Thanks
Neil
More information about the Cvs-ghc
mailing list