Commit 487870ff authored by Mike Gabriel's avatar Mike Gabriel

Xserver/include/protocol-versions.h: Switch to having an Xserver-specific header…

Xserver/include/protocol-versions.h: Switch to having an Xserver-specific header file containing all use protocol versions.
parent a08e2323
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include <resource.h> #include <resource.h>
#include <scrnintstr.h> #include <scrnintstr.h>
#include "GL/glx_ansic.h" #include "GL/glx_ansic.h"
#include "protocol-versions.h"
#include <limits.h> #include <limits.h>
/* /*
...@@ -75,8 +75,8 @@ typedef struct __GLXdrawablePrivateRec __GLXdrawablePrivate; ...@@ -75,8 +75,8 @@ typedef struct __GLXdrawablePrivateRec __GLXdrawablePrivate;
#include "glxerror.h" #include "glxerror.h"
#define GLX_SERVER_MAJOR_VERSION 1 #define GLX_SERVER_MAJOR_VERSION SERVER_GLX_MAJOR_VERSION
#define GLX_SERVER_MINOR_VERSION 2 #define GLX_SERVER_MINOR_VERSION SERVER_GLX_MINOR_VERSION
#ifndef True #ifndef True
#define True 1 #define True 1
......
...@@ -59,7 +59,7 @@ Equipment Corporation. ...@@ -59,7 +59,7 @@ Equipment Corporation.
#include "picturestr.h" #include "picturestr.h"
#endif #endif
#include "modinit.h" #include "modinit.h"
#include "protocol-versions.h"
#ifdef GLXPROXY #ifdef GLXPROXY
extern VisualPtr glxMatchVisual(ScreenPtr pScreen, extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
...@@ -942,8 +942,8 @@ ProcPanoramiXQueryVersion (ClientPtr client) ...@@ -942,8 +942,8 @@ ProcPanoramiXQueryVersion (ClientPtr client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.majorVersion = PANORAMIX_MAJOR_VERSION; rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION;
rep.minorVersion = PANORAMIX_MINOR_VERSION; rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION;
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n); swapl(&rep.length, n);
......
...@@ -65,6 +65,8 @@ in this Software without prior written authorization from the X Consortium. ...@@ -65,6 +65,8 @@ in this Software without prior written authorization from the X Consortium.
#include "modinit.h" #include "modinit.h"
#include "protocol-versions.h"
#if 0 #if 0
static unsigned char ScreenSaverReqCode = 0; static unsigned char ScreenSaverReqCode = 0;
#endif #endif
...@@ -699,8 +701,8 @@ ProcScreenSaverQueryVersion (client) ...@@ -699,8 +701,8 @@ ProcScreenSaverQueryVersion (client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.majorVersion = ScreenSaverMajorVersion; rep.majorVersion = SERVER_SAVER_MAJOR_VERSION;
rep.minorVersion = ScreenSaverMinorVersion; rep.minorVersion = SERVER_SAVER_MINOR_VERSION;
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n); swapl(&rep.length, n);
......
...@@ -56,6 +56,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -56,6 +56,7 @@ in this Software without prior written authorization from The Open Group.
#include "gcstruct.h" #include "gcstruct.h"
#include "colormapst.h" #include "colormapst.h"
#include "propertyst.h" #include "propertyst.h"
#include "protocol-versions.h"
#define _SECURITY_SERVER #define _SECURITY_SERVER
#include <nx-X11/extensions/securstr.h> #include <nx-X11/extensions/securstr.h>
#include <assert.h> #include <assert.h>
...@@ -486,8 +487,8 @@ ProcSecurityQueryVersion( ...@@ -486,8 +487,8 @@ ProcSecurityQueryVersion(
rep.type = X_Reply; rep.type = X_Reply;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.length = 0; rep.length = 0;
rep.majorVersion = SECURITY_MAJOR_VERSION; rep.majorVersion = SERVER_SECURITY_MAJOR_VERSION;
rep.minorVersion = SECURITY_MINOR_VERSION; rep.minorVersion = SERVER_SECURITY_MINOR_VERSION;
if(client->swapped) if(client->swapped)
{ {
register char n; register char n;
......
...@@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group.
#include "resource.h" #include "resource.h"
#include "opaque.h" #include "opaque.h"
#include <X11/extensions/shapeproto.h> #include <X11/extensions/shapeproto.h>
#include "protocol-versions.h"
#include "regionstr.h" #include "regionstr.h"
#include "gcstruct.h" #include "gcstruct.h"
#ifdef EXTMODULE #ifdef EXTMODULE
...@@ -295,8 +296,8 @@ ProcShapeQueryVersion (client) ...@@ -295,8 +296,8 @@ ProcShapeQueryVersion (client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.majorVersion = SHAPE_MAJOR_VERSION; rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION;
rep.minorVersion = SHAPE_MINOR_VERSION; rep.minorVersion = SERVER_SHAPE_MINOR_VERSION;
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n); swapl(&rep.length, n);
......
...@@ -65,6 +65,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -65,6 +65,7 @@ in this Software without prior written authorization from The Open Group.
#ifdef EXTMODULE #ifdef EXTMODULE
#include "xf86_ansic.h" #include "xf86_ansic.h"
#endif #endif
#include "protocol-versions.h"
#ifdef PANORAMIX #ifdef PANORAMIX
#include "panoramiX.h" #include "panoramiX.h"
...@@ -354,8 +355,8 @@ ProcShmQueryVersion(client) ...@@ -354,8 +355,8 @@ ProcShmQueryVersion(client)
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.sharedPixmaps = sharedPixmaps; rep.sharedPixmaps = sharedPixmaps;
rep.pixmapFormat = pixmapFormat; rep.pixmapFormat = pixmapFormat;
rep.majorVersion = SHM_MAJOR_VERSION; rep.majorVersion = SERVER_SHM_MAJOR_VERSION;
rep.minorVersion = SHM_MINOR_VERSION; rep.minorVersion = SERVER_SHM_MINOR_VERSION;
rep.uid = geteuid(); rep.uid = geteuid();
rep.gid = getegid(); rep.gid = getegid();
if (client->swapped) { if (client->swapped) {
......
...@@ -70,6 +70,7 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -70,6 +70,7 @@ PERFORMANCE OF THIS SOFTWARE.
#define _SYNC_SERVER #define _SYNC_SERVER
#include <nx-X11/extensions/sync.h> #include <nx-X11/extensions/sync.h>
#include <nx-X11/extensions/syncstr.h> #include <nx-X11/extensions/syncstr.h>
#include "protocol-versions.h"
#ifdef EXTMODULE #ifdef EXTMODULE
#include "xf86_ansic.h" #include "xf86_ansic.h"
...@@ -1349,8 +1350,8 @@ ProcSyncInitialize(client) ...@@ -1349,8 +1350,8 @@ ProcSyncInitialize(client)
memset(&rep, 0, sizeof(xSyncInitializeReply)); memset(&rep, 0, sizeof(xSyncInitializeReply));
rep.type = X_Reply; rep.type = X_Reply;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.majorVersion = SYNC_MAJOR_VERSION; rep.majorVersion = SERVER_SYNC_MAJOR_VERSION;
rep.minorVersion = SYNC_MINOR_VERSION; rep.minorVersion = SERVER_SYNC_MINOR_VERSION;
rep.length = 0; rep.length = 0;
if (client->swapped) if (client->swapped)
......
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
#include "gcstruct.h" #include "gcstruct.h"
#include "dixfontstr.h" #include "dixfontstr.h"
#include "extnsionst.h" #include "extnsionst.h"
#include "protocol-versions.h"
#define _XF86BIGFONT_SERVER_ #define _XF86BIGFONT_SERVER_
#include <nx-X11/extensions/xf86bigfstr.h> #include <nx-X11/extensions/xf86bigfstr.h>
...@@ -357,8 +358,8 @@ ProcXF86BigfontQueryVersion( ...@@ -357,8 +358,8 @@ ProcXF86BigfontQueryVersion(
reply.type = X_Reply; reply.type = X_Reply;
reply.length = 0; reply.length = 0;
reply.sequenceNumber = client->sequence; reply.sequenceNumber = client->sequence;
reply.majorVersion = XF86BIGFONT_MAJOR_VERSION; reply.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION;
reply.minorVersion = XF86BIGFONT_MINOR_VERSION; reply.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION;
reply.uid = geteuid(); reply.uid = geteuid();
reply.gid = getegid(); reply.gid = getegid();
#ifdef HAS_SHM #ifdef HAS_SHM
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <nx-X11/extensions/XResproto.h> #include <nx-X11/extensions/XResproto.h>
#include "pixmapstr.h" #include "pixmapstr.h"
#include "modinit.h" #include "modinit.h"
#include "protocol-versions.h"
static int static int
ProcXResQueryVersion (ClientPtr client) ProcXResQueryVersion (ClientPtr client)
...@@ -38,8 +39,8 @@ ProcXResQueryVersion (ClientPtr client) ...@@ -38,8 +39,8 @@ ProcXResQueryVersion (ClientPtr client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.server_major = XRES_MAJOR_VERSION; rep.server_major = SERVER_XRES_MAJOR_VERSION;
rep.server_minor = XRES_MINOR_VERSION; rep.server_minor = SERVER_XRES_MINOR_VERSION;
if (client->swapped) { if (client->swapped) {
int n; int n;
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
......
...@@ -74,6 +74,7 @@ SOFTWARE. ...@@ -74,6 +74,7 @@ SOFTWARE.
#include "extinit.h" #include "extinit.h"
#include "exglobals.h" #include "exglobals.h"
#include "swaprep.h" #include "swaprep.h"
#include "protocol-versions.h"
/* modules local to Xi */ /* modules local to Xi */
#include "allowev.h" #include "allowev.h"
...@@ -204,8 +205,9 @@ Mask PropagateMask[MAX_DEVICES]; ...@@ -204,8 +205,9 @@ Mask PropagateMask[MAX_DEVICES];
static XExtensionVersion thisversion = static XExtensionVersion thisversion =
{XI_Present, {XI_Present,
XI_Add_XChangeDeviceControl_Major, SERVER_XI_MAJOR_VERSION,
XI_Add_XChangeDeviceControl_Minor}; SERVER_XI_MINOR_VERSION,
};
/********************************************************************** /**********************************************************************
* *
......
...@@ -29,16 +29,9 @@ ...@@ -29,16 +29,9 @@
#include "compint.h" #include "compint.h"
#include "XI.h" #include "XI.h"
#include "XIproto.h" #include "XIproto.h"
#include "protocol-versions.h"
#include "extinit.h" #include "extinit.h"
#ifndef SERVER_COMPOSITE_MAJOR_VERSION
#define SERVER_COMPOSITE_MAJOR_VERSION 0
#endif
#ifndef SERVER_COMPOSITE_MINOR_VERSION
#define SERVER_COMPOSITE_MINOR_VERSION 4
#endif
static CARD8 CompositeReqCode; static CARD8 CompositeReqCode;
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#endif #endif
#include "damageextint.h" #include "damageextint.h"
#include "protocol-versions.h"
unsigned char DamageReqCode; unsigned char DamageReqCode;
int DamageEventBase; int DamageEventBase;
...@@ -143,16 +144,16 @@ ProcDamageQueryVersion(ClientPtr client) ...@@ -143,16 +144,16 @@ ProcDamageQueryVersion(ClientPtr client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
if (stuff->majorVersion < DAMAGE_MAJOR) { if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) {
rep.majorVersion = stuff->majorVersion; rep.majorVersion = stuff->majorVersion;
rep.minorVersion = stuff->minorVersion; rep.minorVersion = stuff->minorVersion;
} else { } else {
rep.majorVersion = DAMAGE_MAJOR; rep.majorVersion = SERVER_DAMAGE_MAJOR_VERSION;
if (stuff->majorVersion == DAMAGE_MAJOR && if (stuff->majorVersion == SERVER_DAMAGE_MAJOR_VERSION &&
stuff->minorVersion < DAMAGE_MINOR) stuff->minorVersion < SERVER_DAMAGE_MINOR_VERSION)
rep.minorVersion = stuff->minorVersion; rep.minorVersion = stuff->minorVersion;
else else
rep.minorVersion = DAMAGE_MINOR; rep.minorVersion = SERVER_DAMAGE_MINOR_VERSION;
} }
pDamageClient->major_version = rep.majorVersion; pDamageClient->major_version = rep.majorVersion;
pDamageClient->minor_version = rep.minorVersion; pDamageClient->minor_version = rep.minorVersion;
......
...@@ -47,7 +47,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -47,7 +47,6 @@ in this Software without prior written authorization from The Open Group.
/* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include "Trap.h" #include "Trap.h"
#include "Agent.h" #include "Agent.h"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "mipict.h" #include "mipict.h"
#include "fbpict.h" #include "fbpict.h"
#include "dixstruct.h" #include "dixstruct.h"
#include "protocol-versions.h"
#include "Agent.h" #include "Agent.h"
#include "Drawable.h" #include "Drawable.h"
...@@ -217,26 +218,26 @@ void nxagentRenderExtensionInit() ...@@ -217,26 +218,26 @@ void nxagentRenderExtensionInit()
+ two versions. + two versions.
*/ */
if (major_version > RENDER_MAJOR || if (major_version > SERVER_RENDER_MAJOR_VERSION ||
(major_version == RENDER_MAJOR && (major_version == SERVER_RENDER_MAJOR_VERSION &&
minor_version > RENDER_MINOR)) minor_version > SERVER_RENDER_MINOR_VERSION))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentRenderExtensionInit: Using render version [%d.%d] with " fprintf(stderr, "nxagentRenderExtensionInit: Using render version [%d.%d] with "
"remote version [%d.%d].\n", RENDER_MAJOR, RENDER_MINOR, "remote version [%d.%d].\n", SERVER_RENDER_MAJOR_VERSION, SERVER_RENDER_MINOR_VERSION,
major_version, minor_version); major_version, minor_version);
#endif #endif
nxagentRenderVersionMajor = RENDER_MAJOR; nxagentRenderVersionMajor = SERVER_RENDER_MAJOR_VERSION;
nxagentRenderVersionMinor = RENDER_MINOR; nxagentRenderVersionMinor = SERVER_RENDER_MINOR_VERSION;
} }
else if (major_version < RENDER_MAJOR || else if (major_version < SERVER_RENDER_MAJOR_VERSION ||
(major_version == RENDER_MAJOR && (major_version == SERVER_RENDER_MAJOR_VERSION &&
minor_version < RENDER_MINOR)) minor_version < SERVER_RENDER_MINOR_VERSION))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "Info: Local render version %d.%d is higher " fprintf(stderr, "Info: Local render version %d.%d is higher "
"than remote version %d.%d.\n", RENDER_MAJOR, RENDER_MINOR, "than remote version %d.%d.\n", SERVER_RENDER_MAJOR_VERSION, SERVER_RENDER_MINOR_VERSION,
major_version, minor_version); major_version, minor_version);
fprintf(stderr, "Info: Lowering the render version reported to clients.\n"); fprintf(stderr, "Info: Lowering the render version reported to clients.\n");
...@@ -249,7 +250,7 @@ void nxagentRenderExtensionInit() ...@@ -249,7 +250,7 @@ void nxagentRenderExtensionInit()
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentRenderExtensionInit: Local render version %d.%d " fprintf(stderr, "nxagentRenderExtensionInit: Local render version %d.%d "
"matches remote version %d.%d.\n", RENDER_MAJOR, RENDER_MINOR, "matches remote version %d.%d.\n", SERVER_RENDER_MAJOR_VERSION, SERVER_RENDER_MINOR_VERSION,
major_version, minor_version); major_version, minor_version);
#endif #endif
......
/*
* Copyright © 2009 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
/**
* This file specifies the server-supported protocol versions.
*/
#ifndef PROTOCOL_VERSIONS_H
#define PROTOCOL_VERSIONS_H
#ifdef NXAGENT_SERVER
# define XTRANS_SEND_FDS 0
#endif
/* Composite */
#define SERVER_COMPOSITE_MAJOR_VERSION 0
#define SERVER_COMPOSITE_MINOR_VERSION 4
/* Damage */
#define SERVER_DAMAGE_MAJOR_VERSION 1
#ifndef NXAGENT_SERVER
#define SERVER_DAMAGE_MINOR_VERSION 1
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_DAMAGE_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
#ifndef NXAGENT_SERVER
/* DRI3 */
#define SERVER_DRI3_MAJOR_VERSION 1
#define SERVER_DRI3_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
#ifndef NXAGENT_SERVER
/* DMX */
#define SERVER_DMX_MAJOR_VERSION 2
#define SERVER_DMX_MINOR_VERSION 2
#define SERVER_DMX_PATCH_VERSION 20040604
#endif /* !defined(NXAGENT_SERVER) */
#ifndef NXAGENT_SERVER
/* Generic event extension */
#define SERVER_GE_MAJOR_VERSION 1
#define SERVER_GE_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
/* GLX */
#define SERVER_GLX_MAJOR_VERSION 1
#ifndef NXAGENT_SERVER
#define SERVER_GLX_MINOR_VERSION 4
#else
#define SERVER_GLX_MINOR_VERSION 2
#endif
/* Xinerama */
#define SERVER_PANORAMIX_MAJOR_VERSION 1
#define SERVER_PANORAMIX_MINOR_VERSION 1
#ifndef NXAGENT_SERVER
/* Present */
#define SERVER_PRESENT_MAJOR_VERSION 1
#define SERVER_PRESENT_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
/* RandR */
#define SERVER_RANDR_MAJOR_VERSION 1
#define SERVER_RANDR_MINOR_VERSION 5
/* Record */
#define SERVER_RECORD_MAJOR_VERSION 1
#define SERVER_RECORD_MINOR_VERSION 13
/* Render */
#define SERVER_RENDER_MAJOR_VERSION 0
#ifndef NXAGENT_SERVER
#define SERVER_RENDER_MINOR_VERSION 11
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_RENDER_MINOR_VERSION 10
#endif /* !defined(NXAGENT_SERVER) */
/* RandR Xinerama */
#define SERVER_RRXINERAMA_MAJOR_VERSION 1
#define SERVER_RRXINERAMA_MINOR_VERSION 1
/* Screensaver */
#define SERVER_SAVER_MAJOR_VERSION 1
#define SERVER_SAVER_MINOR_VERSION 1
/* Security */
#define SERVER_SECURITY_MAJOR_VERSION 1
#define SERVER_SECURITY_MINOR_VERSION 0
/* Shape */
#define SERVER_SHAPE_MAJOR_VERSION 1
#define SERVER_SHAPE_MINOR_VERSION 1
/* SHM */
#define SERVER_SHM_MAJOR_VERSION 1
#ifndef NXAGENT_SERVER
#if XTRANS_SEND_FDS
#define SERVER_SHM_MINOR_VERSION 2
#else
#define SERVER_SHM_MINOR_VERSION 1
#endif
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_SHM_MINOR_VERSION 1
#endif /* !defined(NXAGENT_SERVER) */
/* Sync */
#define SERVER_SYNC_MAJOR_VERSION 3
#ifndef NXAGENT_SERVER
#define SERVER_SYNC_MINOR_VERSION 1
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_SYNC_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
/* Big Font */
#define SERVER_XF86BIGFONT_MAJOR_VERSION 1
#define SERVER_XF86BIGFONT_MINOR_VERSION 1
#ifndef NXAGENT_SERVER
/* Vidmode */
#define SERVER_XF86VIDMODE_MAJOR_VERSION 2
#define SERVER_XF86VIDMODE_MINOR_VERSION 2
#endif /* !defined(NXAGENT_SERVER) */
/* Fixes */
#ifndef NXAGENT_SERVER
#define SERVER_XFIXES_MAJOR_VERSION 5
#define SERVER_XFIXES_MINOR_VERSION 0
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_XFIXES_MAJOR_VERSION 3
#define SERVER_XFIXES_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
/* X Input */
#ifndef NXAGENT_SERVER
#define SERVER_XI_MAJOR_VERSION 2
#define SERVER_XI_MINOR_VERSION 3
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_XI_MAJOR_VERSION 1
#define SERVER_XI_MINOR_VERSION 3
#endif /* !defined(NXAGENT_SERVER) */
/* XKB */
#define SERVER_XKB_MAJOR_VERSION 1
#define SERVER_XKB_MINOR_VERSION 0
/* Resource */
#define SERVER_XRES_MAJOR_VERSION 1
#ifndef NXAGENT_SERVER
#define SERVER_XRES_MINOR_VERSION 2
#else /* !defined(NXAGENT_SERVER) */
#define SERVER_XRES_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */
#ifndef NXAGENT_SERVER
/* XvMC */
#define SERVER_XVMC_MAJOR_VERSION 1
#define SERVER_XVMC_MINOR_VERSION 1
#endif /* !defined(NXAGENT_SERVER) */
#endif /* PROTOCOL_VERSIONS_H */
...@@ -21,12 +21,7 @@ ...@@ -21,12 +21,7 @@
*/ */
#include "randrstr.h" #include "randrstr.h"
#ifndef NXAGENT_SERVER
#include "protocol-versions.h" #include "protocol-versions.h"
#else
#define SERVER_RANDR_MAJOR_VERSION 1
#define SERVER_RANDR_MINOR_VERSION 5
#endif
Bool Bool
RRClientKnowsRates(ClientPtr pClient) RRClientKnowsRates(ClientPtr pClient)
......
...@@ -88,12 +88,7 @@ ...@@ -88,12 +88,7 @@
#include "randrstr.h" #include "randrstr.h"
#include "swaprep.h" #include "swaprep.h"
#include "panoramiXproto.h" #include "panoramiXproto.h"
#ifndef NXAGENT_SERVER
#include "protocol-versions.h" #include "protocol-versions.h"
#else
#define SERVER_RRXINERAMA_MAJOR_VERSION 1
#define SERVER_RRXINERAMA_MINOR_VERSION 1
#endif
/* Xinerama is not multi-screen capable; just report about screen 0 */ /* Xinerama is not multi-screen capable; just report about screen 0 */
#define RR_XINERAMA_SCREEN 0 #define RR_XINERAMA_SCREEN 0
......
...@@ -60,6 +60,8 @@ and Jim Haggerty of Metheus. ...@@ -60,6 +60,8 @@ and Jim Haggerty of Metheus.
#include "cursor.h" #include "cursor.h"
#endif #endif
#include "protocol-versions.h"
static RESTYPE RTContext; /* internal resource type for Record contexts */ static RESTYPE RTContext; /* internal resource type for Record contexts */
static int RecordErrorBase; /* first Record error number */ static int RecordErrorBase; /* first Record error number */
...@@ -2002,8 +2004,8 @@ ProcRecordQueryVersion(client) ...@@ -2002,8 +2004,8 @@ ProcRecordQueryVersion(client)
rep.type = X_Reply; rep.type = X_Reply;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.length = 0; rep.length = 0;
rep.majorVersion = RECORD_MAJOR_VERSION; rep.majorVersion = SERVER_RECORD_MAJOR_VERSION;
rep.minorVersion = RECORD_MINOR_VERSION; rep.minorVersion = SERVER_RECORD_MINOR_VERSION;
if(client->swapped) if(client->swapped)
{ {
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include "xf86_ansic.h" #include "xf86_ansic.h"
#endif #endif
#include "protocol-versions.h"
#if !defined(UINT32_MAX) #if !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU #define UINT32_MAX 0xffffffffU
#endif #endif
...@@ -293,8 +295,8 @@ ProcRenderQueryVersion (ClientPtr client) ...@@ -293,8 +295,8 @@ ProcRenderQueryVersion (ClientPtr client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.majorVersion = RENDER_MAJOR; rep.majorVersion = SERVER_RENDER_MAJOR_VERSION;
rep.minorVersion = RENDER_MINOR; rep.minorVersion = SERVER_RENDER_MINOR_VERSION;
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n); swapl(&rep.length, n);
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#endif #endif
#include "xfixesint.h" #include "xfixesint.h"
#include "protocol-versions.h"
unsigned char XFixesReqCode; unsigned char XFixesReqCode;
int XFixesEventBase; int XFixesEventBase;
...@@ -46,16 +47,16 @@ ProcXFixesQueryVersion(ClientPtr client) ...@@ -46,16 +47,16 @@ ProcXFixesQueryVersion(ClientPtr client)
rep.type = X_Reply; rep.type = X_Reply;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
if (stuff->majorVersion < XFIXES_MAJOR) { if (stuff->majorVersion < SERVER_XFIXES_MAJOR_VERSION) {
rep.majorVersion = stuff->majorVersion; rep.majorVersion = stuff->majorVersion;
rep.minorVersion = stuff->minorVersion; rep.minorVersion = stuff->minorVersion;
} else { } else {
rep.majorVersion = XFIXES_MAJOR; rep.majorVersion = SERVER_XFIXES_MAJOR_VERSION;
if (stuff->majorVersion == XFIXES_MAJOR && if (stuff->majorVersion == SERVER_XFIXES_MAJOR_VERSION &&
stuff->minorVersion < XFIXES_MINOR) stuff->minorVersion < SERVER_XFIXES_MINOR_VERSION)
rep.minorVersion = stuff->minorVersion; rep.minorVersion = stuff->minorVersion;
else else
rep.minorVersion = XFIXES_MINOR; rep.minorVersion = SERVER_XFIXES_MINOR_VERSION;
} }
pXFixesClient->major_version = rep.majorVersion; pXFixesClient->major_version = rep.majorVersion;
pXFixesClient->minor_version = rep.minorVersion; pXFixesClient->minor_version = rep.minorVersion;
......
...@@ -41,6 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -41,6 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/extensions/XKBsrv.h> #include <nx-X11/extensions/XKBsrv.h>
#include "extnsionst.h" #include "extnsionst.h"
#include "xkb.h" #include "xkb.h"
#include "protocol-versions.h"
#include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XI.h>
...@@ -168,9 +169,9 @@ ProcXkbUseExtension(ClientPtr client) ...@@ -168,9 +169,9 @@ ProcXkbUseExtension(ClientPtr client)
int supported; int supported;
REQUEST_SIZE_MATCH(xkbUseExtensionReq); REQUEST_SIZE_MATCH(xkbUseExtensionReq);
if (stuff->wantedMajor != XkbMajorVersion) { if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) {
/* pre-release version 0.65 is compatible with 1.00 */ /* pre-release version 0.65 is compatible with 1.00 */
supported= ((XkbMajorVersion==1)&& supported= ((SERVER_XKB_MAJOR_VERSION==1)&&
(stuff->wantedMajor==0)&&(stuff->wantedMinor==65)); (stuff->wantedMajor==0)&&(stuff->wantedMinor==65));
} }
else supported = 1; else supported = 1;
...@@ -190,15 +191,15 @@ ProcXkbUseExtension(ClientPtr client) ...@@ -190,15 +191,15 @@ ProcXkbUseExtension(ClientPtr client)
client->index, client->index,
(long)client->clientAsMask, (long)client->clientAsMask,
stuff->wantedMajor,stuff->wantedMinor, stuff->wantedMajor,stuff->wantedMinor,
XkbMajorVersion,XkbMinorVersion); SERVER_XKB_MAJOR_VERSION,SERVER_XKB_MINOR_VERSION);
} }
memset(&rep, 0, sizeof(xkbUseExtensionReply)); memset(&rep, 0, sizeof(xkbUseExtensionReply));
rep.type = X_Reply; rep.type = X_Reply;
rep.supported = supported; rep.supported = supported;
rep.length = 0; rep.length = 0;
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.serverMajor = XkbMajorVersion; rep.serverMajor = SERVER_XKB_MAJOR_VERSION;
rep.serverMinor = XkbMinorVersion; rep.serverMinor = SERVER_XKB_MINOR_VERSION;
if ( client->swapped ) { if ( client->swapped ) {
swaps(&rep.sequenceNumber, n); swaps(&rep.sequenceNumber, n);
swaps(&rep.serverMajor, n); swaps(&rep.serverMajor, n);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment