• Chun-wei Fan's avatar
    Windows: Use Standard Networking Functions If Possible · 6fe28eef
    Chun-wei Fan authored
    Currently, the Windows code use Winsock2-specific APIs to try to emulate
    calls such as inet_pton(), inet_ntop() and if_nametoindex(), which may not
    do the job all the time.  On Vista and later, Winsock2 does provide a
    proper implementation for these functions, so we can use them if they exist
    on the system, by querying for them during g_networking_init().  Otherwise,
    we continue to use the original code path for these, in the case of XP and
    Server 2003.
    This enables many of the network-address tests to pass on Windows as a
    result, when the native Winsock2 implementations can be used.
gnetworking.c 3.47 KB