statvfs.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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, 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. libc_hidden_proto(statvfs)
  46. #else
  47. # ifdef __REDIRECT_NTH
  48. extern int __REDIRECT_NTH (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. libc_hidden_proto(fstatvfs)
  67. #else
  68. # ifdef __REDIRECT_NTH
  69. extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf),
  70. fstatvfs64) __nonnull ((2));
  71. # else
  72. # define fstatvfs fstatvfs64
  73. # endif
  74. #endif
  75. #ifdef __USE_LARGEFILE64
  76. extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
  77. __THROW __nonnull ((2));
  78. #endif
  79. __END_DECLS
  80. #endif /* sys/statvfs.h */