summarylogtreecommitdiffstats
path: root/remove-ImplicitPointerConversions.patch
diff options
context:
space:
mode:
authorSandor Nagy2016-01-13 18:22:24 +0100
committerSandor Nagy2016-01-13 18:22:24 +0100
commitca7f7401d0f0b4b47a7b010b0e0ff8b40f7332b1 (patch)
treeefcc915fb422f9ebd6460ddfb54d301b130ed23b /remove-ImplicitPointerConversions.patch
parent726b02e5b0b99e130d51af7e4846fceb6c9dcdd4 (diff)
downloadaur-ca7f7401d0f0b4b47a7b010b0e0ff8b40f7332b1.tar.gz
Update to Xorg 1.18
Diffstat (limited to 'remove-ImplicitPointerConversions.patch')
-rw-r--r--remove-ImplicitPointerConversions.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/remove-ImplicitPointerConversions.patch b/remove-ImplicitPointerConversions.patch
new file mode 100644
index 000000000000..a2b1681787f9
--- /dev/null
+++ b/remove-ImplicitPointerConversions.patch
@@ -0,0 +1,106 @@
+--- a/src/sis_mergedfb.c
++++ b/src/sis_mergedfb.c
+@@ -47,6 +47,30 @@
+ #include "windowstr.h"
+ #endif
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
++#include <inputstr.h> /* for inputInfo */
++#endif
++
++/*
++ * LookupWindow was removed with video abi 11.
++ */
++#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
++#ifndef DixGetAttrAccess
++#define DixGetAttrAccess (1<<4)
++#endif
++#endif
++
++#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 2)
++static inline int
++dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
++{
++ *pWin = LookupWindow(id, client);
++ if (!*pWin)
++ return BadWindow;
++ return Success;
++}
++#endif
++
+ void SiSMFBInitMergedFB(ScrnInfoPtr pScrn);
+ void SiSMFBHandleModesCRT2(ScrnInfoPtr pScrn, ClockRangePtr clockRanges);
+ void SiSMFBMakeModeList(ScrnInfoPtr pScrn);
+@@ -2488,10 +2512,12 @@
+ WindowPtr pWin;
+ xPanoramiXGetStateReply rep;
+ register int n;
++ int rc;
+
+ REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
+- pWin = LookupWindow(stuff->window, client);
+- if(!pWin) return BadWindow;
++ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
++ if (rc != Success)
++ return rc;
+
+ rep.type = X_Reply;
+ rep.length = 0;
+@@ -2515,8 +2541,8 @@
+ register int n;
+
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
+- pWin = LookupWindow(stuff->window, client);
+- if(!pWin) return BadWindow;
++ if(Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess))
++ return BadWindow;
+
+ rep.type = X_Reply;
+ rep.length = 0;
+@@ -2540,8 +2566,8 @@
+ register int n;
+
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+- pWin = LookupWindow (stuff->window, client);
+- if(!pWin) return BadWindow;
++ if(Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess))
++ return BadWindow;
+
+ rep.type = X_Reply;
+ rep.length = 0;
+@@ -2631,26 +2657,21 @@
+ int lookup_ret;
+
+ REQUEST_SIZE_MATCH(xXineramaSelectInputReq);
+- /*IvansLee define NEW_XORG_VERSION.*/
+- #if NEW_XORG_VERSION == 1
+- pWin = SecurityLookupWindow(stuff->window,client,DixWriteAccess);
+- #else
+- pWin = SecurityLookupWindow(stuff->window,client,SecurityWriteAccess);
+- #endif
+-
+- if(!pWin)
+- return BadWindow;
++ int rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
++ if (rc != Success)
++ return BadWindow;
++
+ #if NEW_XORG_VERSION == 1 /*New Xorg Version >= 1.4 */
+- lookup_ret = dixLookupResourceByType((pointer) &pHead,
+- pWin->drawable.id, EventType,
+- client, DixWriteAccess);
+- pHead = (lookup_ret == Success ? pHead : NULL);
++ lookup_ret = dixLookupResourceByType((pointer) &pHead,
++ pWin->drawable.id, EventType,
++ client, DixWriteAccess);
++ pHead = (lookup_ret == Success ? pHead : NULL);
+ #else
+ pHead = (SiSXineramaEventPtr *)SecurityLookupIDByType(client,
+ pWin->drawable.id, EventType,
+ SecurityWriteAccess);
+ #endif
+-
++
+ if(stuff->enable & (XineramaLayoutChangeNotifyMask)) {
+
+ /* Check for existing entry */