Differences From Artifact [4fb27cba60]:
- File src/macros.h — part of check-in [71ebf4e8fe] at 2013-12-07 16:56:10 on branch trunk — macros.h: Make sure static_assert is defined. (user: js, size: 9612) [annotate] [blame] [check-ins using]
To Artifact [d51c5fe23d]:
- File
src/macros.h
— part of check-in
[fdfb2be253]
at
2013-12-07 17:30:17
on branch trunk
— macros.h: Add OF_BIGGEST_ALIGNMENT.
When the compiler supports C11, _Alignof(max_align_t) is used; otherwise
the __BIGGEST_ALIGNMENT__ define is tried with a fallback to 16. (user: js, size: 9805) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
49 50 51 52 53 54 55 | #ifdef OF_BIG_ENDIAN # define OF_BYTE_ORDER_NATIVE OF_BYTE_ORDER_BIG_ENDIAN #else # define OF_BYTE_ORDER_NATIVE OF_BYTE_ORDER_LITTLE_ENDIAN #endif | > > > > > > | | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #ifdef OF_BIG_ENDIAN # define OF_BYTE_ORDER_NATIVE OF_BYTE_ORDER_BIG_ENDIAN #else # define OF_BYTE_ORDER_NATIVE OF_BYTE_ORDER_LITTLE_ENDIAN #endif #if __STDC_VERSION__ >= 201112L && defined(OF_HAVE_MAX_ALIGN_T) # define OF_BIGGEST_ALIGNMENT _Alignof(max_align_t) #else # ifdef __BIGGEST_ALIGNMENT__ # define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__ # else # /* Hopefully no arch needs more than 16 bytes padding */ # define OF_BIGGEST_ALIGNMENT 16 # endif #endif #ifdef __GNUC__ # if defined(__amd64__) || defined(__x86_64__) # define OF_AMD64_ASM # elif defined(__i386__) # define OF_X86_ASM |
︙ | ︙ |