Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
11 | * Luca Abeni <luca@gandalf.sssup.it> |
||
12 | * (see the web pages for full authors list) |
||
13 | * |
||
14 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
15 | * |
||
16 | * http://www.sssup.it |
||
17 | * http://retis.sssup.it |
||
18 | * http://shark.sssup.it |
||
19 | */ |
||
20 | |||
21 | /* |
||
22 | * Copyright (C) 1999 Massimiliano Giorgi |
||
23 | * |
||
24 | * This program is free software; you can redistribute it and/or modify |
||
25 | * it under the terms of the GNU General Public License as published by |
||
26 | * the Free Software Foundation; either version 2 of the License, or |
||
27 | * (at your option) any later version. |
||
28 | * |
||
29 | * This program is distributed in the hope that it will be useful, |
||
30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
32 | * GNU General Public License for more details. |
||
33 | * |
||
34 | * You should have received a copy of the GNU General Public License |
||
35 | * along with this program; if not, write to the Free Software |
||
36 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
37 | * |
||
38 | */ |
||
39 | |||
40 | /* |
||
41 | * CVS : $Id: types.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $ |
||
42 | * |
||
43 | * File: $File$ |
||
44 | * Revision: $Revision: 1.1.1.1 $ |
||
45 | * Last update: $Date: 2002-03-29 14:12:51 $ |
||
46 | * |
||
47 | * Heavy modified from glibc 2.x.x |
||
48 | * |
||
49 | */ |
||
50 | |||
51 | /* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. |
||
52 | This file is part of the GNU C Library. |
||
53 | |||
54 | The GNU C Library is free software; you can redistribute it and/or |
||
55 | modify it under the terms of the GNU Library General Public License as |
||
56 | published by the Free Software Foundation; either version 2 of the |
||
57 | License, or (at your option) any later version. |
||
58 | |||
59 | The GNU C Library is distributed in the hope that it will be useful, |
||
60 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
61 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||
62 | Library General Public License for more details. |
||
63 | |||
64 | You should have received a copy of the GNU Library General Public |
||
65 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
||
66 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
||
67 | Boston, MA 02111-1307, USA. */ |
||
68 | |||
69 | /* |
||
70 | * Never include this file directly; use <sys/types.h> instead. |
||
71 | */ |
||
72 | |||
73 | #ifndef _BITS_TYPES_H |
||
74 | #define _BITS_TYPES_H 1 |
||
75 | |||
76 | #include <features.h> |
||
77 | #include <ll/sys/types.h> |
||
78 | #include <sys/htypes.h> |
||
79 | |||
80 | #ifdef __GNUC__ |
||
81 | #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) |
||
82 | __extension__ typedef unsigned long long int u_int64_t; |
||
83 | #else |
||
84 | typedef unsigned int u_int64_t __attribute__ ((__mode__(__DI__))); |
||
85 | #endif |
||
86 | #endif |
||
87 | |||
88 | #ifdef __GNUC__ |
||
89 | #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) |
||
90 | __extension__ typedef signed long long int int64_t; |
||
91 | #else |
||
92 | typedef int int64_t __attribute__ ((__mode__(__DI__))); |
||
93 | #endif |
||
94 | #endif |
||
95 | |||
96 | /* Convenience types. */ |
||
97 | typedef u_char __u_char; |
||
98 | typedef u_short __u_short; |
||
99 | typedef u_int __u_int; |
||
100 | typedef u_long __u_long; |
||
101 | |||
102 | #ifdef __GNUC__ |
||
103 | __extension__ typedef u_int64_t __u_quad_t; |
||
104 | __extension__ typedef int64_t __quad_t ; |
||
105 | #else |
||
106 | typedef struct |
||
107 | { |
||
108 | long __val[2]; |
||
109 | } __quad_t; |
||
110 | typedef struct |
||
111 | { |
||
112 | __u_long __val[2]; |
||
113 | } __u_quad_t; |
||
114 | #endif |
||
115 | |||
116 | typedef __quad_t *__qaddr_t; |
||
117 | |||
118 | typedef int8_t __int8_t; |
||
119 | typedef u_int8_t __uint8_t; |
||
120 | typedef int16_t __int16_t; |
||
121 | typedef u_int16_t __uint16_t; |
||
122 | typedef int32_t __int32_t; |
||
123 | typedef u_int32_t __uint32_t; |
||
124 | #ifdef __GNUC__ |
||
125 | typedef int64_t __int64_t; |
||
126 | typedef u_int64_t __uint64_t; |
||
127 | #endif |
||
128 | |||
129 | __DJ_dev_t |
||
130 | #undef __DJ_dev_t |
||
131 | #define __DJ_dev_t |
||
132 | __DJ_uid_t |
||
133 | #undef __DJ_uid_t |
||
134 | #define __DJ_uid_t |
||
135 | __DJ_gid_t |
||
136 | #undef __DJ_gid_t |
||
137 | #define __DJ_gid_t |
||
138 | __DJ_ino_t |
||
139 | #undef __DJ_ino_t |
||
140 | #define __DJ_ino_t |
||
141 | __DJ_mode_t |
||
142 | #undef __DJ_mode_t |
||
143 | #define __DJ_mode_t |
||
144 | __DJ_nlink_t |
||
145 | #undef __DJ_nlink_t |
||
146 | #define __DJ_nlink_t |
||
147 | __DJ_off_t |
||
148 | #undef __DJ_off_t |
||
149 | #define __DJ_off_t |
||
150 | __DJ_pid_t |
||
151 | #undef __DJ_pid_t |
||
152 | #define __DJ_pid_t |
||
153 | __DJ_clock_t |
||
154 | #undef __DJ_clock_t |
||
155 | #define __DJ_clock_t |
||
156 | __DJ_time_t |
||
157 | #undef __DJ_time_t |
||
158 | #define __DJ_time_t |
||
159 | |||
160 | typedef dev_t __dev_t; /* Type of device numbers. */ |
||
161 | typedef uid_t __uid_t; /* Type of user identifications. */ |
||
162 | typedef gid_t __gid_t; /* Type of group identifications. */ |
||
163 | typedef ino_t __ino_t; /* Type of file serial numbers. */ |
||
164 | typedef __quad_t __ino64_t; /* Type of file serial numbers (LFS). */ |
||
165 | typedef mode_t __mode_t; /* Type of file attribute bitmasks. */ |
||
166 | typedef nlink_t __nlink_t; /* Type of file link counts. */ |
||
167 | typedef off_t __off_t; /* Type of file sizes and offsets. */ |
||
168 | typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ |
||
169 | typedef __loff_t __off64_t; /* Type of file sizes and offsets (LFS). */ |
||
170 | typedef pid_t __pid_t; /* Type of process identifications. */ |
||
171 | typedef size_t __size_t; |
||
172 | typedef ssize_t __ssize_t; /* Type of a byte count, or error. */ |
||
173 | typedef __u_quad_t __fsid_t; /* Type of file system IDs. */ |
||
174 | typedef clock_t __clock_t; /* Type of CPU usage counts. */ |
||
175 | typedef long int __rlim_t; /* Type for resource measurement. */ |
||
176 | typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */ |
||
177 | typedef unsigned int __id_t; /* General type for IDs. */ |
||
178 | |||
179 | /* Everythin' else. */ |
||
180 | typedef long int __daddr_t; /* The type of a disk address. */ |
||
181 | typedef char *__caddr_t; /* Type of ... */ |
||
182 | typedef time_t __time_t; /* Type of time */ |
||
183 | typedef long int __swblk_t; /* Type of a swap block maybe? */ |
||
184 | typedef long int __key_t; /* Type of an IPC key */ |
||
185 | |||
186 | /* One element in the file descriptor mask array. */ |
||
187 | typedef unsigned long int __fd_mask; |
||
188 | |||
189 | /* Number of descriptors that can fit in an `fd_set'. */ |
||
190 | #define __FD_SETSIZE 256 |
||
191 | |||
192 | /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ |
||
193 | #define __NFDBITS (sizeof (unsigned long int) * 8) |
||
194 | #define __FDELT(d) ((d) / __NFDBITS) |
||
195 | #define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) |
||
196 | |||
197 | /* fd_set for select and pselect. */ |
||
198 | typedef struct |
||
199 | { |
||
200 | /* XPG4.2 requires this member name. Otherwise avoid the name |
||
201 | from the user namespace. */ |
||
202 | #ifdef __USE_XOPEN |
||
203 | __fd_mask fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; |
||
204 | # define __FDS_BITS(set) ((set)->fds_bits) |
||
205 | #else |
||
206 | __fd_mask __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; |
||
207 | # define __FDS_BITS(set) ((set)->__fds_bits) |
||
208 | #endif |
||
209 | } __fd_set; |
||
210 | |||
211 | /* XXX Used in `struct shmid_ds'. */ |
||
212 | typedef unsigned short int __ipc_pid_t; |
||
213 | |||
214 | /* Types from the Large File Support interface. */ |
||
215 | |||
216 | /* Type to count number os disk blocks. */ |
||
217 | typedef long int __blkcnt_t; |
||
218 | typedef __quad_t __blkcnt64_t; |
||
219 | |||
220 | /* Type to count file system blocks. */ |
||
221 | typedef unsigned int __fsblkcnt_t; |
||
222 | typedef __u_quad_t __fsblkcnt64_t; |
||
223 | |||
224 | /* Type to count file system inodes. */ |
||
225 | typedef unsigned long int __fsfilcnt_t; |
||
226 | typedef __u_quad_t __fsfilcnt64_t; |
||
227 | |||
228 | /* Used in XTI. */ |
||
229 | typedef int __t_scalar_t; |
||
230 | typedef unsigned int __t_uscalar_t; |
||
231 | |||
232 | /* Duplicates info from stdint.h but this is used in unistd.h. */ |
||
233 | typedef long int __intptr_t; |
||
234 | |||
235 | #endif /* bits/types.h */ |