]> Savannah Git Hosting - gnulib.git/commitdiff
stdint: port intptr_t to CHERI
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Nov 2023 07:53:21 +0000 (23:53 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Nov 2023 07:59:36 +0000 (23:59 -0800)
* lib/stdint.in.h: Do not redefine intptr_t/uintptr_t
if __INTPTR_WIDTH__ says otherwise.  This is needed on CHERI.

ChangeLog
lib/stdint.in.h

index 84d40e83930d36bc3f510e5cf9ed0a583bbd3cba..8f6e4e5f97ba4277c0c5ba2a9e31820f9f300703 100644 (file)
--- 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.
index 5ddc644b8ee1eb7f008cbe6e3499a17148b53718..ef0d282dbb1e27d1260989b09702fbf05b4b45dc 100644 (file)
@@ -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