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: fix stdint/inttypes detection with non-autotools #10745

Closed
wants to merge 3 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Mar 11, 2023

Fix stdint.h and inttypes.h detection with non-autotools builds
on Windows. (autotools already auto-detected them correctly.)

lib/config-win32.h builds (e.g. Makefile.mk):

  • set HAVE_STDINT_H where supported.
  • set HAVE_INTTYPES_H for MinGW.

CMake:

  • auto-detect them on Windows. (They were both force-disabled.)
  • delete unused CURL_PULL_STDINT_H.
  • delete unused CURL_PULL_INTTYPES_H.
  • stop detecting HAVE_STDINT_H twice.
    Present since the initial CMake commit: 4c5307b

curl doesn't use these C99 headers, we need them now to
workaround broken wolfSSL builds. Ref: #10739

Once that clears up, we can delete these detections and macros (unless we want to keep them for
future us.)

Closes #10745

- Delete unused `CURL_PULL_STDINT_H`.

- Delete unused `CURL_PULL_INTTYPES_H`.

- Delete duplicate detection for `HAVE_STDINT_H`.

  Present since the initial CMake commit: 4c5307b

Closes curl#10745
@vszakats vszakats added the Windows Windows-specific label Mar 12, 2023
@vszakats vszakats changed the title cmake: delete unused/redundant lines build: improve stdint/inttypes detection with non-autotools Mar 12, 2023
@vszakats vszakats changed the title build: improve stdint/inttypes detection with non-autotools build: improve/fix stdint/inttypes detection with non-autotools Mar 12, 2023
@vszakats vszakats changed the title build: improve/fix stdint/inttypes detection with non-autotools build: fix stdint/inttypes detection with non-autotools Mar 13, 2023
@vszakats vszakats closed this in db073c9 Mar 13, 2023
@vszakats vszakats deleted the cmake-del-unused branch March 13, 2023 10:48
vszakats added a commit that referenced this pull request Mar 14, 2023
- add QUIC/ngtcp2 detection in CMake with wolfSSL.

  Because wolfSSL uses zlib if available, move compression detection
  before TLS detection. (OpenSSL might also need this in the future.)

- wolfSSL 5.5.0 started using C99 types in its `quic.h` header, but it
  doesn't #include the necessary C99 header itself, breaking builds
  (unless another dependency pulled it by chance.) Add local workaround
  for it. For this to work with all build tools, we had to fix our
  header detection first. Ref: #10745

  Ref: curl/curl-for-win@6ad5f6e

Closes #10739
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
Fix `stdint.h` and `inttypes.h` detection with non-autotools builds on
Windows. (autotools already auto-detected them accurately.)

`lib/config-win32.h` builds (e.g. `Makefile.mk`):
- set `HAVE_STDINT_H` where supported.
- set `HAVE_INTTYPES_H` for MinGW.

CMake:
- auto-detect them on Windows. (They were both force-disabled.)
- delete unused `CURL_PULL_STDINT_H`.
- delete unused `CURL_PULL_INTTYPES_H`.
- stop detecting `HAVE_STDINT_H` twice.
  Present since the initial CMake commit: 4c5307b

curl doesn't use these C99 headers, we need them now to workaround
broken wolfSSL builds. Ref: curl#10739

Once that clears up, we can delete these detections and macros (unless
we want to keep them for future us.)

Reviewed-by: Daniel Stenberg
Closes curl#10745
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- add QUIC/ngtcp2 detection in CMake with wolfSSL.

  Because wolfSSL uses zlib if available, move compression detection
  before TLS detection. (OpenSSL might also need this in the future.)

- wolfSSL 5.5.0 started using C99 types in its `quic.h` header, but it
  doesn't #include the necessary C99 header itself, breaking builds
  (unless another dependency pulled it by chance.) Add local workaround
  for it. For this to work with all build tools, we had to fix our
  header detection first. Ref: curl#10745

  Ref: curl/curl-for-win@6ad5f6e

Closes curl#10739
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