[Spice-devel] [PATCH spice-server 18/33] windows: Undefine some conflicting preprocessor macros

Christophe Fergeau cfergeau at redhat.com
Thu Jan 3 16:47:18 UTC 2019


On Sat, Dec 22, 2018 at 09:27:02AM -0500, Frediano Ziglio wrote:
>  
> > On Fri, Dec 21, 2018 at 4:04 PM Frediano Ziglio <fziglio at redhat.com> wrote:
> > >
> > > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > 
> > I would suggest to wrap with #if _WIN32, otherwise it's really weird
> > to see those undef without context.
> > 
> 
> Done, also added a comment like
> 
> @@ -39,7 +39,10 @@
>  
>  #include "red-qxl.h"
>  
> +#ifdef _WIN32
> +// undefine conflicting preprocessor macros
>  #undef interface
> +#endif

I haven't even been able to figure out where 'interface' is defined in
our code? Is it windows headers defining 'interface' and 'MAX_MONITORS'?
The commit log could contain a few more details.

Christophe

>  
>  struct QXLState {
>      QXLWorker qxl_worker;
> 
> 
> > 
> > > ---
> > >  server/red-qxl.c | 1 +
> > >  server/reds.c    | 3 +++
> > >  2 files changed, 4 insertions(+)
> > >
> > > diff --git a/server/red-qxl.c b/server/red-qxl.c
> > > index cec3eefb..886bf9f5 100644
> > > --- a/server/red-qxl.c
> > > +++ b/server/red-qxl.c
> > > @@ -39,6 +39,7 @@
> > >
> > >  #include "red-qxl.h"
> > >
> > > +#undef interface
> > >
> > >  struct QXLState {
> > >      QXLWorker qxl_worker;
> > > diff --git a/server/reds.c b/server/reds.c
> > > index faa62ede..2897aecb 100644
> > > --- a/server/reds.c
> > > +++ b/server/reds.c
> > > @@ -79,6 +79,9 @@
> > >  #include "net-utils.h"
> > >  #include "red-stream-device.h"
> > >
> > > +#undef MAX_MONITORS
> > > +#undef interface
> > > +
> > >  #define REDS_MAX_STAT_NODES 100
> > >
> > >  static void reds_client_monitors_config(RedsState *reds,
> > >  VDAgentMonitorsConfig *monitors_config);
> 
> Frediano
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190103/e7dc1145/attachment.sig>


More information about the Spice-devel mailing list