aboutsummaryrefslogtreecommitdiffstats
path: root/common/align.h
blob: 53a5806aa1c84854905e7f1aa2e3f0832e3a0c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef AL_ALIGN_H
#define AL_ALIGN_H

#if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS)
#include <stdalign.h>
#endif

#if !defined(alignas) && !defined(__cplusplus)
#if defined(HAVE_C11_ALIGNAS)
#define alignas _Alignas
#else
/* NOTE: Our custom ALIGN macro can't take a type name like alignas can. For
 * maximum compatibility, only provide constant integer values to alignas. */
#define alignas(_x) ALIGN(_x)
#endif
#endif

#endif /* AL_ALIGN_H */