Debian Codegraph @

mingw-w64-headers/crt/sys/types.h

raw
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD 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 <crtdefs.h>
14
15 #ifdef _USE_32BIT_TIME_T
16 #ifdef _WIN64
17 #undef _USE_32BIT_TIME_T
18 #endif
19 #endif
20
21 #ifndef _TIME32_T_DEFINED
22 #define _TIME32_T_DEFINED
23 typedef long __time32_t;
24 #endif
25
26 #ifndef _TIME64_T_DEFINED
27 #define _TIME64_T_DEFINED
28 __MINGW_EXTENSION
29 typedef __int64 __time64_t;
30 #endif
31
32 #ifndef _TIME_T_DEFINED
33 #define _TIME_T_DEFINED
34 #ifdef _USE_32BIT_TIME_T
35 typedef __time32_t time_t;
36 #else
37 typedef __time64_t time_t;
38 #endif
39 #endif
40
41 #ifndef _INO_T_DEFINED
42 #define _INO_T_DEFINED
43 typedef unsigned short _ino_t;
44 #ifndef NO_OLDNAMES
45 typedef unsigned short ino_t;
46 #endif
47 #endif
48
49 #ifndef _DEV_T_DEFINED
50 #define _DEV_T_DEFINED
51 typedef unsigned int _dev_t;
52 #ifndef NO_OLDNAMES
53 typedef unsigned int dev_t;
54 #endif
55 #endif
56
57 #ifndef _PID_T_
58 #define _PID_T_
59 #ifndef _WIN64
60 typedef int _pid_t;
61 #else
62 __MINGW_EXTENSION
63 typedef __int64 _pid_t;
64 #endif
65
66 #ifndef NO_OLDNAMES
67 #undef pid_t
68 typedef _pid_t pid_t;
69 #endif
70 #endif /* Not _PID_T_ */
71
72 #ifndef _MODE_T_
73 #define _MODE_T_
74 typedef unsigned short _mode_t;
75
76 #ifndef NO_OLDNAMES
77 typedef _mode_t mode_t;
78 #endif
79 #endif /* Not _MODE_T_ */
80
81 #include <_mingw_off_t.h>
82
83 #ifndef __NO_ISOCEXT
84 typedef unsigned int useconds_t;
85 #endif
86
87 #ifndef _TIMESPEC_DEFINED
88 #define _TIMESPEC_DEFINED
89 struct timespec {
90 time_t tv_sec; /* Seconds */
91 long tv_nsec; /* Nanoseconds */
92 };
93
94 struct itimerspec {
95 struct timespec it_interval; /* Timer period */
96 struct timespec it_value; /* Timer expiration */
97 };
98 #endif /* _TIMESPEC_DEFINED */
99
100 #ifndef _SIGSET_T_
101 #define _SIGSET_T_
102 #ifdef _WIN64
103 __MINGW_EXTENSION
104 typedef unsigned long long _sigset_t;
105 #else
106 typedef unsigned long _sigset_t;
107 #endif
108
109 #ifdef _POSIX
110 typedef _sigset_t sigset_t;
111 #endif
112 #endif /* Not _SIGSET_T_ */
113
114 #endif /* _INC_TYPES */
115