Skip to content

Commit 1604318

Browse files
committed
FIx WinIO CPP guard
Escapes the CPP guard so GHC sees it instead of hsc2hs (cherry picked from commit 530c5ec)
1 parent 6775f8c commit 1604318

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

System/Win32/Types.hsc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ foreign import ccall unsafe "_get_osfhandle"
277277

278278
-- Originally authored by Max Bolingbroke in the ansi-terminal library
279279
withHandleToHANDLE :: Handle -> (HANDLE -> IO a) -> IO a
280-
#if defined(__IO_MANAGER_WINIO__)
280+
##if defined(__IO_MANAGER_WINIO__)
281281
withHandleToHANDLE = withHandleToHANDLEPosix <!> withHandleToHANDLENative
282-
#else
282+
##else
283283
withHandleToHANDLE = withHandleToHANDLEPosix
284-
#endif
284+
##endif
285285

286-
#if defined(__IO_MANAGER_WINIO__)
286+
##if defined(__IO_MANAGER_WINIO__)
287287
withHandleToHANDLENative :: Handle -> (HANDLE -> IO a) -> IO a
288288
withHandleToHANDLENative haskell_handle action =
289289
-- Create a stable pointer to the Handle. This prevents the garbage collector
@@ -293,7 +293,7 @@ withHandleToHANDLENative haskell_handle action =
293293
windows_handle <- handleToHANDLE haskell_handle
294294
-- Do what the user originally wanted
295295
action windows_handle
296-
#endif
296+
##endif
297297

298298
withHandleToHANDLEPosix :: Handle -> (HANDLE -> IO a) -> IO a
299299
withHandleToHANDLEPosix haskell_handle action =

Win32.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Win32
2-
version: 2.10.1.0
2+
version: 2.10.1.1
33
license: BSD3
44
license-file: LICENSE
55
author: Alastair Reid, shelarcy, Tamar Christina

0 commit comments

Comments
 (0)