Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
00538ffe
Kaydet (Commit)
00538ffe
authored
Şub 15, 2016
tarafından
Ned Deily
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #25924: merge with 3.5
üst
44f9bc95
47299fd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
NEWS
Misc/NEWS
+3
-0
socketmodule.c
Modules/socketmodule.c
+18
-2
No files found.
Misc/NEWS
Dosyayı görüntüle @
00538ffe
...
...
@@ -579,6 +579,9 @@ Library
- Issue #26050: Add asyncio.StreamReader.readuntil() method.
Patch by Марк Коренберг.
- Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on
OS X versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis.
IDLE
----
...
...
Modules/socketmodule.c
Dosyayı görüntüle @
00538ffe
...
...
@@ -84,6 +84,11 @@ Local naming conventions:
*/
#ifdef __APPLE__
#include <AvailabilityMacros.h>
/* for getaddrinfo thread safety test on old versions of OS X */
#ifndef MAC_OS_X_VERSION_10_5
#define MAC_OS_X_VERSION_10_5 1050
#endif
/*
* inet_aton is not available on OSX 10.3, yet we want to use a binary
* that was build on 10.4 or later to work on that release, weak linking
...
...
@@ -184,8 +189,19 @@ if_indextoname(index) -- return the corresponding interface name\n\
#include <sys/param.h>
#endif
/* On systems on which getaddrinfo() is believed to not be thread-safe,
(this includes the getaddrinfo emulation) protect access with a lock. */
#if defined(WITH_THREAD) && (defined(__APPLE__) || \
(this includes the getaddrinfo emulation) protect access with a lock.
getaddrinfo is thread-safe on Mac OS X 10.5 and later. Originally it was
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
mDNSResponder process. 10.5 is the first be UNIX '03 certified, which
includes the requirement that getaddrinfo be thread-safe.
See issue #25924 for details.
*/
#if defined(WITH_THREAD) && ( \
(defined(__APPLE__) && \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || \
!defined(HAVE_GETADDRINFO))
...
...
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