diff options
author | Steve Lhomme <slhomme@videolan.org> | 2018-09-27 14:24:46 +0300 |
---|---|---|
committer | Steve Lhomme <slhomme@videolan.org> | 2018-09-28 17:24:02 +0300 |
commit | 18b69609a2ec2c6e15db6867c83bc3b7cde6137e (patch) | |
tree | 084a8e7c622873067b75df664d4ed16c9725c954 /include | |
parent | 92b7e8bd536228b145e6c315987a4908bea3b38a (diff) |
attributes: define the ALIGN() macro for MSVC
Diffstat (limited to 'include')
-rw-r--r-- | include/common/attributes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h index 78ee474..5d665b9 100644 --- a/include/common/attributes.h +++ b/include/common/attributes.h @@ -36,8 +36,13 @@ * becomes: * ALIGN(uint8_t var[1][2][3][4], alignment). */ +#ifdef _MSC_VER +#define ALIGN(ll, a) \ + __declspec(align(a)) ll +#else #define ALIGN(line, align) \ line __attribute__((aligned(align))) +#endif /* * API for stack alignment (ALIGN_STK_$align()) of variables like: |