From: Eli Zaretskii <eliz@gnu.org>
To: Ken Brown <kbrown@cornell.edu>
Cc: 18366@debbugs.gnu.org
Subject: bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build
Date: Sat, 30 Aug 2014 22:15:38 +0300 [thread overview]
Message-ID: <83fvgdhjqd.fsf@gnu.org> (raw)
In-Reply-To: <540214E3.4060208@cornell.edu>
> Date: Sat, 30 Aug 2014 14:16:03 -0400
> From: Ken Brown <kbrown@cornell.edu>
>
> 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.
next prev parent reply other threads:[~2014-08-30 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-30 18:16 bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build Ken Brown
2014-08-30 19:15 ` Eli Zaretskii [this message]
2014-08-30 19:49 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83fvgdhjqd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=18366@debbugs.gnu.org \
--cc=kbrown@cornell.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).