From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 30 14:16:40 2014 Received: (at submit) by debbugs.gnu.org; 30 Aug 2014 18:16:40 +0000 Received: from localhost ([127.0.0.1]:54614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNnCZ-00019a-Jo for submit@debbugs.gnu.org; Sat, 30 Aug 2014 14:16:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55891) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNnCX-00019C-8G for submit@debbugs.gnu.org; Sat, 30 Aug 2014 14:16:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNnCI-0007U6-04 for submit@debbugs.gnu.org; Sat, 30 Aug 2014 14:16:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNnCH-0007U2-Tj for submit@debbugs.gnu.org; Sat, 30 Aug 2014 14:16:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNnCA-0003d2-EX for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 14:16:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNnC2-0007RR-SR for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 14:16:14 -0400 Received: from limerock04.mail.cornell.edu ([128.84.13.244]:52632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNnC2-0007RN-P1 for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 14:16:06 -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 s7UIG5Ya009476 for ; Sat, 30 Aug 2014 14:16:06 -0400 Received: from [192.168.1.4] (cpe-67-249-176-226.twcny.res.rr.com [67.249.176.226]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s7UIG4A1031012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sat, 30 Aug 2014 14:16:05 -0400 Message-ID: <540214E3.4060208@cornell.edu> Date: Sat, 30 Aug 2014 14:16:03 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: -4.3 (----) 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: -4.3 (----) Cygwin's /usr/include/string.h, which comes from newlib, contains a definition of strnicmp; this is needed for the Cygwin-w32 build. That definition has recently been dropped from newlib, and so it will be gone in the next Cygwin release. The following patch fixes the problem. Is it OK for the release branch? === modified file 'src/cygw32.h' --- src/cygw32.h 2014-01-01 07:43:34 +0000 +++ src/cygw32.h 2014-08-30 17:51:36 +0000 @@ -33,6 +33,11 @@ #include "lisp.h" #include "coding.h" +/* The following was in /usr/include/string.h prior to Cygwin 1.7.33. */ +#ifndef strnicmp +#define strnicmp strncasecmp +#endif + extern void syms_of_cygw32 (void); extern char * w32_strerror (int error_no); === modified file 'src/w32font.c' --- src/w32font.c 2014-01-19 15:42:48 +0000 +++ src/w32font.c 2014-08-30 17:47:35 +0000 @@ -35,6 +35,8 @@ #include "w32font.h" #ifdef WINDOWSNT #include "w32.h" +#else /* CYGWIN */ +#include "cygw32.h" #endif /* Cleartype available on Windows XP, cleartype_natural from XP SP1. === modified file 'src/w32reg.c' --- src/w32reg.c 2014-01-01 07:43:34 +0000 +++ src/w32reg.c 2014-08-30 17:47:35 +0000 @@ -26,6 +26,10 @@ #include +#ifdef CYGWIN +#include "cygw32.h" +#endif + #define REG_ROOT "SOFTWARE\\GNU\\Emacs" /* Default system colors from the Display Control Panel settings. */ From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 30 15:15:48 2014 Received: (at 18366) by debbugs.gnu.org; 30 Aug 2014 19:15:48 +0000 Received: from localhost ([127.0.0.1]:54621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNo7n-0002dF-Gz for submit@debbugs.gnu.org; Sat, 30 Aug 2014 15:15:48 -0400 Received: from mtaout27.012.net.il ([80.179.55.183]:58376) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNo7i-0002cy-Es for 18366@debbugs.gnu.org; Sat, 30 Aug 2014 15:15:44 -0400 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NB400A00VRY5100@mtaout27.012.net.il> for 18366@debbugs.gnu.org; Sat, 30 Aug 2014 22:10:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NB4005RRVWWK140@mtaout27.012.net.il>; Sat, 30 Aug 2014 22:10:09 +0300 (IDT) Date: Sat, 30 Aug 2014 22:15:38 +0300 From: Eli Zaretskii Subject: Re: bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build In-reply-to: <540214E3.4060208@cornell.edu> X-012-Sender: halo1@inter.net.il To: Ken Brown Message-id: <83fvgdhjqd.fsf@gnu.org> References: <540214E3.4060208@cornell.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18366 Cc: 18366@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: Sat, 30 Aug 2014 14:16:03 -0400 > From: Ken Brown > > Cygwin's /usr/include/string.h, which comes from newlib, contains a > definition of strnicmp; this is needed for the Cygwin-w32 build. That > definition has recently been dropped from newlib Why did they do such a thing? > --- src/cygw32.h 2014-01-01 07:43:34 +0000 > +++ src/cygw32.h 2014-08-30 17:51:36 +0000 > @@ -33,6 +33,11 @@ > #include "lisp.h" > #include "coding.h" > > +/* The following was in /usr/include/string.h prior to Cygwin 1.7.33. */ > +#ifndef strnicmp > +#define strnicmp strncasecmp > +#endif The proper place for this kind of thing is src/conf_post.h, which will also make sure you won't need to include cygw32.h in every file that uses that function. (You'd probably need to condition this on HAVE_NTGUI in addition to __CYGWIN__.) I'd also suggest to consider whether to make this a macro or an inline function, and perhaps also condition that on the Cygwin or newlib's version rather than on #ifndef (what if newlib will add a function by that name?). But this is up to you. > Is it OK for the release branch? Yes, with the above taken care of. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 30 15:49:37 2014 Received: (at 18366-done) by debbugs.gnu.org; 30 Aug 2014 19:49:37 +0000 Received: from localhost ([127.0.0.1]:54630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNoeX-0003Rv-7d for submit@debbugs.gnu.org; Sat, 30 Aug 2014 15:49:37 -0400 Received: from limerock03.mail.cornell.edu ([128.84.13.243]:55903) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNoeU-0003Re-KW for 18366-done@debbugs.gnu.org; Sat, 30 Aug 2014 15:49: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 limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id s7UJnS7n024314; Sat, 30 Aug 2014 15:49:28 -0400 Received: from [192.168.1.4] (cpe-67-249-176-226.twcny.res.rr.com [67.249.176.226]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s7UJnRu3010207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 30 Aug 2014 15:49:28 -0400 Message-ID: <54022AC5.4080106@cornell.edu> Date: Sat, 30 Aug 2014 15:49:25 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build References: <540214E3.4060208@cornell.edu> <83fvgdhjqd.fsf@gnu.org> In-Reply-To: <83fvgdhjqd.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18366-done Cc: 18366-done@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.3 (--) Version: 24.3.94 On 8/30/2014 3:15 PM, Eli Zaretskii wrote: >> Date: Sat, 30 Aug 2014 14:16:03 -0400 >> From: Ken Brown >> >> Cygwin's /usr/include/string.h, which comes from newlib, contains a >> definition of strnicmp; this is needed for the Cygwin-w32 build. That >> definition has recently been dropped from newlib > > Why did they do such a thing? https://sourceware.org/ml/newlib/2014/msg00309.html > The proper place for this kind of thing is src/conf_post.h, which will > also make sure you won't need to include cygw32.h in every file that > uses that function. (You'd probably need to condition this on > HAVE_NTGUI in addition to __CYGWIN__.) OK. > I'd also suggest to consider whether to make this a macro or an inline > function, and perhaps also condition that on the Cygwin or newlib's > version rather than on #ifndef (what if newlib will add a function by > that name?). But this is up to you. It was added to newlib in 1977 (as a macro), and the discussion in the URL above explains why it has long been obsolete from Cygwin's point of view. So I think I'll leave it as a macro. >> Is it OK for the release branch? > > Yes, with the above taken care of. Thanks. Done, as revision 117467. Ken From unknown Sat Sep 13 04:19:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 28 Sep 2014 11:24:04 +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