1 /* unified sys/types.h:
2 start with sef's sysvi386 version.
3 merge go32 version -- a few ifdefs.
4 h8300hms, h8300xray, and sysvnecv70 disagree on the following types:
13 however, these aren't "reasonable" values, the sysvi386 ones make far
14 more sense, and should work sufficiently well (in particular, h8300
15 doesn't have a stat, and the necv70 doesn't matter.) -- eichin
21 #include <sys/cdefs.h>
22 #include <machine/_types.h>
24 /* BSD types permitted by POSIX and always exposed as in Glibc. Only provided
25 for backward compatibility with BSD code. The uintN_t standard types should
26 be preferred in new code. */
28 typedef __uint8_t u_int8_t
;
30 #if ___int16_t_defined
31 typedef __uint16_t u_int16_t
;
33 #if ___int32_t_defined
34 typedef __uint32_t u_int32_t
;
36 #if ___int64_t_defined
37 typedef __uint64_t u_int64_t
;
39 typedef __intptr_t register_t
;
40 #define __BIT_TYPES_DEFINED__ 1
42 #ifndef __need_inttypes
45 #include <sys/_types.h>
46 #include <sys/_stdint.h>
49 #include <machine/endian.h>
50 #include <sys/select.h>
51 # define physadr physadr_t
54 #ifndef _IN_ADDR_T_DECLARED
55 typedef __uint32_t in_addr_t
; /* base type for internet address */
56 #define _IN_ADDR_T_DECLARED
59 #ifndef _IN_PORT_T_DECLARED
60 typedef __uint16_t in_port_t
;
61 #define _IN_PORT_T_DECLARED
64 typedef __uintptr_t u_register_t
;
65 #endif /* __BSD_VISIBLE */
68 #ifndef _BSDTYPES_DEFINED
69 /* also defined in mingw/gmon.h and in w32api/winsock[2].h */
70 #ifndef __u_char_defined
71 typedef unsigned char u_char
;
72 #define __u_char_defined
74 #ifndef __u_short_defined
75 typedef unsigned short u_short
;
76 #define __u_short_defined
78 #ifndef __u_int_defined
79 typedef unsigned int u_int
;
80 #define __u_int_defined
82 #ifndef __u_long_defined
83 typedef unsigned long u_long
;
84 #define __u_long_defined
86 #define _BSDTYPES_DEFINED
88 #endif /* __MISC_VISIBLE */
91 typedef unsigned short ushort
; /* System V compatibility */
92 typedef unsigned int uint
; /* System V compatibility */
93 typedef unsigned long ulong
; /* System V compatibility */
96 #ifndef _BLKCNT_T_DECLARED
97 typedef __blkcnt_t blkcnt_t
;
98 #define _BLKCNT_T_DECLARED
101 #ifndef _BLKSIZE_T_DECLARED
102 typedef __blksize_t blksize_t
;
103 #define _BLKSIZE_T_DECLARED
106 #if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
107 typedef _CLOCK_T_
clock_t;
108 #define __clock_t_defined
109 #define _CLOCK_T_DECLARED
112 #if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
113 typedef _TIME_T_
time_t;
114 #define __time_t_defined
115 #define _TIME_T_DECLARED
118 typedef __daddr_t daddr_t
;
120 #ifndef __caddr_t_defined
121 typedef char * caddr_t
;
122 #define __caddr_t_defined
125 #ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */
126 typedef __fsblkcnt_t fsblkcnt_t
;
127 typedef __fsfilcnt_t fsfilcnt_t
;
128 #define _FSBLKCNT_T_DECLARED
131 #ifndef _ID_T_DECLARED
132 typedef __id_t id_t
; /* can hold a uid_t or pid_t */
133 #define _ID_T_DECLARED
136 #ifndef _INO_T_DECLARED
137 typedef __ino_t ino_t
; /* inode number */
138 #define _INO_T_DECLARED
141 #if defined(__i386__) && (defined(GO32) || defined(__MSDOS__))
142 typedef char * addr_t
;
143 typedef unsigned long vm_offset_t
;
144 typedef unsigned long vm_size_t
;
145 #endif /* __i386__ && (GO32 || __MSDOS__) */
148 * All these should be machine specific - right now they are all broken.
149 * However, for all of Cygnus' embedded targets, we want them to all be
150 * the same. Otherwise things like sizeof (struct stat) might depend on
151 * how the file was compiled (e.g. -mint16 vs -mint32, etc.).
154 #ifndef _OFF_T_DECLARED
155 typedef __off_t off_t
; /* file offset */
156 #define _OFF_T_DECLARED
158 #ifndef _DEV_T_DECLARED
159 typedef __dev_t dev_t
; /* device number or struct cdev */
160 #define _DEV_T_DECLARED
162 #ifndef _UID_T_DECLARED
163 typedef __uid_t uid_t
; /* user id */
164 #define _UID_T_DECLARED
166 #ifndef _GID_T_DECLARED
167 typedef __gid_t gid_t
; /* group id */
168 #define _GID_T_DECLARED
171 #ifndef _PID_T_DECLARED
172 typedef __pid_t pid_t
; /* process id */
173 #define _PID_T_DECLARED
176 #ifndef _KEY_T_DECLARED
177 typedef __key_t key_t
; /* IPC key */
178 #define _KEY_T_DECLARED
181 #ifndef _SSIZE_T_DECLARED
182 typedef _ssize_t ssize_t
;
183 #define _SSIZE_T_DECLARED
186 #ifndef _MODE_T_DECLARED
187 typedef __mode_t mode_t
; /* permissions */
188 #define _MODE_T_DECLARED
191 #ifndef _NLINK_T_DECLARED
192 typedef __nlink_t nlink_t
; /* link count */
193 #define _NLINK_T_DECLARED
196 #if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED)
197 typedef __clockid_t clockid_t
;
198 #define __clockid_t_defined
199 #define _CLOCKID_T_DECLARED
202 #if !defined(__timer_t_defined) && !defined(_TIMER_T_DECLARED)
203 typedef __timer_t timer_t
;
204 #define __timer_t_defined
205 #define _TIMER_T_DECLARED
208 #ifndef _USECONDS_T_DECLARED
209 typedef __useconds_t useconds_t
; /* microseconds (unsigned) */
210 #define _USECONDS_T_DECLARED
213 #ifndef _SUSECONDS_T_DECLARED
214 typedef __suseconds_t suseconds_t
;
215 #define _SUSECONDS_T_DECLARED
218 typedef __int64_t sbintime_t
;
220 #include <sys/features.h>
221 #include <sys/_pthreadtypes.h>
222 #include <machine/types.h>
224 #endif /* !__need_inttypes */
226 #undef __need_inttypes
228 #endif /* _SYS_TYPES_H */