Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some windows fixes

  • Loading branch information...
commit 4346da662711dc749b4d0152b38cadd8778956f3 1 parent 444fd65
@taruti authored
Showing with 8 additions and 4 deletions.
  1. +3 −1 Network/Fancy.hsc
  2. +5 −3 network-fancy.cabal
View
4 Network/Fancy.hsc
@@ -33,11 +33,13 @@ import System.Posix.Internals hiding(c_close)
import GHC.IO.Device
#endif
+#ifndef WINDOWS
#include <errno.h>
#include <sys/socket.h>
#include <netdb.h>
-#ifndef WINDOWS
#include <sys/un.h>
+#else
+#include <winsock2.h>
#endif
type HostName = String
View
8 network-fancy.cabal
@@ -20,7 +20,8 @@ Executable network-fancy-test
Extensions: TypeSynonymInstances, ForeignFunctionInterface, CPP,
DeriveDataTypeable, FlexibleInstances, RankNTypes
if os(windows)
- CPP-Options: -DWINDOWS=WINDOWS -DCALLCONV=stdcall
+ CPP-Options: -DWINDOWS=WINDOWS -DCALLCONV=stdcall
+ Extra-Libraries: ws2_32
else
CPP-Options: -DCALLCONV=ccall
@@ -32,6 +33,7 @@ Library
DeriveDataTypeable, FlexibleInstances, RankNTypes
GHC-Options: -Wall
if os(windows)
- CPP-Options: -DWINDOWS=WINDOWS -DCALLCONV=stdcall
+ CPP-Options: -DWINDOWS=WINDOWS -DCALLCONV=stdcall
+ Extra-Libraries: ws2_32
else
- CPP-Options: -DCALLCONV=ccall
+ CPP-Options: -DCALLCONV=ccall
Please sign in to comment.
Something went wrong with that request. Please try again.