X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fapi%2Fnetdb.c;h=6476a8d683021cca6840611b16ee2f573daac9d6;hb=b89d984cca6c09e60c1941b746162903d81bb323;hp=c8b223cd64826114166bd13c6a79fb20d821c5e2;hpb=d7c151575c3f0420bc5e4dcd96d8ee4165e4b56f;p=libc-test diff --git a/src/api/netdb.c b/src/api/netdb.c index c8b223c..6476a8d 100644 --- a/src/api/netdb.c +++ b/src/api/netdb.c @@ -69,23 +69,30 @@ C(EAI_SERVICE) C(EAI_SOCKTYPE) C(EAI_SYSTEM) C(EAI_OVERFLOW) -void(*p_endhostent)(void) = endhostent; -void(*p_endnetent)(void) = endnetent; -void(*p_endprotoent)(void) = endprotoent; -void(*p_endservent)(void) = endservent; -const char*(*p_gai_strerror)(int) = gai_strerror; -struct hostent*(*p_gethostent)(void) = gethostent; -struct netent*(*p_getnetbyaddr)(uint32_t,int) = getnetbyaddr; -struct netent*(*p_getnetbyname)(const char*) = getnetbyname; -struct netent*(*p_getnetent)(void) = getnetent; -struct protoent*(*p_getprotobyname)(const char*) = getprotobyname; -struct protoent*(*p_getprotobynumber)(int) = getprotobynumber; -struct protoent*(*p_getprotoent)(void) = getprotoent; -struct servent*(*p_getservbyname)(const char*,const char*) = getservbyname; -struct servent*(*p_getservbyport)(int,const char*) = getservbyport; -struct servent*(*p_getservent)(void) = getservent; -void(*p_sethostent)(int) = sethostent; -void(*p_setnetent)(int) = setnetent; -void(*p_setprotoent)(int) = setprotoent; -void(*p_setservent)(int) = setservent; +{void(*p)(void) = endhostent;} +{void(*p)(void) = endnetent;} +{void(*p)(void) = endprotoent;} +{void(*p)(void) = endservent;} +{const char*(*p)(int) = gai_strerror;} +{struct hostent*(*p)(void) = gethostent;} +{struct netent*(*p)(uint32_t,int) = getnetbyaddr;} +{struct netent*(*p)(const char*) = getnetbyname;} +{struct netent*(*p)(void) = getnetent;} +{struct protoent*(*p)(const char*) = getprotobyname;} +{struct protoent*(*p)(int) = getprotobynumber;} +{struct protoent*(*p)(void) = getprotoent;} +{struct servent*(*p)(const char*,const char*) = getservbyname;} +{struct servent*(*p)(int,const char*) = getservbyport;} +{struct servent*(*p)(void) = getservent;} +{void(*p)(int) = sethostent;} +{void(*p)(int) = setnetent;} +{void(*p)(int) = setprotoent;} +{void(*p)(int) = setservent;} +} +#include +static void g() +{ +{void(*p)(struct addrinfo*) = freeaddrinfo;} +{int(*p)(const char*restrict,const char*restrict,const struct addrinfo*restrict,struct addrinfo**restrict) = getaddrinfo;} +{int(*p)(const struct sockaddr*restrict,socklen_t,char*restrict,socklen_t,char*restrict,socklen_t,int) = getnameinfo;} }