1. Armin Rigo
  2. cpython-withatomic

Commits

Guido van Rossum  committed 7ea369d

better test for existence of hstrerror()

  • Participants
  • Parent commits 7947c0d
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Modules/socketmodule.c

View file
  • Ignore whitespace
 #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));
 			  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));