types.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #pragma once
  2. #include <stddef.h>
  3. #include <stdint.h>
  4. #include <sys/cdefs.h>
  5. __BEGIN_DECLS
  6. typedef unsigned int u_int;
  7. typedef unsigned long u_long;
  8. typedef uint32_t uid_t;
  9. typedef uint32_t gid_t;
  10. typedef int __pid_t;
  11. #define pid_t __pid_t
  12. typedef int __ssize_t;
  13. #define ssize_t __ssize_t
  14. typedef __WINT_TYPE__ wint_t;
  15. typedef uint32_t ino_t;
  16. typedef int32_t off_t;
  17. typedef uint32_t dev_t;
  18. typedef uint16_t mode_t;
  19. typedef uint32_t nlink_t;
  20. typedef uint32_t blksize_t;
  21. typedef uint32_t blkcnt_t;
  22. typedef uint32_t time_t;
  23. typedef uint32_t useconds_t;
  24. typedef int32_t suseconds_t;
  25. typedef uint32_t clock_t;
  26. #define __socklen_t_defined
  27. #define __socklen_t uint32_t
  28. typedef __socklen_t socklen_t;
  29. struct stat {
  30. dev_t st_dev; /* ID of device containing file */
  31. ino_t st_ino; /* inode number */
  32. mode_t st_mode; /* protection */
  33. nlink_t st_nlink; /* number of hard links */
  34. uid_t st_uid; /* user ID of owner */
  35. gid_t st_gid; /* group ID of owner */
  36. dev_t st_rdev; /* device ID (if special file) */
  37. off_t st_size; /* total size, in bytes */
  38. blksize_t st_blksize; /* blocksize for file system I/O */
  39. blkcnt_t st_blocks; /* number of 512B blocks allocated */
  40. time_t st_atime; /* time of last access */
  41. time_t st_mtime; /* time of last modification */
  42. time_t st_ctime; /* time of last status change */
  43. };
  44. struct utimbuf {
  45. time_t actime;
  46. time_t modtime;
  47. };
  48. __END_DECLS