[network] #5: getAddrInfo and addrFamily not in scope on Windows GHC 6.8

#5: getAddrInfo and addrFamily not in scope on Windows GHC 6.8 ---------------------+------------------------------------------------------ Reporter: igloo | Owner: Type: defect | Status: new Priority: major | Milestone: Component: network | Version: Keywords: | ---------------------+------------------------------------------------------ Originally reported here: http://hackage.haskell.org/trac/ghc/ticket/2726 ---- import Network.Socket ... getAddrInfo ... addrFamily -- gives me not in scope on Windows. The same code works on Unix. ---- Looking at the code, these are only available if `IPV6_SOCKET_SUPPORT` is defined. I don't know more than that off the top of my head. -- Ticket URL: http://trac.haskell.org/network/ticket/5 network http://projects.haskell.org/network/ Networking-related facilities

#5: getAddrInfo and addrFamily not in scope on Windows GHC 6.8 ----------------------+----------------------------------------------------- Reporter: igloo | Owner: bos Type: defect | Status: assigned Priority: major | Milestone: Component: network | Version: Resolution: | Keywords: ----------------------+----------------------------------------------------- Changes (by bos): * owner: => bos * status: new => assigned Comment: This is really ugly to deal with. I've got tentative code that ''should'' (but doesn't) detect {{{getaddrinfo}}} on Windows properly. Easy, right? The base problem is that a working version of the function wasn't introduced until Windows XP, but there's a cheeeezy hack for ''some'' earlier releases that tries to find a half-working version in {{{wship6.dll}}} via a runtime probe. Gruesome details near the end of this page: http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx Gruesome details, part deux, in this thread: http://readlist.com/lists/lists.sourceforge.net/mingw-users/0/1544.html Because autoconf goes out of its way to find a nice clean definition of a function, it's not even straightforward to write a correct autoconf macro to find {{{getaddrinfo}}} correctly on Windows. I'm trying to set the {{{WINVER}}} macro to {{{0x0501}}} (aka {{{WindowsXP}}}), but autoconf is undoing my work by deliberately doing a {{{#undef getaddrinfo}}}. It's all rather confusing. -- Ticket URL: http://trac.haskell.org/network/ticket/5#comment:1 network http://projects.haskell.org/network/ Networking-related facilities

#5: getAddrInfo and addrFamily not in scope on Windows GHC 6.8 ----------------------+----------------------------------------------------- Reporter: igloo | Owner: bos Type: defect | Status: assigned Priority: major | Milestone: Component: network | Version: Resolution: | Keywords: ----------------------+----------------------------------------------------- Comment (by anonymous): I've pushed some changes to the darcs repo that sort of fix this, but the code will only work on XP and Vista. I'll write a version of {{{getaddrinfo}}} that should work on Windows 2000 with the IPv6 technology preview (it'll look in {{{ws2_32.dll}}} then {{{wship6.dll}}} at runtime, instead of link time), but it'll be maybe a week before I get that done. -- Ticket URL: http://trac.haskell.org/network/ticket/5#comment:2 network http://projects.haskell.org/network/ Networking-related facilities
participants (1)
-
network