mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1041325 - Use intrin.h for _ReturnAddress in the chromium sandbox code; r=bbondy
--HG-- extra : rebase_source : 06bb642636a9f3df2e75eb950816a7d48da85faf
This commit is contained in:
parent
32baa5a3ed
commit
c7a033be8e
@ -5,10 +5,7 @@
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(COMPILER_MSVC)
|
||||
// MSDN says to #include <intrin.h>, but that breaks the VS2005 build.
|
||||
extern "C" {
|
||||
void* _ReturnAddress();
|
||||
}
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
#include "base/location.h"
|
||||
|
@ -13,21 +13,18 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/move.h"
|
||||
|
||||
namespace base {
|
||||
namespace win {
|
||||
|
||||
// TODO(rvargas): remove this with the rest of the verifier.
|
||||
#if defined(COMPILER_MSVC)
|
||||
// MSDN says to #include <intrin.h>, but that breaks the VS2005 build.
|
||||
extern "C" {
|
||||
void* _ReturnAddress();
|
||||
}
|
||||
#include <intrin.h>
|
||||
#define BASE_WIN_GET_CALLER _ReturnAddress()
|
||||
#elif defined(COMPILER_GCC)
|
||||
#define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\
|
||||
__builtin_return_address(0))
|
||||
#endif
|
||||
|
||||
namespace base {
|
||||
namespace win {
|
||||
|
||||
// Generic wrapper for raw handles that takes care of closing handles
|
||||
// automatically. The class interface follows the style of
|
||||
// the ScopedStdioHandle class with a few additions:
|
||||
|
Loading…
Reference in New Issue
Block a user