git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: git@vger.kernel.org
Cc: ramsay@ramsay1.demon.co.uk, tboegi@web.de
Subject: [PATCH RFC] CYGWIN: avoid implicit declaration warning
Date: Sun, 23 Nov 2014 15:16:06 +0100	[thread overview]
Message-ID: <5471EC26.3040705@web.de> (raw)

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
 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
-- 
1.9.1.dirty

             reply	other threads:[~2014-11-23 14:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23 14:16 Torsten Bögershausen [this message]
2014-11-23 17:12 ` [PATCH RFC] CYGWIN: avoid implicit declaration warning 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

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=5471EC26.3040705@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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 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 NNTP newsgroup(s).