Commit 731f7c0b authored by Guido van Rossum's avatar Guido van Rossum

better test for existence of hstrerror()

parent f519c667
...@@ -265,7 +265,7 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret) ...@@ -265,7 +265,7 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret)
#endif /* HAVE_GETHOSTBYNAME_R */ #endif /* HAVE_GETHOSTBYNAME_R */
if (hp == NULL) { if (hp == NULL) {
#ifndef NT #ifdef HAVE_HSTRERROR
/* Let's get real error message to return */ /* Let's get real error message to return */
extern int h_errno; extern int h_errno;
PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno)); PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno));
...@@ -1026,7 +1026,7 @@ BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args) ...@@ -1026,7 +1026,7 @@ BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args)
sizeof(addr.sin_addr), sizeof(addr.sin_addr),
AF_INET); AF_INET);
if (h == NULL) { if (h == NULL) {
#ifndef NT #ifdef HAVE_HSTRERROR
/* Let's get real error message to return */ /* Let's get real error message to return */
extern int h_errno; extern int h_errno;
PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno)); PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment