errno.h 443 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) mlibc & plct lab
  3. *
  4. * SPDX-License-Identifier: MIT
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023/06/16 bernard the first verison
  9. */
  10. #ifndef MLIBC_ERRNO_H__
  11. #define MLIBC_ERRNO_H__
  12. #include "sys/errno.h"
  13. #ifdef __GNUC__
  14. __attribute__((const))
  15. #endif /* __GNUC__ */
  16. int *__errno_location(void);
  17. #ifndef errno
  18. #define errno (*__errno_location())
  19. #endif /* errno */
  20. #endif /* MLIBC_ERRNO_H__ */