msvc: Fix compilation errors due to header include order.
authorMatthew Oliver <protogonoi@gmail.com>
Thu, 27 Nov 2014 08:00:36 +0000 (19:00 +1100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 27 Nov 2014 11:40:18 +0000 (12:40 +0100)
Ensures that the header include order is such that winsock2.h is always
included before windows.h or that windows.h does not include winsock.h.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/dshow_capture.h
libavdevice/opengl_enc.c
libavformat/matroskadec.c
libavutil/atomic_win32.h

index e4b4dce..0252070 100644 (file)
@@ -27,6 +27,7 @@
 #include "avdevice.h"
 
 #define COBJMACROS
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #define NO_DSHOW_STRSAFE
 #include <dshow.h>
index 5f5b800..434ae97 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 
 #if HAVE_WINDOWS_H
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 #if HAVE_OPENGL_GL3_H
index 3b45c3b..c81b5a0 100644 (file)
 
 #include <inttypes.h>
 #include <stdio.h>
-#if CONFIG_BZLIB
-#include <bzlib.h>
-#endif
-#if CONFIG_ZLIB
-#include <zlib.h>
-#endif
 
 #include "libavutil/avstring.h"
 #include "libavutil/base64.h"
 #include "riff.h"
 #include "rmsipr.h"
 
+#if CONFIG_BZLIB
+#include <bzlib.h>
+#endif
+#if CONFIG_ZLIB
+#include <zlib.h>
+#endif
+
 typedef enum {
     EBML_NONE,
     EBML_UINT,
index 20b99df..f729933 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef AVUTIL_ATOMIC_WIN32_H
 #define AVUTIL_ATOMIC_WIN32_H
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
 #define avpriv_atomic_int_get atomic_int_get_win32