So, I know this is existing practice, but it seems to me that building with different protocol headers than what the server supports would only lead to disaster.
Do we do this anywhere already? On Fri, Dec 13, 2013 at 12:05 PM, Adam Jackson <[email protected]> wrote: > We want to advertise the version we implement, not the version the > protocol headers happen to describe. > > Signed-off-by: Adam Jackson <[email protected]> > --- > include/protocol-versions.h | 4 ++++ > present/present_request.c | 5 +++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/include/protocol-versions.h b/include/protocol-versions.h > index 7fe61e0..fc428c8 100644 > --- a/include/protocol-versions.h > +++ b/include/protocol-versions.h > @@ -67,6 +67,10 @@ > #define SERVER_PANORAMIX_MAJOR_VERSION 1 > #define SERVER_PANORAMIX_MINOR_VERSION 1 > > +/* Present */ > +#define SERVER_PRESENT_MAJOR_VERSION 1 > +#define SERVER_PRESENT_MINOR_VERSION 0 > + > /* RandR */ > #define SERVER_RANDR_MAJOR_VERSION 1 > #define SERVER_RANDR_MINOR_VERSION 4 > diff --git a/present/present_request.c b/present/present_request.c > index 095fa2d..1064dcb 100644 > --- a/present/present_request.c > +++ b/present/present_request.c > @@ -26,6 +26,7 @@ > > #include "present_priv.h" > #include "randrstr.h" > +#include <protocol-versions.h> > > static int > proc_present_query_version(ClientPtr client) > @@ -35,8 +36,8 @@ proc_present_query_version(ClientPtr client) > .type = X_Reply, > .sequenceNumber = client->sequence, > .length = 0, > - .majorVersion = PRESENT_MAJOR, > - .minorVersion = PRESENT_MINOR > + .majorVersion = SERVER_PRESENT_MAJOR_VERSION, > + .minorVersion = SERVER_PRESENT_MINOR_VERSION > }; > > REQUEST_SIZE_MATCH(xPresentQueryVersionReq); > -- > 1.8.4.2 > > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > -- Jasper
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
