[Spice-devel] messages.h unable to be used in VC++
bjvetter at gmail.com
Tue Apr 17 10:41:08 PDT 2012
Not sure if this applies since I'm looking at the spice-gtk 0.11 source, but the generated_demarshallers.c code includes a function parse_SpiceMsgEmpty. Within it it uses "sizeof(SpiceMsgEmpty)" and some pointer/allocator math for demarshalling a SpiceEmptyMsg. I'm no expert here, but I would think that might cause an issue for the wire protocol.
On Apr 17, 2012, at 12:10 PM, spice-devel-request at lists.freedesktop.org wrote:
> On Tue, Apr 17, 2012 at 08:15:22AM -0500, Aric Stewart wrote:
>> Hello all,
>> Working away at making the current tip of spice build the win32 client. I
>> have run into another problem.
>> Since the last working win32 cllient build the code generated by
>> spice_codegen.py has shifted from CPP files to C files. The generated files
>> include messages.h.
>> Inside messages.h there is a structure SpiceMsgEmpty which is empty. Empty
>> structures in C have 0 bytes and are not defined in the spec. VC++ treats
>> this as a hard error (C2015) and so refuses to compile the code. gcc does
>> not treat this as an error, so mingw and gcc builds have not noticed this.
>> How do we want to handle this.
>> We could put a single padding member in that structure that would allow
>> the compile to work, but it would make the structure size expand to a byte
>> and have an unused member.
> Looks like this should just work. Maybe you could try this?
>> If I have the VC++ build path continue to generate cpp files instead of C
>> files then there are issues with the bindings defined in
>> client_demarshallers.h and the SPICE_BEGIN_DECLS lines will have to be
>> #ifdefed out for win32.
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Spice-devel