Skip to content

Commit e9b4b2f

Browse files
committed
PORT: #1514 Windows: make sure PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE is defined.
1 parent e5f9206 commit e9b4b2f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/pl-nt.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@
3636

3737
#ifdef __WINDOWS__
3838
#undef _WIN32_WINNT
39-
#define _WIN32_WINNT 0x0A00 /* PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE */
39+
#define _WIN32_WINNT 0x0A00 /* Windows 10 */
40+
#undef NTDDI_VERSION /* Windows 10 1809: pseudo console. */
41+
#define NTDDI_VERSION 0x0A000006 /* PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE */
4042
#define SWIPL_WINDOWS_NATIVE_ACCESS 1
4143
#include <winsock2.h> /* Needed on VC8 */
4244
#include <windows.h>
4345
#include <psapi.h>
4446

47+
#ifndef PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE /* older SDK */
48+
#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016
49+
#endif
50+
4551
#ifdef __MINGW32__
4652
#ifndef _WIN32_IE
4753
#define _WIN32_IE 0x0400

0 commit comments

Comments
 (0)