From 05e64f9f63f98108bb04f8ab45343e507862d8f4 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 14 Aug 2013 15:09:51 -0400 Subject: [PATCH] * src/gmalloc.c [CYGWIN]: Rename memalign (Bug#15094). --- src/ChangeLog | 5 +++++ src/gmalloc.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 415c4c3f525..43e9bca061b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-08-14 Ken Brown + + * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign + (Bug#15094). + 2013-08-14 Dmitry Antipov Utility function and macro to copy Lisp string to C string. diff --git a/src/gmalloc.c b/src/gmalloc.c index bc1d85ac5fb..42ac0b03985 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -1558,6 +1558,15 @@ License along with this library. If not, see . * void *(*__memalign_hook) (size_t size, size_t alignment); +/* As of version 1.7.24, Cygwin allows applications to provide their + own posix_memalign (but not memalign). But posix_memalign as + defined in this file calls memalign, so we have to rename the + latter in order to make sure that posix_memalign calls Emacs's + memalign. */ +#ifdef CYGWIN +#define memalign emacs_memalign +#endif + void * memalign (size_t alignment, size_t size) { -- 2.39.2