bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] stdint: port intptr_t to CHERI


From: Paul Eggert
Subject: [PATCH 3/3] stdint: port intptr_t to CHERI
Date: Tue, 7 Nov 2023 00:00:01 -0800

* lib/stdint.in.h: Do not redefine intptr_t/uintptr_t
if __INTPTR_WIDTH__ says otherwise.  This is needed on CHERI.
---
 ChangeLog       | 4 ++++
 lib/stdint.in.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 84d40e8393..8f6e4e5f97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2023-11-06  Paul Eggert  <eggert@cs.ucla.edu>
 
+       stdint: port intptr_t to CHERI
+       * lib/stdint.in.h: Do not redefine intptr_t/uintptr_t
+       if __INTPTR_WIDTH__ says otherwise.  This is needed on CHERI.
+
        stdint-tests: port to CHERI etc
        * tests/test-stdint.c: Test intptr_t only if INTPTR_MAX is
        defined, since the type is optional.  Similarly for uintptr_t.
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 5ddc644b8e..ef0d282dbb 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -306,6 +306,8 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
    uintptr_t to avoid conflicting declarations of system functions like
    _findclose in <io.h>.  */
 # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
+       || (defined __INTPTR_WIDTH__ \
+           && __INTPTR_WIDTH__ != (defined _WIN64 ? LLONG_WIDTH : LONG_WIDTH)) 
\
        || defined __MINGW32__)
 #  undef intptr_t
 #  undef uintptr_t
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]