fixes and changes the recently introduced 'alignas' to be 'align' (#12666)
* fixes and changes the recently introduced 'alignas' to be 'align' * more improvements
This commit is contained in:
parent
9c46526cfa
commit
58f3e07b1a
9 changed files with 50 additions and 44 deletions
|
|
@ -256,7 +256,6 @@ __clang__
|
|||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdalign.h>
|
||||
|
||||
/* C99 compiler? */
|
||||
#if (defined(__STD_VERSION__) && (__STD_VERSION__ >= 199901))
|
||||
|
|
@ -467,6 +466,12 @@ typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == siz
|
|||
# define NIM_EXTERNC
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define NIM_ALIGN(x) __declspec(align(x))
|
||||
#else
|
||||
# define NIM_ALIGN(x) __attribute__((aligned(x)))
|
||||
#endif
|
||||
|
||||
/* ---------------- platform specific includes ----------------------- */
|
||||
|
||||
/* VxWorks related includes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue