summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-09-07 16:56:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-09-07 16:56:24 (GMT)
commita6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 (patch)
tree1c31738009bee903417cea928e705a112aea2392 /Modules/socketmodule.c
parent1f06a680de465be0c24a78ea3b610053955daa99 (diff)
downloadcpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.zip
cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.gz
cpython-a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344.tar.bz2
bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config * Always define WITH_THREAD for compatibility.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index a431e25..2c2f98d 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -163,10 +163,6 @@ if_indextoname(index) -- return the corresponding interface name\n\
# include <sys/uio.h>
#endif
-#if !defined(WITH_THREAD)
-# undef HAVE_GETHOSTBYNAME_R
-#endif
-
#if defined(__ANDROID__) && __ANDROID_API__ < 23
# undef HAVE_GETHOSTBYNAME_R
#endif
@@ -185,8 +181,7 @@ if_indextoname(index) -- return the corresponding interface name\n\
# endif
#endif
-#if !defined(HAVE_GETHOSTBYNAME_R) && defined(WITH_THREAD) && \
- !defined(MS_WINDOWS)
+#if !defined(HAVE_GETHOSTBYNAME_R) && !defined(MS_WINDOWS)
# define USE_GETHOSTBYNAME_LOCK
#endif
@@ -210,8 +205,7 @@ if_indextoname(index) -- return the corresponding interface name\n\
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&r2=1.83
*/
-#if defined(WITH_THREAD) && ( \
- (defined(__APPLE__) && \
+#if ((defined(__APPLE__) && \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
(defined(__OpenBSD__) && OpenBSD+0 < 201311) || \
@@ -656,10 +650,8 @@ internal_select(PySocketSockObject *s, int writing, _PyTime_t interval,
struct timeval tv, *tvp;
#endif
-#ifdef WITH_THREAD
/* must be called with the GIL held */
assert(PyGILState_Check());
-#endif
/* Error condition is for output only */
assert(!(connect && !writing));
@@ -758,10 +750,8 @@ sock_call_ex(PySocketSockObject *s,
int deadline_initialized = 0;
int res;
-#ifdef WITH_THREAD
/* sock_call() must be called with the GIL held. */
assert(PyGILState_Check());
-#endif
/* outer loop to retry select() when select() is interrupted by a signal
or to retry select()+sock_func() on false positive (see above) */