[Haskell-cafe] HDBC with SQL Server / OBDC

Andrew Appleyard andrew.appleyard at gmail.com
Fri May 30 01:56:00 EDT 2008

On Wed, May 28, 2008 at 12:46 AM, Olivier Boudry
<olivier.boudry at gmail.com> wrote:
> If the calling convention is stdcall on Windows and ccall on other OS then
> it should be defined based on the OS. This can be done by updating the .hsc
> files to define the calling convention as a "macro" depending on the OS
> type.
> #ifdef mingw32_HOST_OS
> #let CALLCONV = "stdcall"
> #else
> #let CALLCONV = "ccall"
> #endif
> And the foreign import should use CALLCONV instead of ccall.
> This should make it work on Windows and not break it on Linux.

Thanks Olivier, that's neater than I thought.  I'll put a patch together.

-- Andrew

More information about the Haskell-Cafe mailing list