Author: jgardou
Date: Tue Apr 2 11:52:12 2013
New Revision: 58639
URL:
http://svn.reactos.org/svn/reactos?rev=58639&view=rev
Log:
[PSDK]
* implement DEFINE_GUIDSTRUCT and DEFINE_GUIDNAMED for GCC
Modified:
trunk/reactos/include/ddk/dmusicks.h
trunk/reactos/include/ddk/dmusprop.h
trunk/reactos/include/psdk/kcom.h
trunk/reactos/include/psdk/ks.h
trunk/reactos/include/psdk/ksmedia.h
Modified: trunk/reactos/include/ddk/dmusicks.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/dmusicks.h?rev…
==============================================================================
--- trunk/reactos/include/ddk/dmusicks.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/dmusicks.h [iso-8859-1] Tue Apr 2 11:52:12 2013
@@ -107,7 +107,7 @@
typedef struct IAllocatorMXF *PAllocatorMXF;
#define STATIC_IID_IAllocatorMXF\
- 0xa5f0d62c, 0xb30f, 0x11d2, 0xb7, 0xa3, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1
+ 0xa5f0d62c, 0xb30f, 0x11d2, {0xb7, 0xa3, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1}
DEFINE_GUIDSTRUCT("a5f0d62c-b30f-11d2-b7a3-0060083316c1", IID_IAllocatorMXF);
#define IID_IAllocatorMXF DEFINE_GUIDNAMED(IID_IAllocatorMXF)
Modified: trunk/reactos/include/ddk/dmusprop.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/dmusprop.h?rev…
==============================================================================
--- trunk/reactos/include/ddk/dmusprop.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/dmusprop.h [iso-8859-1] Tue Apr 2 11:52:12 2013
@@ -192,7 +192,7 @@
#define STATIC_KSPROPSETID_SynthClock \
- 0xfedfae26L, 0xe46e, 0x11d1, 0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12
+ 0xfedfae26L, 0xe46e, 0x11d1, {0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12}
DEFINE_GUIDSTRUCT("fedfae26-e46e-11d1-aace-0000f875ac12",
KSPROPSETID_SynthClock);
#define KSPROPSETID_SynthClock DEFINE_GUIDNAMED(KSPROPSETID_SynthClock)
Modified: trunk/reactos/include/psdk/kcom.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/kcom.h?rev=58…
==============================================================================
--- trunk/reactos/include/psdk/kcom.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/kcom.h [iso-8859-1] Tue Apr 2 11:52:12 2013
@@ -29,7 +29,7 @@
extern "C" {
#endif
-#define STATIC_KoCreateObject 0x72CF721CL, 0x525A, 0x11D1, 0x9A, 0xA1, 0x00, 0xA0, 0xC9,
0x22, 0x31, 0x96
+#define STATIC_KoCreateObject 0x72CF721CL, 0x525A, 0x11D1, {0x9A, 0xA1, 0x00, 0xA0, 0xC9,
0x22, 0x31, 0x96}
DEFINE_GUIDSTRUCT("72CF721C-525A-11D1-9AA1-00A0C9223196", KoCreateObject);
#define KOSTRING_CreateObject L"{72CF721C-525A-11D1-9AA1-00A0C9223196}"
Modified: trunk/reactos/include/psdk/ks.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=5863…
==============================================================================
--- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Tue Apr 2 11:52:12 2013
@@ -80,9 +80,27 @@
#endif
#endif
-#if defined(__cplusplus) && _MSC_VER >= 1100
- #define DEFINE_GUIDSTRUCT(guid, name) struct __declspec(uuid(guid)) name
- #define DEFINE_GUIDNAMED(name) __uuidof(struct name)
+#if defined(__cplusplus)
+ #if _MSC_VER >= 1100
+ #define DEFINE_GUIDSTRUCT(guid, name) struct __declspec(uuid(guid)) name
+ #define DEFINE_GUIDNAMED(name) __uuidof(struct name)
+ #else
+ extern "C++" {
+ template<typename T> const GUID &__mingw_uuidof();
+ }
+ #define DEFINE_GUIDSTRUCT(guid, name) \
+ struct __guid ## name; \
+ extern "C++" {
\
+ template<> inline const GUID &__mingw_uuidof<__guid ##
name>() { \
+ static const IID iid = {STATICGUIDOF(name)}; \
+ return iid; \
+ } \
+ template<> inline const GUID &__mingw_uuidof<__guid ## name
*>() { \
+ return __mingw_uuidof<__guid ## name>(); \
+ } \
+ }
+ #define DEFINE_GUIDNAMED(name) __mingw_uuidof<__guid ## name>()
+ #endif
#else
#define DEFINE_GUIDSTRUCT(guid, name) DEFINE_GUIDEX(name)
#define DEFINE_GUIDNAMED(name) name
@@ -93,7 +111,6 @@
0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
DEFINE_GUIDSTRUCT("00000000-0000-0000-0000-000000000000", GUID_NULL);
#define GUID_NULL DEFINE_GUIDNAMED(GUID_NULL)
-
#define STATIC_KSNAME_Filter\
0x9b365890L, 0x165f, 0x11d0, {0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}
Modified: trunk/reactos/include/psdk/ksmedia.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ksmedia.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/ksmedia.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ksmedia.h [iso-8859-1] Tue Apr 2 11:52:12 2013
@@ -646,7 +646,7 @@
} LOOPEDSTREAMING_POSITION_EVENT_DATA, *PLOOPEDSTREAMING_POSITION_EVENT_DATA ;
#define STATIC_KSPROPSETID_DrmAudioStream\
- 0x2f2c8ddd, 0x4198, 0x4fac, 0xba, 0x29, 0x61, 0xbb, 0x5, 0xb7, 0xde, 0x6
+ 0x2f2c8ddd, 0x4198, 0x4fac, {0xba, 0x29, 0x61, 0xbb, 0x5, 0xb7, 0xde, 0x6}
DEFINE_GUIDSTRUCT("2F2C8DDD-4198-4fac-BA29-61BB05B7DE06",
KSPROPSETID_DrmAudioStream);
#define KSPROPSETID_DrmAudioStream DEFINE_GUIDNAMED(KSPROPSETID_DrmAudioStream)
@@ -796,7 +796,7 @@
#define KSDATAFORMAT_SUBTYPE_MIDI_BUS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI_BUS)
#define STATIC_KSAUDFNAME_MIDI\
- 0x185FEDF8L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
+ 0x185FEDF8L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
DEFINE_GUIDSTRUCT("185FEDF8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI);
#define KSAUDFNAME_MIDI DEFINE_GUIDNAMED(KSAUDFNAME_MIDI)