summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2014-03-13 12:16:15 +1100
committerwm4 <wm4@nowhere>2014-03-30 17:47:44 +0200
commit33e00746031beba4e306cbdf0d17083abecffacd (patch)
treec3ba17cfa460c3e829791f5c3b0cefcc2c1f3b6d
parentb6ed94fa7cb03350e73509edd3debe41c2309c6d (diff)
downloadmpv-33e00746031beba4e306cbdf0d17083abecffacd.tar.bz2
mpv-33e00746031beba4e306cbdf0d17083abecffacd.tar.xz
player/main: Fix Cygwin build
Xlib.h (included from x11_common.h) defines a macro 'Status' as 'int'. This messed up a bunch of definitions in windows.h and broke the build in Cygwin. Including windows.h first seems to solve the problem. This commit also removes the definition of an unused flag. Conflicts: player/main.c
-rw-r--r--player/main.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/player/main.c b/player/main.c
index 4c27ec3e19..50cde63e1d 100644
--- a/player/main.c
+++ b/player/main.c
@@ -64,6 +64,14 @@
#include "command.h"
#include "screenshot.h"
+#if defined(__MINGW32__) || defined(__CYGWIN__)
+#include <windows.h>
+
+#ifndef BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE
+#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE (0x0001)
+#endif
+#endif
+
#if HAVE_X11
#include "video/out/x11_common.h"
#endif
@@ -76,18 +84,6 @@
#include <pthread.h>
#endif
-#if defined(__MINGW32__) || defined(__CYGWIN__)
-#include <windows.h>
-
-#ifndef BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE
-#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE (0x0001)
-#endif
-
-#ifndef BASE_SEARCH_PATH_PERMANENT
-#define BASE_SEARCH_PATH_PERMANENT (0x8000)
-#endif
-#endif
-
const char mp_help_text[] =
"Usage: mpv [options] [url|path/]filename\n"
"\n"