-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b03
-
windows
We use various POSIX functions in the JDK in shared code, and possibly even in Windows-specific code. The UCRT optionally provides the relevant functionality under alternate names with leading underscores, and optionally provides the POSIX names and by default warns about their use.
https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=msvc-170
We currently define _CRT_NONSTDC_NO_DEPRECATE to request the POSIX names be defined and to suppress the deprecation warnings. However, that macro seems to be undocumented (or perhaps is no longer documented). Instead, recent versions of that compatibility page suggest the use of _CRT_NONSTDC_NO_WARNINGS and _CRT_DECLARE_NONSTDC_NAMES. We should update our usage accordingly.
https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=msvc-170
We currently define _CRT_NONSTDC_NO_DEPRECATE to request the POSIX names be defined and to suppress the deprecation warnings. However, that macro seems to be undocumented (or perhaps is no longer documented). Instead, recent versions of that compatibility page suggest the use of _CRT_NONSTDC_NO_WARNINGS and _CRT_DECLARE_NONSTDC_NAMES. We should update our usage accordingly.