Update.
[glibc.git] / sysdeps / unix / sysv / linux / alpha / bits / types.h
blob13c389846fb271b2facd23be76e0092affb6116d
1 /* 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.
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.
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 int __u_short;
34 typedef unsigned int __u_int;
35 typedef unsigned long int __u_long;
36 typedef unsigned long int __u_quad_t;
37 typedef long int __quad_t;
38 typedef signed char __int8_t;
39 typedef unsigned char __uint8_t;
40 typedef signed short int __int16_t;
41 typedef unsigned short int __uint16_t;
42 typedef signed int __int32_t;
43 typedef unsigned int __uint32_t;
44 typedef signed long int __int64_t;
45 typedef unsigned long int __uint64_t;
46 typedef __quad_t *__qaddr_t;
48 typedef __uint64_t __dev_t; /* Type of device numbers. */
49 typedef __uint32_t __uid_t; /* Type of user identifications. */
50 typedef __uint32_t __gid_t; /* Type of group identifications. */
51 typedef __uint32_t __ino_t; /* Type of file serial numbers. */
52 typedef __uint64_t __ino64_t; /* "" (LFS) */
53 typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */
54 typedef __uint32_t __nlink_t; /* Type of file link counts. */
55 typedef __int64_t __off_t; /* Type of file sizes and offsets. */
56 typedef __int64_t __off64_t; /* "" (LFS) */
57 typedef __int64_t __loff_t; /* Type of file sizes and offsets. */
58 typedef __int32_t __pid_t; /* Type of process identifications. */
59 typedef __int64_t __ssize_t; /* Type of a byte count, or error. */
60 typedef __uint64_t __rlim_t; /* Type of resource counts. */
61 typedef __uint64_t __rlim64_t; /* "" (LFS) */
62 typedef __uint32_t __blksize_t; /* Type to represnet block size. */
63 typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */
64 typedef __uint64_t __blkcnt64_t; /* "" (LFS) */
65 typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */
66 typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */
67 typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */
68 typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */
69 typedef __uint32_t __id_t; /* General type for IDs. */
71 typedef struct
73 int __val[2];
74 } __fsid_t; /* Type of file system IDs. */
76 /* Everythin' else. */
77 typedef int __daddr_t; /* Type of a disk address. */
78 typedef char *__caddr_t; /* Type of a core address. */
79 typedef long int __time_t;
80 typedef unsigned int __useconds_t;
81 typedef long int __suseconds_t;
82 typedef long int __swblk_t; /* Type of a swap block maybe? */
83 typedef long int __clock_t;
84 typedef int __key_t; /* Type of a SYSV IPC key. */
86 /* Clock ID used in clock and timer functions. */
87 typedef int __clockid_t;
89 /* Timer ID returned by `timer_create'. */
90 typedef int __timer_t;
92 /* Used in `struct shmid_ds'. */
93 typedef int __ipc_pid_t;
95 /* One element in the file descriptor mask array. */
96 typedef unsigned long int __fd_mask;
98 /* Due to incaution, we may have gotten these from a kernel header file. */
99 #undef __FD_SETSIZE
100 #undef __NFDBITS
101 #undef __FDMASK
103 /* Number of descriptors that can fit in an `fd_set'. */
104 #define __FD_SETSIZE 1024
106 /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
107 #define __NFDBITS (8 * sizeof (__fd_mask))
108 #define __FDELT(d) ((d) / __NFDBITS)
109 #define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
111 /* fd_set for select and pselect. */
112 typedef struct
114 /* XPG4.2 requires this member name. Otherwise avoid the name
115 from the user namespace. */
116 #ifdef __USE_XOPEN
117 __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
118 # define __FDS_BITS(set) ((set)->fds_bits)
119 #else
120 __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
121 # define __FDS_BITS(set) ((set)->__fds_bits)
122 #endif
123 } __fd_set;
125 /* Used in XTI. */
126 typedef long int __t_scalar_t;
127 typedef unsigned long int __t_uscalar_t;
129 /* Duplicates info from stdint.h but this is used in unistd.h. */
130 typedef long int __intptr_t;
132 /* Duplicate info from sys/socket.h. */
133 typedef unsigned int __socklen_t;
136 /* Now add the thread types. */
137 #if defined __USE_POSIX199506 || defined __USE_UNIX98
138 # include <bits/pthreadtypes.h>
139 #endif
141 #endif /* bits/types.h */