types.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. /*
  16. * Never include this file directly; use <sys/types.h> instead.
  17. */
  18. #ifndef _BITS_TYPES_H
  19. #define _BITS_TYPES_H 1
  20. #include <features.h>
  21. #define __need_size_t
  22. #include <stddef.h>
  23. /* Sigh. We need to carefully wrap this one... */
  24. #ifndef __GLIBC__
  25. #define __GLIBC__ 2
  26. #include <asm/posix_types.h>
  27. #undef __GLIBC__
  28. #else
  29. #include <asm/posix_types.h>
  30. #endif
  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;
  47. /* changed to be more compatible with kernel */
  48. typedef __kernel_dev_t __dev_t; /* Type of device numbers. */
  49. typedef __kernel_uid_t __uid_t; /* Type of user identifications. */
  50. typedef __kernel_gid_t __gid_t; /* Type of group identifications. */
  51. typedef __kernel_ino_t __ino_t; /* Type of file serial numbers. */
  52. typedef __kernel_mode_t __mode_t; /* Type of file attribute bitmasks. */
  53. typedef __kernel_nlink_t __nlink_t; /* Type of file link counts. */
  54. typedef __kernel_off_t __off_t; /* Type of file sizes and offsets. */
  55. typedef __kernel_loff_t __loff_t; /* Type of file sizes and offsets. */
  56. typedef __kernel_pid_t __pid_t; /* Type of process identifications. */
  57. typedef __kernel_ssize_t __ssize_t; /* Type of a byte count, or error. */
  58. typedef __uint64_t __ino64_t; /* "" (LFS) */
  59. typedef __int64_t __off64_t; /* "" (LFS) */
  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. */
  70. typedef struct
  71. {
  72. int __val[2];
  73. } __fsid_t; /* Type of file system IDs. */
  74. /* Everythin' else. */
  75. typedef int __daddr_t; /* Type of a disk address. */
  76. typedef char *__caddr_t; /* Type of a core address. */
  77. typedef long int __time_t;
  78. typedef unsigned int __useconds_t;
  79. typedef long int __suseconds_t;
  80. typedef long int __swblk_t; /* Type of a swap block maybe? */
  81. typedef long int __clock_t;
  82. typedef int __key_t; /* Type of a SYSV IPC key. */
  83. /* Clock ID used in clock and timer functions. */
  84. typedef int __clockid_t;
  85. /* Timer ID returned by `timer_create'. */
  86. typedef int __timer_t;
  87. /* Used in `struct shmid_ds'. */
  88. typedef int __ipc_pid_t;
  89. /* Number of descriptors that can fit in an `fd_set'. */
  90. #define __FD_SETSIZE 1024
  91. /* Used in XTI. */
  92. typedef long int __t_scalar_t;
  93. typedef unsigned long int __t_uscalar_t;
  94. /* Duplicates info from stdint.h but this is used in unistd.h. */
  95. typedef long int __intptr_t;
  96. /* Duplicate info from sys/socket.h. */
  97. typedef unsigned int __socklen_t;
  98. /* Now add the thread types. */
  99. #if defined __USE_POSIX199506 || defined __USE_UNIX98
  100. # include <bits/pthreadtypes.h>
  101. #endif
  102. #endif /* bits/types.h */