From 72779ca1925f3ec98182fd82b31bd2ba67b905e0 Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 29 Jul 1999 13:57:34 +0000 Subject: [PATCH] [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 --- ghc/lib/misc/Socket.lhs | 8 ++++---- ghc/lib/misc/SocketPrim.lhs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ghc/lib/misc/Socket.lhs b/ghc/lib/misc/Socket.lhs index b960b90..549d450 100644 --- a/ghc/lib/misc/Socket.lhs +++ b/ghc/lib/misc/Socket.lhs @@ -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 diff --git a/ghc/lib/misc/SocketPrim.lhs b/ghc/lib/misc/SocketPrim.lhs index b63f663..809cd85 100644 --- a/ghc/lib/misc/SocketPrim.lhs +++ b/ghc/lib/misc/SocketPrim.lhs @@ -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 -- 1.7.10.4