Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: delete HAVE_STDINT_H and HAVE_INTTYPES_H #12275

Closed
wants to merge 6 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Nov 6, 2023

We use stdint.h unconditionally in all places except one. These uses
are imposed by external 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 or newer.)

This patch changes the single use of stdint.h guarded by
HAVE_STDINT_H to use stdint.h unconditionally. Also stop using
inttypes.h as an alternative there. HAVE_INTTYPES_H wasn't used
anywhere else, allowing to delete this feature check as well.

Closes #12275

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
@vszakats vszakats added the build label Nov 6, 2023
@vszakats vszakats changed the title build: delete HAVE_STDINT_H build: delete HAVE_STDINT_H and HAVE_INTTYPES_H Nov 6, 2023
@vszakats vszakats closed this in 60359ad Nov 6, 2023
@vszakats vszakats deleted the stdinth branch November 6, 2023 17:22
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.

None yet

1 participant