+2019-11-18 Bruno Haible <bruno@clisp.org>
+
+ stdint: Avoid triggering a "conflicting types" error on mingw 5.22.
+ Reported by Keith Marshall <keith@users.osdn.me> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00044.html>
+ and <https://osdn.net/projects/mingw/ticket/39677>.
+ * lib/stdint.in.h (intptr_t, uintptr_t): Don't define if the types have
+ already been defined by mingw's <crtdefs.h>.
+
2019-11-18 Bruno Haible <bruno@clisp.org>
gnulib-tool: Fix build error on macOS with --conditional-dependencies.
/* 7.18.1.4. Integer types capable of holding object pointers */
-/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+/* kLIBC's <stdint.h> 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. */
-# ifndef _INTPTR_T_DECLARED
+ to avoid clashes with declarations of system functions like sbrk.
+ Similarly, mingw 5.22 <crtdefs.h> defines _INTPTR_T_DEFINED and
+ _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and
+ uintptr_t to avoid conflicting declarations of system functions like
+ _findclose in <io.h>. */
+# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
+ || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED))
# undef intptr_t
# undef uintptr_t
typedef long int gl_intptr_t;