From 0af4151b05184e1da37abdfc88204a322339ff8a Mon Sep 17 00:00:00 2001 From: faust3 Date: Fri, 30 Apr 2004 16:56:00 +0000 Subject: Make it compile on mingw again. Now it is finally possible to include windows.h in mplayer.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12359 b3059339-0415-0410-9bf9-f77b7e298cf2 --- codec-cfg.h | 2 +- get_path.c | 1 - mencoder.c | 4 ++++ mplayer.c | 6 ++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/codec-cfg.h b/codec-cfg.h index 149cd3f649..f1853c744d 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -27,7 +27,7 @@ #define CODECS_STATUS__MAX 2 -#ifndef GUID_TYPE +#if !defined(GUID_TYPE) && !defined(GUID_DEFINED) #define GUID_TYPE typedef struct { unsigned long f1; diff --git a/get_path.c b/get_path.c index 73b80f2e6e..f27de6cfb1 100644 --- a/get_path.c +++ b/get_path.c @@ -12,7 +12,6 @@ char *get_path(char *filename){ if ((homedir = getenv("HOME")) == NULL) #if defined(__MINGW32__)||defined(__CYGWIN__) /*hack to get fonts etc. loaded outside of cygwin environment*/ { - int __stdcall GetModuleFileNameA(void* hModule,char* lpFilename,int nSize); int i,imax=0; char exedir[260]; GetModuleFileNameA(NULL, exedir, 260); diff --git a/mencoder.c b/mencoder.c index aa6b6e3a39..25b1d7297c 100644 --- a/mencoder.c +++ b/mencoder.c @@ -23,6 +23,10 @@ #ifdef __MINGW32__ #define SIGQUIT 3 #endif +#ifdef WIN32 +#include +#endif + #include #include "config.h" diff --git a/mplayer.c b/mplayer.c index b9f9c60286..88d8b16401 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1,5 +1,9 @@ #include #include +#ifdef WIN32 +#define _UWIN 1 /*disable Non-underscored versions of non-ANSI functions as otherwise int eof would conflict with eof()*/ +#include +#endif #include #include @@ -792,8 +796,6 @@ int gui_no_filename=0; char tmppath[MAX_PATH*2 + 1]; char win32path[MAX_PATH]; char realpath[MAX_PATH]; - int WINAPI SetEnvironmentVariableA(char*,char*); - int WINAPI GetModuleFileNameA(void*,char*,int); #ifdef __CYGWIN__ cygwin_conv_to_full_win32_path(WIN32_PATH,win32path); strcpy(tmppath,win32path); -- cgit v1.2.3