All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Strickroth <sven@cs-ware.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 2/3] mingw.h: Define only if necessary
Date: Thu, 09 May 2013 03:13:00 +0200	[thread overview]
Message-ID: <518AF81C.10302@cs-ware.de> (raw)
In-Reply-To: <518AF79A.5000408@cs-ware.de>

Since the latest version of MSVC EWOULDBLOCK, EAFNOSUPPORT and
ECONNABORTED are defined in errno.h. When used with MSVC mingw.h
is included from msvc.h and causes warnings about redefinitions.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
 compat/mingw.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/compat/mingw.h b/compat/mingw.h
index 685cd2c..c424333 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -32,7 +32,9 @@ typedef int socklen_t;
 #define WEXITSTATUS(x) ((x) & 0xff)
 #define WTERMSIG(x) SIGTERM
 
+#ifndef EWOULDBLOCK
 #define EWOULDBLOCK EAGAIN
+#endif
 #define SHUT_WR SD_SEND
 
 #define SIGHUP 1
@@ -46,8 +48,12 @@ typedef int socklen_t;
 #define F_SETFD 2
 #define FD_CLOEXEC 0x1
 
+#ifndef EAFNOSUPPORT
 #define EAFNOSUPPORT WSAEAFNOSUPPORT
+#endif
+#ifndef ECONNABORTED
 #define ECONNABORTED WSAECONNABORTED
+#endif
 
 struct passwd {
 	char *pw_name;
-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

  parent reply	other threads:[~2013-05-09  1:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09  1:10 [PATCH 0/3] MSVC fixes Sven Strickroth
2013-05-09  1:12 ` [PATCH 1/3] poll.h lies in the same folder, so use normal quotes for include Sven Strickroth
2013-05-09  1:31   ` Sven Strickroth
2013-05-09  1:13 ` Sven Strickroth [this message]
2013-05-09  1:13 ` [PATCH 3/3] Initialize variables with values Sven Strickroth
2013-05-09 12:40   ` Krzysztof Mazur
2013-05-09 13:21   ` Jonathan Nieder
2013-05-09 13:49     ` Sven Strickroth
2013-05-09 14:32     ` René Scharfe

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=518AF81C.10302@cs-ware.de \
    --to=sven@cs-ware.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.