1276N/ADownloaded from:
1276N/Ahttp://pkgs.fedoraproject.org/gitweb/?p=tigervnc.git;a=blob_plain;f=tigervnc11-xorg112.patch;hb=HEAD
1276N/A
1276N/Acommit 2e3bcdbb30edb01ddb161c5814dadb2dda59baee - Tue, 27 Mar 2012 12:48:15
1276N/A
1276N/Adiff -up xserver/hw/vnc/vncExtInit.cc.xorg112 xserver/hw/vnc/vncExtInit.cc
1276N/A--- xserver/hw/vnc/vncExtInit.cc.xorg112 2011-08-09 23:16:36.000000000 +0200
1276N/A+++ xserver/hw/vnc/vncExtInit.cc 2012-03-27 12:54:56.937271323 +0200
1276N/A@@ -56,6 +56,7 @@ extern "C" {
1276N/A #include "XserverDesktop.h"
1276N/A #include "vncHooks.h"
1276N/A #include "vncExtInit.h"
1276N/A+#include "xorg-version.h"
1276N/A
1276N/A extern "C" {
1276N/A
1276N/A@@ -360,10 +361,16 @@ void vncClientCutText(const char* str, i
1276N/A ev.window = cur->window;
1276N/A ev.time = GetTimeInMillis();
1276N/A if (cur->client->swapped) {
1276N/A+#if XORG < 112
1276N/A int n;
1276N/A swaps(&ev.sequenceNumber, n);
1276N/A swapl(&ev.window, n);
1276N/A swapl(&ev.time, n);
1276N/A+#else
1276N/A+ swaps(&ev.sequenceNumber);
1276N/A+ swapl(&ev.window);
1276N/A+ swapl(&ev.time);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(cur->client, sizeof(xVncExtClientCutTextNotifyEvent),
1276N/A (char *)&ev);
1276N/A@@ -406,9 +413,14 @@ void vncQueryConnect(XserverDesktop* des
1276N/A ev.sequenceNumber = cur->client->sequence;
1276N/A ev.window = cur->window;
1276N/A if (cur->client->swapped) {
1276N/A+#if XORG < 112
1276N/A int n;
1276N/A swaps(&ev.sequenceNumber, n);
1276N/A swapl(&ev.window, n);
1276N/A+#else
1276N/A+ swaps(&ev.sequenceNumber);
1276N/A+ swapl(&ev.window);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(cur->client, sizeof(xVncExtQueryConnectNotifyEvent),
1276N/A (char *)&ev);
1276N/A@@ -449,10 +461,16 @@ static void SendSelectionChangeEvent(Ato
1276N/A ev.window = cur->window;
1276N/A ev.selection = selection;
1276N/A if (cur->client->swapped) {
1276N/A+#if XORG < 112
1276N/A int n;
1276N/A swaps(&ev.sequenceNumber, n);
1276N/A swapl(&ev.window, n);
1276N/A swapl(&ev.selection, n);
1276N/A+#else
1276N/A+ swaps(&ev.sequenceNumber);
1276N/A+ swapl(&ev.window);
1276N/A+ swapl(&ev.selection);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(cur->client, sizeof(xVncExtSelectionChangeNotifyEvent),
1276N/A (char *)&ev);
1276N/A@@ -473,7 +491,6 @@ static int ProcVncExtSetParam(ClientPtr
1276N/A param.buf[stuff->paramLen] = 0;
1276N/A
1276N/A xVncExtSetParamReply rep;
1276N/A- int n;
1276N/A rep.type = X_Reply;
1276N/A rep.length = 0;
1276N/A rep.success = 0;
1276N/A@@ -514,8 +531,14 @@ static int ProcVncExtSetParam(ClientPtr
1276N/A
1276N/A deny:
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A+ int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.length, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.length);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtSetParamReply), (char *)&rep);
1276N/A return (client->noClientException);
1276N/A@@ -523,9 +546,13 @@ deny:
1276N/A
1276N/A static int SProcVncExtSetParam(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtSetParamReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_AT_LEAST_SIZE(xVncExtSetParamReq);
1276N/A return ProcVncExtSetParam(client);
1276N/A }
1276N/A@@ -539,7 +566,6 @@ static int ProcVncExtGetParam(ClientPtr
1276N/A param.buf[stuff->paramLen] = 0;
1276N/A
1276N/A xVncExtGetParamReply rep;
1276N/A- int n;
1276N/A rep.type = X_Reply;
1276N/A rep.sequenceNumber = client->sequence;
1276N/A rep.success = 0;
1276N/A@@ -557,9 +583,16 @@ static int ProcVncExtGetParam(ClientPtr
1276N/A rep.length = (len + 3) >> 2;
1276N/A rep.valueLen = len;
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A+ int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.length, n);
1276N/A swaps(&rep.valueLen, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.length);
1276N/A+ swaps(&rep.valueLen);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtGetParamReply), (char *)&rep);
1276N/A if (value)
1276N/A@@ -570,9 +603,13 @@ static int ProcVncExtGetParam(ClientPtr
1276N/A
1276N/A static int SProcVncExtGetParam(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtGetParamReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_AT_LEAST_SIZE(xVncExtGetParamReq);
1276N/A return ProcVncExtGetParam(client);
1276N/A }
1276N/A@@ -586,7 +623,6 @@ static int ProcVncExtGetParamDesc(Client
1276N/A param.buf[stuff->paramLen] = 0;
1276N/A
1276N/A xVncExtGetParamDescReply rep;
1276N/A- int n;
1276N/A rep.type = X_Reply;
1276N/A rep.sequenceNumber = client->sequence;
1276N/A rep.success = 0;
1276N/A@@ -601,9 +637,16 @@ static int ProcVncExtGetParamDesc(Client
1276N/A rep.length = (len + 3) >> 2;
1276N/A rep.descLen = len;
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A+ int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.length, n);
1276N/A swaps(&rep.descLen, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.length);
1276N/A+ swaps(&rep.descLen);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtGetParamDescReply), (char *)&rep);
1276N/A if (desc)
1276N/A@@ -613,9 +656,13 @@ static int ProcVncExtGetParamDesc(Client
1276N/A
1276N/A static int SProcVncExtGetParamDesc(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtGetParamDescReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_AT_LEAST_SIZE(xVncExtGetParamDescReq);
1276N/A return ProcVncExtGetParamDesc(client);
1276N/A }
1276N/A@@ -626,7 +673,6 @@ static int ProcVncExtListParams(ClientPt
1276N/A REQUEST_SIZE_MATCH(xVncExtListParamsReq);
1276N/A
1276N/A xVncExtListParamsReply rep;
1276N/A- int n;
1276N/A rep.type = X_Reply;
1276N/A rep.sequenceNumber = client->sequence;
1276N/A
1276N/A@@ -642,9 +688,16 @@ static int ProcVncExtListParams(ClientPt
1276N/A rep.length = (len + 3) >> 2;
1276N/A rep.nParams = nParams;
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A+ int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.length, n);
1276N/A swaps(&rep.nParams, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.length);
1276N/A+ swaps(&rep.nParams);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtListParamsReply), (char *)&rep);
1276N/A rdr::U8* data = new rdr::U8[len];
1276N/A@@ -664,9 +717,13 @@ static int ProcVncExtListParams(ClientPt
1276N/A
1276N/A static int SProcVncExtListParams(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtListParamsReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_SIZE_MATCH(xVncExtListParamsReq);
1276N/A return ProcVncExtListParams(client);
1276N/A }
1276N/A@@ -689,11 +746,19 @@ static int ProcVncExtSetServerCutText(Cl
1276N/A
1276N/A static int SProcVncExtSetServerCutText(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtSetServerCutTextReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_AT_LEAST_SIZE(xVncExtSetServerCutTextReq);
1276N/A+#if XORG < 112
1276N/A swapl(&stuff->textLen, n);
1276N/A+#else
1276N/A+ swapl(&stuff->textLen);
1276N/A+#endif
1276N/A return ProcVncExtSetServerCutText(client);
1276N/A }
1276N/A
1276N/A@@ -703,15 +768,21 @@ static int ProcVncExtGetClientCutText(Cl
1276N/A REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq);
1276N/A
1276N/A xVncExtGetClientCutTextReply rep;
1276N/A- int n;
1276N/A rep.type = X_Reply;
1276N/A rep.length = (clientCutTextLen + 3) >> 2;
1276N/A rep.sequenceNumber = client->sequence;
1276N/A rep.textLen = clientCutTextLen;
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A+ int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.length, n);
1276N/A swapl(&rep.textLen, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.length);
1276N/A+ swapl(&rep.textLen);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtGetClientCutTextReply), (char *)&rep);
1276N/A if (clientCutText)
1276N/A@@ -721,9 +792,13 @@ static int ProcVncExtGetClientCutText(Cl
1276N/A
1276N/A static int SProcVncExtGetClientCutText(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtGetClientCutTextReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq);
1276N/A return ProcVncExtGetClientCutText(client);
1276N/A }
1276N/A@@ -753,12 +828,21 @@ static int ProcVncExtSelectInput(ClientP
1276N/A
1276N/A static int SProcVncExtSelectInput(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtSelectInputReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_SIZE_MATCH(xVncExtSelectInputReq);
1276N/A+#if XORG < 112
1276N/A swapl(&stuff->window, n);
1276N/A swapl(&stuff->mask, n);
1276N/A+#else
1276N/A+ swapl(&stuff->window);
1276N/A+ swapl(&stuff->mask);
1276N/A+#endif
1276N/A return ProcVncExtSelectInput(client);
1276N/A }
1276N/A
1276N/A@@ -804,9 +888,14 @@ static int ProcVncExtConnect(ClientPtr c
1276N/A rep.length = 0;
1276N/A rep.sequenceNumber = client->sequence;
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.length, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.length);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtConnectReply), (char *)&rep);
1276N/A return (client->noClientException);
1276N/A@@ -814,9 +903,13 @@ static int ProcVncExtConnect(ClientPtr c
1276N/A
1276N/A static int SProcVncExtConnect(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtConnectReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_AT_LEAST_SIZE(xVncExtConnectReq);
1276N/A return ProcVncExtConnect(client);
1276N/A }
1276N/A@@ -836,7 +929,6 @@ static int ProcVncExtGetQueryConnect(Cli
1276N/A qcTimeout = 0;
1276N/A
1276N/A xVncExtGetQueryConnectReply rep;
1276N/A- int n;
1276N/A rep.type = X_Reply;
1276N/A rep.sequenceNumber = client->sequence;
1276N/A rep.timeout = qcTimeout;
1276N/A@@ -845,11 +937,20 @@ static int ProcVncExtGetQueryConnect(Cli
1276N/A rep.opaqueId = (CARD32)(long)queryConnectId;
1276N/A rep.length = (rep.userLen + rep.addrLen + 3) >> 2;
1276N/A if (client->swapped) {
1276N/A+#if XORG < 112
1276N/A+ int n;
1276N/A swaps(&rep.sequenceNumber, n);
1276N/A swapl(&rep.userLen, n);
1276N/A swapl(&rep.addrLen, n);
1276N/A swapl(&rep.timeout, n);
1276N/A swapl(&rep.opaqueId, n);
1276N/A+#else
1276N/A+ swaps(&rep.sequenceNumber);
1276N/A+ swapl(&rep.userLen);
1276N/A+ swapl(&rep.addrLen);
1276N/A+ swapl(&rep.timeout);
1276N/A+ swapl(&rep.opaqueId);
1276N/A+#endif
1276N/A }
1276N/A WriteToClient(client, sizeof(xVncExtGetQueryConnectReply), (char *)&rep);
1276N/A if (qcTimeout)
1276N/A@@ -861,9 +962,13 @@ static int ProcVncExtGetQueryConnect(Cli
1276N/A
1276N/A static int SProcVncExtGetQueryConnect(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtGetQueryConnectReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+#endif
1276N/A REQUEST_SIZE_MATCH(xVncExtGetQueryConnectReq);
1276N/A return ProcVncExtGetQueryConnect(client);
1276N/A }
1276N/A@@ -888,10 +993,15 @@ static int ProcVncExtApproveConnect(Clie
1276N/A
1276N/A static int SProcVncExtApproveConnect(ClientPtr client)
1276N/A {
1276N/A- register char n;
1276N/A REQUEST(xVncExtApproveConnectReq);
1276N/A+#if XORG < 112
1276N/A+ register char n;
1276N/A swaps(&stuff->length, n);
1276N/A swapl(&stuff->opaqueId, n);
1276N/A+#else
1276N/A+ swaps(&stuff->length);
1276N/A+ swapl(&stuff->opaqueId);
1276N/A+#endif
1276N/A REQUEST_SIZE_MATCH(xVncExtApproveConnectReq);
1276N/A return ProcVncExtApproveConnect(client);
1276N/A }
1276N/Adiff -up xserver/hw/vnc/xf86vncModule.cc.xorg112 xserver/hw/vnc/xf86vncModule.cc
1276N/A--- xserver/hw/vnc/xf86vncModule.cc.xorg112 2011-08-09 23:16:36.000000000 +0200
1276N/A+++ xserver/hw/vnc/xf86vncModule.cc 2012-03-27 12:54:56.938271322 +0200
1276N/A@@ -26,6 +26,8 @@
1276N/A #include <rfb/Logger_stdio.h>
1276N/A #include <rfb/LogWriter.h>
1276N/A
1276N/A+#include "xorg-version.h"
1276N/A+
1276N/A extern "C" {
1276N/A #define class c_class
1276N/A #define private c_private
1276N/A@@ -89,7 +91,12 @@ static void vncExtensionInitWithParams(I
1276N/A ScrnInfoPtr pScrn = xf86Screens[scr];
1276N/A
1276N/A for (ParameterIterator i(Configuration::global()); i.param; i.next()) {
1276N/A- char* val = xf86FindOptionValue(pScrn->options, i.param->getName());
1276N/A+ const char *val;
1276N/A+#if XORG < 112
1276N/A+ val = xf86FindOptionValue(pScrn->options, i.param->getName());
1276N/A+#else
1276N/A+ val = xf86FindOptionValue((XF86OptionPtr)pScrn->options, i.param->getName());
1276N/A+#endif
1276N/A if (val)
1276N/A i.param->setParam(val);
1276N/A }
1276N/Adiff -up xserver/hw/vnc/xorg-version.h.xorg112 xserver/hw/vnc/xorg-version.h
1276N/A--- xserver/hw/vnc/xorg-version.h.xorg112 2012-03-27 12:55:27.576240843 +0200
1276N/A+++ xserver/hw/vnc/xorg-version.h 2012-03-27 12:56:07.541204026 +0200
1276N/A@@ -38,6 +38,8 @@
1276N/A #define XORG 110
1276N/A #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
1276N/A #define XORG 111
1276N/A+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (12 * 100000) + (99 * 1000))
1276N/A+#define XORG 112
1276N/A #else
1276N/A #error "X.Org newer than 1.10 is not supported"
1276N/A #endif