More debianization
[erwise] / Cl / WWWLibrary / HTTCP.c
index 40a43e8..afa1727 100644 (file)
@@ -221,16 +221,11 @@ PUBLIC int HTParseInet(sin, str)
        sin->sin_addr.s_addr = inet_addr(host); /* See arpa/inet.h */
 
     } else {               /* Alphanumeric node name: */
-#ifdef MVS     /* Oustanding problem with crsh in MVS gethostbyname */
-       if(TRACE)printf("HTTCP: Calling gethostbyname(%s)\n", host);
-#endif
-       phost=gethostbyname(host);      /* See netdb.h */
-#ifdef MVS
-       if(TRACE)printf("HTTCP: gethostbyname() returned %d\n", phost);
-#endif
+       printf("HTTCP: Calling gethostbyname2(\"%s\",AF_INET)\n", host);
+       phost=gethostbyname2(host,AF_INET);     /* See netdb.h */
        if (!phost) {
-           if (TRACE) printf(
-                   "HTTPAccess: Can't find internet node name `%s'.\n",host);
+           printf(
+                   "HTTPAccess: Can't find internet node name `%s', h_errno: %d.\n",host,h_errno);
            return -1;  /* Fail? */
        }
        memcpy(&sin->sin_addr, phost->h_addr, phost->h_length);
@@ -278,7 +273,7 @@ PRIVATE void get_host_details()
 #ifdef NEED_HOST_ADDRESS               /* no -- needs name server! */
     phost=gethostbyname(name);         /* See netdb.h */
     if (!phost) {
-       if (TRACE) printf(
+       printf(
                "TCP: Can't find my own internet node address for `%s'!!\n",
                name);
        return;  /* Fail! */