Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8285506

Unify os::vsnprintf implementations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 19
    • hotspot
    • b25

      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.

            dholmes David Holmes
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: