[Python-checkins] cpython (2.7): Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT
martin.panter
python-checkins at python.org
Mon Nov 14 00:39:11 EST 2016
https://hg.python.org/cpython/rev/77cb8fa47138
changeset: 105097:77cb8fa47138
branch: 2.7
parent: 105095:b1f99e09bd77
user: Martin Panter <vadmium+py at gmail.com>
date: Mon Nov 14 04:13:55 2016 +0000
summary:
Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT
Patch by Matthieu S.
files:
Misc/ACKS | 1 +
Modules/socketmodule.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1214,6 +1214,7 @@
James Rutherford
Chris Ryland
Constantina S.
+Matthieu S
Patrick Sabin
Sébastien Sablé
Suman Saha
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -167,12 +167,14 @@
#endif
#ifdef HAVE_GETHOSTBYNAME_R
-# if defined(_AIX) || defined(__osf__)
+# if defined(_AIX) && !defined(_LINUX_SOURCE_COMPAT) || defined(__osf__)
# define HAVE_GETHOSTBYNAME_R_3_ARG
# elif defined(__sun) || defined(__sgi)
# define HAVE_GETHOSTBYNAME_R_5_ARG
# elif defined(linux)
/* Rely on the configure script */
+# elif defined(_LINUX_SOURCE_COMPAT) /* Linux compatibility on AIX */
+# define HAVE_GETHOSTBYNAME_R_6_ARG
# else
# undef HAVE_GETHOSTBYNAME_R
# endif
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list