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:
Andreas Rumpf 2019-11-15 20:24:14 +01:00 • committed by GitHub
commit 58f3e07b1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 44 deletions

View file

@ -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 */