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 /include/libunwind-arm.h | |
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 'include/libunwind-arm.h')
-rw-r--r-- | include/libunwind-arm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libunwind-arm.h b/include/libunwind-arm.h index 6709b7ab..ea14577b 100644 --- a/include/libunwind-arm.h +++ b/include/libunwind-arm.h @@ -32,6 +32,10 @@ extern "C" { #include <inttypes.h> #include <stddef.h> +#ifndef UNW_EMPTY_STRUCT +# define UNW_EMPTY_STRUCT +#endif + #define UNW_TARGET arm #define UNW_TARGET_ARM 1 @@ -247,6 +251,7 @@ arm_regnum_t; typedef struct unw_tdep_save_loc { /* Additional target-dependent info on a save location. */ + UNW_EMPTY_STRUCT } unw_tdep_save_loc_t; @@ -288,6 +293,7 @@ unw_tdep_context_t; typedef struct { /* no arm-specific auxiliary proc-info */ + UNW_EMPTY_STRUCT } unw_tdep_proc_info_t; |