[Python-checkins] cpython (merge 3.2 -> default): Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.

gregory.p.smith python-checkins at python.org
Tue Jun 5 22:30:56 CEST 2012


http://hg.python.org/cpython/rev/5a4d5e714d08
changeset:   77364:5a4d5e714d08
parent:      77362:b2f86880517f
parent:      77363:aa9cfeea07ad
user:        Gregory P. Smith <greg at krypto.org>
date:        Tue Jun 05 13:30:24 2012 -0700
summary:
  Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.

files:
  Misc/NEWS                  |  5 +++++
  Modules/_posixsubprocess.c |  7 +++++++
  2 files changed, 12 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,11 @@
 - Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative
   algorithm (Patch by Alon Horev)
 
+Extension Modules
+-----------------
+
+- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
+
 Tests
 -----
 
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -177,8 +177,15 @@
  * chooses to break compatibility with all existing binaries.  Highly Unlikely.
  */
 struct linux_dirent {
+#if defined(__x86_64__) && defined(__ILP32__)
+   /* Support the wacky x32 ABI (fake 32-bit userspace speaking to x86_64
+    * kernel interfaces) - https://sites.google.com/site/x32abi/ */
+   unsigned long long d_ino;
+   unsigned long long d_off;
+#else
    unsigned long  d_ino;        /* Inode number */
    unsigned long  d_off;        /* Offset to next linux_dirent */
+#endif
    unsigned short d_reclen;     /* Length of this linux_dirent */
    char           d_name[256];  /* Filename (null-terminated) */
 };

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list