[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:59:16 UTC 2010


The following commit has been merged in the master branch:
commit fe642cff7f17e2da23bcd2e2ccb8fafd54d26f89
Author: John Goerzen <jgoerzen at complete.org>
Date:   Thu Jul 21 20:18:47 2005 +0100

    Fixed Syslog.hs to compile on Windows

diff --git a/MissingH/Logging/Handler/Syslog.hs b/MissingH/Logging/Handler/Syslog.hs
index e9ee831..b7531a8 100644
--- a/MissingH/Logging/Handler/Syslog.hs
+++ b/MissingH/Logging/Handler/Syslog.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {- arch-tag: Syslog handler
 Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
 
@@ -63,7 +64,9 @@ import Data.Bits
 import Network.Socket
 import Network.BSD
 import List
+#ifndef mingw32_HOST_OS
 import System.Posix.Process(getProcessID)
+#endif
 import IO
 
 code_of_pri :: Priority -> Int
@@ -212,7 +215,11 @@ instance LogHandler SyslogHandler where
             getpid :: IO String
             getpid = if (elem PID (options sh))
                      then do
+#ifndef mingw32_HOST_OS
                           pid <- getProcessID
+#else
+                          let pid = "windows"
+#endif
                           return ("[" ++ show pid ++ "]")
                      else return ""
                      

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list