From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 12:23:00 2013 Received: (at submit) by debbugs.gnu.org; 14 Aug 2013 16:23:00 +0000 Received: from localhost ([127.0.0.1]:58441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9dqd-0006DA-Ld for submit@debbugs.gnu.org; Wed, 14 Aug 2013 12:23:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34704) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9dqa-0006Cv-L5 for submit@debbugs.gnu.org; Wed, 14 Aug 2013 12:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9dqO-0003oC-4s for submit@debbugs.gnu.org; Wed, 14 Aug 2013 12:22:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9dqO-0003o8-2U for submit@debbugs.gnu.org; Wed, 14 Aug 2013 12:22:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9dqH-0008R8-UI for bug-gnu-emacs@gnu.org; Wed, 14 Aug 2013 12:22:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9dq7-0003lI-MZ for bug-gnu-emacs@gnu.org; Wed, 14 Aug 2013 12:22:37 -0400 Received: from limerock03.mail.cornell.edu ([128.84.12.34]:50215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9dq7-0003jK-Ih for bug-gnu-emacs@gnu.org; Wed, 14 Aug 2013 12:22:27 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r7EGMCAI023911 for ; Wed, 14 Aug 2013 12:22:12 -0400 Received: from [192.168.1.4] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r7EGMBbS007916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Aug 2013 12:22:12 -0400 Message-ID: <520BAEBA.1030306@cornell.edu> Date: Wed, 14 Aug 2013 12:22:18 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: emacs-bug Subject: Fix for posix_memalign on Cygwin Content-Type: multipart/mixed; boundary="------------030501050905070806050509" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) This is a multi-part message in MIME format. --------------030501050905070806050509 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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.) Thanks. Ken --------------030501050905070806050509 Content-Type: text/plain; charset=windows-1252; name="memalign.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="memalign.patch" === modified file 'src/gmalloc.c' --- src/gmalloc.c 2013-01-02 16:13:04 +0000 +++ src/gmalloc.c 2013-08-14 16:01:02 +0000 @@ -1558,8 +1558,14 @@ void *(*__memalign_hook) (size_t size, size_t alignment); +#ifdef CYGWIN +#define memalign memalign1 +void * +memalign1 (size_t alignment, size_t size) +#else void * memalign (size_t alignment, size_t size) +#endif { void *result; size_t adj, lastadj; --------------030501050905070806050509-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 15:11:39 2013 Received: (at 15094-done) by debbugs.gnu.org; 14 Aug 2013 19:11:39 +0000 Received: from localhost ([127.0.0.1]:58702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9gTq-0002v3-Jk for submit@debbugs.gnu.org; Wed, 14 Aug 2013 15:11:39 -0400 Received: from limerock02.mail.cornell.edu ([128.84.12.100]:35694) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9gTn-0002uk-1t for 15094-done@debbugs.gnu.org; Wed, 14 Aug 2013 15:11:36 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r7EJBSK6014205 for <15094-done@debbugs.gnu.org>; Wed, 14 Aug 2013 15:11:29 -0400 Received: from [128.84.234.244] (dhcp244.math.cornell.edu [128.84.234.244]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r7EJBS7Z013736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <15094-done@debbugs.gnu.org>; Wed, 14 Aug 2013 15:11:28 -0400 Message-ID: <520BD64D.2000906@cornell.edu> Date: Wed, 14 Aug 2013 15:11:09 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: 15094-done@debbugs.gnu.org Subject: Re: bug#15094: Fix for posix_memalign on Cygwin References: <520BAEBA.1030306@cornell.edu> In-Reply-To: <520BAEBA.1030306@cornell.edu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15094-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) 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. Ken From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 15:28:47 2013 Received: (at 15094) by debbugs.gnu.org; 14 Aug 2013 19:28:47 +0000 Received: from localhost ([127.0.0.1]:58721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9gkQ-0003QK-KP for submit@debbugs.gnu.org; Wed, 14 Aug 2013 15:28:46 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:43395) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9gkN-0003Pw-1U for 15094@debbugs.gnu.org; Wed, 14 Aug 2013 15:28:44 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MRJ00G00CK4P800@a-mtaout20.012.net.il> for 15094@debbugs.gnu.org; Wed, 14 Aug 2013 22:28:36 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRJ00GLKCROBO70@a-mtaout20.012.net.il>; Wed, 14 Aug 2013 22:28:36 +0300 (IDT) Date: Wed, 14 Aug 2013 22:29:05 +0300 From: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin In-reply-to: <520BD64D.2000906@cornell.edu> X-012-Sender: halo1@inter.net.il To: Ken Brown Message-id: <8361v8oyv2.fsf@gnu.org> References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 14 Aug 2013 15:11:09 -0400 > From: Ken Brown > > 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 15:53:29 2013 Received: (at 15094) by debbugs.gnu.org; 14 Aug 2013 19:53:29 +0000 Received: from localhost ([127.0.0.1]:58767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9h8G-00049f-GT for submit@debbugs.gnu.org; Wed, 14 Aug 2013 15:53:29 -0400 Received: from limerock03.mail.cornell.edu ([128.84.12.34]:42390) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9h8A-00049K-Q0 for 15094@debbugs.gnu.org; Wed, 14 Aug 2013 15:53:23 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r7EJrCFm026702; Wed, 14 Aug 2013 15:53:13 -0400 Received: from [128.84.234.244] (dhcp244.math.cornell.edu [128.84.234.244]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r7EJrCTU003729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 14 Aug 2013 15:53:12 -0400 Message-ID: <520BE015.5080107@cornell.edu> Date: Wed, 14 Aug 2013 15:52:53 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> <8361v8oyv2.fsf@gnu.org> In-Reply-To: <8361v8oyv2.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 8/14/2013 3:29 PM, Eli Zaretskii wrote: > 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? How's this: /* Cygwin allows applications to provide their own malloc. As of cygwin-1.7.24, applications that provide their own malloc are also allowed to provide their own posix_memalign (but not memalign). Calls to memalign are handled by Cygwin's memalign, which always returns ENOSYS if the application has defined its own malloc. So we have to rename memalign in order to make sure that posix_memalign calls Emacs's memalign rather than Cygwin's. */ Ken From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 22:46:22 2013 Received: (at 15094) by debbugs.gnu.org; 15 Aug 2013 02:46:22 +0000 Received: from localhost ([127.0.0.1]:59300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9nZt-000796-Ig for submit@debbugs.gnu.org; Wed, 14 Aug 2013 22:46:21 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:39879) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9nZq-00078m-Sl for 15094@debbugs.gnu.org; Wed, 14 Aug 2013 22:46:19 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MRJ00D00WPQ8200@a-mtaout22.012.net.il> for 15094@debbugs.gnu.org; Thu, 15 Aug 2013 05:46:13 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRJ00CPZX10ZS60@a-mtaout22.012.net.il>; Thu, 15 Aug 2013 05:46:13 +0300 (IDT) Date: Thu, 15 Aug 2013 05:46:42 +0300 From: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin In-reply-to: <520BE015.5080107@cornell.edu> X-012-Sender: halo1@inter.net.il To: Ken Brown Message-id: <831u5vpt65.fsf@gnu.org> References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> <8361v8oyv2.fsf@gnu.org> <520BE015.5080107@cornell.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 14 Aug 2013 15:52:53 -0400 > From: Ken Brown > CC: 15094@debbugs.gnu.org > > /* Cygwin allows applications to provide their own malloc. As of > cygwin-1.7.24, applications that provide their own malloc are also > allowed to provide their own posix_memalign (but not memalign). Calls > to memalign are handled by Cygwin's memalign, which always returns > ENOSYS if the application has defined its own malloc. So we have to > rename memalign in order to make sure that posix_memalign calls > Emacs's memalign rather than Cygwin's. */ How does Cygwin memalign come into play, when Emacs provides its own? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 07:52:04 2013 Received: (at 15094) by debbugs.gnu.org; 15 Aug 2013 11:52:04 +0000 Received: from localhost ([127.0.0.1]:59976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9w5z-0007wX-Q1 for submit@debbugs.gnu.org; Thu, 15 Aug 2013 07:52:04 -0400 Received: from limerock01.mail.cornell.edu ([128.84.12.99]:49416) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9w5y-0007vx-8B for 15094@debbugs.gnu.org; Thu, 15 Aug 2013 07:52:02 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r7FBpt0I005996; Thu, 15 Aug 2013 07:51:56 -0400 Received: from [192.168.1.5] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r7FBpsMe018163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Aug 2013 07:51:55 -0400 Message-ID: <520CC0C8.2000805@cornell.edu> Date: Thu, 15 Aug 2013 07:51:36 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> <8361v8oyv2.fsf@gnu.org> <520BE015.5080107@cornell.edu> <831u5vpt65.fsf@gnu.org> In-Reply-To: <831u5vpt65.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 8/14/2013 10:46 PM, Eli Zaretskii wrote: >> Date: Wed, 14 Aug 2013 15:52:53 -0400 >> From: Ken Brown >> CC: 15094@debbugs.gnu.org >> >> /* Cygwin allows applications to provide their own malloc. As of >> cygwin-1.7.24, applications that provide their own malloc are also >> allowed to provide their own posix_memalign (but not memalign). Calls >> to memalign are handled by Cygwin's memalign, which always returns >> ENOSYS if the application has defined its own malloc. So we have to >> rename memalign in order to make sure that posix_memalign calls >> Emacs's memalign rather than Cygwin's. */ > > How does Cygwin memalign come into play, when Emacs provides its own? As I said in the comment, Cygwin does not let applications define their own memalign. During linking, calls to memalign become calls to Cygwin's memalign. Ken From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 09:00:40 2013 Received: (at 15094) by debbugs.gnu.org; 15 Aug 2013 13:00:41 +0000 Received: from localhost ([127.0.0.1]:60121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9xAL-0001ga-7A for submit@debbugs.gnu.org; Thu, 15 Aug 2013 09:00:38 -0400 Received: from limerock01.mail.cornell.edu ([128.84.12.99]:58817) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V9xAI-0001gM-8r for 15094@debbugs.gnu.org; Thu, 15 Aug 2013 09:00:35 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r7FD0OlI018653; Thu, 15 Aug 2013 09:00:28 -0400 Received: from [192.168.1.5] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r7FD0N1b028248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Aug 2013 09:00:24 -0400 Message-ID: <520CD0D6.6060200@cornell.edu> Date: Thu, 15 Aug 2013 09:00:06 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> <8361v8oyv2.fsf@gnu.org> <520BE015.5080107@cornell.edu> <831u5vpt65.fsf@gnu.org> <520CC0C8.2000805@cornell.edu> In-Reply-To: <520CC0C8.2000805@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 8/15/2013 7:51 AM, Ken Brown wrote: > On 8/14/2013 10:46 PM, Eli Zaretskii wrote: >>> Date: Wed, 14 Aug 2013 15:52:53 -0400 >>> From: Ken Brown >>> CC: 15094@debbugs.gnu.org >>> >>> /* Cygwin allows applications to provide their own malloc. As of >>> cygwin-1.7.24, applications that provide their own malloc are also >>> allowed to provide their own posix_memalign (but not memalign). Calls >>> to memalign are handled by Cygwin's memalign, which always returns >>> ENOSYS if the application has defined its own malloc. So we have to >>> rename memalign in order to make sure that posix_memalign calls >>> Emacs's memalign rather than Cygwin's. */ >> >> How does Cygwin memalign come into play, when Emacs provides its own? > > As I said in the comment, Cygwin does not let applications define their > own memalign. During linking, calls to memalign become calls to > Cygwin's memalign. Hold on...I think I'm missing something obvious. I have to recheck this. Ken From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 12:15:58 2013 Received: (at 15094) by debbugs.gnu.org; 15 Aug 2013 16:15:58 +0000 Received: from localhost ([127.0.0.1]:60687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VA0DN-0000Ei-P6 for submit@debbugs.gnu.org; Thu, 15 Aug 2013 12:15:58 -0400 Received: from limerock04.mail.cornell.edu ([128.84.12.60]:42122) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VA0DK-0000EQ-St for 15094@debbugs.gnu.org; Thu, 15 Aug 2013 12:15:55 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r7FGFnCA019176; Thu, 15 Aug 2013 12:15:49 -0400 Received: from [128.84.234.244] (dhcp244.math.cornell.edu [128.84.234.244]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r7FGFm6B000951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Aug 2013 12:15:48 -0400 Message-ID: <520CFEB5.1000206@cornell.edu> Date: Thu, 15 Aug 2013 12:15:49 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> <8361v8oyv2.fsf@gnu.org> <520BE015.5080107@cornell.edu> <831u5vpt65.fsf@gnu.org> <520CC0C8.2000805@cornell.edu> <520CD0D6.6060200@cornell.edu> In-Reply-To: <520CD0D6.6060200@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) On 8/15/2013 9:00 AM, Ken Brown wrote: > On 8/15/2013 7:51 AM, Ken Brown wrote: >> On 8/14/2013 10:46 PM, Eli Zaretskii wrote: >>>> Date: Wed, 14 Aug 2013 15:52:53 -0400 >>>> From: Ken Brown >>>> CC: 15094@debbugs.gnu.org >>>> >>>> /* Cygwin allows applications to provide their own malloc. As of >>>> cygwin-1.7.24, applications that provide their own malloc are also >>>> allowed to provide their own posix_memalign (but not memalign). Calls >>>> to memalign are handled by Cygwin's memalign, which always returns >>>> ENOSYS if the application has defined its own malloc. So we have to >>>> rename memalign in order to make sure that posix_memalign calls >>>> Emacs's memalign rather than Cygwin's. */ >>> >>> How does Cygwin memalign come into play, when Emacs provides its own? >> >> As I said in the comment, Cygwin does not let applications define their >> own memalign. During linking, calls to memalign become calls to >> Cygwin's memalign. > > Hold on...I think I'm missing something obvious. I have to recheck this. Thanks for pressing me on this, Eli. I did of course miss the obvious fact that posix_memalign in gmalloc.c will use memalign as defined in the same file. I'll revert the change. I'll also use the opportunity to update some comments elsewhere in the code. Sorry for the noise. Ken From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 12:39:21 2013 Received: (at 15094) by debbugs.gnu.org; 15 Aug 2013 16:39:21 +0000 Received: from localhost ([127.0.0.1]:60737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VA0a1-0000xH-0t for submit@debbugs.gnu.org; Thu, 15 Aug 2013 12:39:21 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:46724) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VA0Zx-0000wx-14 for 15094@debbugs.gnu.org; Thu, 15 Aug 2013 12:39:18 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MRK00900ZG71M00@a-mtaout21.012.net.il> for 15094@debbugs.gnu.org; Thu, 15 Aug 2013 19:39:10 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRK009WUZL91H10@a-mtaout21.012.net.il>; Thu, 15 Aug 2013 19:39:09 +0300 (IDT) Date: Thu, 15 Aug 2013 19:39:40 +0300 From: Eli Zaretskii Subject: Re: bug#15094: Fix for posix_memalign on Cygwin In-reply-to: <520CFEB5.1000206@cornell.edu> X-012-Sender: halo1@inter.net.il To: Ken Brown Message-id: <83mwoioqlv.fsf@gnu.org> References: <520BAEBA.1030306@cornell.edu> <520BD64D.2000906@cornell.edu> <8361v8oyv2.fsf@gnu.org> <520BE015.5080107@cornell.edu> <831u5vpt65.fsf@gnu.org> <520CC0C8.2000805@cornell.edu> <520CD0D6.6060200@cornell.edu> <520CFEB5.1000206@cornell.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15094 Cc: 15094@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 15 Aug 2013 12:15:49 -0400 > From: Ken Brown > CC: 15094@debbugs.gnu.org > > Thanks for pressing me on this, Eli. I did of course miss the obvious > fact that posix_memalign in gmalloc.c will use memalign as defined in > the same file. I'll revert the change. I'll also use the opportunity > to update some comments elsewhere in the code. Thanks. > Sorry for the noise. No need to apologize: no harm was done. From unknown Fri Sep 05 15:37:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 Sep 2013 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator