diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-06-11 12:52:26 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-08-05 19:45:19 +0100 |
commit | 93c554530045f8a27ee2b9645d7913115deee6f4 (patch) | |
tree | 11fde82e0bdc830f2f2d2b2ed23ed7e901e65262 /posix | |
parent | 77777d453d48482c0d1b0e295ac1d4b674ba43d2 (diff) | |
download | glibc-93c554530045f8a27ee2b9645d7913115deee6f4.tar.gz glibc-93c554530045f8a27ee2b9645d7913115deee6f4.tar.xz glibc-93c554530045f8a27ee2b9645d7913115deee6f4.zip |
cheri: headers: Define {u}intptr_t and {u}intcap_t for CHERI
The CHERI pure capability programming model for C requires special definition of {u}intptr_t. Only the pure capability model is supported for hosted compilation, but for freestanding compilation there is limited support for other (hybrid capability) programming models too, which require new {u}intcap_t type definitions.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/bits/types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/posix/bits/types.h b/posix/bits/types.h index f912e77a02..e315dfd779 100644 --- a/posix/bits/types.h +++ b/posix/bits/types.h @@ -204,7 +204,11 @@ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef char *__caddr_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ +#ifdef __CHERI_PURE_CAPABILITY__ +__STD_TYPE __intcap_t __intptr_t; +#else __STD_TYPE __SWORD_TYPE __intptr_t; +#endif /* Duplicate info from sys/socket.h. */ __STD_TYPE __U32_TYPE __socklen_t; |