align.h 559 B

123456789101112131415161718192021
  1. #ifndef AL_ALIGN_H
  2. #define AL_ALIGN_H
  3. #if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS)
  4. #include <stdalign.h>
  5. #endif
  6. #ifndef alignas
  7. #if defined(IN_IDE_PARSER)
  8. /* KDevelop has problems with our align macro, so just use nothing for parsing. */
  9. #define alignas(x)
  10. #elif defined(HAVE_C11_ALIGNAS)
  11. #define alignas _Alignas
  12. #else
  13. /* NOTE: Our custom ALIGN macro can't take a type name like alignas can. For
  14. * maximum compatibility, only provide constant integer values to alignas. */
  15. #define alignas(_x) ALIGN(_x)
  16. #endif
  17. #endif
  18. #endif /* AL_ALIGN_H */