From dd648be95a997cf5ac78cf72db96bc1416c900f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Sat, 28 Jan 2012 16:56:58 +0200
Subject: [PATCH] Define WIN32_LEAN_AND_MEAN in config.h rather than
 vlc_common.h

---
 configure.ac         | 1 +
 include/vlc_common.h | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index dc11ac033937..4e8792a23121 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,7 @@ AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
 AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.])
 AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
 AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
+AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
 
 AM_PROG_CC_C_O
 AC_PROG_CXX
diff --git a/include/vlc_common.h b/include/vlc_common.h
index ac4b713b7576..545b1cd08b3a 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -449,9 +449,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
  * OS-specific headers and thread types
  *****************************************************************************/
 #if defined( WIN32 ) || defined( UNDER_CE )
-/* WIN32_LEAN_AND_MEAN is needed to be able to include winsock2.h because else,
- * windows.h will also include winsock.h and declarations will conflict */
-# define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 #endif
 
-- 
GitLab