---
.../winstorecompat/Makefile.am | 1 +
.../winstorecompat/src/RtlRestoreContext.c | 42 +++++++++++++++++++
2 files changed, 43 insertions(+)
create mode 100644 mingw-w64-libraries/winstorecompat/src/RtlRestoreContext.c
diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am
b/mingw-w64-libraries/winstorecompat/Makefile.am
index e20f5f79..c8d6bb32 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -42,4 +42,5 @@ libwinstorecompat_a_SOURCES = \
src/RtlAddFunctionTable.c \
src/RtlCaptureContext.c \
src/RtlVirtualUnwind.c \
+ src/RtlRestoreContext.c \
$(NULL)
diff --git a/mingw-w64-libraries/winstorecompat/src/RtlRestoreContext.c
b/mingw-w64-libraries/winstorecompat/src/RtlRestoreContext.c
new file mode 100644
index 00000000..02429799
--- /dev/null
+++ b/mingw-w64-libraries/winstorecompat/src/RtlRestoreContext.c
@@ -0,0 +1,42 @@
+/*
+ Copyright (c) 2018 mingw-w64 project
+
+ Contributing authors: Hugo Beauzée-Luyssen
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+#define RtlRestoreContext __RtlRestoreContext
+#include <windows.h>
+#include <string.h>
+#undef RtlRestoreContext
+
+VOID NTAPI RtlRestoreContext(PCONTEXT ContextRecord,
+ struct _EXCEPTION_RECORD *ExceptionRecord)
+{
+ (void)ContextRecord;
+ (void)ExceptionRecord;
+}
+
+#ifdef _X86_
+VOID (NTAPI *__MINGW_IMP_SYMBOL(RtlRestoreContext))(PCONTEXT ContextRecord,
struct _EXCEPTION_RECORD *ExceptionRecord) asm("__imp__RtlRestoreContext@8") =
RtlRestoreContext;
+#else
+VOID (NTAPI *__MINGW_IMP_SYMBOL(RtlRestoreContext))(PCONTEXT ContextRecord,
struct _EXCEPTION_RECORD *ExceptionRecord) asm("__imp_RtlRestoreContext") =
RtlRestoreContext;
+#endif
+
--
2.19.2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public