2
0

features.h 713 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) mlibc & plct lab
  3. *
  4. * SPDX-License-Identifier: MIT
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024/7/24 0Bitbiscuits the first version
  9. */
  10. #ifndef MLIBC_SYS_FEATURES_H__
  11. #define MLIBC_SYS_FEATURES_H__
  12. /* Macro to test version of GCC. Returns 0 for non-GCC or too old GCC. */
  13. #ifndef __GNUC_PREREQ
  14. #if defined __GNUC__ && defined __GNUC_MINOR__
  15. # define __GNUC_PREREQ(maj, min) \
  16. ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
  17. #else
  18. #define __GNUC_PREREQ(maj, min) 0
  19. #endif /* defined __GNUC__ && defined __GNUC_MINOR__ */
  20. #endif /* __GNUC_PREREQ */
  21. #define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
  22. #endif /* MLIBC_SYS_FEATURES_H__ */