Subversion Repositories shark

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/* Copyright (C) 1991,92,94,95,96,97,98,99 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 Library General Public License as
6
   published by the Free Software Foundation; either version 2 of the
7
   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
   Library General Public License for more details.
13
 
14
   You should have received a copy of the GNU Library General Public
15
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
16
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
   Boston, MA 02111-1307, USA.  */
18
 
19
/* from GNU libc 2.1.2 (modified marked with MG) */
20
 
21
/*
22
 *	POSIX Standard: 2.6 Primitive System Data Types	<sys/types.h>
23
 */
24
 
25
#ifndef	_SYS_TYPES_H
26
#define	_SYS_TYPES_H	1
27
 
28
#include <features.h>
29
 
30
__BEGIN_DECLS
31
 
32
#include <bits/types.h>
33
 
34
#ifdef	__USE_BSD
35
typedef __u_char u_char;
36
typedef __u_short u_short;
37
typedef __u_int u_int;
38
typedef __u_long u_long;
39
typedef __quad_t quad_t;
40
typedef __u_quad_t u_quad_t;
41
typedef __fsid_t fsid_t;
42
#endif
43
 
44
typedef __loff_t loff_t;
45
 
46
#ifndef ino_t
47
# ifndef __USE_FILE_OFFSET64
48
typedef __ino_t ino_t;
49
# else
50
typedef __ino64_t ino_t;
51
# endif
52
# define ino_t ino_t
53
#endif
54
#ifdef __USE_LARGEFILE64
55
typedef __ino64_t ino64_t;
56
#endif
57
 
58
#ifndef dev_t
59
typedef __dev_t dev_t;
60
# define dev_t dev_t
61
#endif
62
 
63
#ifndef gid_t
64
typedef __gid_t gid_t;
65
# define gid_t gid_t
66
#endif
67
 
68
#ifndef mode_t
69
typedef __mode_t mode_t;
70
# define mode_t mode_t
71
#endif
72
 
73
#ifndef nlink_t
74
typedef __nlink_t nlink_t;
75
# define nlink_t nlink_t
76
#endif
77
 
78
#ifndef uid_t
79
typedef __uid_t uid_t;
80
# define uid_t uid_t
81
#endif
82
 
83
#ifndef off_t
84
# ifndef __USE_FILE_OFFSET64
85
typedef __off_t off_t;
86
# else
87
typedef __off64_t off_t;
88
# endif
89
# define off_t off_t
90
#endif
91
#if defined __USE_LARGEFILE64 && !defined off64_t
92
typedef __off64_t off64_t;
93
# define off64_t off64_t
94
#endif
95
 
96
#ifndef pid_t
97
typedef __pid_t pid_t;
98
# define pid_t pid_t
99
#endif
100
 
101
#if defined __USE_SVID || defined __USE_XOPEN
102
typedef __id_t id_t;
103
#endif
104
 
105
#ifndef ssize_t
106
typedef __ssize_t ssize_t;
107
# define ssize_t ssize_t
108
#endif
109
 
110
#ifdef	__USE_BSD
111
typedef __daddr_t daddr_t;
112
typedef __caddr_t caddr_t;
113
#endif
114
 
115
#if defined __USE_SVID || defined __USE_XOPEN
116
typedef __key_t key_t;
117
#endif
118
 
119
#ifdef __USE_XOPEN
120
# define __need_clock_t
121
#endif
122
#define	__need_time_t
123
#include <time.h>
124
 
125
#define	__need_size_t
126
#include <stddef.h>
127
 
128
#ifdef __USE_MISC
129
/* Old compatibility names for C types.  */
130
typedef unsigned long int ulong;
131
typedef unsigned short int ushort;
132
typedef unsigned int uint;
133
#endif
134
 
135
/* These size-specific names are used by some of the inet code.  */
136
 
137
#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
138
 
139
/* These types are defined by the ISO C 9x header <inttypes.h>. */
140
# ifndef __int8_t_defined
141
#  define __int8_t_defined
142
typedef	char int8_t;
143
typedef	short int int16_t;
144
typedef	int int32_t;
145
#  ifdef __GNUC__
146
__extension__ typedef long long int int64_t;
147
#  endif
148
# endif
149
 
150
/* But these were defined by ISO C without the first `_'.  */
151
typedef	unsigned char u_int8_t;
152
typedef	unsigned short int u_int16_t;
153
typedef	unsigned int u_int32_t;
154
# ifdef __GNUC__
155
__extension__ typedef unsigned long long int u_int64_t;
156
# endif
157
 
158
typedef int register_t;
159
 
160
#else
161
 
162
/* For GCC 2.7 and later, we can use specific type-size attributes.  */
163
# define __intN_t(N, MODE) \
164
  typedef int int##N##_t __attribute__ ((__mode__ (MODE)))
165
# define __u_intN_t(N, MODE) \
166
  typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE)))
167
 
168
# ifndef __int8_t_defined
169
#  define __int8_t_defined
170
__intN_t (8, __QI__);
171
__intN_t (16, __HI__);
172
__intN_t (32, __SI__);
173
__intN_t (64, __DI__);
174
# endif
175
 
176
__u_intN_t (8, __QI__);
177
__u_intN_t (16, __HI__);
178
__u_intN_t (32, __SI__);
179
__u_intN_t (64, __DI__);
180
 
181
typedef int register_t __attribute__ ((__mode__ (__word__)));
182
 
183
 
184
/* Some code from BIND tests this macro to see if the types above are
185
   defined.  */
186
#endif
187
#define __BIT_TYPES_DEFINED__	1
188
 
189
 
190
#ifdef	__USE_BSD
191
/* In BSD <sys/types.h> is expected to define BYTE_ORDER.  */
192
# include <endian.h>
193
 
194
/* It also defines `fd_set' and the FD_* macros for `select'.  */
195
/* MG */
196
//# include <sys/select.h>
197
 
198
/* BSD defines these symbols, so we follow.  */
199
# include <sys/sysmacros.h>
200
#endif /* Use BSD.  */
201
 
202
 
203
/* Types from the Large File Support interface.  */
204
#ifndef __USE_FILE_OFFSET64
205
typedef __blkcnt_t blkcnt_t;	 /* Type to count number of disk blocks.  */
206
typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks.  */
207
typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes.  */
208
#else
209
typedef __blkcnt64_t blkcnt_t;	   /* Type to count number of disk blocks.  */
210
typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks.  */
211
typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes.  */
212
#endif
213
 
214
#ifdef __USE_LARGEFILE64
215
typedef __blkcnt64_t blkcnt64_t;     /* Type to count number of disk blocks. */
216
typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks.  */
217
typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes.  */
218
#endif
219
 
220
__END_DECLS
221
 
222
#endif /* sys/types.h */