Network library patches

Neil Mitchell ndmitchell at gmail.com
Wed Mar 3 16:26:17 EST 2010


Hi,

I like Windows. I like networks. I love GHC 6.12.1. Having all three
in combination would be fantastic :-)

Given the Haskell platform will certainly include network (as an
ex-GHC package), does anyone from the haskell-platform team want to
pick up the Windows pieces and put together a working network?

I've got a locally patched version of network, which I'm using with
great success - but that's not much benefit to the rest of the
community.

Thanks, Neil

On Tue, Feb 16, 2010 at 11:10 PM, Claus Reinke <claus.reinke at talk21.com> wrote:
>> 1) Install Cygwin 1.7 (include autoreconf)
>
> ..
>>
>> 4) Change all instances of CALLCONV to stdcall
>> 5) cabal install
>>
>> Please can you apply the attached patch, which should be compatible
>> with Linux/Mac too. I found lots of references to CALLCONV all over
>> the place, but couldn't figure out where it started/ended up - my
>> attempts at #define were rather unsuccessful. Could you please change
>> the logic so Windows gets stdcall as standard?
>
> That part rings a bell, as the opengl binding had the same issue
> when dropping out of ghc's extralibs: those packages tend to be
> integrated into ghc's build system (or one version thereof), which
> sets things like CALLCONV. This particular setting tended to
> happen (ghc's build system has changed since I last looked, and I
> can't check right now) in configure (generated from configure.ac),
> by simply checking the build's $host variable for '*-mingw32'.
>
> This doesn't work when building on cygwin (even when using
> the mingw tool chain, configure will see cygwin as the host),
> and the simple workaround was only documented for ghc
> builds, not for the packages depending on ghc's build system.
>
> If that information is still relevant, you should be able to get
> around the CALLCONV issue when building from cygwin by
> passing a configure option. Here is the example that used to
> do the trick for building opengl/glut from cygwin:
>
>   cabal install opengl glut --configure-option="--host=i386-unknown-mingw32"
> --reinstall
>
> A better solution would be for configure to test for the
> gcc tool chain, not the host environment, before setting
> CALLCONV. Might apply to other packages that have
> dropped out of the old extralibs.
>
> Hope this helps,
> Claus
>
>
>


More information about the Libraries mailing list