-
-
Notifications
You must be signed in to change notification settings - Fork 7k
build: tidy-up MSVC CRT warning suppression macros #19175
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
Conversation
_CRT_SECURE_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS|
Just a reminder that the way MS treats "deprecated" is not the way others do because those functions aren't removed. Also like fopen is "insecure", they're never going to get rid of it, all these C functions that they mark as insecure or deprecated because they don't do exactly what MS wants |
|
@jay I'm aware, yes. Just trying to map it out what exactly are they suppressing, One thing I found is that the warning messages agree on suggesting |
move to top of the file to have an affect
|
|
|
Ended up going with |
…INGS` Based on these logs (non-Unicode, Unicode Schannel): https://github.com/curl/curl/actions/runs/19446115443/job/55640968722?pr=19175 https://github.com/curl/curl/actions/runs/19446115443/job/55640968764?pr=19175 Follow-up to 5fa2d83 curl#19175
Based on these logs (non-Unicode, Unicode Schannel): https://github.com/curl/curl/actions/runs/19446115443/job/55640968722?pr=19175 https://github.com/curl/curl/actions/runs/19446115443/job/55640968764?pr=19175 Follow-up to 5fa2d83 #19175 Closes #19597
_CRT_SECURE_NO_DEPRECATEwith_CRT_SECURE_NO_WARNINGS, which seems to be the preferred,more recent macro for this. Also syncing with libssh2.
They are equivalent for curl sources with the supported compilers.
_CRT_SECURE_NO_DEPRECATEglobally for examples.To make it work when compiling examples out of curl's build systems.
Use
_CRT_SECURE_NO_WARNINGS._CRT_SECURE_NO_WARNINGS._CRT_SECURE_NO_WARNINGS._CRT_NONSTDC_NO_DEPRECATEto MSVC._CRT_SECURE_NO_WARNINGSbefore headers and limit to MSVC.
_CRT_NONSTDC_NO_DEPRECATE.