summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-04-13 04:07:32 (GMT)
committerGuido van Rossum <guido@python.org>1999-04-13 04:07:32 (GMT)
commit7a1229991de8d1a275823acb7d7d2cf5be1cc776 (patch)
treea3c677a0a8c1441c83edfec8bead85adde7ed71d /Modules/socketmodule.c
parent761fcd03aa71d16225850a797f6a7c67c12800ed (diff)
downloadcpython-7a1229991de8d1a275823acb7d7d2cf5be1cc776.zip
cpython-7a1229991de8d1a275823acb7d7d2cf5be1cc776.tar.gz
cpython-7a1229991de8d1a275823acb7d7d2cf5be1cc776.tar.bz2
Put back __osf__ support for gethostbyname_r(); the real bug was that
it was being used even without threads. This of course might be an all-platform problem so now we only use the _r variant when we are using threads.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 039023f..4507eaa 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -91,8 +91,12 @@ Socket methods:
#undef HAVE_GETHOSTBYNAME_R_5_ARG
#undef HAVE_GETHOSTBYNAME_R_6_ARG
+#ifndef WITH_THREAD
+#undef HAVE_GETHOSTBYNAME_R
+#endif
+
#ifdef HAVE_GETHOSTBYNAME_R
-#if defined(_AIX)
+#if defined(_AIX) || defined(__osf__)
#define HAVE_GETHOSTBYNAME_R_3_ARG
#elif defined(__sun__) || defined(__sgi)
#define HAVE_GETHOSTBYNAME_R_5_ARG