build: assume stdint.h

curl requires `stdint.h` from C99, and no longer builds without it since
v8.18.0 (after dropping VS2008 support). Assume it's available, drop
feature checks.

Also:
- drop duplicate `stdint.h` includes.
- introduce internal `HAVE_UINTPTR_T`, enabled by default.
- OS400: disable `HAVE_UINTPTR_T`.
- build: keep cmake pre-fill and `cmp-config.pl` exception because cmake
  and autotools both detect `stdint.h` implicitly.

Co-authored-by: Dan Fandrich
Ref: #20405
Ref: #20384
Follow-up to 2e1a045d89 #17931

Closes #20406
This commit is contained in:
Viktor Szakats 2026-01-21 16:20:51 +01:00
parent f062b4b903
commit feb52be197
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
14 changed files with 8 additions and 31 deletions

View file

@ -466,9 +466,8 @@
#include <curl/stdcheaders.h>
#endif
#if defined(HAVE_STDINT_H) || defined(USE_WOLFSSL)
#include <stdint.h>
#endif
#define HAVE_UINTPTR_T /* assume uintptr_t is provided by stdint.h */
#ifdef __DJGPP__
/* By default, DJGPP provides this type as a version of 'unsigned long' which
@ -477,6 +476,11 @@
#define uint32_t unsigned int
#endif
/* Disable uintptr_t for targets known to miss it from stdint.h */
#ifdef __OS400__
#undef HAVE_UINTPTR_T
#endif
#include <limits.h>
#ifdef _WIN32