diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-02-01 17:25:19 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2012-02-02 10:31:32 +0100 |
commit | bfb286bea967c26426aebda2a581f35da0d86884 (patch) | |
tree | 2f76f7eee135b9ae7c0183768404beea6a887b6b /vmwgfx | |
parent | 8ff19c2b2f288d6851b444dbda39544980837b73 (diff) |
vmwgfx: Fix up swap[sl] for server 1.12
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'vmwgfx')
-rw-r--r-- | vmwgfx/vmwgfx_ctrl.c | 40 | ||||
-rw-r--r-- | vmwgfx/vmwgfx_driver.h | 9 |
2 files changed, 29 insertions, 20 deletions
diff --git a/vmwgfx/vmwgfx_ctrl.c b/vmwgfx/vmwgfx_ctrl.c index 3185879..156d34c 100644 --- a/vmwgfx/vmwgfx_ctrl.c +++ b/vmwgfx/vmwgfx_ctrl.c @@ -73,10 +73,10 @@ VMwareCtrlQueryVersion(ClientPtr client) rep.majorVersion = VMWARE_CTRL_MAJOR_VERSION; rep.minorVersion = VMWARE_CTRL_MINOR_VERSION; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.majorVersion, n); - swapl(&rep.minorVersion, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swapl(&rep.majorVersion, n); + _swapl(&rep.minorVersion, n); } WriteToClient(client, sizeof(xVMwareCtrlQueryVersionReply), (char *)&rep); @@ -171,11 +171,11 @@ VMwareCtrlSetRes(ClientPtr client) rep.x = stuff->x; rep.y = stuff->y; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.screen, n); - swapl(&rep.x, n); - swapl(&rep.y, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swapl(&rep.screen, n); + _swapl(&rep.x, n); + _swapl(&rep.y, n); } WriteToClient(client, sizeof(xVMwareCtrlSetResReply), (char *)&rep); @@ -278,9 +278,9 @@ VMwareCtrlSetTopology(ClientPtr client) rep.sequenceNumber = client->sequence; rep.screen = stuff->screen; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.screen, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swapl(&rep.screen, n); } WriteToClient(client, sizeof(xVMwareCtrlSetTopologyReply), (char *)&rep); @@ -347,7 +347,7 @@ SVMwareCtrlQueryVersion(ClientPtr client) REQUEST(xVMwareCtrlQueryVersionReq); REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq); - swaps(&stuff->length, n); + _swaps(&stuff->length, n); return VMwareCtrlQueryVersion(client); } @@ -378,10 +378,10 @@ SVMwareCtrlSetRes(ClientPtr client) REQUEST(xVMwareCtrlSetResReq); REQUEST_SIZE_MATCH(xVMwareCtrlSetResReq); - swaps(&stuff->length, n); - swapl(&stuff->screen, n); - swapl(&stuff->x, n); - swapl(&stuff->y, n); + _swaps(&stuff->length, n); + _swapl(&stuff->screen, n); + _swapl(&stuff->x, n); + _swapl(&stuff->y, n); return VMwareCtrlSetRes(client); } @@ -412,9 +412,9 @@ SVMwareCtrlSetTopology(ClientPtr client) REQUEST(xVMwareCtrlSetTopologyReq); REQUEST_SIZE_MATCH(xVMwareCtrlSetTopologyReq); - swaps(&stuff->length, n); - swapl(&stuff->screen, n); - swapl(&stuff->number, n); + _swaps(&stuff->length, n); + _swapl(&stuff->screen, n); + _swapl(&stuff->number, n); /* Each extent is a struct of shorts. */ SwapRestS(stuff); diff --git a/vmwgfx/vmwgfx_driver.h b/vmwgfx/vmwgfx_driver.h index 3290f0e..4fcfed6 100644 --- a/vmwgfx/vmwgfx_driver.h +++ b/vmwgfx/vmwgfx_driver.h @@ -44,6 +44,7 @@ #include <xf86Crtc.h> #include <xf86xv.h> #include <xa_tracker.h> +#include <xf86Module.h> #ifdef DRI2 #include <dri2.h> @@ -52,6 +53,14 @@ #endif #endif +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 +#define _swapl(x, n) swapl(x,n) +#define _swaps(x, n) swaps(x,n) +#else +#define _swapl(x, n) (void) n; swapl(x) +#define _swaps(x, n) (void) n; swaps(x) +#endif + #define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg); #define debug_printf(...) |