From 206d2710caf7265c86f5f23265ca14df28c091f8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Aug 2020 11:27:48 -0700 Subject: [PATCH] stdint: port intptr_t to more-recent MinGW Problem reported by Eli Zaretskii in . * lib/stdint.in.h (intptr_t, uintptr_t): Do not define on MinGW, even if _INTPTR_T_DEFINED and _UINTPTR_T_DEFINED are not defined. Apparently those two macros were removed in mingwrt-3.22 dated 2016-07-14. --- ChangeLog | 9 +++++++++ lib/stdint.in.h | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 986b882a69..20319c82a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2020-08-12 Paul Eggert + + stdint: port intptr_t to more-recent MinGW + Problem reported by Eli Zaretskii in . + * lib/stdint.in.h (intptr_t, uintptr_t): Do not define on MinGW, + even if _INTPTR_T_DEFINED and _UINTPTR_T_DEFINED are not defined. + Apparently those two macros were removed in mingwrt-3.22 + dated 2016-07-14. + 2020-08-12 Bruno Haible thread-optim: Export function-like macros only. diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 324f5e8b26..cbfb53b438 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -302,12 +302,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 -- 2.39.5