diff options
| author | Barry Warsaw <barry@python.org> | 2011-07-19 23:23:56 (GMT) |
|---|---|---|
| committer | Barry Warsaw <barry@python.org> | 2011-07-19 23:23:56 (GMT) |
| commit | 2ebada4233bdc1b25a83800a9040a43ccfe0bed4 (patch) | |
| tree | 28ed8b1e82edfc48724f85b9d40b7946dcbbb8c5 | |
| parent | 4c14bba7f9a97f3ea5d2f89eeeeb518464971f23 (diff) | |
| parent | d460a76e9eea15aee25c47de30a96b8f4e158929 (diff) | |
| download | cpython-2ebada4233bdc1b25a83800a9040a43ccfe0bed4.zip cpython-2ebada4233bdc1b25a83800a9040a43ccfe0bed4.tar.gz cpython-2ebada4233bdc1b25a83800a9040a43ccfe0bed4.tar.bz2 | |
- 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.
| -rw-r--r-- | Misc/NEWS | 8 | ||||
| -rw-r--r-- | Modules/_ctypes/libffi/src/dlmalloc.c | 5 |
2 files changed, 11 insertions, 2 deletions
@@ -16,8 +16,8 @@ Core and Builtins - Issue #10271: Allow warnings.showwarning() be any callable. -- 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 @@ -1040,6 +1040,10 @@ Tools/Demos 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. + - Issue #12221: Replace pyexpat.__version__ with the Python version. - Issue #12051: Fix segfault in json.dumps() while encoding highly-nested 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) |
