added alignment test
and fix an incorrect alignment check in cwksp which was failing on m68k
This commit is contained in:
1 parent
9b97fdf74f
commit
e89e847820
2 files changed
+22
-2
No files matched your search
@@ -80,6 +80,26 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*-**************************************************************
|
||||
* Alignment check
|
||||
*****************************************************************/
|
||||
|
||||
/* C11 support */
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
|
||||
#include <stdalign.h>
|
||||
# define MEM_ALIGN_COND(T) alignof(T)
|
||||
|
||||
#elif defined(__GNUC__) || defined(_MSC_VER)
|
||||
|
||||
# define MEM_ALIGN_COND(T) __alignof(T)
|
||||
|
||||
#else
|
||||
|
||||
# define MEM_ALIGN_COND(T) 1 /* most likely incorrect, just to pass tests */
|
||||
|
||||
#endif
|
||||
|
||||
/*-**************************************************************
|
||||
* Memory I/O API
|
||||
*****************************************************************/
|
||||
|
||||
Reference in new issue
Block a user