types.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef _SYS_TYPES_H
  2. #define _SYS_TYPES_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define __NEED_ino_t
  8. #define __NEED_dev_t
  9. #define __NEED_uid_t
  10. #define __NEED_gid_t
  11. #define __NEED_mode_t
  12. #define __NEED_nlink_t
  13. #define __NEED_off_t
  14. #define __NEED_pid_t
  15. #define __NEED_size_t
  16. #define __NEED_ssize_t
  17. #define __NEED_time_t
  18. #define __NEED_timer_t
  19. #define __NEED_clockid_t
  20. #define __NEED_blkcnt_t
  21. #define __NEED_fsblkcnt_t
  22. #define __NEED_fsfilcnt_t
  23. #define __NEED_id_t
  24. #define __NEED_key_t
  25. #define __NEED_clock_t
  26. #define __NEED_suseconds_t
  27. #define __NEED_blksize_t
  28. #define __NEED_pthread_t
  29. #define __NEED_pthread_attr_t
  30. #define __NEED_pthread_mutexattr_t
  31. #define __NEED_pthread_condattr_t
  32. #define __NEED_pthread_rwlockattr_t
  33. #define __NEED_pthread_barrierattr_t
  34. #define __NEED_pthread_mutex_t
  35. #define __NEED_pthread_cond_t
  36. #define __NEED_pthread_rwlock_t
  37. #define __NEED_pthread_barrier_t
  38. #define __NEED_pthread_spinlock_t
  39. #define __NEED_pthread_key_t
  40. #define __NEED_pthread_once_t
  41. #define __NEED_useconds_t
  42. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  43. #define __NEED_int8_t
  44. #define __NEED_int16_t
  45. #define __NEED_int32_t
  46. #define __NEED_int64_t
  47. #define __NEED_u_int64_t
  48. #define __NEED_register_t
  49. #endif
  50. #include <bits/alltypes.h>
  51. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  52. typedef unsigned char u_int8_t;
  53. typedef unsigned short u_int16_t;
  54. typedef unsigned u_int32_t;
  55. typedef char *caddr_t;
  56. typedef unsigned char u_char;
  57. typedef unsigned short u_short, ushort;
  58. typedef unsigned u_int, uint;
  59. typedef unsigned long u_long, ulong;
  60. typedef long long quad_t;
  61. typedef unsigned long long u_quad_t;
  62. #include <endian.h>
  63. #include <sys/select.h>
  64. #endif
  65. #if defined(_LARGEFILE64_SOURCE)
  66. #define blkcnt64_t blkcnt_t
  67. #define fsblkcnt64_t fsblkcnt_t
  68. #define fsfilcnt64_t fsfilcnt_t
  69. #define ino64_t ino_t
  70. #define off64_t off_t
  71. #endif
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif