Skip to content

Commit 2f15d4e

Browse files
Prevent defining _GUARD_CHECK_ICALL twice (chakra-core#6974)
* Prevent defining `_GUARD_CHECK_ICALL` twice Newer versions of MVC define _GUARD_CHECK_ICALL after CC defines it
1 parent d1cc2b4 commit 2f15d4e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/Runtime/Base/ThreadContextInfo.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -21,6 +22,10 @@
2122
# else
2223
extern "C" void __fastcall _guard_check_icall(_In_ uintptr_t _Target);
2324
# endif
25+
26+
# ifndef _GUARD_CHECK_ICALL
27+
# define _GUARD_CHECK_ICALL _guard_check_icall
28+
# endif
2429
#endif
2530

2631
ThreadContextInfo::ThreadContextInfo() :

lib/Runtime/Base/ThreadContextInfo.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -178,7 +179,3 @@ uintptr_t ShiftAddr(const ThreadContextInfo*const context, T* address)
178179
}
179180

180181
uintptr_t ShiftAddr(const ThreadContextInfo*const context, uintptr_t address);
181-
182-
#ifndef _GUARD_CHECK_ICALL
183-
#define _GUARD_CHECK_ICALL _guard_check_icall
184-
#endif

0 commit comments

Comments
 (0)