Skip to content
Snippets Groups Projects
Commit 92a747a7 authored by sof's avatar sof
Browse files

[project @ 1999-07-03 19:15:26 by sof]

Don't use WinSock under cygwin
parent e95d9ed1
No related merge requests found
...@@ -1252,7 +1252,7 @@ use @withSocketsDo@...: ...@@ -1252,7 +1252,7 @@ use @withSocketsDo@...:
\begin{code} \begin{code}
withSocketsDo :: IO a -> IO a withSocketsDo :: IO a -> IO a
#ifndef _WIN32 #if !defined(HAVE_WINSOCK_H) || defined(__CYGWIN32__)
withSocketsDo x = x withSocketsDo x = x
#else #else
withSocketsDo act = do withSocketsDo act = do
......
#ifndef GHC_SOCKETS_H #ifndef GHC_SOCKETS_H
#define GHC_SOCKETS_H #define GHC_SOCKETS_H
#ifdef HAVE_WINSOCK_H #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
#include <winsock.h> #include <winsock.h>
#else #else
...@@ -94,7 +94,7 @@ StgInt setSocketOption__ (StgInt, StgInt, StgInt); ...@@ -94,7 +94,7 @@ StgInt setSocketOption__ (StgInt, StgInt, StgInt);
StgInt writeDescriptor (StgInt, StgAddr, StgInt); StgInt writeDescriptor (StgInt, StgAddr, StgInt);
/* initWinSock.c */ /* initWinSock.c */
#ifdef _WIN32 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
StgInt initWinSock(); StgInt initWinSock();
void shutdownWinSock(); void shutdownWinSock();
#endif #endif
......
...@@ -5,10 +5,13 @@ ...@@ -5,10 +5,13 @@
#include "stgio.h" #include "stgio.h"
#ifdef _WIN32 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
#define USE_WINSOCK
#endif
/* Initialising WinSock... */ #ifdef USE_WINSOCK
/* Initialising WinSock... */
StgInt StgInt
initWinSock () initWinSock ()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment