mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Patch #1288833: Removed thread lock from socket.getaddrinfo on
FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3). (Reported by Maxim Sobolev)
This commit is contained in:
parent
3a708dfc88
commit
9ceebd5445
2 changed files with 9 additions and 1 deletions
|
@ -149,6 +149,9 @@ present).
|
||||||
Extension Modules
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Patch #1288833: Removed thread lock from socket.getaddrinfo on
|
||||||
|
FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3).
|
||||||
|
|
||||||
- Patches #1298449 and #1298499: Add some missing checks for error
|
- Patches #1298449 and #1298499: Add some missing checks for error
|
||||||
returns in cStringIO.c.
|
returns in cStringIO.c.
|
||||||
|
|
||||||
|
|
|
@ -140,9 +140,14 @@ shutdown(how) -- shut down traffic in one or both directions\n\
|
||||||
# define USE_GETHOSTBYNAME_LOCK
|
# define USE_GETHOSTBYNAME_LOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* To use __FreeBSD_version */
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
/* On systems on which getaddrinfo() is believed to not be thread-safe,
|
/* On systems on which getaddrinfo() is believed to not be thread-safe,
|
||||||
(this includes the getaddrinfo emulation) protect access with a lock. */
|
(this includes the getaddrinfo emulation) protect access with a lock. */
|
||||||
#if defined(WITH_THREAD) && (defined(__APPLE__) || defined(__FreeBSD__) || \
|
#if defined(WITH_THREAD) && (defined(__APPLE__) || \
|
||||||
|
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
|
||||||
defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO))
|
defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO))
|
||||||
#define USE_GETADDRINFO_LOCK
|
#define USE_GETADDRINFO_LOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue