include/guiddef.h: C++ compatibility patch (with MSVC++ support)
Troy Rollo
wine at troy.rollo.name
Thu Sep 1 23:35:16 CDT 2005
The following patch corrects the definition for DEFINE_GUID when INITGUID is
on and the current language is C++. In such a case an initialised variable
declared as "const" is implicitly static unless it is explicitly declared as
also "extern". This patch declares initialised GUIDs as "extern const" so
that they are visible to other compilation units.
This patch differs from the earlier one in that not only does it support GNU C
and C++, but also MSVC and MSVC++ (the latter of which was also not working
previously due to MSVC++ mangling globals).
ChangeLog:
For C++, declare initialised GUIDs to be "extern const" rather than just
"const" to ensure that the initialised GUID is visible to other modules, and
use EXTERN_C rather than just "extern" for the benefit of MSVC++, which
does name mangling on global variables.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: guiddef.diffs
Type: text/x-diff
Size: 771 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050902/537af70c/guiddef.diff
More information about the wine-patches
mailing list