[commit: packages/Win32] win32-2.5.4.1-ghc-8.2: GH85: Fix 32bit long ptr (f4f2512)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:29:08 UTC 2017


Repository : ssh://git@git.haskell.org/Win32

On branch  : win32-2.5.4.1-ghc-8.2
Link       : http://git.haskell.org/packages/Win32.git/commitdiff/f4f2512ba9618c40fb911ab386996a3dbbd609be

>---------------------------------------------------------------

commit f4f2512ba9618c40fb911ab386996a3dbbd609be
Author: Tamar Christina <tamar at zhox.com>
Date:   Mon Apr 3 20:50:14 2017 +0100

    GH85: Fix 32bit long ptr


>---------------------------------------------------------------

f4f2512ba9618c40fb911ab386996a3dbbd609be
 Graphics/Win32/LayeredWindow.hsc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Graphics/Win32/LayeredWindow.hsc b/Graphics/Win32/LayeredWindow.hsc
index b811150..9bd9906 100644
--- a/Graphics/Win32/LayeredWindow.hsc
+++ b/Graphics/Win32/LayeredWindow.hsc
@@ -52,8 +52,13 @@ foreign import WINDOWS_CCONV unsafe "windows.h GetLayeredWindowAttributes"
 foreign import WINDOWS_CCONV unsafe "windows.h UpdateLayeredWindow"
   c_UpdateLayeredWindow :: HANDLE -> HDC -> Ptr POINT -> Ptr SIZE ->  HDC -> Ptr POINT -> COLORREF -> Ptr BLENDFUNCTION -> DWORD -> IO BOOL
 
+#if defined(x86_64_HOST_ARCH)
 foreign import WINDOWS_CCONV "windows.h GetWindowLongPtrW"
   c_GetWindowLongPtr :: HANDLE -> INT -> IO LONG_PTR
+#else
+foreign import WINDOWS_CCONV "windows.h GetWindowLongW"
+  c_GetWindowLongPtr :: HANDLE -> INT -> IO LONG_PTR
+#endif
 
 #{enum DWORD,
  , uLW_ALPHA    = ULW_ALPHA



More information about the ghc-commits mailing list