https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aabefa30d5f613a39f9b5…
commit aabefa30d5f613a39f9b54907cb19506cef1308e
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Nov 22 22:20:21 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Jan 5 13:11:09 2019 +0100
[SHIMLIB] c++ compatibility
---
dll/appcompat/shims/shimlib/implement_shim.inl | 6 +++---
dll/appcompat/shims/shimlib/shimlib.h | 14 ++++++++++++--
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/dll/appcompat/shims/shimlib/implement_shim.inl
b/dll/appcompat/shims/shimlib/implement_shim.inl
index e099f63779..26900f91b3 100644
--- a/dll/appcompat/shims/shimlib/implement_shim.inl
+++ b/dll/appcompat/shims/shimlib/implement_shim.inl
@@ -1,8 +1,8 @@
/*
* PROJECT: ReactOS Shim helper library
- * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Shimlib helper file, used to register shims setup with macro's from
setup_shim.inl
- * COPYRIGHT: Copyright 2016,2017 Mark Jansen (mark.jansen(a)reactos.org)
+ * COPYRIGHT: Copyright 2016-2019 Mark Jansen (mark.jansen(a)reactos.org)
*/
#ifndef SHIM_NS
@@ -37,7 +37,7 @@ PHOOKAPI WINAPI SHIM_OBJ_NAME(GetHookAPIs)(DWORD fdwReason, PCSTR
pszCmdLine, PD
{
SHIM_OBJ_NAME(g_szCommandLine) = "";
}
- SHIM_OBJ_NAME(g_pAPIHooks) = ShimLib_ShimMalloc(sizeof(HOOKAPI) * SHIM_NUM_HOOKS);
+ SHIM_OBJ_NAME(g_pAPIHooks) = (PHOOKAPI)ShimLib_ShimMalloc(sizeof(HOOKAPI) *
SHIM_NUM_HOOKS);
if (SHIM_NUM_HOOKS)
ZeroMemory(SHIM_OBJ_NAME(g_pAPIHooks), sizeof(HOOKAPI) * SHIM_NUM_HOOKS);
*pdwHookCount = SHIM_NUM_HOOKS;
diff --git a/dll/appcompat/shims/shimlib/shimlib.h
b/dll/appcompat/shims/shimlib/shimlib.h
index 5eaf1853ab..443f0b7964 100644
--- a/dll/appcompat/shims/shimlib/shimlib.h
+++ b/dll/appcompat/shims/shimlib/shimlib.h
@@ -1,12 +1,18 @@
/*
* PROJECT: ReactOS Shim helper library
- * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: ReactOS Shim Engine common functions / structures
- * COPYRIGHT: Copyright 2016-2018 Mark Jansen (mark.jansen(a)reactos.org)
+ * COPYRIGHT: Copyright 2016-2019 Mark Jansen (mark.jansen(a)reactos.org)
*/
#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
typedef struct tagHOOKAPI
{
PCSTR LibraryName;
@@ -91,3 +97,7 @@ typedef struct tagSHIMREG
#error Your compiler is not supported.
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+