• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-org-wsl: コミット

The MinGW.org Windows System Libraries


コミットメタ情報

リビジョン91da6687c3ad48f3dba16d1e1e935c9d57a33bb8 (tree)
日時2021-06-14 03:31:36
作者Keith Marshall <keith@user...>
コミッターKeith Marshall

ログメッセージ

Update to add Win10 pseudo-console support.

変更サマリ

差分

--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,103 @@
1+2021-06-13 Keith Marshall <keith@users.osdn.me>
2+
3+ Update to add Win10 pseudo-console support.
4+
5+ * include/winbase.h [_WIN32_WINNT >= _WIN32_WINNT_VISTA]
6+ (PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL, PROTECTION_LEVEL_SAME)
7+ (EXTENDED_STARTUPINFO_PRESENT, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS)
8+ (PROC_THREAD_ATTRIBUTE_HANDLE_LIST): Define them.
9+ (LPPROC_THREAD_ATTRIBUTE_LIST): Typedef as pointer to opaque struct.
10+ (STARTUPINFOEXA, STARTUPINFOEXW): Typedef as struct...
11+ (LPSTARTUPINFOEXA, LPSTARTUPINFOEXW): ...and pointers thereto.
12+ (STARTUPINFOEX, LPSTARTUPINFOEX) [UNICODE vs. !UNICODE]: Alias to
13+ STARTUPINFOEXW or STARTUPINFOEXA, respectively.
14+ (InitializeProcThreadAttributeList, UpdateProcThreadAttribute)
15+ (DeleteProcThreadAttributeList): Declare function prototypes.
16+
17+ [_WIN32_WINNT >= _WIN32_WINNT_WIN7]
18+ (PROC_THREAD_ATTRIBUTE_PREFERRED_NODE)
19+ (PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY)
20+ (PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE)
21+ (PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE)
22+ (PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE)
23+ (PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY)
24+ (PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR)
25+ (PROC_THREAD_ATTRIBUTE_UMS_THREAD): Define them.
26+
27+ [_WIN32_WINNT >= _WIN32_WINNT_WIN8]
28+ (PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON)
29+ (PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_OFF)
30+ (PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON_REQ_RELOCS)
31+ (PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_ON)
32+ (PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_OFF)
33+ (PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_ON)
34+ (PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_OFF)
35+ (PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_ALWAYS_ON)
36+ (PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_ALWAYS_OFF)
37+ (PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_ALWAYS_ON)
38+ (PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_ALWAYS_OFF)
39+ (PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON)
40+ (PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_OFF)
41+ (PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_ALWAYS_ON)
42+ (PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_ALWAYS_OFF)
43+ (PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON)
44+ (PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_OFF)
45+ (PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON_ALLOW_OPT_OUT)
46+ (PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_DEFER)
47+ (PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_MASK)
48+ (PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_DEFER)
49+ (PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_ON)
50+ (PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_OFF)
51+ (PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_EXPORT_SUPPRESSION)
52+ (PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_MASK)
53+ (PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_DEFER)
54+ (PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_ALWAYS_ON)
55+ (PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_ALWAYS_OFF)
56+ (PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_RESERVED)
57+ (PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_MASK)
58+ (PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_DEFER)
59+ (PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON)
60+ (PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_OFF)
61+ (PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALLOW_STORE)
62+ (PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_MASK)
63+ (PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_DEFER)
64+ (PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_ALWAYS_ON)
65+ (PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_ALWAYS_OFF)
66+ (PROCESS_CREATION_MITIGATION_POLICY_AUDIT_NONSYSTEM_FONTS)
67+ (PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_MASK)
68+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_DEFER)
69+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_ON)
70+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_OFF)
71+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_RESERVED)
72+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_MASK)
73+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_DEFER)
74+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_ON)
75+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_OFF)
76+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_RESERVED)
77+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_MASK)
78+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_DEFER)
79+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_ALWAYS_ON)
80+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_ALWAYS_OFF)
81+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_RESERVED)
82+ (PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_MASK):
83+ Define them.
84+
85+ [_WIN32_WINNT >= _WIN32_WINNT_WIN10 && NTDDI_VERSION >= NTDDI_WIN10_RS3]
86+ (PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_ALWAYS_ON)
87+
88+ [_WIN32_WINNT >= _WIN32_WINNT_WIN10 && NTDDI_VERSION >= NTDDI_WIN10_RS5]
89+ (PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_ALWAYS_ON)
90+ (PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE): Define them.
91+
92+ * include/wincon.h [NTDDI_VERSION >= NTDDI_WIN10_RS5]
93+ (HPCON): Typedef as Windows handle type.
94+ (PSEUDOCONSOLE_INHERIT_CURSOR): Define it.
95+ (CreatePseudoConsole, ResizePseudoConsole, ClosePseudoConsole):
96+ Declare function prototypes.
97+
98+ * lib/kernel32.def (CreatePseudoConsole, ResizePseudoConsole)
99+ (ClosePseudoConsole): Add references.
100+
1101 2021-05-25 Keith Marshall <keith@users.osdn.me>
2102
3103 Add "legacy-safe" emulation of Microsoft's version helpers API.
--- a/w32api/include/winbase.h
+++ b/w32api/include/winbase.h
@@ -730,6 +730,14 @@ _BEGIN_C_DECLS
730730 #define THREAD_MODE_BACKGROUND_BEGIN 0x00010000
731731 #define THREAD_MODE_BACKGROUND_END 0x00020000
732732
733+#define EXTENDED_STARTUPINFO_PRESENT 0x00080000
734+
735+#define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS 0x00020000
736+#define PROC_THREAD_ATTRIBUTE_HANDLE_LIST 0x00020002
737+#define PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL 0x0002000B
738+
739+#define PROTECTION_LEVEL_SAME 0xFFFFFFFF
740+
733741 /* http://msdn.microsoft.com/en-us/library/aa363866%28VS.85%29.aspx */
734742 #define SYMBOLIC_LINK_FLAG_DIRECTORY 0x1
735743
@@ -748,6 +756,111 @@ _BEGIN_C_DECLS
748756 #define PROCESS_DEP_ENABLE 1
749757 #define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 2
750758
759+#define PROC_THREAD_ATTRIBUTE_PREFERRED_NODE 0x00020004
760+#define PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY 0x00020007
761+
762+#define PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE 1
763+#define PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE 2
764+#define PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE 4
765+
766+#define PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY 0x00030003
767+#define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR 0x00030005
768+#define PROC_THREAD_ATTRIBUTE_UMS_THREAD 0x00030006
769+
770+#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
771+/* Constants associated with features supported only on Win8 and later.
772+ */
773+#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON 0x00000100
774+#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_OFF 0x00000200
775+#define PROCESS_CREATION_MITIGATION_POLICY_FORCE_RELOCATE_IMAGES_ALWAYS_ON_REQ_RELOCS 0x00000300
776+
777+#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_ON 0x00001000
778+#define PROCESS_CREATION_MITIGATION_POLICY_HEAP_TERMINATE_ALWAYS_OFF 0x00002000
779+
780+#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_ON 0x00010000
781+#define PROCESS_CREATION_MITIGATION_POLICY_BOTTOM_UP_ASLR_ALWAYS_OFF 0x00020000
782+
783+#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_ALWAYS_ON 0x00100000
784+#define PROCESS_CREATION_MITIGATION_POLICY_HIGH_ENTROPY_ASLR_ALWAYS_OFF 0x00200000
785+
786+#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_ALWAYS_ON 0x01000000
787+#define PROCESS_CREATION_MITIGATION_POLICY_STRICT_HANDLE_CHECKS_ALWAYS_OFF 0x02000000
788+
789+#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON 0x10000000
790+#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_OFF 0x20000000
791+
792+#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_ALWAYS_ON (1ULL << 32)
793+#define PROCESS_CREATION_MITIGATION_POLICY_EXTENSION_POINT_DISABLE_ALWAYS_OFF (2ULL << 32)
794+
795+#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON (1ULL << 36)
796+#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_OFF (2ULL << 36)
797+
798+#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_ALWAYS_ON_ALLOW_OPT_OUT (3ULL << 36)
799+
800+#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_DEFER (0ULL << 36)
801+#define PROCESS_CREATION_MITIGATION_POLICY_PROHIBIT_DYNAMIC_CODE_MASK (3ULL << 36)
802+
803+#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_DEFER (0ULL << 40)
804+#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_ON (1ULL << 40)
805+#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_OFF (2ULL << 40)
806+#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_EXPORT_SUPPRESSION (3ULL << 40)
807+#define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_MASK (3ULL << 40)
808+
809+#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_DEFER (0ULL << 8)
810+#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_ALWAYS_ON (1ULL << 8)
811+#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_ALWAYS_OFF (2ULL << 8)
812+#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_RESERVED (3ULL << 8)
813+#define PROCESS_CREATION_MITIGATION_POLICY2_STRICT_CONTROL_FLOW_GUARD_MASK (3ULL << 8)
814+
815+#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_DEFER (0ULL << 44)
816+#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON (1ULL << 44)
817+#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_OFF (2ULL << 44)
818+#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALLOW_STORE (3ULL << 44)
819+#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_MASK (3ULL << 44)
820+
821+#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_DEFER (0ULL << 48)
822+#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_ALWAYS_ON (1ULL << 48)
823+#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_ALWAYS_OFF (2ULL << 48)
824+#define PROCESS_CREATION_MITIGATION_POLICY_AUDIT_NONSYSTEM_FONTS (3ULL << 48)
825+#define PROCESS_CREATION_MITIGATION_POLICY_FONT_DISABLE_MASK (3ULL << 48)
826+
827+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_DEFER (0ULL << 52)
828+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_ON (1ULL << 52)
829+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_ALWAYS_OFF (2ULL << 52)
830+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_RESERVED (3ULL << 52)
831+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_REMOTE_MASK (3ULL << 52)
832+
833+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_DEFER (0ULL << 56)
834+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_ON (1ULL << 56)
835+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_ALWAYS_OFF (2ULL << 56)
836+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_RESERVED (3ULL << 56)
837+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_LOW_LABEL_MASK (3ULL << 56)
838+
839+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_DEFER (0ULL << 60)
840+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_ALWAYS_ON (1ULL << 60)
841+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_ALWAYS_OFF (2ULL << 60)
842+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_RESERVED (3ULL << 60)
843+#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_NO_PREFER_SYSTEM32_MASK (3ULL << 60)
844+
845+#if _WIN32_WINNT >= _WIN32_WINNT_WIN10
846+#if NTDDI_VERSION >= NTDDI_WIN10_RS3
847+/* Additional policy attributes introduced by Win10-1709 (Redstone 3)
848+ */
849+#define PROCESS_CREATION_MITIGATION_POLICY2_RESTRICT_INDIRECT_BRANCH_PREDICTION_ALWAYS_ON (1ULL << 16)
850+
851+#if NTDDI_VERSION >= NTDDI_WIN10_RS5
852+/* Additional policy attributes introduced by Win10-1809 (Redstone 5)
853+ */
854+#define PROCESS_CREATION_MITIGATION_POLICY2_SPECULATIVE_STORE_BYPASS_DISABLE_ALWAYS_ON (1ULL << 24)
855+
856+/* Redstone 5 also introduced support for pseudo-consoles
857+ */
858+#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x00020016
859+
860+#endif /* Win10-1809 (Redstone 5) and later */
861+#endif /* Win10-1709 (Redstone 3) and later */
862+#endif /* Win10 and later */
863+#endif /* Win8 and later */
751864 #endif /* Win7 and later */
752865 #endif /* WinVista and later */
753866 #endif /* WinXP and later */
@@ -2877,7 +2990,35 @@ WINBASEAPI BOOL WINAPI SetFirmwareEnvironmentVariableW
28772990 #if _WIN32_WINNT >= _WIN32_WINNT_VISTA
28782991 /* Additional features, available only on the WinNT series platforms, from
28792992 * the release of Windows-Vista onwards.
2993+ *
2994+ * Note that, to support STARTUPINFOEX, we need a type definintion for
2995+ * references to a PROC_THREAD_ATTRIBUTE_LIST data type, but Microsoft's
2996+ * online documentation doesn't specify what that represents; define it
2997+ * as an opaque struct type, which will always be accessed indirectly.
28802998 */
2999+typedef struct _PROC_THREAD_ATTRIBUTE_LIST *LPPROC_THREAD_ATTRIBUTE_LIST;
3000+
3001+typedef struct _STARTUPINFOEXA
3002+{ STARTUPINFOA StartupInfo;
3003+ LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
3004+} STARTUPINFOEXA, *LPSTARTUPINFOEXA;
3005+
3006+typedef struct _STARTUPINFOEXW
3007+{ STARTUPINFOW StartupInfo;
3008+ LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList;
3009+} STARTUPINFOEXW, *LPSTARTUPINFOEXW;
3010+
3011+typedef __AW_ALIAS__(STARTUPINFOEX), *LPSTARTUPINFOEX;
3012+
3013+BOOL WINAPI InitializeProcThreadAttributeList
3014+(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD, PSIZE_T);
3015+
3016+BOOL WINAPI UpdateProcThreadAttribute
3017+(LPPROC_THREAD_ATTRIBUTE_LIST, DWORD, DWORD_PTR, PVOID, SIZE_T, PVOID, PSIZE_T);
3018+
3019+void WINAPI DeleteProcThreadAttributeList
3020+(LPPROC_THREAD_ATTRIBUTE_LIST);
3021+
28813022 typedef struct _FILE_BASIC_INFO
28823023 /* http://msdn.microsoft.com/en-us/library/aa364217%28VS.85%29.aspx */
28833024 { LARGE_INTEGER CreationTime;
--- a/w32api/include/wincon.h
+++ b/w32api/include/wincon.h
@@ -6,7 +6,7 @@
66 * $Id$
77 *
88 * Written by Anders Norlander <anorland@hem2.passagen.se>
9- * Copyright (C) 1998, 1999, 2002-2006, 2009, 2011, 2016, 2018,
9+ * Copyright (C) 1998, 1999, 2002-2006, 2009, 2011, 2016, 2018, 2021,
1010 * MinGW.org Project.
1111 *
1212 *
@@ -415,6 +415,17 @@ WINAPI BOOL SetConsoleHistoryInfo (PCONSOLE_HISTORY_INFO);
415415 WINAPI BOOL SetConsoleScreenBufferInfoEx (HANDLE, PCONSOLE_SCREEN_BUFFER_INFOEX);
416416 WINAPI BOOL SetCurrentConsoleFontEx (HANDLE, BOOL, PCONSOLE_FONT_INFOEX);
417417
418+#if NTDDI_VERSION >= NTDDI_WIN10_RS5
419+/* Windows-10 Version 1809 (Redstone 5) introduced the pseudo-console API.
420+ */
421+typedef HANDLE HPCON;
422+WINAPI HRESULT CreatePseudoConsole (COORD, HANDLE, HANDLE, DWORD, HPCON *);
423+WINAPI HRESULT ResizePseudoConsole (HPCON, COORD);
424+WINAPI void ClosePseudoConsole (HPCON);
425+
426+#define PSEUDOCONSOLE_INHERIT_CURSOR (DWORD)(1)
427+
428+#endif /* Win10 Redstone 5 and later */
418429 #endif /* Vista and later */
419430 #endif /* WinXP and later */
420431 #endif /* Win2K and later */
--- a/w32api/lib/kernel32.def
+++ b/w32api/lib/kernel32.def
@@ -91,6 +91,7 @@ CloseConsoleHandle@4
9191 CloseHandle@4
9292 ClosePrivateNamespace@8
9393 CloseProfileUserMapping@0
94+ClosePseudoConsole@4
9495 CloseThreadpool@4
9596 CloseThreadpoolCleanupGroup@4
9697 CloseThreadpoolCleanupGroupMembers@12
@@ -173,6 +174,7 @@ CreateProcessA@40
173174 CreateProcessInternalA@48
174175 CreateProcessInternalW@48
175176 CreateProcessW@40
177+CreatePseudoConsole@20
176178 CreateRemoteThread@28
177179 CreateRemoteThreadEx@32
178180 CreateSemaphoreA@16
@@ -993,6 +995,7 @@ RequestDeviceWakeup@4
993995 RequestWakeupLatency@4
994996 ResetEvent@4
995997 ResetWriteWatch@8
998+ResizePseudoConsole@8
996999 ResolveLocaleName@12
9971000 RestoreLastError@4
9981001 ResumeThread@4
旧リポジトリブラウザで表示