[Patch] MSVC fixes for dbus master
thiago at kde.org
Mon Feb 22 23:24:22 PST 2010
Em Terça-feira 23. Fevereiro 2010, às 02.02.53, Romain Pokrzywka
> Please find attached a couple of patches for minor fixes on windows with
> the msvc compiler (VS2008).
> - The first patch fixes compilation errors when the option
> DBUS_USE_OUTPUT_DEBUG_STRING is enabled
> - The second patch is a trivial
> warning fix, a missing return statement
> - The third patch is a little more
> tricky: basically MSVC (as of VS2008) doesn't support exporting global
> variables from a DLL just by using the "extern" keyword, even if the
> variable is exported as DATA in the .def file. What you get then is a
> linker error when trying to access the variable from outside the DLL. In
> what was probably an attempt to work around those linker errors, the
> "DATA" keyword was removed for the variables actually accessed outside
> libdbus-1.dll. However, while this fixes the linker issue, what you're
> accessing in that case is not the variable but some stub which contains
> the actual variable address in memory (iow, pVar instead of *pVar), which
> is bound for erratic behavior and crashes. So the only way to access
> global variables properly is to use the standard dllexport/dllimport
Looks fine too.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the dbus