[Python-checkins] cpython (merge 3.6 -> default): Merge AIX fixes from 3.6

martin.panter python-checkins at python.org
Mon Nov 14 00:39:11 EST 2016


https://hg.python.org/cpython/rev/fcf3ae3e7db4
changeset:   105099:fcf3ae3e7db4
parent:      105093:817a003ecdc6
parent:      105098:6312f1eca2ff
user:        Martin Panter <vadmium+py at gmail.com>
date:        Mon Nov 14 05:04:36 2016 +0000
summary:
  Merge AIX fixes from 3.6

files:
  Lib/test/test_fileio.py |  2 +-
  Misc/ACKS               |  1 +
  Modules/socketmodule.c  |  4 +++-
  3 files changed, 5 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -377,7 +377,7 @@
                     self.assertEqual(f.writable(), True)
                     if sys.platform != "darwin" and \
                        'bsd' not in sys.platform and \
-                       not sys.platform.startswith('sunos'):
+                       not sys.platform.startswith(('sunos', 'aix')):
                         # Somehow /dev/tty appears seekable on some BSDs
                         self.assertEqual(f.seekable(), False)
                     self.assertEqual(f.isatty(), True)
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1309,6 +1309,7 @@
 Chris Ryland
 Bernt Røskar Brenna
 Constantina S.
+Matthieu S
 Patrick Sabin
 Sébastien Sablé
 Amit Saha
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -172,12 +172,14 @@
 #endif
 
 #ifdef HAVE_GETHOSTBYNAME_R
-# if defined(_AIX)
+# if defined(_AIX) && !defined(_LINUX_SOURCE_COMPAT)
 #  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