AuroraOpenALSoft/common/align.h

22 lines
559 B
C
Raw Normal View History

2014-04-19 09:11:04 +00:00
#ifndef AL_ALIGN_H
#define AL_ALIGN_H
#if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS)
2014-04-19 09:11:04 +00:00
#include <stdalign.h>
#endif
#ifndef alignas
2014-12-25 01:15:50 +00:00
#if defined(IN_IDE_PARSER)
2014-04-19 09:11:04 +00:00
/* KDevelop has problems with our align macro, so just use nothing for parsing. */
#define alignas(x)
2014-12-25 01:15:50 +00:00
#elif defined(HAVE_C11_ALIGNAS)
#define alignas _Alignas
2014-04-19 09:11:04 +00:00
#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 */