Which version x.org xserver got rid of ClockRanges?

Kevin Brace kevinbrace at gmx.com
Tue Feb 16 04:48:26 UTC 2016


Hi,

I just want some clarifications on ClockRange and ClockRanges.
I will like to know which version of x.org xserver got rid of ClockRanges type.
I was compiling OpenChrome on Ubuntu and Lubuntu 10.04, and was getting a warning regarding pointer type.
This is the only warning I get when I compile current master branch OpenChrome source code on Ubuntu and Lubuntu 10.04.
I spent several hours researching this, and it turns out that Adam Jackson made this change around 2009.

https://lists.x.org/archives/xorg-devel/2009-November/003395.html

I am planning to make some changes to the OpenChrome source code so that it can still be compiled against the older xserver.
This is what the patch will look like, but I will like to know the precise xserver version so that I can set the correct value of XORG_VERSION_NUMERIC.
This is what the the current patch will look like.

---
 src/via_display.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/via_display.c b/src/via_display.c
index 7e58ae5..fc99f31 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1670,7 +1670,11 @@ UMSCrtcInit(ScrnInfoPtr pScrn)
     drmmode_crtc_private_ptr iga1_rec = NULL, iga2_rec = NULL;
     vgaHWPtr hwp = VGAHWPTR(pScrn);
     VIAPtr pVia = VIAPTR(pScrn);
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,11,0,0,0)
     ClockRangePtr clockRanges;
+#else
+    ClockRangesPtr clockRanges;
+#endif
     int max_pitch, max_height;
     VIABIOSInfoPtr pBIOSInfo;
     xf86CrtcPtr iga1, iga2;
@@ -1734,7 +1738,12 @@ UMSCrtcInit(ScrnInfoPtr pScrn)
      * Set up ClockRanges, which describe what clock ranges are
      * available, and what sort of modes they can be used for.
      */
+
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,11,0,0,0)
     clockRanges = xnfalloc(sizeof(ClockRange));
+#else
+    clockRanges = xnfalloc(sizeof(ClockRanges));
+#endif
     clockRanges->next = NULL;
     clockRanges->minClock = 20000;
     clockRanges->maxClock = 230000;
-- 


Should "XORG_VERSION_NUMERIC(1,11,0,0,0)" be "1,11 . . ." or something different?
If Adam can answer this question for me, that will be very helpful.


More information about the xorg-devel mailing list