[vlc-commits] Fix build with mingw-w64
Rafaël Carré
git at videolan.org
Sun Nov 20 18:12:30 CET 2011
npapi-vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Nov 20 11:47:30 2011 -0500| [2ba937ee8cbbefe55501f534554d1dc6cd3eeed3] | committer: Rafaël Carré
Fix build with mingw-w64
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=2ba937ee8cbbefe55501f534554d1dc6cd3eeed3
---
activex/connectioncontainer.cpp | 11 +++++------
activex/main.cpp | 26 ++++++++------------------
2 files changed, 13 insertions(+), 24 deletions(-)
diff --git a/activex/connectioncontainer.cpp b/activex/connectioncontainer.cpp
index a7e6918..15f3e0a 100644
--- a/activex/connectioncontainer.cpp
+++ b/activex/connectioncontainer.cpp
@@ -30,18 +30,17 @@
#include <assert.h>
#include <rpc.h>
#include <rpcndr.h>
+#include <objidl.h>
using namespace std;
#ifdef __MINGW32__
-////////////////////////////////////////////////////////////////////////////////////////////////
-DEFINE_GUID(IID_IGlobalInterfaceTable, 0x00000146, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
-DEFINE_GUID(CLSID_StdGlobalInterfaceTable, 0x00000323, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
-
+# include <_mingw.h>
+# if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64_VERSION_MAJOR)
const GUID IID_IGlobalInterfaceTable = { 0x00000146, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46} };
+# endif /* __MINGW32_MAJOR_VERSION && !__MINGW64_VERSION_MAJOR */
const CLSID CLSID_StdGlobalInterfaceTable = { 0x00000323, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46} };
-////////////////////////////////////////////////////////////////////////////////////////////////
-#endif
+#endif /* __MINGW32__ */
/* this function object is used to return the value from a map pair */
struct VLCEnumConnectionsDereference
diff --git a/activex/main.cpp b/activex/main.cpp
index dd309cd..30344ae 100644
--- a/activex/main.cpp
+++ b/activex/main.cpp
@@ -31,32 +31,22 @@
#include <tchar.h>
-#ifdef __MINGW32__
-#include <_mingw.h>
-#endif
-
#include <objsafe.h>
-#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64_VERSION_MAJOR)
-/*
-** Widl generated code requires guiddef.h,
-** which is not available under MinGW32
-*/
-#undef GUID_EXT
-#define GUID_EXT
-#include <initguid.h>
-
-/*
-** Mingw32 do not declare those
-*/
-/* CATID_InternetAware is declared as extern but not present in library */
+#ifdef __MINGW32__
+# include <_mingw.h>
+# if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64_VERSION_MAJOR)
+# undef GUID_EXT
+# define GUID_EXT
+# include <initguid.h>
DEFINE_GUID(CATID_InternetAware, \
0x0DE86A58, 0x2BAA, 0x11CF, 0xA2, 0x29, 0x00,0xAA,0x00,0x3D,0x73,0x52);
DEFINE_GUID(CATID_SafeForInitializing, \
0x7DD95802, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
DEFINE_GUID(CATID_SafeForScripting, \
0x7DD95801, 0x9882, 0x11CF, 0x9F, 0xA9, 0x00,0xAA,0x00,0x6C,0x42,0xC4);
-#endif
+# endif /* __MINGW32_MAJOR_VERSION && !__MINGW64_VERSION_MAJOR */
+#endif /* __MINGW32__ */
using namespace std;
More information about the vlc-commits
mailing list