2002-10-02 Roland McGrath <roland@redhat.com>
[glibc.git] / bits / types.h
blobf63a0f8b74e55cf741e16c3ab3f653491d21b15c
1 /* Copyright (C) 1991,1992,94-1999,2000,2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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.
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.
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. */
20 * Never include this file directly; use <sys/types.h> instead.
23 #ifndef _BITS_TYPES_H
24 #define _BITS_TYPES_H 1
26 #include <features.h>
28 #define __need_size_t
29 #include <stddef.h>
31 /* Convenience types. */
32 typedef unsigned char __u_char;
33 typedef unsigned short __u_short;
34 typedef unsigned int __u_int;
35 typedef unsigned long __u_long;
36 #ifdef __GNUC__
37 typedef unsigned long long int __u_quad_t;
38 typedef long long int __quad_t;
39 #else
40 typedef struct
42 long __val[2];
43 } __quad_t;
44 typedef struct
46 __u_long __val[2];
47 } __u_quad_t;
48 #endif
49 typedef signed char __int8_t;
50 typedef unsigned char __uint8_t;
51 typedef signed short int __int16_t;
52 typedef unsigned short int __uint16_t;
53 typedef signed int __int32_t;
54 typedef unsigned int __uint32_t;
55 #ifdef __GNUC__
56 typedef signed long long int __int64_t;
57 typedef unsigned long long int __uint64_t;
58 #endif
59 typedef __quad_t *__qaddr_t;
61 typedef int __dev_t; /* Type of device numbers. */
62 typedef unsigned int __uid_t; /* Type of user identifications. */
63 typedef unsigned int __gid_t; /* Type of group identifications. */
64 typedef unsigned int __ino_t; /* Type of file serial numbers. */
65 typedef __quad_t __ino64_t; /* Type of file serial numbers (LFS). */
66 typedef unsigned int __mode_t; /* Type of file attribute bitmasks. */
67 typedef unsigned short int __nlink_t; /* Type of file link counts. */
68 typedef long int __off_t; /* Type of file sizes and offsets. */
69 typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
70 typedef __loff_t __off64_t; /* Type of file sizes and offsets (LFS). */
71 typedef int __pid_t; /* Type of process identifications. */
72 typedef int __ssize_t; /* Type of a byte count, or error. */
73 typedef __u_quad_t __fsid_t; /* Type of file system IDs. */
74 typedef long int __clock_t; /* Type of CPU usage counts. */
75 typedef long int __rlim_t; /* Type for resource measurement. */
76 typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */
77 typedef unsigned int __id_t; /* General type for IDs. */
79 /* Everythin' else. */
80 typedef long int __daddr_t; /* The type of a disk address. */
81 typedef char *__caddr_t;
82 typedef long int __time_t;
83 typedef unsigned int __useconds_t;
84 typedef long int __suseconds_t;
85 typedef long int __swblk_t; /* Type of a swap block maybe? */
86 typedef long int __key_t; /* Type of an IPC key */
89 /* Clock ID used in clock and timer functions. */
90 typedef int __clockid_t;
92 /* Timer ID returned by `timer_create'. */
93 typedef int __timer_t;
96 /* Number of descriptors that can fit in an `fd_set'. */
97 #define __FD_SETSIZE 256
100 /* XXX Used in `struct shmid_ds'. */
101 typedef unsigned short int __ipc_pid_t;
104 /* Type to represent block size. */
105 typedef unsigned int __blksize_t;
107 /* Types from the Large File Support interface. */
109 /* Type to count number os disk blocks. */
110 typedef long int __blkcnt_t;
111 typedef __quad_t __blkcnt64_t;
113 /* Type to count file system blocks. */
114 typedef unsigned int __fsblkcnt_t;
115 typedef __u_quad_t __fsblkcnt64_t;
117 /* Type to count file system inodes. */
118 typedef unsigned long int __fsfilcnt_t;
119 typedef __u_quad_t __fsfilcnt64_t;
121 /* Used in XTI. */
122 typedef int __t_scalar_t;
123 typedef unsigned int __t_uscalar_t;
125 /* Duplicates info from stdint.h but this is used in unistd.h. */
126 typedef long int __intptr_t;
128 /* Duplicate info from sys/socket.h. */
129 typedef unsigned int __socklen_t;
131 #endif /* bits/types.h */