-- This is for a box running cygwin32 toolchain.
-#if defined(_WIN32)
+#if defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS)
data SocketType =
Stream
| Datagram
\begin{code}
withSocketsDo :: IO a -> IO a
-#ifndef _WIN32
+#if !defined(HAVE_WINSOCK_H) || defined(cygwin32_TARGET_OS)
withSocketsDo x = x
#else
withSocketsDo act = do