Subject: bug#15094: Fix for posix_memalign on Cygwin

From: Eli Zaretskii <[email-masked]>
Date: Wed, 14 Aug 2013 22:29:05 +0300

> Date: Wed, 14 Aug 2013 15:11:09 -0400
> From: Ken Brown <[email-masked]>
> 
> On 8/14/2013 12:22 PM, Ken Brown wrote:
> > Cygwin allows applications to supply their own malloc but not, until
> > today, their own posix_memalign.  This has caused problems with the GTK
> > build of Emacs on Cygwin.  The problem became worse with the latest Glib
> > update.  Anyone who wants the gory details can find them starting here:
> >
> >    http://cygwin.com/ml/cygwin-xfree/2013-08/msg00018.html
> >
> > Cygwin was just patched today to allow applications to supply their own
> > posix_memalign (but not their own memalign), which solves the Glib
> > problem.  But posix_memalign in gmalloc.c calls memalign, so I need to
> > make sure that it calls Emacs's memalign.  The attached patch does this.
> >   Is this a reasonable way to handle the problem?  (I plan to also add
> > an explanatory comment.)
> 
> I made this more complicated than necessary.  I've installed a simpler 
> version as bzr revision 113880, and I'm closing the bug.

Thanks, but could you please make the commentary more clear?  I'm
afraid it doesn't make sense to me: if posix_memalign calls memalign,
then why does the latter have to be renamed, if all you want is for it
to be called?  Why won't it be called unless renamed?

TIA