mirror of
https://github.com/curl/curl.git
synced 2026-01-26 06:57:57 +00:00
TEST: Drop the check for stdint.h
curl now expects C99-style fixed-length types to be defined, and the standard location for that is stdint.h. There is no need to check for a header file that must exist. Caveats: - Some systems predating C99 defined the necessary types in inttypes.h, but this PR doesn't affect those. - Apparently, OS400 doesn't define uintptr_t but does have stdint.h, so this PR will probably break it. The uintptr_t dependencies should probably be guarded by a new HAVE_UINTPTR_T macro (or maybe MISSING_UINTPTR_T) to use alternate code there. Ref: #20384
This commit is contained in:
parent
86190dccb3
commit
630502d2e7
1
.github/scripts/cmp-config.pl
vendored
1
.github/scripts/cmp-config.pl
vendored
@ -71,7 +71,6 @@ my %remove = (
|
||||
'#define HAVE_QUICHE_H 1' => 1,
|
||||
'#define HAVE_SSL_SET_QUIC_TLS_CBS 1' => 1,
|
||||
'#define HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT 1' => 1,
|
||||
'#define HAVE_STDINT_H 1' => 1,
|
||||
'#define HAVE_STDIO_H 1' => 1,
|
||||
'#define HAVE_STDLIB_H 1' => 1,
|
||||
'#define HAVE_STRING_H 1' => 1,
|
||||
|
||||
@ -243,7 +243,6 @@ set(HAVE_SOCKETPAIR 1)
|
||||
set(HAVE_STDATOMIC_H 1)
|
||||
set(HAVE_STDBOOL_H 1)
|
||||
set(HAVE_STDDEF_H 1)
|
||||
set(HAVE_STDINT_H 1)
|
||||
set(HAVE_STRCASECMP 1)
|
||||
set(HAVE_STRCMPI 0)
|
||||
set(HAVE_STRDUP 1)
|
||||
|
||||
@ -36,7 +36,6 @@ if(MINGW)
|
||||
set(HAVE_SNPRINTF 1)
|
||||
set(HAVE_STDBOOL_H 1)
|
||||
set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size()
|
||||
set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size()
|
||||
set(HAVE_STRINGS_H 1) # wrapper to string.h
|
||||
set(HAVE_SYS_PARAM_H 1)
|
||||
set(HAVE_UNISTD_H 1)
|
||||
@ -53,7 +52,6 @@ else()
|
||||
if(MSVC)
|
||||
set(HAVE_UNISTD_H 0)
|
||||
set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size()
|
||||
set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size()
|
||||
if(MSVC_VERSION GREATER_EQUAL 1800)
|
||||
set(HAVE_STDBOOL_H 1)
|
||||
else()
|
||||
|
||||
@ -1494,7 +1494,6 @@ check_include_file("poll.h" HAVE_POLL_H)
|
||||
check_include_file("pwd.h" HAVE_PWD_H)
|
||||
check_include_file("stdatomic.h" HAVE_STDATOMIC_H)
|
||||
check_include_file("stdbool.h" HAVE_STDBOOL_H)
|
||||
check_include_file("stdint.h" HAVE_STDINT_H)
|
||||
check_include_file("strings.h" HAVE_STRINGS_H)
|
||||
check_include_file("stropts.h" HAVE_STROPTS_H)
|
||||
check_include_file("termio.h" HAVE_TERMIO_H)
|
||||
|
||||
@ -46,11 +46,6 @@
|
||||
#define HAVE_STDBOOL_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
@ -472,9 +472,6 @@
|
||||
/* Define to 1 if you have the sendmmsg function. */
|
||||
#cmakedefine HAVE_SENDMMSG 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the 'fsetxattr' function. */
|
||||
#cmakedefine HAVE_FSETXATTR 1
|
||||
|
||||
|
||||
@ -466,9 +466,7 @@
|
||||
#include <curl/stdcheaders.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STDINT_H) || defined(USE_WOLFSSL)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef __DJGPP__
|
||||
/* By default, DJGPP provides this type as a version of 'unsigned long' which
|
||||
|
||||
@ -62,11 +62,7 @@
|
||||
|
||||
/* Macro to strip 'const' without triggering a compiler warning.
|
||||
Use it for APIs that do not or cannot support the const qualifier. */
|
||||
#ifdef HAVE_STDINT_H
|
||||
# define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
|
||||
#else
|
||||
# define CURL_UNCONST(p) ((void *)(p)) /* Fall back to simple cast */
|
||||
#endif
|
||||
#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
|
||||
|
||||
#ifdef USE_SCHANNEL
|
||||
/* Must set this before <schannel.h> is included directly or indirectly by
|
||||
|
||||
@ -310,11 +310,7 @@ static CURLFORMcode FormAdd(struct curl_httppost **httppost,
|
||||
struct curl_httppost *lastnode = NULL;
|
||||
|
||||
#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
|
||||
#ifdef HAVE_STDINT_H
|
||||
#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
|
||||
#else
|
||||
#define form_int_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We need to allocate the first struct to fill in.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user