align.h 518 B

123456789101112131415161718192021
  1. #ifndef AL_ALIGN_H
  2. #define AL_ALIGN_H
  3. #ifdef HAVE_STDALIGN_H
  4. #include <stdalign.h>
  5. #endif
  6. #ifndef alignas
  7. #ifdef HAVE_C11_ALIGNAS
  8. #define alignas _Alignas
  9. #elif defined(IN_IDE_PARSER)
  10. /* KDevelop has problems with our align macro, so just use nothing for parsing. */
  11. #define alignas(x)
  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 */