while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr) < 0)
while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr) != 0)
getrpcport (const char *host, u_long prognum, u_long versnum, u_int proto){  struct sockaddr_in addr;  struct hostent hostbuf, *hp;  size_t buflen;  char *buffer;  int herr;  buflen = 1024;  buffer = __alloca (buflen);  while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr)	 < 0)    if (herr != NETDB_INTERNAL || errno != ERANGE)      return 0;    else      {	/* Enlarge the buffer.  */	buflen *= 2;	buffer = __alloca (buflen);      }  bcopy (hp->h_addr, (char *) &addr.sin_addr, hp->h_length);  addr.sin_family = AF_INET;  addr.sin_port = 0;  return pmap_getport (&addr, prognum, versnum, proto);}