summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2011-07-19 23:25:56 (GMT)
committerBarry Warsaw <barry@python.org>2011-07-19 23:25:56 (GMT)
commit346f95ff820c698fef7bd825a6d157d0549a2233 (patch)
treeb0804a24736264634e5b41ffaedc64e04ae67989
parent2ea6fccf64596f84562b0a57a8d63847286bdf4c (diff)
parentd460a76e9eea15aee25c47de30a96b8f4e158929 (diff)
downloadcpython-346f95ff820c698fef7bd825a6d157d0549a2233.zip
cpython-346f95ff820c698fef7bd825a6d157d0549a2233.tar.gz
cpython-346f95ff820c698fef7bd825a6d157d0549a2233.tar.bz2
Upstream merge
-rw-r--r--Misc/NEWS11
-rw-r--r--Modules/_ctypes/libffi/src/dlmalloc.c5
2 files changed, 14 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 590166a..df257f5 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -14,8 +14,8 @@ Core and Builtins
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
@@ -75,6 +75,13 @@ Library
- 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
index 783c5c2..582ddc3 100644
--- a/Modules/_ctypes/libffi/src/dlmalloc.c
+++ b/Modules/_ctypes/libffi/src/dlmalloc.c
@@ -457,6 +457,11 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#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)