ntohl is not available on Windows

Description

None

Environment

Windows

Activity

Show:
Anonymous
April 28, 2015, 9:51 AM

fitflop singapore outlet
fitflop clearance http://fitflopsingapore.iemiller.net/

Anonymous
April 25, 2015, 11:47 PM

ash boots sale online
ash outlet sale http://ashwedge.blogspot.com/

jjinkou2
July 25, 2013, 3:09 PM
Edited

I had the same problem. I tried to solve it like you suggest with a few tweaks.
For windows i had to copy two files (ntohl.c and ntohl.h) written by Neil Mitchell available here :
http://haskell.1045720.n5.nabble.com/Hat-on-Windows-patches-td3197944.html

i put them inside the directory src/Network/Transport

then i added this line inside the cabal file:
network-transport.cabal
------------------------------

c-sources: ./src/Network/Transport/ntohl.c

i compiled also the ntohl.c with gcc -c ntohl.c -o ntohl.o

may be thoses modifications could be included for next compilation of network-transport.

i didn't coded for htonl and ntohs, htons but it seems they are also undefined in the libHSnetwork-transport-0.3.0.1.a

Pankaj More
February 9, 2013, 12:25 PM

http://code.haskell.org/hat/include/ntohl.h and the corresponding c file with an FFI call might be useful?

Assignee

Tim Watson

Reporter

Edsko de Vries

External issue ID

None

OS

None

Affects versions

Priority

Blocker