Blame src/api/arpa_inet.c
|
nsz |
e19254 |
#include <arpa/inet.h>
|
|
nsz |
e19254 |
#define T(t) (t*)0;
|
|
nsz |
e19254 |
#define C(n) switch(n){case n:;}
|
|
nsz |
e19254 |
static void f()
|
|
nsz |
e19254 |
{
|
|
nsz |
e19254 |
T(in_port_t)
|
|
nsz |
e19254 |
T(in_addr_t)
|
|
nsz |
e19254 |
T(struct in_addr)
|
|
nsz |
e19254 |
T(uint32_t)
|
|
nsz |
e19254 |
T(uint16_t)
|
|
nsz |
e19254 |
|
|
nsz |
e19254 |
C(INET_ADDRSTRLEN)
|
|
nsz |
e19254 |
C(INET6_ADDRSTRLEN)
|
|
nsz |
e19254 |
|
|
nsz |
e19254 |
#ifdef htonl
|
|
nsz |
e19254 |
C(htonl(0))
|
|
nsz |
e19254 |
#else
|
|
nsz |
e19254 |
uint32_t(*p_htonl)(uint32_t) = htonl;
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
#ifdef htons
|
|
nsz |
e19254 |
C(htons(0))
|
|
nsz |
e19254 |
#else
|
|
nsz |
e19254 |
uint16_t(*p_htons)(uint16_t) = htons;
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
#ifdef ntohl
|
|
nsz |
e19254 |
C(ntohl(0))
|
|
nsz |
e19254 |
#else
|
|
nsz |
e19254 |
uint32_t(*p_ntohl)(uint32_t) = ntohl;
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
#ifdef ntohs
|
|
nsz |
e19254 |
C(ntohs(0))
|
|
nsz |
e19254 |
#else
|
|
nsz |
e19254 |
uint16_t(*p_ntohs)(uint16_t) = ntohs;
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
|
|
nsz |
e19254 |
in_addr_t(*p_inet_addr)(const char*) = inet_addr;
|
|
nsz |
e19254 |
char*(*p_inet_ntoa)(struct in_addr) = inet_ntoa;
|
|
nsz |
e19254 |
const char*(*p_inet_ntop)(int,const void*restrict,char*restrict,socklen_t) = inet_ntop;
|
|
nsz |
e19254 |
int(*p_inet_pton)(int,const char*restrict,void*restrict) = inet_pton;
|
|
nsz |
e19254 |
}
|