build: delete HAVE_STDINT_H and HAVE_INTTYPES_H#12275
Closed
vszakats wants to merge 6 commits into
Closed
Conversation
We use `stdint.h` unconditionally in all places except one. All of these uses are imposed by dependencies / features. nghttp2, quic, wolfSSL and `HAVE_MACH_ABSOLUTE_TIME` do require this C99 header. It means that any of these features make curl require a C99 compiler. (In case of MSVC, this means Visual Studio 2010 minimum.) This patch changes the only use of `stdint.h` guarded by `HAVE_STDINT_H` to prioritize `inttypes.h` and fall back to `stdint.h` if not present. C99 types are required by wolfSSL headers, so one of the must be available. Closes #xxxxx
autotools checks for `stdint.h` somewhere implicitly.
HAVE_STDINT_HHAVE_STDINT_H and HAVE_INTTYPES_H
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jan 7, 2026
Follow-up to 1ecf2f1 curl#16585 curl#15907 Follow-up to 60359ad curl#12275
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jan 7, 2026
Follow-up to 60359ad curl#12275
vszakats
added a commit
that referenced
this pull request
Jan 7, 2026
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jan 7, 2026
Follow-up to 60359ad curl#12275
1 task
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jan 7, 2026
Follow-up to 60359ad curl#12275
vszakats
added a commit
that referenced
this pull request
Jan 7, 2026
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.
We use
stdint.hunconditionally in all places except one. These usesare imposed by external dependencies / features. nghttp2, quic, wolfSSL
and
HAVE_MACH_ABSOLUTE_TIMEdo require this C99 header. It means thatany of these features make curl require a C99 compiler. (In case of
MSVC, this means Visual Studio 2010 or newer.)
This patch changes the single use of
stdint.hguarded byHAVE_STDINT_Hto usestdint.hunconditionally. Also stop usinginttypes.has an alternative there.HAVE_INTTYPES_Hwasn't usedanywhere else, allowing to delete this feature check as well.
Closes #12275