[commit: Win32] master: Use CPP to not build the SimpleMAPI module content on Win64 (fe0dad3)
Ian Lynagh
igloo at earth.li
Sat Mar 17 17:09:06 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Win32
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/fe0dad32ba351483f7d370acd3aafb747c2ab4b1
>---------------------------------------------------------------
commit fe0dad32ba351483f7d370acd3aafb747c2ab4b1
Author: Ian Lynagh <igloo at earth.li>
Date: Thu Mar 15 23:40:01 2012 +0000
Use CPP to not build the SimpleMAPI module content on Win64
I am not sure why exactly, but with mingw64 mapi.h does not define
some of the values we use, e.g. MAPI_LOGOFF_SHARED.
mapix.h does define MAPI_LOGOFF_SHARED, but the various flags
clash with each other.
So for now we only define the module content on i386.
>---------------------------------------------------------------
System/Win32/SimpleMAPI.hsc | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/System/Win32/SimpleMAPI.hsc b/System/Win32/SimpleMAPI.hsc
index 44946d2..09e178d 100644
--- a/System/Win32/SimpleMAPI.hsc
+++ b/System/Win32/SimpleMAPI.hsc
@@ -16,6 +16,14 @@
-----------------------------------------------------------------------------
module System.Win32.SimpleMAPI
where
+
+-- I am not sure why exactly, but with mingw64 mapi.h does not define
+-- some of the values we use, e.g. MAPI_LOGOFF_SHARED.
+-- mapix.h does define MAPI_LOGOFF_SHARED, but the various flags
+-- clash with each other.
+-- So for now we only define the module content on i386.
+#if __i386__
+
import Control.Exception ( bracket, handle, finally, onException
, IOException )
import Control.Monad ( liftM5 )
@@ -398,3 +406,4 @@ mapiSendMail f ses hwnd msg flag = withMessage f ses msg $ \msg ->
handleIOException :: (IOException -> IO a) -> IO a -> IO a
handleIOException = handle
+#endif
More information about the Cvs-libraries
mailing list