Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ur xf86-video-sis-0.9.1.orig/src/sis_driver.c xf86-video-sis-0.9.1/src/sis_driver.c
- --- xf86-video-sis-0.9.1.orig/src/sis_driver.c 2009-06-22 14:15:54.000000000 +0200
- +++ xf86-video-sis-0.9.1/src/sis_driver.c 2012-03-14 23:08:27.009397583 +0100
- @@ -3278,7 +3278,7 @@
- pSiS->pInt = NULL;
- /* Save PCI Domain Base */
- -#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0)
- +#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0) || GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12
- pSiS->IODBase = 0;
- #else
- pSiS->IODBase = pScrn->domainIOBase;
- diff -ur xf86-video-sis-0.9.1.orig/src/sis.h xf86-video-sis-0.9.1/src/sis.h
- --- xf86-video-sis-0.9.1.orig/src/sis.h 2009-12-03 20:28:46.000000000 +0100
- +++ xf86-video-sis-0.9.1/src/sis.h 2012-03-14 23:08:27.010397580 +0100
- @@ -80,6 +80,13 @@
- #include "xf86_ansic.h"
- #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) swapl(x)
- +#define _swaps(x, n) swaps(x)
- +#endif
- #define SIS_HaveDriverFuncs 0
- diff -ur xf86-video-sis-0.9.1.orig/src/sis_mergedfb.c xf86-video-sis-0.9.1/src/sis_mergedfb.c
- --- xf86-video-sis-0.9.1.orig/src/sis_mergedfb.c 2008-05-15 20:50:12.000000000 +0200
- +++ xf86-video-sis-0.9.1/src/sis_mergedfb.c 2012-03-14 23:08:27.012397575 +0100
- @@ -2472,10 +2472,10 @@
- rep.majorVersion = SIS_XINERAMA_MAJOR_VERSION;
- rep.minorVersion = SIS_XINERAMA_MINOR_VERSION;
- 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);
- @@ -2498,9 +2498,8 @@
- rep.sequenceNumber = client->sequence;
- rep.state = !SiSnoPanoramiXExtension;
- if(client->swapped) {
- - swaps (&rep.sequenceNumber, n);
- - swapl (&rep.length, n);
- - swaps (&rep.state, n);
- + _swaps (&rep.sequenceNumber, n);
- + _swapl (&rep.length, n);
- }
- WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);
- return client->noClientException;
- @@ -2523,9 +2522,8 @@
- rep.sequenceNumber = client->sequence;
- rep.ScreenCount = SiSXineramaNumScreens;
- if(client->swapped) {
- - swaps(&rep.sequenceNumber, n);
- - swapl(&rep.length, n);
- - swaps(&rep.ScreenCount, n);
- + _swaps(&rep.sequenceNumber, n);
- + _swapl(&rep.length, n);
- }
- WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
- return client->noClientException;
- @@ -2549,10 +2547,10 @@
- rep.width = SiSXineramadataPtr[stuff->screen].width;
- rep.height = SiSXineramadataPtr[stuff->screen].height;
- if(client->swapped) {
- - swaps(&rep.sequenceNumber, n);
- - swapl(&rep.length, n);
- - swaps(&rep.width, n);
- - swaps(&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;
- @@ -2571,9 +2569,9 @@
- rep.state = !SiSnoPanoramiXExtension;
- 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;
- @@ -2592,9 +2590,9 @@
- 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);
- @@ -2609,10 +2607,10 @@
- scratch.height = SiSXineramadataPtr[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);
- }
- @@ -2761,7 +2759,7 @@
- {
- REQUEST(xPanoramiXQueryVersionReq);
- register int n;
- - swaps(&stuff->length,n);
- + _swaps(&stuff->length,n);
- REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
- return SiSProcXineramaQueryVersion(client);
- }
- @@ -2771,7 +2769,7 @@
- {
- REQUEST(xPanoramiXGetStateReq);
- register int n;
- - swaps (&stuff->length, n);
- + _swaps (&stuff->length, n);
- REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- return SiSProcXineramaGetState(client);
- }
- @@ -2781,7 +2779,7 @@
- {
- REQUEST(xPanoramiXGetScreenCountReq);
- register int n;
- - swaps (&stuff->length, n);
- + _swaps (&stuff->length, n);
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- return SiSProcXineramaGetScreenCount(client);
- }
- @@ -2791,7 +2789,7 @@
- {
- REQUEST(xPanoramiXGetScreenSizeReq);
- register int n;
- - swaps (&stuff->length, n);
- + _swaps (&stuff->length, n);
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- return SiSProcXineramaGetScreenSize(client);
- }
- @@ -2801,7 +2799,7 @@
- {
- REQUEST(xXineramaIsActiveReq);
- register int n;
- - swaps (&stuff->length, n);
- + _swaps (&stuff->length, n);
- REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
- return SiSProcXineramaIsActive(client);
- }
- @@ -2811,7 +2809,7 @@
- {
- REQUEST(xXineramaQueryScreensReq);
- register int n;
- - swaps (&stuff->length, n);
- + _swaps (&stuff->length, n);
- REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
- return SiSProcXineramaQueryScreens(client);
- }
- @@ -2821,8 +2819,8 @@
- {
- REQUEST(xXineramaSelectInputReq);
- register int n;
- - swaps(&stuff->length, n);
- - swapl(&stuff->window, n);
- + _swaps(&stuff->length, n);
- + _swapl(&stuff->window, n);
- return SiSProcXineramaSelectInput(client);
- }
- diff -ur xf86-video-sis-0.9.1.orig/src/sis_utility.c xf86-video-sis-0.9.1/src/sis_utility.c
- --- xf86-video-sis-0.9.1.orig/src/sis_utility.c 2008-09-02 16:16:32.000000000 +0200
- +++ xf86-video-sis-0.9.1/src/sis_utility.c 2012-03-14 23:08:27.013397573 +0100
- @@ -2078,10 +2078,10 @@
- rep.majorVersion = SISCTRL_MAJOR_VERSION;
- rep.minorVersion = SISCTRL_MINOR_VERSION;
- 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(xSiSCtrlQueryVersionReply), (char *)&rep);
- return (client->noClientException);
- @@ -2122,15 +2122,15 @@
- rep.sequenceNumber = client->sequence;
- if(client->swapped) {
- - swaps(&rep.sequenceNumber, n);
- - swapl(&rep.length, n);
- - swapl(&rep.screen, n);
- - swapl(&rep.sdc_id, n);
- - swapl(&rep.sdc_command, n);
- - swapl(&rep.sdc_result_header, n);
- + _swaps(&rep.sequenceNumber, n);
- + _swapl(&rep.length, n);
- + _swapl(&rep.screen, n);
- + _swapl(&rep.sdc_id, n);
- + _swapl(&rep.sdc_command, n);
- + _swapl(&rep.sdc_result_header, n);
- for(i = 0; i < SDC_NUM_PARM_RESULT; i++) {
- - swapl(&rep.sdc_parm[i], n);
- - swapl(&rep.sdc_result[i], n);
- + _swapl(&rep.sdc_parm[i], n);
- + _swapl(&rep.sdc_result[i], n);
- }
- }
- WriteToClient(client, sizeof(xSiSCtrlCommandReply), (char *)&rep);
- @@ -2157,7 +2157,7 @@
- {
- REQUEST(xSiSCtrlQueryVersionReq);
- register int n;
- - swaps(&stuff->length, n);
- + _swaps(&stuff->length, n);
- REQUEST_SIZE_MATCH(xSiSCtrlQueryVersionReq);
- return SiSProcSiSCtrlQueryVersion(client);
- }
- @@ -2168,14 +2168,14 @@
- REQUEST(xSiSCtrlCommandReq);
- register int n;
- int i;
- - swaps(&stuff->length, n);
- - swapl(&stuff->screen, n);
- - swapl(&stuff->sdc_id, n);
- - swapl(&stuff->sdc_command, n);
- - swapl(&stuff->sdc_result_header, n);
- + _swaps(&stuff->length, n);
- + _swapl(&stuff->screen, n);
- + _swapl(&stuff->sdc_id, n);
- + _swapl(&stuff->sdc_command, n);
- + _swapl(&stuff->sdc_result_header, n);
- for(i = 0; i < SDC_NUM_PARM_RESULT; i++) {
- - swapl(&stuff->sdc_parm[i], n);
- - swapl(&stuff->sdc_result[i], n);
- + _swapl(&stuff->sdc_parm[i], n);
- + _swapl(&stuff->sdc_result[i], n);
- }
- REQUEST_SIZE_MATCH(xSiSCtrlCommandReq);
- return SiSProcSiSCtrlCommand(client);
Advertisement
Add Comment
Please, Sign In to add comment