features.h 493 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * MIT License
  3. * Copyright (c) 2020 Rich Felker musl-libc
  4. */
  5. #ifndef _FEATURES_H
  6. #define _FEATURES_H
  7. #if __STDC_VERSION__ >= 199901L
  8. #define __restrict restrict
  9. #elif !defined(__GNUC__)
  10. #define __restrict
  11. #endif
  12. #if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
  13. #define __inline inline
  14. #elif !defined(__GNUC__)
  15. #define __inline
  16. #endif
  17. #if __STDC_VERSION__ >= 201112L
  18. #elif defined(__GNUC__)
  19. #define _Noreturn __attribute__((__noreturn__))
  20. #else
  21. #define _Noreturn
  22. #endif
  23. #endif