+ {
+ /* EAI_AGAIN is returned if no network is available. Don't fail
+ the test merely because someone is down the country on their
+ in-law's farm. */
+ if (res == EAI_AGAIN)
+ {
+ skip++;
+ fprintf (stderr, "skipping getaddrinfo test: no network?\n");
+ return 77;
+ }
+ /* IRIX reports EAI_NONAME for "https". Don't fail the test
+ merely because of this. */
+ if (res == EAI_NONAME)
+ return 0;
+ /* Solaris reports EAI_SERVICE for "http" and "https". Don't
+ fail the test merely because of this. */
+ if (res == EAI_SERVICE)
+ return 0;
+#ifdef EAI_NODATA
+ /* AIX reports EAI_NODATA for "https". Don't fail the test
+ merely because of this. */
+ if (res == EAI_NODATA)
+ return 0;
+#endif
+ /* Provide details if errno was set. */
+ if (res == EAI_SYSTEM)
+ fprintf (stderr, "system error: %s\n", strerror (err));
+
+ return 1;
+ }