The problem is that the necessary header file (config.h) isn't included in that module. This was fixed a while ago in HEAD. --sigbjorn ----- Original Message ----- From: "Peter Strand" <d98peter@dtek.chalmers.se> To: "C.Reinke" <C.Reinke@ukc.ac.uk> Cc: <glasgow-haskell-users@haskell.org> Sent: Monday, March 17, 2003 13:34 Subject: Re: Network/Notwork?
Hi,
On Mon, Mar 17, 2003 at 07:01:20PM +0000, C.Reinke wrote:
Windows only, of course!-) On Solaris, I never even noticed there might be a problem (it seems to work even without acknowledgment or hFlush..).
One explanation could be that hClose ends up calling close instead of closesocket under windows.
I tried your example, and got the same error (under win2k). But by using a slightly modified hClose, everything seemed to work well.
In base/GHC/Handle.hs there is a preprocessor conditional on mingw32_TARGET_OS which seems to be undefined in the distributed compilation (I used 5.04.3). By explicitly calling closeFd there instead of c_close it works for me. Perhaps it should trigger on WITH_WINSOCK instead?