From afb59e7f98f40cde77c150414a8a5bd13f40781a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 14 Apr 2017 18:15:56 -0700 Subject: Move internal headers out of the include directory --- common/align.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 common/align.h (limited to 'common/align.h') diff --git a/common/align.h b/common/align.h new file mode 100644 index 00000000..e2dc81df --- /dev/null +++ b/common/align.h @@ -0,0 +1,21 @@ +#ifndef AL_ALIGN_H +#define AL_ALIGN_H + +#if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS) +#include +#endif + +#ifndef alignas +#if defined(IN_IDE_PARSER) +/* KDevelop has problems with our align macro, so just use nothing for parsing. */ +#define alignas(x) +#elif 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 */ -- cgit v1.2.3