Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3d2778c8
Commit
3d2778c8
authored
Feb 23, 2016
by
Ned Deily
Browse files
Options
Browse Files
Download
Plain Diff
Issue #26406: merge from 3.5
parents
2d43bc2f
e1d4e587
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
Misc/NEWS
Misc/NEWS
+3
-0
Modules/socketmodule.c
Modules/socketmodule.c
+10
-4
No files found.
Misc/NEWS
View file @
3d2778c8
...
@@ -600,6 +600,9 @@ Issue #26186: Remove an invalid type check in importlib.util.LazyLoader.
...
@@ -600,6 +600,9 @@ Issue #26186: Remove an invalid type check in importlib.util.LazyLoader.
- Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on
- Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on
OS X versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis.
OS X versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis.
- Issue #26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis.
IDLE
IDLE
----
----
...
...
Modules/socketmodule.c
View file @
3d2778c8
...
@@ -184,7 +184,7 @@ if_indextoname(index) -- return the corresponding interface name\n\
...
@@ -184,7 +184,7 @@ if_indextoname(index) -- return the corresponding interface name\n\
# define USE_GETHOSTBYNAME_LOCK
# define USE_GETHOSTBYNAME_LOCK
#endif
#endif
/* To use __FreeBSD_version */
/* To use __FreeBSD_version
, __OpenBSD__, and __NetBSD_Version__
*/
#ifdef HAVE_SYS_PARAM_H
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#include <sys/param.h>
#endif
#endif
...
@@ -195,15 +195,21 @@ if_indextoname(index) -- return the corresponding interface name\n\
...
@@ -195,15 +195,21 @@ if_indextoname(index) -- return the corresponding interface name\n\
a mix of code including an unsafe implementation from an old BSD's
a mix of code including an unsafe implementation from an old BSD's
libresolv. In 10.5 Apple reimplemented it as a safe IPC call to the
libresolv. In 10.5 Apple reimplemented it as a safe IPC call to the
mDNSResponder process. 10.5 is the first be UNIX '03 certified, which
mDNSResponder process. 10.5 is the first be UNIX '03 certified, which
includes the requirement that getaddrinfo be thread-safe.
includes the requirement that getaddrinfo be thread-safe.
See issue #25924.
See issue #25924 for details.
It's thread-safe in OpenBSD starting with 5.4, released Nov 2013:
http://www.openbsd.org/plus54.html
It's thread-safe in NetBSD starting with 4.0, released Dec 2007:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&r2=1.83
*/
*/
#if defined(WITH_THREAD) && ( \
#if defined(WITH_THREAD) && ( \
(defined(__APPLE__) && \
(defined(__APPLE__) && \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || \
(defined(__OpenBSD__) && OpenBSD+0 < 201311) || \
(defined(__NetBSD__) && __NetBSD_Version__+0 < 400000000) || \
!defined(HAVE_GETADDRINFO))
!defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#define USE_GETADDRINFO_LOCK
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment