diff -rcPp2 curl/lib/hostip.c curl-7.8.1/lib/hostip.c
*** curl/lib/hostip.c	Wed Oct  3 16:43:13 2001
--- curl-7.8.1/lib/hostip.c	Mon Aug  6 08:21:09 2001
*************** static char *MakeIP(unsigned long num,ch
*** 89,163 ****
  }
  
- /**
-  * Performs a "deep" copy of a hostent into a buffer 
-  * (returns a pointer to the copy).
-  *
-  * Keith McGuigan 
-  * 10/3/2001
-  */
- static struct hostent* pack_hostent(char* buf, struct hostent* orig)
- {
-     char* bufptr;
-     struct hostent* copy;
- 
-     int i;
-     char* str;
-     int len;
- 
-     bufptr = buf;
-     copy = (struct hostent*)bufptr;
- 
-     bufptr += sizeof(struct hostent);
-     copy->h_name = bufptr;
-     len = strlen(orig->h_name) + 1;
-     strncpy(bufptr, orig->h_name, len);
-     bufptr += len;
- 
-     copy->h_aliases = (char**)bufptr;
- 
-     /* Figure out how many aliases there are */
-     for (i = 0; orig->h_aliases[i] != NULL; ++i);
- 
-     /* Reserve room for the array */
-     bufptr += (i + 1) * sizeof(char*);
- 
-     i = 0;
-     str = orig->h_aliases[i];
-     while (str != NULL)
-     {
- 	len = strlen(str) + 1;
- 	strncpy(bufptr, str, len);
- 	copy->h_aliases[i] = bufptr;
- 	bufptr += len;
- 	str = orig->h_aliases[++i];
-     }
-     copy->h_aliases[i] = NULL;
- 
-     copy->h_addrtype = orig->h_addrtype;
-     copy->h_length = orig->h_length;
-     
-     copy->h_addr_list = (char**)bufptr;
- 
-     /* Figure out how many addresses there are */
-     for (i = 0; orig->h_addr_list[i] != NULL; ++i);
- 
-     /* Reserve room for the array */
-     bufptr += (i + 1) * sizeof(char*);
- 
-     i = 0;
-     len = orig->h_length;
-     str = orig->h_addr_list[i];
-     while (str != NULL)
-     {
- 	memcpy(bufptr, str, len);
- 	copy->h_addr_list[i] = bufptr;
- 	bufptr += len;
- 	str = orig->h_addr_list[++i];
-     }
-     copy->h_addr_list[i] = NULL;
- 
-     return copy;
- }
- 
  #ifdef ENABLE_IPV6
  struct addrinfo *Curl_getaddrinfo(struct UrlData *data,
--- 89,92 ----
*************** struct hostent *Curl_gethost(struct UrlD
*** 283,291 ****
        *bufp=NULL;
      }
-     else 
-       h = pack_hostent(buf, h);
  #endif
    }
    return (h);
  }
- 
--- 212,217 ----

