mirror of
https://github.com/reactos/reactos.git
synced 2026-07-01 23:44:57 +08:00
- mingw: __builtin_return_address -> _ReturnAddress, __builtin_frame_address -> _AddressOfReturnAddress
- ReactOS-generic.rbuild: Define __STDC__ for MSVC to fix some code depending on it (not using /Za as it breaks other code) svn path=/trunk/; revision=42369
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
|
||||
<group compilerset="msc">
|
||||
<define name="inline" compiler="cc">__inline</define>
|
||||
<define name="__STDC__" compiler="cc">1</define>
|
||||
<compilerflag>/Zl</compilerflag>
|
||||
<compilerflag>/Zi</compilerflag>
|
||||
<compilerflag>/W1</compilerflag>
|
||||
|
||||
10
reactos/lib/3rdparty/mingw/gs_support.c
vendored
10
reactos/lib/3rdparty/mingw/gs_support.c
vendored
@@ -108,12 +108,22 @@ __report_gsfailure (ULONGLONG StackCookie)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#ifdef _WIN64
|
||||
GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
|
||||
GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
|
||||
#else
|
||||
GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
|
||||
GS_ContextRecord.Esp = (DWORD) __builtin_frame_address (0) + 4;
|
||||
#endif
|
||||
#else
|
||||
#ifdef _WIN64
|
||||
GS_ContextRecord.Rip = (ULONGLONG) _ReturnAddress();
|
||||
GS_ContextRecord.Rsp = (ULONGLONG) _AddressOfReturnAddress();
|
||||
#else
|
||||
GS_ContextRecord.Eip = (DWORD) _ReturnAddress();
|
||||
GS_ContextRecord.Esp = (DWORD) _AddressOfReturnAddress();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user