types.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) mlibc & plct lab
  3. *
  4. * SPDX-License-Identifier: MIT
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024/5/9 0Bitbiscuits the first version
  9. */
  10. #ifndef MLIBC_SYS_TYPES_H__
  11. #define MLIBC_SYS_TYPES_H__
  12. typedef signed int clockid_t;
  13. typedef signed int key_t; /* Used for interprocess communication. */
  14. typedef int pid_t; /* Used for process IDs and process group IDs. */
  15. typedef unsigned short uid_t;
  16. typedef unsigned short gid_t;
  17. typedef signed long off_t;
  18. typedef int mode_t;
  19. typedef unsigned short ino_t;
  20. #ifndef __SIZE_TYPE__
  21. typedef long unsigned int size_t;
  22. #else
  23. typedef __SIZE_TYPE__ size_t;
  24. #endif /* __SIZE_TYPE__ */
  25. #if (defined(__GNUC__) && (__SIZEOF_POINTER__ == 8))
  26. typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */
  27. #else
  28. typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */
  29. #endif /* __GNUC__ */
  30. typedef unsigned long __timer_t;
  31. typedef __timer_t timer_t;
  32. typedef unsigned long useconds_t; /* microseconds (unsigned) */
  33. typedef long suseconds_t; /* microseconds (signed) */
  34. typedef unsigned long dev_t;
  35. typedef unsigned int u_int;
  36. typedef unsigned char u_char;
  37. typedef unsigned long u_long;
  38. #endif /*MLIBC_SYS_TYPES_H__*/