Skip to content
Snippets Groups Projects
Commit 72779ca1 authored by sof's avatar sof
Browse files

[project @ 1999-07-29 13:57:34 by sof]

Recent CPP-related wibblement meant that _WIN32 wasn't defined when
the pre-proc was run (cf. -undef usage.) Avoid the use of _WIN32
parent 92ddb923
No related merge requests found
......@@ -61,7 +61,7 @@ signalling that the current hostname applies.
data PortID =
Service String -- Service Name eg "ftp"
| PortNumber PortNumber -- User defined Port Number
#ifndef _WIN32
#if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS)
| UnixSocket String -- Unix family socket in file system
#endif
......@@ -93,7 +93,7 @@ connectTo hostname (PortNumber port) = do
connect sock (SockAddrInet port (hostAddress he))
socketToHandle sock ReadWriteMode
#ifndef _WIN32
#if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS)
connectTo _ (UnixSocket path) = do
sock <- socket AF_UNIX Datagram 0
connect sock (SockAddrUnix path)
......@@ -124,7 +124,7 @@ listenOn (PortNumber port) = do
listen sock maxListenQueue
return sock
#ifndef _WIN32
#if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS)
listenOn (UnixSocket path) = do
sock <- socket AF_UNIX Datagram 0
bindSocket sock (SockAddrUnix path)
......@@ -195,7 +195,7 @@ socketPort s = do
portID sa =
case sa of
SockAddrInet port _ -> PortNumber port
#ifndef _WIN32
#if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS)
SockAddrUnix path -> UnixSocket path
#endif
......
......@@ -958,7 +958,7 @@ packSocketType stype = 1 + (index (Stream, SeqPacket) stype)
-- This is for a box running cygwin32 toolchain.
#if defined(_WIN32)
#if defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS)
data SocketType =
Stream
| Datagram
......
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