Mercurial Patch Queue for Windows System Libraries
Revisión | e94c4e3920591fd2ab0c231c4cdad5043d7c6e7f (tree) |
---|---|
Tiempo | 2019-04-20 21:22:48 |
Autor | Cesar Strauss <cestrauss@gmai...> |
Commiter | Cesar Strauss |
Add patch to forward declare CONTEXT for Win64.
@@ -1,3 +1,4 @@ | ||
1 | +win64-context.patch #+win64 | |
1 | 2 | win64-time-typedef.patch #+win64 |
2 | 3 | cpu-features-x86-64.patch #+win64 |
3 | 4 | alloca-testing.patch #+void #-void |
@@ -0,0 +1,42 @@ | ||
1 | +# HG changeset patch | |
2 | +# User Cesar Strauss <cestrauss@gmail.com> | |
3 | +# Date 1555182688 0 | |
4 | +# Parent a7cb15fb5ac2a68b8b58cacc752a0941553dc2c7 | |
5 | +Forward declare CONTEXT for Win64, in place of an actual declaration. | |
6 | + | |
7 | +Allow uses of pointers to CONTEXT to compile, while postponing the work | |
8 | +of determining the actual declaration for Win64. | |
9 | + | |
10 | +diff -r a7cb15fb5ac2 wslapi/include/winbase.h | |
11 | +--- a/wslapi/include/winbase.h Mon Apr 08 10:03:40 2019 +0100 | |
12 | ++++ b/wslapi/include/winbase.h Sat Apr 20 12:19:34 2019 +0000 | |
13 | +@@ -2386,7 +2386,8 @@ | |
14 | + WINBASEAPI DWORD WINAPI SetTapePosition | |
15 | + (HANDLE, DWORD, DWORD, DWORD, DWORD, BOOL); | |
16 | + WINBASEAPI DWORD WINAPI SetThreadAffinityMask (HANDLE, DWORD); | |
17 | +-WINBASEAPI BOOL WINAPI SetThreadContext (HANDLE, const CONTEXT *); | |
18 | ++/* TODO: remove the struct keyword after CONTEXT is defined for x86_64 */ | |
19 | ++WINBASEAPI BOOL WINAPI SetThreadContext (HANDLE, const struct CONTEXT *); | |
20 | + | |
21 | + WINBASEAPI DWORD WINAPI SetThreadIdealProcessor (HANDLE, DWORD); | |
22 | + WINBASEAPI BOOL WINAPI SetThreadPriority (HANDLE, int); | |
23 | +diff -r a7cb15fb5ac2 wslapi/include/winnt.h | |
24 | +--- a/wslapi/include/winnt.h Mon Apr 08 10:03:40 2019 +0100 | |
25 | ++++ b/wslapi/include/winnt.h Sat Apr 20 12:19:34 2019 +0000 | |
26 | +@@ -2430,10 +2430,15 @@ | |
27 | + ULONG Psr; | |
28 | + } CONTEXT; | |
29 | + | |
30 | ++#elif defined(_M_AMD64) | |
31 | ++/* TODO: Find out the definition of CONTEXT for x86_64 */ | |
32 | ++struct CONTEXT; | |
33 | ++ | |
34 | + #else | |
35 | + #error "undefined processor type" | |
36 | + #endif | |
37 | +-typedef CONTEXT *PCONTEXT, *LPCONTEXT; | |
38 | ++/* TODO: remove the struct keyword after CONTEXT is defined for x86_64 */ | |
39 | ++typedef struct CONTEXT *PCONTEXT, *LPCONTEXT; | |
40 | + | |
41 | + typedef struct _EXCEPTION_RECORD | |
42 | + { DWORD ExceptionCode; |