#include <sys/types.h>
#include <stdio.h>
#include <netdb.h>

extern int h_errno;

int main(const int argc, const char *argv[])
{
  struct hostent *hp;

  hp = gethostbyname(argv[1]);

  printf("hp=%p h_errno=%d\n", hp, h_errno);
  
  return 0;
}



syntax highlighted by Code2HTML, v. 0.9.1