From: Paul Eggert Date: Tue, 7 Nov 2023 07:53:21 +0000 (-0800) Subject: stdint: port intptr_t to CHERI X-Git-Tag: v1.0~626 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6e4aa95cc6f165d2d3a30e963f13596e6b09ed90;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 84d40e8393..8f6e4e5f97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2023-11-06 Paul Eggert + 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 . */ # 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