struct hostent *h; PRStatus rv = PR_FAILURE; #if defined(_PR_HAVE_GETHOST_R) char localbuf[PR_NETDB_BUF_SIZE]; char *tmpbuf; struct hostent tmphe; int h_err;
PR_IMPLEMENT(const char *) PR_GetCanonNameFromAddrInfo(const PRAddrInfo *ai){#if defined(_PR_HAVE_GETADDRINFO)#if defined(_PR_INET6_PROBE)    if (!_pr_ipv6_is_present) {        const PRAddrInfoFB *fb = (const PRAddrInfoFB *) ai;        return fb->has_cname ? fb->hostent.h_name : NULL;    } #endif    return ((const PRADDRINFO *) ai)->ai_canonname;#else    const PRAddrInfoFB *fb = (const PRAddrInfoFB *) ai;    return fb->has_cname ? fb->hostent.h_name : NULL;#endif}