diff options
author | Steve Ellcey <sellcey@caviumnetworks.com> | 2016-11-22 09:59:12 -0800 |
---|---|---|
committer | Steve Ellcey <sellcey@caviumnetworks.com> | 2016-11-22 09:59:12 -0800 |
commit | 510abe7b945ddab6f4497e7c097cff677286bb4d (patch) | |
tree | 9f176df59689a00bc0b132390e152d6f17d7ff8d /sysdeps/unix/sysv/linux/generic | |
parent | 65a77b558513ab54018b237f6570d27d12b6ee97 (diff) | |
download | glibc-510abe7b945ddab6f4497e7c097cff677286bb4d.tar.gz glibc-510abe7b945ddab6f4497e7c097cff677286bb4d.tar.xz glibc-510abe7b945ddab6f4497e7c097cff677286bb4d.zip |
Allow [f]statfs64 to alias [f]statfs
* sysdeps/unix/sysv/linux/fstatfs64.c: Hide prototypes for fstatfs and __fstatfs. Make them aliases of __fstatfs64 if STATFS_IS_STATFS64 is set to non-zero. * sysdeps/unix/sysv/linux/statfs64.c: Ditto for __statfs, statfs, and __statfs64. * sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c: Do not define __fstatfs and fstatfs if STATFS_IS_STATFS64 is non-zero. * sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c: Ditto for __statfs and statfs. * sysdeps/unix/sysv/linux/alpha/kernel_stat.h: Set STATFS_IS_STATFS64 to 0. * sysdeps/unix/sysv/linux/generic/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/hppa/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/ia64/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/microblaze/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h: Ditto. * sysdeps/unix/sysv/linux/x86_64/kernel_stat.h: Ditto.
Diffstat (limited to 'sysdeps/unix/sysv/linux/generic')
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/kernel_stat.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/generic/kernel_stat.h b/sysdeps/unix/sysv/linux/generic/kernel_stat.h index 5d5f04b402..ee9ff037f3 100644 --- a/sysdeps/unix/sysv/linux/generic/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/generic/kernel_stat.h @@ -26,3 +26,5 @@ #else # define XSTAT_IS_XSTAT64 0 #endif + +#define STATFS_IS_STATFS64 0 diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c index be9599a3eb..c19993850a 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c @@ -18,8 +18,10 @@ #include <errno.h> #include <sys/statfs.h> +#include <kernel_stat.h> #include <stddef.h> +#if !STATFS_IS_STATFS64 #include "overflow.h" /* Return information about the filesystem on which FD resides. */ @@ -30,3 +32,4 @@ __fstatfs (int fd, struct statfs *buf) return rc ?: statfs_overflow (buf); } weak_alias (__fstatfs, fstatfs) +#endif diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c index 1937f0555f..6413a54770 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c @@ -18,8 +18,10 @@ #include <errno.h> #include <sys/statfs.h> +#include <kernel_stat.h> #include <stddef.h> +#if !STATFS_IS_STATFS64 #include "overflow.h" /* Return information about the filesystem on which FILE resides. */ @@ -31,3 +33,4 @@ __statfs (const char *file, struct statfs *buf) } libc_hidden_def (__statfs) weak_alias (__statfs, statfs) +#endif |