cmake: stop probing unused float.h for STDC_HEADERS#22191
Closed
vszakats wants to merge 1 commit into
Closed
Conversation
Also to sync up with current autotools, which stopped testing for it at one point. Follow-up to 4c5307b
There was a problem hiding this comment.
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 theSTDC_HEADERScompile test inCMake/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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also to sync up with current autotools, which stopped testing for it at
one point.
Follow-up to 4c5307b
STDC_HEADERa closer look after this. → build: drop superfluousSTDC_HEADERSmacro #22206