Robert Shearman : include: Make guiddef.h defines match PSDK.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 23 06:11:57 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: bf1fff0890f628cd583659636c8e00d8d1346cd7
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=bf1fff0890f628cd583659636c8e00d8d1346cd7

Author: Robert Shearman <rob at codeweavers.com>
Date:   Mon May 22 22:15:41 2006 +0100

include: Make guiddef.h defines match PSDK.

Protect LPGUID typedef by __LPGUID_DEFINED__ being defined.

Protect LPCLSID and LPFMTID typedefs, IsEqualGUID, IsEqualIID,
IsEqualCLSID, IID_NULL, CLSID_NULL and FMTID_NULL defines by
__IID_DEFINED__ being defined.

---

 include/guiddef.h |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/include/guiddef.h b/include/guiddef.h
index 1cda4f7..96c2b6a 100644
--- a/include/guiddef.h
+++ b/include/guiddef.h
@@ -27,11 +27,6 @@ typedef struct _GUID
 } GUID;
 #endif
 
-#ifndef __LPCGUID_DEFINED__
-#define __LPCGUID_DEFINED__
-typedef const GUID *LPCGUID;
-#endif
-
 #undef DEFINE_GUID
 
 #ifdef INITGUID
@@ -55,13 +50,28 @@ #define DEFINE_OLEGUID(name, l, w1, w2) 
 #ifndef _GUIDDEF_H_
 #define _GUIDDEF_H_
 
+#ifndef __LPGUID_DEFINED__
+#define __LPGUID_DEFINED___
 typedef GUID *LPGUID;
-typedef GUID CLSID,*LPCLSID;
+#endif
+
+#ifndef __LPCGUID_DEFINED__
+#define __LPCGUID_DEFINED__
+typedef const GUID *LPCGUID;
+#endif
+
 #ifndef __IID_DEFINED__
 #define __IID_DEFINED__
+
 typedef GUID IID,*LPIID;
-#endif /* ndef __IID_DEFINED__ */
+typedef GUID CLSID,*LPCLSID;
 typedef GUID FMTID,*LPFMTID;
+#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
+#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
+#define IsEqualFMTID(rfmtid1, rfmtid2) IsEqualGUID(rfmtid1, rfmtid2)
+#define IID_NULL   GUID_NULL
+#define CLSID_NULL GUID_NULL
+#define FMTID_NULL GUID_NULL
 
 #ifdef __midl_proxy
 #define __MIDL_CONST
@@ -69,6 +79,8 @@ #else
 #define __MIDL_CONST const
 #endif
 
+#endif /* ndef __IID_DEFINED__ */
+
 #if defined(__cplusplus) && !defined(CINTERFACE)
 #define REFGUID             const GUID &
 #define REFCLSID            const CLSID &
@@ -86,8 +98,6 @@ #define IsEqualGUID(rguid1, rguid2) (!me
 #else /* defined(__cplusplus) && !defined(CINTERFACE) */
 #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
 #endif /* defined(__cplusplus) && !defined(CINTERFACE) */
-#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
-#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
 
 #if defined(__cplusplus) && !defined(CINTERFACE)
 #include <string.h>
@@ -102,8 +112,5 @@ inline bool operator!=(const GUID& guidO
 #endif
 
 extern const IID GUID_NULL;
-#define IID_NULL            GUID_NULL
-#define CLSID_NULL GUID_NULL
-#define FMTID_NULL          GUID_NULL
 
 #endif /* _GUIDDEF_H_ */




More information about the wine-cvs mailing list