statvfs.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. libc_hidden_proto(statvfs)
  47. #else
  48. # ifdef __REDIRECT_NTH
  49. extern int __REDIRECT_NTH (statvfs,
  50. (__const char *__restrict __file,
  51. struct statvfs *__restrict __buf), statvfs64)
  52. __nonnull ((1, 2));
  53. # else
  54. # define statvfs statvfs64
  55. # endif
  56. #endif
  57. #ifdef __USE_LARGEFILE64
  58. extern int statvfs64 (__const char *__restrict __file,
  59. struct statvfs64 *__restrict __buf)
  60. __THROW __nonnull ((1, 2));
  61. #endif
  62. /* Return information about the filesystem containing the file FILDES
  63. refers to. */
  64. #ifndef __USE_FILE_OFFSET64
  65. extern int fstatvfs (int __fildes, struct statvfs *__buf)
  66. __THROW __nonnull ((2));
  67. libc_hidden_proto(fstatvfs)
  68. #else
  69. # ifdef __REDIRECT_NTH
  70. extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf),
  71. fstatvfs64) __nonnull ((2));
  72. # else
  73. # define fstatvfs fstatvfs64
  74. # endif
  75. #endif
  76. #ifdef __USE_LARGEFILE64
  77. extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
  78. __THROW __nonnull ((2));
  79. #endif
  80. __END_DECLS
  81. #endif /* sys/statvfs.h */