anchor.diff:  	    Pid
       end.
   
  -parse_address(BinHostent) ->
  +parse_address(BinHostent, DefaultName) ->
       case catch 
   	begin
   	    case BinHostent of
   		<<?UNIT_ERROR, Errstring/binary>> -> 
   		    {error, list_to_atom(listify(Errstring))};
   		<<?UNIT_IPV4, Naddr:32, T0/binary>> ->
  -		    {T1,Addresses} = pick_addresses_v4(Naddr, T0),
  -		    [Name | Names] = pick_names(T1),
  +		    {T1, Addresses} = pick_addresses_v4(Naddr, T0),
  +		    {Name, Names} =
  +			expand_default_name(pick_names(T1), DefaultName),
   		    {ok, #hostent{h_addr_list = Addresses, h_addrtype = inet,
   				  h_aliases = Names, h_length = ?UNIT_IPV4, 
   				  h_name = Name}};
   		<<?UNIT_IPV6, Naddr:32, T0/binary>> ->
  -		    {T1,Addresses} = pick_addresses_v6(Naddr, T0),
  -		    [Name | Names] = pick_names(T1),
  +		    {T1, Addresses} = pick_addresses_v6(Naddr, T0),
  +		    {Name, Names} =
  +			expand_default_name(pick_names(T1), DefaultName),
   		    {ok, #hostent{h_addr_list = Addresses, h_addrtype = inet6,
   				  h_aliases = Names, h_length = ?UNIT_IPV6, 
   				  h_name = Name}};
  
positive.code: 	Normal ->
  	    Normal
      end.
  	    
  listify(Bin) ->
      N = byte_size(Bin) - 1,
      <<Bin2:N/binary, Ch>> = Bin,
  
negative.code:     gethostbyname(Name, inet).
  
  gethostbyname(Name, inet) when is_list(Name) ->
      getit(?OP_GETHOSTBYNAME, ?PROTO_IPV4, Name, Name);
  gethostbyname(Name, inet6) when is_list(Name) ->
      getit(?OP_GETHOSTBYNAME, ?PROTO_IPV6, Name, Name);
  gethostbyname(Name, Type) when is_atom(Name) ->
      gethostbyname(atom_to_list(Name), Type);
  gethostbyname(_, _)  ->
      {error, formerr}.
  
  gethostbyaddr({A,B,C,D}=Addr)
    when ?VALID_V4(A), ?VALID_V4(B), ?VALID_V4(C), ?VALID_V4(D) ->
      getit(?OP_GETHOSTBYADDR, ?PROTO_IPV4, <<A,B,C,D>>, Addr);
  gethostbyaddr({A,B,C,D,E,F,G,H}=Addr)
    when ?VALID_V6(A), ?VALID_V6(B), ?VALID_V6(C), ?VALID_V6(D),
         ?VALID_V6(E), ?VALID_V6(F), ?VALID_V6(G), ?VALID_V6(H) ->
      getit
        (?OP_GETHOSTBYADDR, ?PROTO_IPV6,
         <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16>>, Addr);
  gethostbyaddr(Addr) when is_list(Addr) ->
      case inet_parse:address(Addr) of
          {ok, IP} -> gethostbyaddr(IP);
  