git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] MSVC: fix compile errors due to macro redefinitions

From
Karsten Blees <karsten.blees@gmail.com>
Date
Sep 10, 2013, 23:22 UTC
Message-ID
<522FA9BA.6020303@gmail.com>
In-Reply-To
<522FA959.80108@gmail.com>
Skip errno.h definitions if they are already defined.
Signed-off-by: Karsten Blees <blees@dcon.de>
---
 compat/mingw.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/compat/mingw.h b/compat/mingw.h
index bd0a88b..6b531e4 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;
-- 
1.8.4.8243.gbcbdefd
Previous: Karsten BleesNext: Karsten Blees
Message 3 of 9 in “Fix MSVC compile errors and cleanup stat definitions”
  1. 0/3 Fix MSVC compile errors and cleanup stat definitionsKarsten Blees, Sep 10, 2013
  2. 1/3 MSVC: fix compile errors due to missing libintl.hKarsten Blees, Sep 10, 2013
  3. 2/3 MSVC: fix compile errors due to macro redefinitionsKarsten Blees, Sep 10, 2013
  4. 3/3 MSVC: fix stat definition hellKarsten Blees, Sep 10, 2013
  5. Eric SunshineSep 11, 2013
  6. Sebastian SchuberthSep 11, 2013
  7. Junio C HamanoSep 11, 2013
  8. Sebastian SchuberthSep 11, 2013
  9. Junio C HamanoSep 11, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.