aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorCarlos Eduardo Seo <carlos.seo@arm.com>2022-01-26 16:19:33 -0300
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-08-05 19:45:19 +0100
commit434271f1321cc78ecf422af73af741b8a59b17f0 (patch)
tree79185759f8eea8af5e717bb9be2067eeefc1d68e /sysdeps
parent93c554530045f8a27ee2b9645d7913115deee6f4 (diff)
downloadglibc-434271f1321cc78ecf422af73af741b8a59b17f0.zip
glibc-434271f1321cc78ecf422af73af741b8a59b17f0.tar.gz
glibc-434271f1321cc78ecf422af73af741b8a59b17f0.tar.bz2
TODO(spec): cheri: __LP64__ is not defined for purecap ABI
TODO: there is no good ABI macro to check, for now we assume __CHERI_PURE_CAPABILITY__ implies 64 bit long, 64 bit address and 128 bit pointer.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/aarch64/bits/wordsize.h2
-rw-r--r--sysdeps/unix/sysv/linux/generic/bits/typesizes.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
index 4635431..8fbf650 100644
--- a/sysdeps/aarch64/bits/wordsize.h
+++ b/sysdeps/aarch64/bits/wordsize.h
@@ -17,7 +17,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#ifdef __LP64__
+#if defined __LP64__ || defined __CHERI_PURE_CAPABILITY__
# define __WORDSIZE 64
#else
# define __WORDSIZE 32
diff --git a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
index 6b13ff3..c70dcbc 100644
--- a/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
@@ -75,7 +75,7 @@
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
-#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
+#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) || defined __CHERI_PURE_CAPABILITY__
/* Tell the libc code that off_t and off64_t are actually the same type
for all ABI purposes, even if possibly expressed as different base types
for C type-checking purposes. */