diff options
author | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-05-20 22:48:41 -0400 |
---|---|---|
committer | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-05-20 22:48:41 -0400 |
commit | a52e5e7cb7948e536eca6c29bfa0d56f57576575 (patch) | |
tree | 22144db3b50b546a5ea77db7d79c12804af4920f /src/aarch64 | |
parent | 52c6488da816857de4c782bc5217defdb4c0bea3 (diff) | |
download | libunwind-a52e5e7cb7948e536eca6c29bfa0d56f57576575.tar.gz |
Fix MSVC UNW_REMOTE_ONLY compilation errors
Fix errors observed while compiling libunwind for
UNW_REMOTE_ONLY,
library src,
amd64 & aarch64 with an amd64 MSVC compile, and
arm with an x86 MSVC compiler
Use standard compliant variadic macros
GNUC offer non-compliant variadic macros
Switch to standrds compiant variadic macros
Replace non-standard statement expression
GNUC statement expression is non-ISO C compliant
Where a simple inline function will be equivalent, use that instead
Gexpr.c support compilers w/o statement expressions
For this case a simple inline function would change semantics
Make a close approximation with a separate set of macros for non GNUC
Fix UNW_REMOTE_ONLY placement
Exclude function call not required for remote only builds
Fix __attribute__((packed))
On MSVC use pragma pack()
Add THREAD_LOCAL macro
Avoid bare use of __thread
Add MSVC fetch_and_add() support
Use macro ALIGNED(x) in place of __attribute__((aligned(x))
Rename local ltoa to avoid name collision
The Windows x86 SDK headers define ltoa.
Rename this local function to avoid a name collision.
ISO C doesn't allow empty structures
Add padding to allow empty arm/aarch64 structures to compile on MSVC
Diffstat (limited to 'src/aarch64')
-rw-r--r-- | src/aarch64/Gtrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/aarch64/Gtrace.c b/src/aarch64/Gtrace.c index c67faf0e..2f8c3f8d 100644 --- a/src/aarch64/Gtrace.c +++ b/src/aarch64/Gtrace.c @@ -52,8 +52,8 @@ static pthread_once_t trace_cache_once = PTHREAD_ONCE_INIT; static sig_atomic_t trace_cache_once_happen; static pthread_key_t trace_cache_key; static struct mempool trace_cache_pool; -static __thread unw_trace_cache_t *tls_cache; -static __thread int tls_cache_destroyed; +static THREAD_LOCAL unw_trace_cache_t *tls_cache; +static THREAD_LOCAL int tls_cache_destroyed; /* Free memory for a thread's trace cache. */ static void |