gpg: Fix build on Windows.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 8 Mar 2018 05:08:51 +0000 (14:08 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 8 Mar 2018 05:08:51 +0000 (14:08 +0900)
--

WIN32_LEAN_AND_MEAN is required to avoid definitions of grp1, grp2,
and grp3 in dlgs.h, which is included by windows.h.

Fixes-commit: fd595c9d3642dba437fbe0f6e25d7aaaae095f94
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/gpg.h
g10/misc.c

index 9b8b77c..1bad551 100644 (file)
--- a/g10/gpg.h
+++ b/g10/gpg.h
    correct value and may be of advantage if we ever have to do
    special things. */
 
+#ifdef HAVE_W32_SYSTEM
+# define WIN32_LEAN_AND_MEAN 1
+#endif
+
 #ifdef GPG_ERR_SOURCE_DEFAULT
 #error GPG_ERR_SOURCE_DEFAULT already defined
 #endif
index 77c8f26..9780969 100644 (file)
@@ -42,6 +42,7 @@
 #include <time.h>
 #include <process.h>
 #ifdef HAVE_WINSOCK2_H
+# define WIN32_LEAN_AND_MEAN 1
 # include <winsock2.h>
 #endif
 #include <windows.h>