Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /**
  2.  * This file has no copyright assigned and is placed in the Public Domain.
  3.  * This file is part of the w64 mingw-runtime package.
  4.  * No warranty is given; refer to the file DISCLAIMER within this package.
  5.  */
  6. #ifndef _INC_TYPES
  7. #define _INC_TYPES
  8.  
  9. #ifndef _WIN32
  10. #error Only Win32 target is supported!
  11. #endif
  12.  
  13. #include <_mingw.h>
  14.  
  15. #ifndef __TINYC__ /* gr */
  16. #ifdef _USE_32BIT_TIME_T
  17. #ifdef _WIN64
  18. #undef _USE_32BIT_TIME_T
  19. #endif
  20. #else
  21. #if _INTEGRAL_MAX_BITS < 64
  22. #define _USE_32BIT_TIME_T
  23. #endif
  24. #endif
  25. #endif
  26.  
  27. #ifndef _TIME32_T_DEFINED
  28. #define _TIME32_T_DEFINED
  29. typedef long __time32_t;
  30. #endif
  31.  
  32. #ifndef _TIME64_T_DEFINED
  33. #define _TIME64_T_DEFINED
  34. #if _INTEGRAL_MAX_BITS >= 64
  35. typedef __int64 __time64_t;
  36. #endif
  37. #endif
  38.  
  39. #ifndef _TIME_T_DEFINED
  40. #define _TIME_T_DEFINED
  41. #ifdef _USE_32BIT_TIME_T
  42. typedef __time32_t time_t;
  43. #else
  44. typedef __time64_t time_t;
  45. #endif
  46. #endif
  47.  
  48. #ifndef _INO_T_DEFINED
  49. #define _INO_T_DEFINED
  50. typedef unsigned short _ino_t;
  51. #ifndef NO_OLDNAMES
  52. typedef unsigned short ino_t;
  53. #endif
  54. #endif
  55.  
  56. #ifndef _DEV_T_DEFINED
  57. #define _DEV_T_DEFINED
  58. typedef unsigned int _dev_t;
  59. #ifndef NO_OLDNAMES
  60. typedef unsigned int dev_t;
  61. #endif
  62. #endif
  63.  
  64. #ifndef _PID_T_
  65. #define _PID_T_
  66. #ifndef _WIN64
  67. typedef int     _pid_t;
  68. #else
  69. typedef __int64 _pid_t;
  70. #endif
  71.  
  72. #ifndef NO_OLDNAMES
  73. typedef _pid_t  pid_t;
  74. #endif
  75. #endif  /* Not _PID_T_ */
  76.  
  77. #ifndef _MODE_T_
  78. #define _MODE_T_
  79. typedef unsigned short _mode_t;
  80.  
  81. #ifndef NO_OLDNAMES
  82. typedef _mode_t mode_t;
  83. #endif
  84. #endif  /* Not _MODE_T_ */
  85.  
  86. #ifndef _OFF_T_DEFINED
  87. #define _OFF_T_DEFINED
  88. #ifndef _OFF_T_
  89. #define _OFF_T_
  90.   typedef long _off_t;
  91. #if !defined(NO_OLDNAMES) || defined(_POSIX)
  92.   typedef long off_t;
  93. #endif
  94. #endif
  95. #endif
  96.  
  97. #ifndef _OFF64_T_DEFINED
  98. #define _OFF64_T_DEFINED
  99.   typedef long long _off64_t;
  100. #if !defined(NO_OLDNAMES) || defined(_POSIX)
  101.   typedef long long off64_t;
  102. #endif
  103. #endif
  104.  
  105. #ifndef _TIMESPEC_DEFINED
  106. #define _TIMESPEC_DEFINED
  107. struct timespec {
  108.   time_t  tv_sec;   /* Seconds */
  109.   long    tv_nsec;  /* Nanoseconds */
  110. };
  111.  
  112. struct itimerspec {
  113.   struct timespec  it_interval;  /* Timer period */
  114.   struct timespec  it_value;     /* Timer expiration */
  115. };
  116. #endif
  117.  
  118. #endif
  119.