[PATCH wayland] introduce new headers wayland-client/server-core.h

Giulio Camuffo giuliocamuffo at gmail.com
Mon Apr 27 23:04:16 PDT 2015

2015-04-28 3:34 GMT+03:00 Bill Spitzak <spitzak at gmail.com>:
> On 04/27/2015 01:06 PM, Giulio Camuffo wrote:
>> 2015-04-27 21:53 GMT+03:00 Bill Spitzak <spitzak at gmail.com>:
>>> On 04/26/2015 11:48 PM, Marek Chalupa wrote:
>>>> Is the --include-core-headers option necessary? Until now the scanner
>>>> included wayland-client/server.h
>>>> which included the %-protocol.h, but since there are inclusion guards,
>>>> the protocol header was not
>>>> included again - so including wayland-client/server.h is the same as
>>>> including wayland-client/server-core.h, isn't it?
>>>> So including the core headers should be good for all cases.
>> The problem is when you have an extension.xml, and generate
>> extension-client-protocol.h. Then you have some preexisting code
>> including that and relying on it including wayland-client.h and then
>> wayland-client-protocol.h, and if you use something from that it will
>> not build anymore, because wayland-client-core.h doesn't include it.
>>> Even if there is a reason to not include the core headers (I don't see
>>> it,
>>> however) it certainly would be the default to include them. Therefore the
>>> switch should at least be reversed so no switch means to include them.
>> No, because it would then not be backward compatible, breaking the
>> sole reason the switch exists for.
> I think there is some confusion here.
> I am saying the default should be to *include* the headers, so that existing
> code will continue to work.

Right now the scanner includes wayland-client.h and wayland-server.h,
and that needs to remain the default.

> What I (and I believe others) are trying to say is that this should not be
> an option, it *ALWAYS* includes the core headers. There is no reason for a
> switch to turn it off, and certainly no reason for a switch that is required
> to turn it on.

As i explained, that would break code that currently builds so it is
not acceptable.


More information about the wayland-devel mailing list