diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-07 13:10:59 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-07 13:10:59 -0700 |
commit | 208ccbc7179b40a570a5943e325dd22740a67577 (patch) | |
tree | ebcb52c638c1ae238afcb3705ee39a0ac889ca77 | |
parent | de70a1d0cb79dad9e52baa43306264db80a163da (diff) |
Fix build failures resulting from changes to the swaps and swapl macros in recent xorg-server
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/vmware.h | 8 | ||||
-rw-r--r-- | src/vmwarectrl.c | 40 | ||||
-rw-r--r-- | src/vmwarexinerama.c | 56 |
3 files changed, 56 insertions, 48 deletions
diff --git a/src/vmware.h b/src/vmware.h index cf32462..0385292 100644 --- a/src/vmware.h +++ b/src/vmware.h @@ -43,6 +43,14 @@ #include "svga_reg.h" #include "svga_struct.h" +#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) swapl(x) +#define _swaps(x, n) swaps(x) +#endif + /* * The virtual hardware's cursor limits are pretty big. Some VMware * product versions limit to 1024x1024 pixels, others limit to 128 diff --git a/src/vmwarectrl.c b/src/vmwarectrl.c index d021eb7..d31bef6 100644 --- a/src/vmwarectrl.c +++ b/src/vmwarectrl.c @@ -82,10 +82,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); @@ -225,11 +225,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); @@ -379,9 +379,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); @@ -448,7 +448,7 @@ SVMwareCtrlQueryVersion(ClientPtr client) REQUEST(xVMwareCtrlQueryVersionReq); REQUEST_SIZE_MATCH(xVMwareCtrlQueryVersionReq); - swaps(&stuff->length, n); + _swaps(&stuff->length, n); return VMwareCtrlQueryVersion(client); } @@ -479,10 +479,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); } @@ -513,9 +513,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/src/vmwarexinerama.c b/src/vmwarexinerama.c index 2407c27..49df3f2 100644 --- a/src/vmwarexinerama.c +++ b/src/vmwarexinerama.c @@ -99,10 +99,10 @@ VMwareXineramaQueryVersion(ClientPtr client) rep.majorVersion = 1; rep.minorVersion = 0; if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swaps(&rep.majorVersion, n); + _swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -154,8 +154,8 @@ VMwareXineramaGetState(ClientPtr client) rep.sequenceNumber = client->sequence; rep.state = pVMWARE->xinerama; if(client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); + _swaps (&rep.sequenceNumber, n); + _swapl (&rep.length, n); } WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep); return client->noClientException; @@ -207,8 +207,8 @@ VMwareXineramaGetScreenCount(ClientPtr client) rep.sequenceNumber = client->sequence; rep.ScreenCount = pVMWARE->xineramaNumOutputs; if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); } WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); return client->noClientException; @@ -261,10 +261,10 @@ VMwareXineramaGetScreenSize(ClientPtr client) rep.width = pVMWARE->xineramaState[stuff->screen].width; rep.height = pVMWARE->xineramaState[stuff->screen].height; if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.width, n); - swapl(&rep.height, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swapl(&rep.width, n); + _swapl(&rep.height, n); } WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); return client->noClientException; @@ -310,9 +310,9 @@ VMwareXineramaIsActive(ClientPtr client) rep.state = pVMWARE->xinerama; if(client->swapped) { register int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.state, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swapl(&rep.state, n); } WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep); return client->noClientException; @@ -358,9 +358,9 @@ VMwareXineramaQueryScreens(ClientPtr client) rep.length = rep.number * sz_XineramaScreenInfo >> 2; if(client->swapped) { register int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.number, n); + _swaps(&rep.sequenceNumber, n); + _swapl(&rep.length, n); + _swapl(&rep.number, n); } WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep); @@ -375,10 +375,10 @@ VMwareXineramaQueryScreens(ClientPtr client) scratch.height = pVMWARE->xineramaState[i].height; if(client->swapped) { register int n; - swaps(&scratch.x_org, n); - swaps(&scratch.y_org, n); - swaps(&scratch.width, n); - swaps(&scratch.height, n); + _swaps(&scratch.x_org, n); + _swaps(&scratch.y_org, n); + _swaps(&scratch.width, n); + _swaps(&scratch.height, n); } WriteToClient(client, sz_XineramaScreenInfo, (char *)&scratch); } @@ -449,7 +449,7 @@ SVMwareXineramaQueryVersion (ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); register int n; - swaps(&stuff->length,n); + _swaps(&stuff->length,n); REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); return VMwareXineramaQueryVersion(client); } @@ -477,7 +477,7 @@ SVMwareXineramaGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); register int n; - swaps (&stuff->length, n); + _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); return VMwareXineramaGetState(client); } @@ -505,7 +505,7 @@ SVMwareXineramaGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); register int n; - swaps (&stuff->length, n); + _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); return VMwareXineramaGetScreenCount(client); } @@ -533,7 +533,7 @@ SVMwareXineramaGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); register int n; - swaps (&stuff->length, n); + _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); return VMwareXineramaGetScreenSize(client); } @@ -561,7 +561,7 @@ SVMwareXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); register int n; - swaps (&stuff->length, n); + _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return VMwareXineramaIsActive(client); } @@ -589,7 +589,7 @@ SVMwareXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); register int n; - swaps (&stuff->length, n); + _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return VMwareXineramaQueryScreens(client); } |