statvfs.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Definitions for getting information about a filesystem.
  2. Copyright (C) 1998-2016 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, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _SYS_STATVFS_H
  16. #define _SYS_STATVFS_H 1
  17. #include <features.h>
  18. /* Get the system-specific definition of `struct statfs'. */
  19. #include <bits/statvfs.h>
  20. #ifndef __USE_FILE_OFFSET64
  21. # ifndef __fsblkcnt_t_defined
  22. typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */
  23. # define __fsblkcnt_t_defined
  24. # endif
  25. # ifndef __fsfilcnt_t_defined
  26. typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */
  27. # define __fsfilcnt_t_defined
  28. # endif
  29. #else
  30. # ifndef __fsblkcnt_t_defined
  31. typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */
  32. # define __fsblkcnt_t_defined
  33. # endif
  34. # ifndef __fsfilcnt_t_defined
  35. typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */
  36. # define __fsfilcnt_t_defined
  37. # endif
  38. #endif
  39. __BEGIN_DECLS
  40. /* Return information about the filesystem on which FILE resides. */
  41. #ifndef __USE_FILE_OFFSET64
  42. extern int statvfs (const char *__restrict __file,
  43. struct statvfs *__restrict __buf)
  44. __THROW __nonnull ((1, 2));
  45. #else
  46. # ifdef __REDIRECT_NTH
  47. extern int __REDIRECT_NTH (statvfs,
  48. (const char *__restrict __file,
  49. struct statvfs *__restrict __buf), statvfs64)
  50. __nonnull ((1, 2));
  51. # else
  52. # define statvfs statvfs64
  53. # endif
  54. #endif
  55. #ifdef __USE_LARGEFILE64
  56. extern int statvfs64 (const char *__restrict __file,
  57. struct statvfs64 *__restrict __buf)
  58. __THROW __nonnull ((1, 2));
  59. #endif
  60. /* Return information about the filesystem containing the file FILDES
  61. refers to. */
  62. #ifndef __USE_FILE_OFFSET64
  63. extern int fstatvfs (int __fildes, struct statvfs *__buf)
  64. __THROW __nonnull ((2));
  65. #else
  66. # ifdef __REDIRECT_NTH
  67. extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf),
  68. fstatvfs64) __nonnull ((2));
  69. # else
  70. # define fstatvfs fstatvfs64
  71. # endif
  72. #endif
  73. #ifdef __USE_LARGEFILE64
  74. extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
  75. __THROW __nonnull ((2));
  76. #endif
  77. __END_DECLS
  78. #endif /* sys/statvfs.h */