os::vsnprintf has different implementations for POSIX and Windows. The Windows implementation is identical to the POSIX implementation for Visual Studio 2015 and later, but uses a different implementation for earlier versions. But we no longer support such old versions of Visual Studio. This means the POSIX implementation can be moved to shared and the Windows implementation can be deleted.
While we're at it, the description for the function should be updated. We guarantee nul-termination when the operation fails due to an encoding error, as an extension to what's specified by the C99 standard. Were it not for that extension we could drop os::vsnprintf and os::snprintf and just use the C library functions directly.
While we're at it, the description for the function should be updated. We guarantee nul-termination when the operation fails due to an encoding error, as an extension to what's specified by the C99 standard. Were it not for that extension we could drop os::vsnprintf and os::snprintf and just use the C library functions directly.
- relates to
-
JDK-8294901 remove pre-VS2017 checks in Windows related coding
- Resolved