RFR: 8286371: Avoid use of deprecated str[n]icmp

David Holmes dholmes at openjdk.java.net
Mon May 9 06:33:48 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.

Looks good and trivial.

Thanks.

-------------

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8590


More information about the hotspot-runtime-dev mailing list