From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build Date: Sat, 30 Aug 2014 22:15:38 +0300 Message-ID: <83fvgdhjqd.fsf@gnu.org> References: <540214E3.4060208@cornell.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1409426187 26950 80.91.229.3 (30 Aug 2014 19:16:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Aug 2014 19:16:27 +0000 (UTC) Cc: 18366@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 30 21:16:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XNo8H-0008C8-TD for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Aug 2014 21:16:18 +0200 Original-Received: from localhost ([::1]:47523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNo8H-00069m-GA for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Aug 2014 15:16:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNo89-00068Q-06 for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 15:16:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNo82-0000l8-LH for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 15:16:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNo82-0000ks-IG for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 15:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XNo81-0002dj-Vv for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 15:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Aug 2014 19:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18366 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18366-submit@debbugs.gnu.org id=B18366.140942614810126 (code B ref 18366); Sat, 30 Aug 2014 19:16:01 +0000 Original-Received: (at 18366) by debbugs.gnu.org; 30 Aug 2014 19:15:48 +0000 Original-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 Original-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 Original-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) Original-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) In-reply-to: <540214E3.4060208@cornell.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92879 Archived-At: > 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.