#ifndef GHC_SOCKETS_H
#define GHC_SOCKETS_H
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
+#else
+
#include <ctype.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/uio.h>
/* ToDo: featurise this */
-#ifndef cygwin32_TARGET_OS
+#if !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS)
#include <sys/un.h>
#endif
# include <unistd.h>
#endif
+#endif /* !HAVE_WINSOCK_H */
+
/* acceptSocket.lc */
StgInt acceptSocket (StgInt, StgAddr, StgAddr);
/* writeDescriptor.lc */
StgInt writeDescriptor (StgInt, StgAddr, StgInt);
+/* initWinSock.c */
+#ifdef _WIN32
+StgInt initWinSock();
+void shutdownWinSock();
+#endif
#endif /* !GHC_SOCKETS_H */