dumphstrerrno.c 365 B

12345678910111213141516171819
  1. #include <netdb.h>
  2. #include <stdio.h>
  3. static void D (const char *s, int e)
  4. {
  5. printf("%s, %s\n", s, hstrerror(e));
  6. }
  7. int main (int argc, char *argv[])
  8. {
  9. D("NETDB_INTERNAL", NETDB_INTERNAL);
  10. D("NETDB_SUCCESS", NETDB_SUCCESS);
  11. D("HOST_NOT_FOUND", HOST_NOT_FOUND);
  12. D("TRY_AGAIN", TRY_AGAIN);
  13. D("NO_RECOVERY", NO_RECOVERY);
  14. D("NO_DATA", NO_DATA);
  15. return 0;
  16. }