[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] poll: undef NOGDI
From: |
Marat Radchenko |
Subject: |
[PATCH] poll: undef NOGDI |
Date: |
Thu, 18 Sep 2014 16:53:37 +0400 |
On MinGW-W64, MsgWaitForMultipleObjects is guarded with #ifndef NOGDI.
-DNOGDI=1 prevents inclusion of tons of Windows headers, especially
wingdi.h with weird #define ERROR 0 that has high chances to conflict
with internal software defines. So, just #undef NOGDI.
MinGW-W64 bug: http://sourceforge.net/p/mingw-w64/bugs/397/
When it is fixed, this commit can be reverted.
Signed-off-by: Marat Radchenko <address@hidden>
---
This issue was encountered during adoption [1] of git for MinGW-W64.
Possibly there is a better workaround I'm unaware of.
Please, use 'reply to all', I'm not subscribed to gnulib ML.
[1]: http://www.spinics.net/lists/git/msg230028.html
lib/poll.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/poll.c b/lib/poll.c
index a3e0ab7..a7e068a 100644
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -36,6 +36,7 @@
#include <assert.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# undef NOGDI
# define WINDOWS_NATIVE
# include <winsock2.h>
# include <windows.h>
--
2.1.0
- [PATCH] poll: undef NOGDI,
Marat Radchenko <=