]> granicus.if.org Git - python/commitdiff
Put back __osf__ support for gethostbyname_r(); the real bug was that
authorGuido van Rossum <guido@python.org>
Tue, 13 Apr 1999 04:07:32 +0000 (04:07 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 13 Apr 1999 04:07:32 +0000 (04:07 +0000)
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.

Modules/socketmodule.c

index 039023fce0e85f6230cec71436ffbe62b9ccf747..4507eaa913f962e7dbf3ebec70c7f7a265d09e8a 100644 (file)
@@ -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