All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: "Torsten Bögershausen" <tboegi@web.de>, git@vger.kernel.org
Subject: Re: [PATCH RFC] CYGWIN: avoid implicit declaration warning
Date: Sun, 23 Nov 2014 10:53:53 -0800	[thread overview]
Message-ID: <xmqqegstychq.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <5472159B.4060905@ramsay1.demon.co.uk> (Ramsay Jones's message of "Sun, 23 Nov 2014 17:12:59 +0000")

Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> On 23/11/14 14:16, 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
>
> Heh, thanks for looking into this. Your email came at a good time,
> since I was just about to boot my old laptop into windows XP to
> test my patch on 32-bit cygwin! (If I had not been watching the
> F1 Grand Prix on TV, I would already have done so! ;-) ).
>
> It's been a while since I updated my 32-bit cygwin installation
> (about 6 months) but I'm a little surprised you found this issue
> with gcc 4.7.3 (I'm _almost_ tempted to boot that laptop anyway
> just to see what versions of software it is running).

So you have an old installation to check how well the patched
version is accepted by the old set of header files?

>
> Just for the reccord, my patch follows.
>
> ATB,
> Ramsay Jones
>
>> 
>> 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
>>  git-compat-util.h | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/git-compat-util.h b/git-compat-util.h
>> index 400e921..cef2691 100644
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -75,7 +75,8 @@
>>  # endif
>>  #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
>>        !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \
>> -      !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__)
>> +      !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \
>> +      !defined(__CYGWIN__)
>>  #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
>>  #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
>>  #endif
>> 

  reply	other threads:[~2014-11-23 18:54 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 [this message]
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

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=xmqqegstychq.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsay1.demon.co.uk \
    --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.