build: drop superfluous STDC_HEADERS macro

It is traditionally defined by autotools to detect the presence of set
of standard C89 headers. autoconf 2.70 (2020-12-08) reduced the headers
covered to `stdlib.h`, `string.h`. After 2.59d (2006-06-05) obsoleting
it earlier. CMake replicated this detection, and curl included
`curl/stdcheaders.h` if standard headers were missing. However, such
condition could never happen because curl sources already assume all
checked standard headers (`stdarg.h`, `stdlib.h`, `string.h`) and
include them unconditionally.

Since this is an unused feature detection and an impossible fallback
path, drop them from CMake and curl's source. autotools continues to do
the detection by default, but its result is unused after this patch.

This leaves public `curl/stdcheaders.h` unused from within the codebase.

Refs:
f0c7c42553
86c213d0e3

Follow-up to 65dae4ad80 #22191
Follow-up to 4c5307b456
Ref: ae1912cb0d

Closes #22206
This commit is contained in:
Viktor Szakats 2026-06-28 12:19:11 +02:00
parent 99859ecca8
commit 1671ebd975
No known key found for this signature in database
10 changed files with 1 additions and 38 deletions

View file

@ -88,6 +88,7 @@ my %remove = (
'#define PACKAGE_TARNAME "curl"' => 1,
'#define PACKAGE_URL ""' => 1,
'#define PACKAGE_VERSION "-"' => 1,
'#define STDC_HEADERS 1' => 1,
'#define VERSION "-"' => 1,
'#define _FILE_OFFSET_BITS 64' => 1,
);