blob: 22a12f846bda60edcf116fdf96a25d4ba7d7126f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
diff --git a/implement.h b/implement.h
index 1579376..3a7d29b 100644
--- a/implement.h
+++ b/implement.h
@@ -36,6 +36,12 @@
#if !defined(_IMPLEMENT_H)
#define _IMPLEMENT_H
+#if 1 // The condition should be `defined(__cplusplus_winrt)` when compile option is provided correctly.
+// porvide 2 static libs to resolve link error. 'kernel32' and 'windowsapp'
+#pragma comment(lib, "kernel32")
+#pragma comment(lib, "WindowsApp")
+#endif
+
#if !defined (__PTW32_CONFIG_H)
# error "config.h was not #included"
#endif
diff --git a/pthread_cancel.c b/pthread_cancel.c
index fddf216..bf16870 100644
--- a/pthread_cancel.c
+++ b/pthread_cancel.c
@@ -64,12 +64,12 @@ __ptw32_cancel_callback (ULONG_PTR unused)
DWORD
__ptw32_Registercancellation (PAPCFUNC unused1, HANDLE threadH, DWORD unused2)
{
- CONTEXT context;
+ /*CONTEXT context;
context.ContextFlags = CONTEXT_CONTROL;
GetThreadContext (threadH, &context);
__PTW32_PROGCTR (context) = (DWORD_PTR) __ptw32_cancel_self;
- SetThreadContext (threadH, &context);
+ SetThreadContext (threadH, &context);*/
return 0;
}
|