[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build
From: |
Ken Brown |
Subject: |
bug#18366: 24.3.93; Definition of strnicmp needed for Cygwin-w32 build |
Date: |
Sat, 30 Aug 2014 15:49:25 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
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 <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?
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