Back to index

glibc  2.9
types.h
Go to the documentation of this file.
00001 /* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /*
00020  * Never include this file directly; use <sys/types.h> instead.
00021  */
00022 
00023 #ifndef       _BITS_TYPES_H
00024 #define       _BITS_TYPES_H 1
00025 
00026 #include <features.h>
00027 
00028 #define __need_NULL
00029 #define __need_size_t
00030 #include <stddef.h>
00031 
00032 /* Convenience types.  */
00033 typedef unsigned char __u_char;
00034 typedef unsigned short __u_short;
00035 typedef unsigned int __u_int;
00036 typedef unsigned long __u_long;
00037 #ifdef __GNUC__
00038 __extension__ typedef unsigned long long int __u_quad_t;
00039 __extension__ typedef long long int __quad_t;
00040 #else
00041 typedef struct
00042   {
00043     long int __val[2];
00044   } __quad_t;
00045 typedef struct
00046   {
00047     __u_long __val[2];
00048   } __u_quad_t;
00049 #endif
00050 typedef signed char __int8_t;
00051 typedef unsigned char __uint8_t;
00052 typedef signed short int __int16_t;
00053 typedef unsigned short int __uint16_t;
00054 typedef signed int __int32_t;
00055 typedef unsigned int __uint32_t;
00056 #ifdef __GNUC__
00057 __extension__ typedef signed long long int __int64_t;
00058 __extension__ typedef unsigned long long int __uint64_t;
00059 #endif
00060 typedef __quad_t *__qaddr_t;
00061 
00062 typedef __u_long __dev_t;          /* Type of device numbers.  */
00063 typedef __u_int __uid_t;           /* Type of user identifications.  */
00064 typedef __u_int __gid_t;           /* Type of group identifications.  */
00065 typedef __u_long __ino_t;          /* Type of file serial numbers.  */
00066 typedef __u_int __mode_t;          /* Type of file attribute bitmasks.  */
00067 typedef short int __nlink_t;              /* Type of file link counts.  */
00068 typedef long int __off_t;          /* Type of file sizes and offsets.  */
00069 typedef __quad_t __loff_t;         /* Type of file sizes and offsets.  */
00070 typedef int __pid_t;               /* Type of process identifications.  */
00071 typedef long int __ssize_t;        /* Type of a byte count, or error.  */
00072 typedef __u_long __rlim_t;         /* Type of resource counts.  */
00073 typedef __u_quad_t __rlim64_t;            /* Type of resource counts (LFS).  */
00074 typedef unsigned int __id_t;              /* General type for ID.  */
00075 
00076 typedef struct
00077   {
00078     unsigned long int __val[2];
00079   } __fsid_t;                      /* Type of file system IDs.  */
00080 
00081 /* Everythin' else.  */
00082 typedef long int __daddr_t;        /* The type of a disk address.  */
00083 typedef char *__caddr_t;
00084 typedef long int __time_t;
00085 typedef unsigned int __useconds_t;
00086 typedef int __suseconds_t;
00087 typedef long int __swblk_t;        /* Type of a swap block maybe?  */
00088 
00089 typedef int __clock_t;
00090 
00091 /* Clock ID used in clock and timer functions.  */
00092 typedef int __clockid_t;
00093 
00094 /* Timer ID returned by `timer_create'.  */
00095 typedef int __timer_t;
00096 
00097 /* Number of descriptors that can fit in an `fd_set'.  */
00098 #define __FD_SETSIZE 1024
00099 
00100 
00101 typedef long int __key_t;
00102 
00103 /* Type to represent block size.  */
00104 typedef int __blksize_t;
00105 
00106 /* Types from the Large File Support interface.  */
00107 
00108 /* Type to count number os disk blocks.  */
00109 typedef int __blkcnt_t;
00110 typedef __quad_t __blkcnt64_t;
00111 
00112 /* Type to count file system blocks.  */
00113 typedef __u_long __fsblkcnt_t;
00114 typedef __u_quad_t __fsblkcnt64_t;
00115 
00116 /* Type to count file system inodes.  */
00117 typedef __u_long __fsfilcnt_t;
00118 typedef __u_quad_t __fsfilcnt64_t;
00119 
00120 /* Type of file serial numbers.  */
00121 typedef __u_quad_t __ino64_t;
00122 
00123 /* Type of file sizes and offsets.  */
00124 typedef __loff_t __off64_t;
00125 
00126 /* Used in XTI.  */
00127 typedef int __t_scalar_t;
00128 typedef unsigned int __t_uscalar_t;
00129 
00130 /* Duplicates info from stdint.h but this is used in unistd.h.  */
00131 typedef signed long __intptr_t;
00132 
00133 /* Duplicate info from sys/socket.h.  */
00134 typedef unsigned int __socklen_t;
00135 
00136 #endif /* bits/types.h */