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

Replace the deprecated/obsolete gethostbyname and inet_addr calls

    XMLWordPrintable

Details

    • b13
    • windows

    Backports

      Description

        Originally this was aimed at just Windows: Avoid using deprecated names from winsock2.h

        > We currently suppress warnings for uses of some functions in winsock2.h (before JDK-8286262 by globally suppressing deprecation warnings, after by defining
        > _WINSOCK_DEPRECATED_NO_WARNINGS). It might be better to update our code to not use the deprecated names and remove the warning suppression.

        but it turns out that gethostbyname is also marked as obsolete on Linux and is not part of Posix anyway! So we can replace its use by getaddrinfo which is supported on Windows and Posix.

        inet_addr is also deprecated on Windows and considered superceded in Posix by inet_pton.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: