From: Ken Brown Date: Wed, 14 Aug 2013 19:09:51 +0000 (-0400) Subject: * src/gmalloc.c [CYGWIN]: Rename memalign (Bug#15094). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~243 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=05e64f9f63f98108bb04f8ab45343e507862d8f4;p=emacs.git * src/gmalloc.c [CYGWIN]: Rename memalign (Bug#15094). --- 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) {