OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [include/] [sys/] [types.h] - Blame information for rev 1325

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
/* Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
 
4
   The GNU C Library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Lesser General Public
6
   License as published by the Free Software Foundation; either
7
   version 2.1 of the License, or (at your option) any later version.
8
 
9
   The GNU C Library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Lesser General Public License for more details.
13
 
14
   You should have received a copy of the GNU Lesser General Public
15
   License along with the GNU C Library; if not, write to the Free
16
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
   02111-1307 USA.  */
18
 
19
/*
20
 *      POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
21
 */
22
 
23
#ifndef _SYS_TYPES_H
24
#define _SYS_TYPES_H    1
25
 
26
#include <features.h>
27
 
28
__BEGIN_DECLS
29
 
30
#include <bits/types.h>
31
 
32
#ifdef  __USE_BSD
33
# ifndef __u_char_defined
34
typedef __u_char u_char;
35
typedef __u_short u_short;
36
typedef __u_int u_int;
37
typedef __u_long u_long;
38
typedef __quad_t quad_t;
39
typedef __u_quad_t u_quad_t;
40
typedef __fsid_t fsid_t;
41
#  define __u_char_defined
42
# endif
43
#endif
44
 
45
typedef __loff_t loff_t;
46
 
47
#ifndef __ino_t_defined
48
# ifndef __USE_FILE_OFFSET64
49
typedef __ino_t ino_t;
50
# else
51
typedef __ino64_t ino_t;
52
# endif
53
# define __ino_t_defined
54
#endif
55
#if defined __USE_LARGEFILE64 && !defined __ino64_t_defined
56
typedef __ino64_t ino64_t;
57
# define __ino64_t_defined
58
#endif
59
 
60
#ifndef __dev_t_defined
61
typedef __dev_t dev_t;
62
# define __dev_t_defined
63
#endif
64
 
65
#ifndef __gid_t_defined
66
typedef __gid_t gid_t;
67
# define __gid_t_defined
68
#endif
69
 
70
#ifndef __mode_t_defined
71
typedef __mode_t mode_t;
72
# define __mode_t_defined
73
#endif
74
 
75
#ifndef __nlink_t_defined
76
typedef __nlink_t nlink_t;
77
# define __nlink_t_defined
78
#endif
79
 
80
#ifndef __uid_t_defined
81
typedef __uid_t uid_t;
82
# define __uid_t_defined
83
#endif
84
 
85
#ifndef __off_t_defined
86
# ifndef __USE_FILE_OFFSET64
87
typedef __off_t off_t;
88
# else
89
typedef __off64_t off_t;
90
# endif
91
# define __off_t_defined
92
#endif
93
#if defined __USE_LARGEFILE64 && !defined __off64_t_defined
94
typedef __off64_t off64_t;
95
# define __off64_t_defined
96
#endif
97
 
98
#ifndef __pid_t_defined
99
typedef __pid_t pid_t;
100
# define __pid_t_defined
101
#endif
102
 
103
#if (defined __USE_SVID || defined __USE_XOPEN) && !defined __id_t_defined
104
typedef __id_t id_t;
105
# define __id_t_defined
106
#endif
107
 
108
#ifndef __ssize_t_defined
109
typedef __ssize_t ssize_t;
110
# define __ssize_t_defined
111
#endif
112
 
113
#ifdef  __USE_BSD
114
# ifndef __daddr_t_defined
115
typedef __daddr_t daddr_t;
116
typedef __caddr_t caddr_t;
117
#  define __daddr_t_defined
118
# endif
119
#endif
120
 
121
#if (defined __USE_SVID || defined __USE_XOPEN) && !defined __key_t_defined
122
typedef __key_t key_t;
123
# define __key_t_defined
124
#endif
125
 
126
#ifdef __USE_XOPEN
127
# define __need_clock_t
128
#endif
129
#define __need_time_t
130
#define __need_timer_t
131
#define __need_clockid_t
132
#include <time.h>
133
 
134
#ifdef __USE_XOPEN
135
# ifndef __useconds_t_defined
136
typedef __useconds_t useconds_t;
137
#  define __useconds_t_defined
138
# endif
139
# ifndef __suseconds_t_defined
140
typedef __suseconds_t suseconds_t;
141
#  define __suseconds_t_defined
142
# endif
143
#endif
144
 
145
#define __need_size_t
146
#include <stddef.h>
147
 
148
#ifdef __USE_MISC
149
/* Old compatibility names for C types.  */
150
typedef unsigned long int ulong;
151
typedef unsigned short int ushort;
152
typedef unsigned int uint;
153
#endif
154
 
155
/* These size-specific names are used by some of the inet code.  */
156
 
157
#if !__GNUC_PREREQ (2, 7)
158
 
159
/* These types are defined by the ISO C99 header <inttypes.h>. */
160
# ifndef __int8_t_defined
161
#  define __int8_t_defined
162
typedef char int8_t;
163
typedef short int int16_t;
164
typedef int int32_t;
165
#  ifdef __GNUC__
166
__extension__ typedef long long int int64_t;
167
#  endif
168
# endif
169
 
170
/* But these were defined by ISO C without the first `_'.  */
171
typedef unsigned char u_int8_t;
172
typedef unsigned short int u_int16_t;
173
typedef unsigned int u_int32_t;
174
# ifdef __GNUC__
175
__extension__ typedef unsigned long long int u_int64_t;
176
# endif
177
 
178
typedef int register_t;
179
 
180
#else
181
 
182
/* For GCC 2.7 and later, we can use specific type-size attributes.  */
183
# define __intN_t(N, MODE) \
184
  typedef int int##N##_t __attribute__ ((__mode__ (MODE)))
185
# define __u_intN_t(N, MODE) \
186
  typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE)))
187
 
188
# ifndef __int8_t_defined
189
#  define __int8_t_defined
190
__intN_t (8, __QI__);
191
__intN_t (16, __HI__);
192
__intN_t (32, __SI__);
193
__intN_t (64, __DI__);
194
# endif
195
 
196
__u_intN_t (8, __QI__);
197
__u_intN_t (16, __HI__);
198
__u_intN_t (32, __SI__);
199
__u_intN_t (64, __DI__);
200
 
201
typedef int register_t __attribute__ ((__mode__ (__word__)));
202
 
203
 
204
/* Some code from BIND tests this macro to see if the types above are
205
   defined.  */
206
#endif
207
#define __BIT_TYPES_DEFINED__   1
208
 
209
 
210
#ifdef  __USE_BSD
211
/* In BSD <sys/types.h> is expected to define BYTE_ORDER.  */
212
# include <endian.h>
213
 
214
/* It also defines `fd_set' and the FD_* macros for `select'.  */
215
# include <sys/select.h>
216
 
217
/* BSD defines these symbols, so we follow.  */
218
# include <sys/sysmacros.h>
219
#endif /* Use BSD.  */
220
 
221
 
222
#if defined __USE_UNIX98 && !defined __blksize_t_defined
223
typedef __blksize_t blksize_t;
224
# define __blksize_t_defined
225
#endif
226
 
227
/* Types from the Large File Support interface.  */
228
#ifndef __USE_FILE_OFFSET64
229
# ifndef __blkcnt_t_defined
230
typedef __blkcnt_t blkcnt_t;     /* Type to count number of disk blocks.  */
231
#  define __blkcnt_t_defined
232
# endif
233
# ifndef __fsblkcnt_t_defined
234
typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks.  */
235
#  define __fsblkcnt_t_defined
236
# endif
237
# ifndef __fsfilcnt_t_defined
238
typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes.  */
239
#  define __fsfilcnt_t_defined
240
# endif
241
#else
242
# ifndef __blkcnt_t_defined
243
typedef __blkcnt64_t blkcnt_t;     /* Type to count number of disk blocks.  */
244
#  define __blkcnt_t_defined
245
# endif
246
# ifndef __fsblkcnt_t_defined
247
typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks.  */
248
#  define __fsblkcnt_t_defined
249
# endif
250
# ifndef __fsfilcnt_t_defined
251
typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes.  */
252
#  define __fsfilcnt_t_defined
253
# endif
254
#endif
255
 
256
#ifdef __USE_LARGEFILE64
257
typedef __blkcnt64_t blkcnt64_t;     /* Type to count number of disk blocks. */
258
typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks.  */
259
typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes.  */
260
#endif
261
 
262
__END_DECLS
263
 
264
#endif /* sys/types.h */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.