Integrated: 8286371: Avoid use of deprecated str[n]icmp
Kim Barrett
kbarrett at openjdk.java.net
Mon May 9 15:25:59 UTC 2022
On Mon, 9 May 2022 05:20:01 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this trivial change to use _str[n]icmp instead of (deprecated)
> str[n]icmp in the only places the latter are used in HotSpot, in
> Windows-specific code. This change is in preparation for removing the global
> disable of deprecation warnings for HotSpot Windows builds.
>
> An alternative would be to use str[n]casecmp, which are defined in
> globalDefinitions_visCPP.hpp for compatibilty in shared code. But since the
> uses of the functions being changed are in Windows-specific code I think the
> non-deprecated Windows-specific functions are more appropriate.
>
> There are some other uses of the deprecated functions in the JDK. I didn't
> change them. Those other places have different approaches to dealing with the
> source compatibility and deprecation than does HotSpot, suppressing the
> warning for this and various other functions using _CRT_NONSTDC_NO_DEPRECATE.
>
> Note that the deprecation message for these functions is the same one used for
> deprecating various POSIX functions, and the deprecation is under the control
> of the same macro, even though these aren't actually from POSIX.
This pull request has now been integrated.
Changeset: fe6e0c0b
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/fe6e0c0beba5065cca4e2e5d1a89125d5bd0dba6
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
8286371: Avoid use of deprecated str[n]icmp
Reviewed-by: dholmes
-------------
PR: https://git.openjdk.java.net/jdk/pull/8590
More information about the hotspot-runtime-dev
mailing list