From 9544a365bd47000b0d4c364808860365e6142a03 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 14 Nov 2016 01:58:57 +0000 Subject: Issue #28016: Skip /dev/tty seekable() test on AIX --- Lib/test/test_fileio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py index 59cc38f..12f2f11 100644 --- a/Lib/test/test_fileio.py +++ b/Lib/test/test_fileio.py @@ -377,7 +377,7 @@ class OtherFileTests: 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) -- cgit v0.12 From c9e08d8cb508aecaaa327ee1f27fe4164235f682 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 14 Nov 2016 04:26:36 +0000 Subject: Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT Patch by Matthieu S. --- Misc/ACKS | 1 + Modules/socketmodule.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/ACKS b/Misc/ACKS index 0a4e02e..69dc9f5 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1290,6 +1290,7 @@ James Rutherford Chris Ryland Bernt Røskar Brenna Constantina S. +Matthieu S Patrick Sabin Sébastien Sablé Suman Saha diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 3e1a460..af6cc94 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -168,12 +168,14 @@ if_indextoname(index) -- return the corresponding interface name\n\ #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 -- cgit v0.12