config.tests/unix/getaddrinfo/getaddrinfotest.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 
    41 
    42 /* Sample program for configure to test for getaddrinfo on the unix
    42 /* Sample program for configure to test for getaddrinfo on the unix
    43      platform. we check for all structures and functions required. */
    43      platform. we check for all structures and functions required. */
    44 
    44 
       
    45 #include <stdio.h>
       
    46 #include <stdlib.h>
       
    47 #ifdef __MINGW32__
       
    48 #include <winsock2.h>
       
    49 #include <ws2tcpip.h>
       
    50 #else
    45 #include <sys/types.h>
    51 #include <sys/types.h>
    46 #include <sys/socket.h>
    52 #include <sys/socket.h>
    47 #include <netdb.h>
    53 #include <netdb.h>
       
    54 #endif
    48 
    55 
    49 int main()
    56 int main()
    50 {
    57 {
    51     addrinfo *res = 0;
    58     addrinfo *res = 0;
    52     if (getaddrinfo("foo", 0, 0, &res) == 0)
    59     if (getaddrinfo("foo", 0, 0, &res) == 0)