KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
_types.h
Go to the documentation of this file.
1/** \file sys/_types.h
2 \brief Internal typedefs.
3 \ingroup system_types
4
5 This file contains internal typedefs required by libc. You probably
6 shouldn't use any of these in your code. Most of these are copied from
7 newlib's %sys/_types.h.
8*/
9
10#ifndef _SYS__TYPES_H
11#define _SYS__TYPES_H
12
13#include <sys/cdefs.h>
14__BEGIN_DECLS
15
16#include <sys/lock.h>
17#include <newlib.h>
18#include <sys/_pthreadtypes.h>
19
20/** \addtogroup system_types
21 @{
22*/
23
24/* This part copied from newlib's sys/_types.h. */
25#ifndef __off_t_defined
26/** \brief File offset type. */
27typedef long _off_t;
29#endif
30
31#ifndef __dev_t_defined
32/** \brief Device ID type. */
33typedef short __dev_t;
34#endif
35
36#ifndef __uid_t_defined
37/** \brief User ID type. */
38typedef unsigned short __uid_t;
39#endif
40#ifndef __gid_t_defined
41/** \brief Group ID type. */
42typedef unsigned short __gid_t;
43#endif
44
45#ifndef __off64_t_defined
46/** \brief 64-bit file offset type. */
47__extension__ typedef long long _off64_t;
48#endif
49
50#ifndef __fpos_t_defined
51/** \brief File position type. */
52typedef long _fpos_t;
53#endif
54
55#ifdef __LARGE64_FILES
56#ifndef __fpos64_t_defined
57/** \brief 64-bit file position type. */
58typedef _off64_t _fpos64_t;
59#endif
60#endif
61
62#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
63/** \brief Signed size type. */
64typedef int _ssize_t;
65#else
66typedef long _ssize_t;
67#endif
68
69/** \cond */
70#define __need_wint_t
71#include <stddef.h>
72/** \endcond */
73
74#ifndef __mbstate_t_defined
75/** \brief Conversion state information.
76 \headerfile sys/_types.h
77*/
78typedef struct {
80 union {
81 wint_t __wch;
82 unsigned char __wchb[4];
83 } __value; /* Value so far. */
85#endif
86
87#ifndef __flock_t_defined
88/** \brief File lock type. */
89typedef __newlib_recursive_lock_t _flock_t;
90#endif
91
92#ifndef __iconv_t_defined
93/** \brief Iconv descriptor type. */
94typedef void *_iconv_t;
95#endif
96
97#ifndef __blkcnt_t_defined
98typedef long __blkcnt_t;
99#endif
100
101#ifndef __blksize_t_defined
102typedef long __blksize_t;
103#endif
104
105#ifndef __daddr_t_defined
106typedef long __daddr_t;
107#endif
108
109#ifndef __fsblkcnt_t_defined
110typedef unsigned long long __fsblkcnt_t;
111#endif
112
113#ifndef __fsfilcnt_t_defined
114typedef unsigned long __fsfilcnt_t;
115#endif
116
117#ifndef __id_t_defined
118typedef unsigned long __id_t;
119#endif
120
121#ifndef __ino_t_defined
122typedef unsigned long __ino_t;
123#endif
124
125#ifndef __pid_t_defined
126typedef int __pid_t;
127#endif
128
129#ifndef __key_t_defined
130typedef long __key_t;
131#endif
132
133#ifndef __mode_t_defined
134typedef unsigned long __mode_t;
135#endif
136
137typedef unsigned short __nlink_t;
138typedef long __suseconds_t; /* microseconds (signed) */
139typedef unsigned long __useconds_t; /* microseconds (unsigned) */
140#define _TIME_T_ long long
142
143#ifndef __clockid_t_defined
144#define _CLOCKID_T_ unsigned long
145#endif
146
148
149#define _TIMER_T_ unsigned long
151
152#ifndef __clock_t_defined
153#define _CLOCK_T_ unsigned long /* clock() */
154#endif
155
157
158#ifndef IOV_MAX
159/** \brief Maximum length of an iovec, in elements. */
160#define IOV_MAX 1024
161#endif
162
163#if __GNUC_MINOR__ > 95 || __GNUC__ >= 3
164typedef __builtin_va_list __va_list;
165#else
166typedef char * __va_list;
167#endif
168
169/** @} */
170
171__END_DECLS
172
173#endif /* _SYS__TYPES_H */
174
175#ifdef _STDLIB_H_
176#include <kos/stdlib.h>
177#endif
#define __extension__
Definition cdefs.h:103
_CLOCKID_T_ __clockid_t
Definition _types.h:147
long __blksize_t
Definition _types.h:102
_CLOCK_T_ __clock_t
Definition _types.h:156
unsigned long __ino_t
Definition _types.h:122
#define _CLOCKID_T_
Definition _types.h:144
long __daddr_t
Definition _types.h:106
unsigned short __uid_t
User ID type.
Definition _types.h:38
long long _off64_t
64-bit file offset type.
Definition _types.h:47
unsigned long __mode_t
Definition _types.h:134
unsigned long long __fsblkcnt_t
Definition _types.h:110
unsigned long __useconds_t
Definition _types.h:139
_TIME_T_ __time_t
Definition _types.h:141
__newlib_recursive_lock_t _flock_t
File lock type.
Definition _types.h:89
long _ssize_t
Definition _types.h:66
char * __va_list
Definition _types.h:166
short __dev_t
Device ID type.
Definition _types.h:33
long _off_t
File offset type.
Definition _types.h:27
_off_t __off_t
Definition _types.h:28
unsigned long __id_t
Definition _types.h:118
#define _CLOCK_T_
Definition _types.h:153
void * _iconv_t
Iconv descriptor type.
Definition _types.h:94
#define _TIME_T_
Definition _types.h:140
long _fpos_t
File position type.
Definition _types.h:52
int __pid_t
Definition _types.h:126
unsigned short __nlink_t
Definition _types.h:137
long __blkcnt_t
Definition _types.h:98
#define _TIMER_T_
Definition _types.h:149
_TIMER_T_ __timer_t
Definition _types.h:150
long __suseconds_t
Definition _types.h:138
unsigned long __fsfilcnt_t
Definition _types.h:114
long __key_t
Definition _types.h:130
unsigned short __gid_t
Group ID type.
Definition _types.h:42
KOS-specific patching for newlib's <sys/lock.h>
KOS-implementation of select POSIX extensions.
Conversion state information.
Definition _types.h:78
wint_t __wch
Definition _types.h:81
int __count
Definition _types.h:79