Skip to content

Commit 350ebd4

Browse files
committed
win32: add compat
1 parent c8b86bf commit 350ebd4

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

System/Win32/NamedPipes.hsc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <fcntl.h>
22
#include <windows.h>
33

4+
#include "namedpipeapi_compat.h"
5+
46
{-# LANGUAGE CPP #-}
57
{-# LANGUAGE BangPatterns #-}
68
{-# LANGUAGE MultiWayIf #-}

Win32.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Library
155155
ghc-options: -Wall
156156
include-dirs: include
157157
includes: "alphablend.h", "diatemp.h", "dumpBMP.h", "ellipse.h", "errors.h", "HsGDI.h", "HsWin32.h", "Win32Aux.h", "win32debug.h", "windows_cconv.h", "WndProc.h", "alignment.h"
158-
install-includes: "HsWin32.h", "HsGDI.h", "WndProc.h", "windows_cconv.h", "alphablend.h", "wincon_compat.h", "winternl_compat.h", "winuser_compat.h", "winreg_compat.h", "tlhelp32_compat.h", "winnls_compat.h", "winnt_compat.h"
158+
install-includes: "HsWin32.h", "HsGDI.h", "WndProc.h", "windows_cconv.h", "alphablend.h", "wincon_compat.h", "winternl_compat.h", "winuser_compat.h", "winreg_compat.h", "tlhelp32_compat.h", "winnls_compat.h", "winnt_compat.h", "namedpipeapi_compat.h"
159159
c-sources:
160160
cbits/HsGDI.c
161161
cbits/HsWin32.c

include/namedpipeapi_compat.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* The version of wincon.h provided by the version of MSYS2 included with x86
2+
* versions of GHC before GHC 7.10 excludes certain components introduced with
3+
* Windows Vista.
4+
*/
5+
6+
#ifndef NAMEDPIPEAPI_COMPAT_H
7+
#define NAMEDPIPEAPI_COMPAT_H
8+
9+
#if defined(x86_64_HOST_ARCH) || __GLASGOW_HASKELL__ > 708
10+
#
11+
#else
12+
13+
#define PIPE_ACCEPT_REMOTE_CLIENTS 0x0
14+
#define PIPE_REJECT_REMOTE_CLIENTS 0x8
15+
#endif /* GHC version check */
16+
#endif /* NAMEDPIPEAPI_COMPAT_H */

0 commit comments

Comments
 (0)