Skip to content

msvc: tidy up _CRT_*_NO_DEPRECATE definitions - #15960

Closed
vszakats wants to merge 14 commits into
curl:masterfrom
vszakats:msvc-crt-warn-cust-conf
Closed

vszakats wants to merge 14 commits into
curl:masterfrom
vszakats:msvc-crt-warn-cust-conf

Conversation

@vszakats

@vszakats vszakats commented Jan 9, 2025 •

Copy link
Copy Markdown
Member

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
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 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.

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