statvfs.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* Definitions for getting information about a filesystem.
  2. Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
  3. 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.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, write to the Free
  14. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307 USA. */
  16. #ifndef _SYS_STATVFS_H
  17. #define _SYS_STATVFS_H 1
  18. #include <features.h>
  19. /* Get the system-specific definition of `struct statfs'. */
  20. #include <bits/statvfs.h>
  21. #ifndef __USE_FILE_OFFSET64
  22. # ifndef __fsblkcnt_t_defined
  23. typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */
  24. # define __fsblkcnt_t_defined
  25. # endif
  26. # ifndef __fsfilcnt_t_defined
  27. typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */
  28. # define __fsfilcnt_t_defined
  29. # endif
  30. #else
  31. # ifndef __fsblkcnt_t_defined
  32. typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */
  33. # define __fsblkcnt_t_defined
  34. # endif
  35. # ifndef __fsfilcnt_t_defined
  36. typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */
  37. # define __fsfilcnt_t_defined
  38. # endif
  39. #endif
  40. __BEGIN_DECLS
  41. /* Return information about the filesystem on which FILE resides. */
  42. #ifndef __USE_FILE_OFFSET64
  43. extern int statvfs (__const char *__restrict __file,
  44. struct statvfs *__restrict __buf)
  45. __THROW __nonnull ((1, 2));
  46. #else
  47. # ifdef __REDIRECT
  48. extern int __REDIRECT (statvfs,
  49. (__const char *__restrict __file,
  50. struct statvfs *__restrict __buf), statvfs64)
  51. __nonnull ((1, 2));
  52. # else
  53. # define statvfs statvfs64
  54. # endif
  55. #endif
  56. #ifdef __USE_LARGEFILE64
  57. extern int statvfs64 (__const char *__restrict __file,
  58. struct statvfs64 *__restrict __buf)
  59. __THROW __nonnull ((1, 2));
  60. #endif
  61. /* Return information about the filesystem containing the file FILDES
  62. refers to. */
  63. #ifndef __USE_FILE_OFFSET64
  64. extern int fstatvfs (int __fildes, struct statvfs *__buf)
  65. __THROW __nonnull ((2));
  66. #else
  67. # ifdef __REDIRECT
  68. extern int __REDIRECT (fstatvfs, (int __fildes, struct statvfs *__buf),
  69. fstatvfs64) __nonnull ((2));
  70. # else
  71. # define fstatvfs fstatvfs64
  72. # endif
  73. #endif
  74. #ifdef __USE_LARGEFILE64
  75. extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
  76. __THROW __nonnull ((2));
  77. #endif
  78. __END_DECLS
  79. #endif /* sys/statvfs.h */