]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
better test for existence of hstrerror()
authorGuido van Rossum <guido@python.org>
Tue, 10 Jan 1995 16:30:54 +0000 (16:30 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Jan 1995 16:30:54 +0000 (16:30 +0000)
Modules/socketmodule.c

index 08a6f4d9a3583c31339209205148c66e5978b2f1..9525dbaf1eaf3888e3f77ebdd7301856f53a9f57 100644 (file)
@@ -265,7 +265,7 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret)
 #endif /* HAVE_GETHOSTBYNAME_R */
 
        if (hp == NULL) {
-#ifndef NT
+#ifdef HAVE_HSTRERROR
                /* Let's get real error message to return */
                extern int h_errno;
                PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno));
@@ -1026,7 +1026,7 @@ BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args)
                          sizeof(addr.sin_addr),
                          AF_INET);
        if (h == NULL) {
-#ifndef NT
+#ifdef HAVE_HSTRERROR
                /* Let's get real error message to return */
                extern int h_errno;
                PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno));