[Python-checkins] cpython (3.2): - Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
barry.warsaw
python-checkins at python.org
Wed Jul 20 01:28:37 CEST 2011
http://hg.python.org/cpython/rev/cc00e09404e6
changeset: 71429:cc00e09404e6
branch: 3.2
parent: 71418:f8c4ac9aa9e2
user: Barry Warsaw <barry at python.org>
date: Tue Jul 19 18:28:30 2011 -0400
summary:
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
signature. Without this, architectures where sizeof void* != sizeof int are
broken. Patch given by Hallvard B Furuseth.
files:
Misc/NEWS | 11 +++++++++--
Modules/_ctypes/libffi/src/dlmalloc.c | 5 +++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -14,8 +14,8 @@
format string that contains positional fields. Initial patch by
Julian Berman.
-- Issue #11627: Fix segfault when __new__ on a exception returns a non-exception
- class.
+- Issue #11627: Fix segfault when __new__ on a exception returns a
+ non-exception class.
- Issue #12149: Update the method cache after a type's dictionnary gets
cleared by the garbage collector. This fixes a segfault when an instance
@@ -71,6 +71,13 @@
- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
of the text mode (using the locale encoding) to avoid encoding issues.
+Extension Modules
+-----------------
+
+- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
+ signature. Without this, architectures where sizeof void* != sizeof int are
+ broken. Patch given by Hallvard B Furuseth.
+
C-API
-----
diff --git a/Modules/_ctypes/libffi/src/dlmalloc.c b/Modules/_ctypes/libffi/src/dlmalloc.c
--- a/Modules/_ctypes/libffi/src/dlmalloc.c
+++ b/Modules/_ctypes/libffi/src/dlmalloc.c
@@ -457,6 +457,11 @@
#define LACKS_ERRNO_H
#define MALLOC_FAILURE_ACTION
#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
+#elif !defined _GNU_SOURCE
+/* mremap() on Linux requires this via sys/mman.h
+ * See roundup issue 10309
+ */
+#define _GNU_SOURCE 1
#endif /* WIN32 */
#if defined(DARWIN) || defined(_DARWIN)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list