MSVC: fix compile errors due to macro redefinitions
authorKarsten Blees <karsten.blees@gmail.com>
Tue, 10 Sep 2013 23:22:34 +0000 (01:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Sep 2013 18:08:52 +0000 (11:08 -0700)
Skip errno.h definitions if they are already defined.

Signed-off-by: Karsten Blees <blees@dcon.de>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.h
index bd0a88bc1d19583b7dfed36fd8f7a7af7f386296..6b531e4013cb5bc3cd62a9fceba3415f5d67ae2b 100644 (file)
@@ -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;