summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/aarch64/bits/statfs.h
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@caviumnetworks.com>2017-08-14 15:16:05 +0100
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-08-03 23:24:53 +0200
commitd7b48e121de704a4db844825452dc484ec359769 (patch)
treed7ca2d0903e43def047013e8ab11ea40beefd0b8 /sysdeps/unix/sysv/linux/aarch64/bits/statfs.h
parent885db24338cbfefefdbdc3a65c98c507c8174113 (diff)
aarch64: Add ILP32 support
Add support for the ILP32 abi variant to aarch64. 2017-09-01 Andrew Pinski <andrew.pinski@caviumnetworks.com> Yury Norov <ynorov@caviumnetworks.com> Steve Ellcey <sellcey@caviumnetworks.com> * elf/cache.c (print_entry): Add FLAG_AARCH64_LIB32. * sysdeps/aarch64/configure.ac (HAVE_AARCH64_ILP32): New define. (default-abi): Allow for ilp32 ABI. * sysdeps/aarch64/configure: Regenerate. * sysdeps/aarch64/Implies: Deleted. * sysdeps/aarch64/ilp32/Implies: New file. * sysdeps/aarch64/ilp32/Implies-after: New file. * sysdeps/aarch64/lp64/Implies: New file. * sysdeps/aarch64/lp64/Implies-after: New file. * sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): Set to 1. * sysdeps/aarch64/preconfigure (machine): Check for ilp32/lp64. * sysdeps/aarch64/tls-macros.h (TLS_IE): Remove register specification for __result and ifdef for ILP32. * sysdeps/generic/ldconfig.h (FLAG_AARCH64_LIB32): New define. * sysdeps/unix/sysv/linux/aarch64/Implies: Remove generic and wordsize-64 entries. * sysdeps/unix/sysv/linux/aarch64/Makefile (abi-variants): Add new variants for ilp32 and ilp32_be. (abi-lp64-condition, abi-lp64_be-condition): Check for __WORDSIZE equal to 64. (abi-ilp32-condition, abi-ilp32_be-condition): New. * sysdeps/unix/sysv/linux/aarch64/configure.ac (arch_minimum_kernel): Use different value for ILP32. (LIBC_SLIBDIR_RTLDDIR): Modify for ILP32. * sysdeps/unix/sysv/linux/aarch64/configure: Regenerate. * sysdeps/unix/sysv/linux/aarch64/ilp32/Implies: New file. * sysdeps/unix/sysv/linux/aarch64/ilp32/c++-types.data: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/kernel_stat.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/ilp32/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/utmp.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/Implies: Add unix/sysv/linux/aarch64. * sysdeps/unix/sysv/linux/aarch64/ioctl.S: Move to lp64 directory. * sysdeps/unix/sysv/linux/aarch64/mmap.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/aarch64/c++-types.data: Likewise. * sysdeps/unix/sysv/linux/aarch64/ldd-rewrite.sed: Likewise. * sysdeps/unix/sysv/linux/aarch64/ipc_priv.h (__IPC_64): Check __ILP32 when setting. * sysdeps/unix/sysv/linux/arm/readelflib.c (process_elf_file): Check for EM_AARCH64 when processing ELFCLASS32 object. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h (F_GETLK, F_SETLCK, F_SETLKW): Check for __OFF_T_MATCHES_OFF64_T when defining.
Diffstat (limited to 'sysdeps/unix/sysv/linux/aarch64/bits/statfs.h')
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/bits/statfs.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/statfs.h b/sysdeps/unix/sysv/linux/aarch64/bits/statfs.h
new file mode 100644
index 0000000000..23953b9e6d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/bits/statfs.h
@@ -0,0 +1,68 @@
+/* Definition of `struct statfs', information about a filesystem.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
+
+#include <endian.h>
+#include <bits/types.h>
+#include <bits/wordsize.h>
+
+/* On AArch64 both the 32-bit and 64-bit libc's use the kernels
+ 'struct statfs' with 64 bit f_blocks/f_bfree/f_bavail/f_files/f_ffree
+ fields. This means the statfs and statfs64 structs are identical
+ and the statfs and statfs64 calls can be aliases. */
+
+struct statfs
+ {
+ __SWORD_TYPE f_type;
+ __SWORD_TYPE f_bsize;
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_bavail;
+ __fsfilcnt_t f_files;
+ __fsfilcnt_t f_ffree;
+ __fsid_t f_fsid;
+ __SWORD_TYPE f_namelen;
+ __SWORD_TYPE f_frsize;
+ __SWORD_TYPE f_flags;
+ __SWORD_TYPE f_spare[4];
+ };
+
+struct statfs64
+ {
+ __SWORD_TYPE f_type;
+ __SWORD_TYPE f_bsize;
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
+ __fsid_t f_fsid;
+ __SWORD_TYPE f_namelen;
+ __SWORD_TYPE f_frsize;
+ __SWORD_TYPE f_flags;
+ __SWORD_TYPE f_spare[4];
+ };
+
+/* Tell code we have these members. */
+#define _STATFS_F_NAMELEN
+#define _STATFS_F_FRSIZE
+#define _STATFS_F_FLAGS