Back to index

glibc  2.9
statvfs.h
Go to the documentation of this file.
00001 /* Definitions for getting information about a filesystem.
00002    Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef       _SYS_STATVFS_H
00021 #define       _SYS_STATVFS_H       1
00022 
00023 #include <features.h>
00024 
00025 /* Get the system-specific definition of `struct statfs'.  */
00026 #include <bits/statvfs.h>
00027 
00028 #ifndef __USE_FILE_OFFSET64
00029 # ifndef __fsblkcnt_t_defined
00030 typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks.  */
00031 #  define __fsblkcnt_t_defined
00032 # endif
00033 # ifndef __fsfilcnt_t_defined
00034 typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes.  */
00035 #  define __fsfilcnt_t_defined
00036 # endif
00037 #else
00038 # ifndef __fsblkcnt_t_defined
00039 typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks.  */
00040 #  define __fsblkcnt_t_defined
00041 # endif
00042 # ifndef __fsfilcnt_t_defined
00043 typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes.  */
00044 #  define __fsfilcnt_t_defined
00045 # endif
00046 #endif
00047 
00048 __BEGIN_DECLS
00049 
00050 /* Return information about the filesystem on which FILE resides.  */
00051 #ifndef __USE_FILE_OFFSET64
00052 extern int statvfs (__const char *__restrict __file,
00053                   struct statvfs *__restrict __buf)
00054      __THROW __nonnull ((1, 2));
00055 #else
00056 # ifdef __REDIRECT_NTH
00057 extern int __REDIRECT_NTH (statvfs,
00058                         (__const char *__restrict __file,
00059                          struct statvfs *__restrict __buf), statvfs64)
00060      __nonnull ((1, 2));
00061 # else
00062 #  define statvfs statvfs64
00063 # endif
00064 #endif
00065 #ifdef __USE_LARGEFILE64
00066 extern int statvfs64 (__const char *__restrict __file,
00067                     struct statvfs64 *__restrict __buf)
00068      __THROW __nonnull ((1, 2));
00069 #endif
00070 
00071 /* Return information about the filesystem containing the file FILDES
00072    refers to.  */
00073 #ifndef __USE_FILE_OFFSET64
00074 extern int fstatvfs (int __fildes, struct statvfs *__buf)
00075      __THROW __nonnull ((2));
00076 #else
00077 # ifdef __REDIRECT_NTH
00078 extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf),
00079                         fstatvfs64) __nonnull ((2));
00080 # else
00081 #  define fstatvfs fstatvfs64
00082 # endif
00083 #endif
00084 #ifdef __USE_LARGEFILE64
00085 extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
00086      __THROW __nonnull ((2));
00087 #endif
00088 
00089 __END_DECLS
00090 
00091 #endif /* sys/statvfs.h */