Huw Davies : include: Add the ability to initialize oledb constants independently of the INITGUID define by defining DBINITCONSTANTS instead .

Alexandre Julliard julliard at winehq.org
Mon Jan 18 10:58:53 CST 2010


Module: wine
Branch: master
Commit: 10f6d5c1fa7ec140a2e5cf4a46d3b61f289d8a7a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=10f6d5c1fa7ec140a2e5cf4a46d3b61f289d8a7a

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Jan 15 16:28:37 2010 +0000

include: Add the ability to initialize oledb constants independently of the INITGUID define by defining DBINITCONSTANTS instead.

---

 include/dbs.idl |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/include/dbs.idl b/include/dbs.idl
index a2ed656..8ca2e2a 100644
--- a/include/dbs.idl
+++ b/include/dbs.idl
@@ -183,10 +183,27 @@ enum DBSTATUSENUM
     DBSTATUS_S_DEFAULT = 13
 };
 
-cpp_quote("DEFINE_GUID(DBGUID_SESSION,    0xc8b522f5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
-cpp_quote("DEFINE_GUID(DBGUID_ROWSET,     0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
-cpp_quote("DEFINE_GUID(DBGUID_ROW,        0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
-cpp_quote("DEFINE_GUID(DBGUID_STREAM,     0xc8b522f9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
+cpp_quote("#ifdef DBINITCONSTANTS")
+cpp_quote("#ifdef __cplusplus")
+cpp_quote("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\")
+cpp_quote("        EXTERN_C const GUID name DECLSPEC_HIDDEN;     \\")
+cpp_quote("        EXTERN_C const GUID name =                    \\")
+cpp_quote("	{ l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }")
+cpp_quote("#else")
+cpp_quote("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\")
+cpp_quote("        const GUID name DECLSPEC_HIDDEN;      \\")
+cpp_quote("        const GUID name =                             \\")
+cpp_quote("	{ l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }")
+cpp_quote("#endif")
+cpp_quote("#else")
+cpp_quote("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\")
+cpp_quote("    EXTERN_C const GUID name DECLSPEC_HIDDEN")
+cpp_quote("#endif")
+
+cpp_quote("DEFINE_DBGUID(DBGUID_SESSION,    0xc8b522f5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
+cpp_quote("DEFINE_DBGUID(DBGUID_ROWSET,     0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
+cpp_quote("DEFINE_DBGUID(DBGUID_ROW,        0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
+cpp_quote("DEFINE_DBGUID(DBGUID_STREAM,     0xc8b522f9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
 
 typedef struct tagDBCOLUMNACCESS
 {




More information about the wine-cvs mailing list