mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
850 B
24 lines
850 B
9 years ago
|
/*
|
||
|
* Alignment requirement and support for unaligned accesses
|
||
|
*
|
||
|
* Assume unaligned accesses are not supported unless specifically allowed
|
||
|
* in the target platform. Some platforms may support unaligned accesses
|
||
|
* but alignment to 4 or 8 may still be desirable.
|
||
|
*/
|
||
|
|
||
|
/* If not provided, use safe default for alignment. */
|
||
|
#if !defined(DUK_USE_ALIGN_BY)
|
||
|
#define DUK_USE_ALIGN_BY 8
|
||
|
#endif
|
||
|
|
||
|
/* Compiler specific hackery needed to force struct size to match aligment,
|
||
|
* see e.g. duk_hbuffer.h.
|
||
|
*
|
||
|
* http://stackoverflow.com/questions/11130109/c-struct-size-alignment
|
||
|
* http://stackoverflow.com/questions/10951039/specifying-64-bit-alignment
|
||
|
*/
|
||
|
#if !(defined(DUK_USE_PACK_MSVC_PRAGMA) || defined(DUK_USE_PACK_GCC_ATTR) || \
|
||
|
defined(DUK_USE_PACK_CLANG_ATTR) || defined(DUK_USE_PACK_DUMMY_MEMBER))
|
||
|
#define DUK_USE_PACK_DUMMY_MEMBER
|
||
|
#endif
|