From 67d1d2c7d58d86048b7f1bd7806cd5b31a476ffc Mon Sep 17 00:00:00 2001
From: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
Date: Mon, 21 Mar 2016 11:51:22 -0400
Subject: [PATCH] win32: fix redefine symbol

PJ_SIP defines WIN32_LEAN_AND_MEAN since 3876.
If we not force it to 1, this causes lot of redefinition
warning at build.

Change-Id: If72f0260bf15ce002cd922b875a0e816c6eb3ea2
Tuleap: #487
---
 configure.ac    | 2 +-
 src/winsyslog.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2ce790cb55..5a202d0a32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,7 @@ case "${host_os}" in
     AC_DEFINE([_BSD_SOURCE], [1], [ISO C, POSIX, and 4.3BSD things.])
     AC_DEFINE([_SVID_SOURCE], [1], [ISO C, POSIX, and SVID things.])
 
-    AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
+    AC_DEFINE([WIN32_LEAN_AND_MEAN],[1], [Define to limit the scope of <windows.h>.])
 
     CPPFLAGS+="-D_WIN32_WINNT=0x0601 -DWINVER=0x0601 -D__USE_MINGW_ANSI_STDIO=1"
     LDFLAGS+="-no-undefined -avoid-version -Wl,--nxcompat -Wl,--dynamicbase"
diff --git a/src/winsyslog.h b/src/winsyslog.h
index 514de7dfa5..3696ff335e 100644
--- a/src/winsyslog.h
+++ b/src/winsyslog.h
@@ -13,7 +13,9 @@
 
 #ifndef WINSYSLOG_H
 #define WINSYSLOG_H
-#define WIN32_LEAN_AND_MEAN
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
 #include <windows.h>
 
 #define WINLOG_PRIMASK  0x07
-- 
GitLab