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.
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.
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.
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. */
20 * Never include this file directly; use <sys/types.h> instead.
24 #define _BITS_TYPES_H 1
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;
37 typedef unsigned long long int __u_quad_t;
38 typedef long long int __quad_t;
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;
56 typedef signed long long int __int64_t;
57 typedef unsigned long long int __uint64_t;
59 typedef __quad_t *__qaddr_t;
60 typedef unsigned long int __dev_t; /* Type of device numbers. */
61 typedef long int __uid_t; /* Type of user identifications. */
62 typedef long int __gid_t; /* Type of group identifications. */
63 typedef unsigned long int __ino_t; /* Type of file serial numbers. */
64 typedef unsigned long int __mode_t; /* Type of file attribute bitmasks. */
65 typedef unsigned long int __nlink_t; /* Type of file link counts. */
66 typedef long int __off_t; /* Type of file sizes and offsets. */
67 typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
68 typedef long int __pid_t; /* Type of process identifications. */
69 typedef int __ssize_t; /* Type of a byte count, or error. */
70 typedef __u_quad_t __fsid_t; /* Type of file system IDs. */
71 typedef long int __clock_t; /* Type of CPU usage counts. */
72 typedef long int __rlim_t; /* Type for resource measurement. */
73 typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */
74 typedef __quad_t __ino64_t; /* Type for file serial numbers. */
75 typedef __loff_t __off64_t; /* Type of file izes and offsets. */
76 typedef unsigned int __id_t; /* General type for IDs. */
78 /* Everythin' else. */
79 typedef long int __daddr_t; /* The type of a disk address. */
80 typedef char *__caddr_t;
81 typedef long int __time_t;
82 typedef unsigned int __useconds_t;
83 typedef int __suseconds_t;
84 typedef long int __swblk_t; /* Type of a swap block maybe? */
85 typedef int __key_t; /* Type of an IPC key */
87 /* fd_set for select. */
89 /* Number of descriptors that can fit in an `fd_set'. */
90 #define __FD_SETSIZE 1024
92 /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
93 #define __NFDBITS (sizeof (unsigned long int) * 8)
94 #define __FDELT(d) ((d) / __NFDBITS)
95 #define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS))
99 /* XPG4.2 requires this member name. Otherwise avoid the name
100 from the user namespace. */
102 unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
103 # define __FDS_BITS(set) ((set)->fds_bits)
105 unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
106 # define __FDS_BITS(set) ((set)->__fds_bits)
110 typedef unsigned long int __fd_mask;
113 /* Types from the Large File Support interface. */
115 /* Type to count number os disk blocks. */
116 typedef long int __blkcnt_t;
117 typedef __quad_t __blkcnt64_t;
119 /* Type to count file system blocks. */
120 typedef unsigned int __fsblkcnt_t;
121 typedef __u_quad_t __fsblkcnt64_t;
123 /* Type to count file system inodes. */
124 typedef unsigned long int __fsfilcnt_t;
125 typedef __u_quad_t __fsfilcnt64_t;
128 typedef int __t_scalar_t;
129 typedef unsigned int __t_uscalar_t;
131 /* Duplicates info from stdint.h but this is used in unistd.h. */
132 typedef long int __intptr_t;
134 #endif /* bits/types.h */