Skip to content

cmake: stop probing unused float.h for STDC_HEADERS#22191

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cm-drop-unused-probe
Closed

cmake: stop probing unused float.h for STDC_HEADERS#22191
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cm-drop-unused-probe

Conversation

@vszakats

@vszakats vszakats commented Jun 26, 2026

Copy link
Copy Markdown
Member

Also to sync up with current autotools, which stopped testing for it at
one point.

Follow-up to 4c5307b


Also to sync up with current autotools, which stopped testing for it at
one point.

Follow-up to 4c5307b
@github-actions github-actions Bot added the build label Jun 26, 2026
@vszakats vszakats closed this in 65dae4a Jun 26, 2026
@vszakats vszakats deleted the cm-drop-unused-probe branch June 26, 2026 17:02
@vszakats vszakats requested a review from Copilot June 26, 2026 17:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates curl’s CMake-based feature probing to stop including (and therefore requiring) float.h when determining STDC_HEADERS, aligning the probe with current autotools behavior and avoiding an unnecessary header dependency.

Changes:

  • Remove #include <float.h> from the STDC_HEADERS compile test in CMake/CurlTests.c.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

vszakats added a commit that referenced this pull request Jun 29, 2026
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:
autotools-mirror/autoconf@f0c7c42
autotools-mirror/autoconf@86c213d

Follow-up to 65dae4a #22191
Follow-up to 4c5307b
Ref: ae1912c

Closes #22206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants