All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: "Jonathan Nieder" <jrnieder@gmail.com>,
	"Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH RFC] CYGWIN: avoid implicit declaration warning
Date: Mon, 24 Nov 2014 21:41:22 +0000	[thread overview]
Message-ID: <5473A602.30505@ramsay1.demon.co.uk> (raw)
In-Reply-To: <20141124175947.GN6527@google.com>

On 24/11/14 17:59, Jonathan Nieder wrote:
> Torsten Bögershausen wrote:
> 
>> gcc under cygwin reports several warnings like this:
>>
>>  warning: implicit declaration of function 'memmem'
>>   [-Wimplicit-function-declaration]
>>
>> This has been observed under CYGWIN-32 with GCC 4.7.3 as well
>> as CYGWIN-64 with gcc v4.8.3-5 x86-64
>>
>> Do not #define _XOPEN_SOURCE 600 for CYGWIN.
>>
>> Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
>> ---
>> This may be a start for a patch, tested under CYGWIN-32,
>> both Windows7 and XP
> 
> The "tested under" part would also be a good addition to the commit
> message.
> 
>>  git-compat-util.h | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Patch looks good to me.  Do you know if this has been reported to the
> Cygwin maintainers?

As I said in an earlier email, I have searched the cygwin mailing list
(a few days ago now), but this issue had not been mentioned (modulo my
poor list searching fu!).

However, since I don't want to subscribe to (yet another) busy mailing
list, I won't be reporting this issue there. (If someone on this list
is already subscribed to that list, then ... ;-) ).

>                       The behavior seems counterintuitive --- I would
> expect _GNU_SOURCE to override everything else (since I thought that
> was the point of _GNU_SOURCE).

I had that impression too, but I need to read some more first.

Also, my theory about the cause of the problem has changed slightly
this evening, after booting up my old laptop and looking at an old
32-bit cygwin installation.

Rather than a change to '..../sys/cdefs.h' which changed the priority
of _XOPEN_SOURCE, it seems that it was the <string.h> header that
changed; those functions used to be declared unconditionally, whereas
the new headers have them within preprocessor conditionals.

ATB,
Ramsay Jones

      parent reply	other threads:[~2014-11-24 21:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23 14:16 [PATCH RFC] CYGWIN: avoid implicit declaration warning Torsten Bögershausen
2014-11-23 17:12 ` Ramsay Jones
2014-11-23 18:53   ` Junio C Hamano
2014-11-23 23:15     ` Ramsay Jones
2014-11-24  7:20       ` Torsten Bögershausen
2014-11-24 16:00         ` Torsten Bögershausen
2014-11-24 18:29           ` [PATCH] t5000 on Windows: do not mistake "sh.exe" as "sh" Johannes Sixt
2014-11-24 20:02             ` Torsten Bögershausen
2014-11-24 21:27         ` [PATCH RFC] CYGWIN: avoid implicit declaration warning Ramsay Jones
2014-11-24 21:44           ` Junio C Hamano
2014-11-24 22:59             ` Ramsay Jones
2014-11-24 22:27       ` Ramsay Jones
2014-11-24 22:50         ` Junio C Hamano
2014-11-24 23:04           ` Ramsay Jones
2014-11-24 17:59 ` Jonathan Nieder
2014-11-24 19:17   ` Torsten Bögershausen
2014-11-24 21:41   ` Ramsay Jones [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5473A602.30505@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tboegi@web.de \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.