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

msvc: tidy up _CRT_*_NO_DEPRECATE definitions #15960

Closed
wants to merge 14 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jan 9, 2025

Dedupe and migrate MSVC-specific warning suppressions to curl_setup.h.
Make cmake set _CRT_SECURE_NO_DEPRECATE for examples and standalone
tests, and stop setting _CRT_NONSTDC_NO_DEPRECATE for them.

Details:

  • drop version guards. On ancient MSVC version these macro are a no-op.
  • move to curl_setup.h from config-win32*.h.
  • sync macro values with CMake.
  • cmake: stop setting them globally in favour of curl_setup.h.
  • cmake: re-add these macros to docs/examples and tests/http/clients,
    which do not use curl_setup.h.
  • cmake: drop _CRT_NONSTDC_NO_DEPRECATE for examples and tests.
    They build fine without.
  • update comments.

w/o whitespace: https://github.com/curl/curl/pull/15960/files?w=1

@vszakats vszakats added build Windows Windows-specific tidy-up labels Jan 9, 2025
@vszakats vszakats changed the title config-win32*: tidy up _CRT_* definitions msvc: tidy up _CRT_* definitions Jan 9, 2025
@vszakats vszakats marked this pull request as draft January 10, 2025 03:49
@vszakats vszakats force-pushed the msvc-crt-warn-cust-conf branch from 11e6cf6 to ef3ccb8 Compare January 10, 2025 22:12
@github-actions github-actions bot added the tests label Jan 10, 2025
@vszakats vszakats marked this pull request as ready for review January 11, 2025 01:11
@vszakats vszakats changed the title msvc: tidy up _CRT_* definitions msvc: tidy up _CRT_*_NO_DEPRECATE definitions Jan 11, 2025
@vszakats vszakats closed this in de3e662 Jan 11, 2025
@vszakats vszakats deleted the msvc-crt-warn-cust-conf branch January 11, 2025 23:35
vszakats added a commit to vszakats/curl that referenced this pull request Feb 8, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 8, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 8, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 9, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 9, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 10, 2025
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