JDK-8286349 : Simplify use of Windows deprecated POSIX names
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: windows
  • Submitted: 2022-05-07
  • Updated: 2022-06-02
  • Resolved: 2022-06-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Relates :  
Description
In globalDefinitions_visCPP.hpp there is a set of macros defining POSIX names to corresponding names with a leading underscore.  This is done because Visual Studio 2005 deprecated these names, with the leading-underscored functions being the recommended replacement.

We could eliminate these macros by adding _CRT_NONSTDC_NO_WARNINGS and _CRT_DECLARE_NONSTDC_NAMES to the microsoft version of ALWAYS_DEFINES_JVM in flags-cflags.m4.  Given that we are using the no-underscore names anyway, that seems like a cleaner approach.

https://docs.microsoft.com/en-us/cpp/c-runtime-library/compatibility

Alternatively, if the relevant functions have (or should have) os:: wrappers, then we may not need the function macros or the _CRT macros at all.
Comments
[~dcubed] Had I been more on the ball with the latter I would probably have included this one as an additional bugid in the PR for JDK-8286262. They are already linked. It didn’t seem like a dup to me; rather one subsumed the other, rendering it moot.
02-06-2022

[~kbarrett] - Any particular reason for not closing as a duplicate of JDK-8286262?
02-06-2022

This was addressed as part of JDK-8286262.
01-06-2022