mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 09:59:44 +00: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:
parent
f32da36427
commit
95cfd1d8da
|
@ -95,6 +95,7 @@
|
||||||
|
|
||||||
<group compilerset="msc">
|
<group compilerset="msc">
|
||||||
<define name="inline" compiler="cc">__inline</define>
|
<define name="inline" compiler="cc">__inline</define>
|
||||||
|
<define name="__STDC__" compiler="cc">1</define>
|
||||||
<compilerflag>/Zl</compilerflag>
|
<compilerflag>/Zl</compilerflag>
|
||||||
<compilerflag>/Zi</compilerflag>
|
<compilerflag>/Zi</compilerflag>
|
||||||
<compilerflag>/W1</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
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#ifdef __GNUC__
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
|
GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
|
||||||
GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
|
GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
|
||||||
#else
|
#else
|
||||||
GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
|
GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
|
||||||
GS_ContextRecord.Esp = (DWORD) __builtin_frame_address (0) + 4;
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue