packages: xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec, xorg-driv...
baggins
baggins at pld-linux.org
Thu Jun 21 14:22:26 CEST 2012
Author: baggins Date: Thu Jun 21 12:22:26 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 7
- sync with git for new ABI
---- Files affected:
packages/xorg-driver-video-sisusb:
xorg-driver-video-sisusb.spec (1.26 -> 1.27) , sisusb-git.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec
diff -u packages/xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec:1.26 packages/xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec:1.27
--- packages/xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec:1.26 Mon Mar 5 07:26:41 2012
+++ packages/xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec Thu Jun 21 14:22:21 2012
@@ -3,11 +3,12 @@
Summary(pl.UTF-8): Sterownik obrazu X.org dla układów SiS podłączonych poprzez przejściówkę USB Net2280
Name: xorg-driver-video-sisusb
Version: 0.9.4
-Release: 6
+Release: 7
License: MIT
Group: X11/Applications
Source0: http://xorg.freedesktop.org/releases/individual/driver/xf86-video-sisusb-%{version}.tar.bz2
# Source0-md5: 1d7a1d4d09aa953bf09acb8467b16a59
+Patch0: sisusb-git.patch
URL: http://xorg.freedesktop.org/
BuildRequires: autoconf >= 2.57
BuildRequires: automake
@@ -46,6 +47,7 @@
%prep
%setup -q -n xf86-video-sisusb-%{version}
+%patch0 -p1
%build
%{__libtoolize}
@@ -80,6 +82,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.27 2012/06/21 12:22:21 baggins
+- rel 7
+- sync with git for new ABI
+
Revision 1.26 2012/03/05 06:26:41 arekm
- release 6
================================================================
Index: packages/xorg-driver-video-sisusb/sisusb-git.patch
diff -u /dev/null packages/xorg-driver-video-sisusb/sisusb-git.patch:1.1
--- /dev/null Thu Jun 21 14:22:26 2012
+++ packages/xorg-driver-video-sisusb/sisusb-git.patch Thu Jun 21 14:22:21 2012
@@ -0,0 +1,794 @@
+diff --git a/configure.ac b/configure.ac
+index 86c6ac5..725d6cb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,49 +20,48 @@
+ #
+ # Process this file with autoconf to produce a configure script
+
+-AC_PREREQ(2.57)
++# Initialize Autoconf
++AC_PREREQ([2.60])
+ AC_INIT([xf86-video-sisusb],
+- 0.9.4,
++ [0.9.4],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+- xf86-video-sisusb)
+-
++ [xf86-video-sisusb])
+ AC_CONFIG_SRCDIR([Makefile.am])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_AUX_DIR(.)
+
++# Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+-
+ AM_MAINTAINER_MODE
+
+-# Require xorg-macros: XORG_DEFAULT_OPTIONS
++# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+ m4_ifndef([XORG_MACROS_VERSION],
+- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+-XORG_MACROS_VERSION(1.3)
++ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
++XORG_MACROS_VERSION(1.8)
+ XORG_DEFAULT_OPTIONS
+
+-# Checks for programs.
++# Initialize libtool
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+-AC_PROG_CC
+-XORG_PROG_RAWCPP
+
+ AH_TOP([#include "xorg-server.h"])
+
++# Define a configure option for an alternate module directory
+ AC_ARG_WITH(xorg-module-dir,
+- AC_HELP_STRING([--with-xorg-module-dir=DIR],
++ AS_HELP_STRING([--with-xorg-module-dir=DIR],
+ [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+ [moduledir="$withval"],
+ [moduledir="$libdir/xorg/modules"])
+
+-# Checks for extensions
++# Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+ XORG_DRIVER_CHECK_EXT(XV, videoproto)
+ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
+
+-# Checks for pkg-config packages
+-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
++# Obtain compiler/linker options for the driver dependencies
++PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto pciaccess $REQUIRED_MODULES])
+ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+ HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
+ HAVE_XEXTPROTO_71="no")
+@@ -70,17 +69,14 @@ AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
+
+ # Checks for libraries.
+
+-# Checks for header files.
+-AC_HEADER_STDC
+-
+-AC_SUBST([XORG_CFLAGS])
+ AC_SUBST([moduledir])
+
+ DRIVER_NAME=sisusb
+ AC_SUBST([DRIVER_NAME])
+
+-AC_OUTPUT([
+- Makefile
+- src/Makefile
+- man/Makefile
++AC_CONFIG_FILES([
++ Makefile
++ src/Makefile
++ man/Makefile
+ ])
++AC_OUTPUT
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 1b26ac2..9ceb36f 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -31,39 +31,9 @@ EXTRA_DIST = @DRIVER_NAME at .man
+
+ CLEANFILES = $(driverman_DATA)
+
+-SED = sed
+-
+-# Strings to replace in man pages
+-XORGRELSTRING = @PACKAGE_STRING@
+- XORGMANNAME = X Version 11
+-
+-MANDEFS = \
+- -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
+- -D__appmansuffix__=$(APP_MAN_SUFFIX) \
+- -D__filemansuffix__=$(FILE_MAN_SUFFIX) \
+- -D__libmansuffix__=$(LIB_MAN_SUFFIX) \
+- -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
+- -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \
+- -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
+- -D__xconfigfile__=xorg.conf \
+- -D__xservername__=Xorg
+-
+-# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
+-# to cpp, because that trick does not work on all ANSI C preprocessors.
+-# Delete line numbers from the cpp output (-P is not portable, I guess).
+-# Allow XCOMM to be preceded by whitespace and provide a means of generating
+-# output lines with trailing backslashes.
+-# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
+-
+-CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
+- -e '/^\#line *[0-9][0-9]* *.*$$/d' \
+- -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
+- -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
+- -e '/^[ ]*XHASH/s/XHASH/\#/' \
+- -e '/\@\@$$/s/\@\@$$/\\/'
+-
+ SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
+
++# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+ .man.$(DRIVER_MAN_SUFFIX):
+- $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
++ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+diff --git a/man/sisusb.man b/man/sisusb.man
+index 7817cb5..6eafb8e 100644
+--- a/man/sisusb.man
++++ b/man/sisusb.man
+@@ -1,17 +1,5 @@
+-.\" $XFree86$
+-.\" $XdotOrg$
+ .\" shorthand for double quote that works everywhere.
+ .ds q \N'34'
+-#ifdef __xservername__
+-#define __myservername__ __xservername__
+-#else
+-#define __myservername__ XFree86
+-#endif
+-#ifdef __xconfigfile__
+-#define __myxconfigfile__ __xconfigfile__
+-#else
+-#define __myxconfigfile__ XF86Config
+-#endif
+ .TH SISUSB __drivermansuffix__ __vendorversion__
+ .SH NAME
+ sisusb \- SiS USB video driver
+@@ -25,7 +13,7 @@ sisusb \- SiS USB video driver
+ .fi
+ .SH DESCRIPTION
+ .B sisusb
+-is an __myservername__ driver for SiS (Silicon Integrated Systems) video chips that
++is an __xservername__ driver for SiS (Silicon Integrated Systems) video chips that
+ are connected via a Net2280-based USB dongle. The driver is not accelerated, but
+ provides support for colordepths of 8, 16 and 24 bpp as well as Render and other
+ extensions.
+@@ -39,7 +27,7 @@ driver supports USB video cards based on the following chipsets:
+ The SiS315E/PRO features two CRT controllers. However, in its USB version, only
+ the first output, referred to as "CRT1", is being used.
+ .SH CONFIGURATION DETAILS
+-Please refer to __myxconfigfile__(__filemansuffix__) for general configuration
++Please refer to __xconfigfile__(__filemansuffix__) for general configuration
+ details and to sis(__drivermansuffix__) for more information. This manpage only
+ covers a subset of the supported options.
+ .PP
+@@ -81,11 +69,7 @@ for device reconnection).
+ .SH "KNOWN BUGS"
+ none.
+ .SH "SEE ALSO"
+-#ifdef __xservername__
+ __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), sis(__drivermansuffix__)
+-#else
+-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__), sis(__drivermansuffix__)
+-#endif
+ .PP
+ .B "http://www.winischhofer.at/linuxsisvga.shtml"
+ for more information and updates
+diff --git a/src/sisusb.h b/src/sisusb.h
+index b9992ac..82ed509 100644
+--- a/src/sisusb.h
++++ b/src/sisusb.h
+@@ -113,6 +113,14 @@
+ #include <X11/extensions/Xv.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
++
+ /* Platform/architecture related definitions: */
+
+ #undef SIS_PC_PLATFORM
+@@ -141,7 +149,6 @@
+ #define UNLOCK_ALWAYS /* Always unlock the registers (should be set!) */
+
+ /* Need that for SiSCtrl */
+-#define NEED_REPLIES /* ? */
+ #define EXTENSION_PROC_ARGS void *
+ #include "extnsionst.h" /* required */
+ #include <X11/extensions/panoramiXproto.h> /* required */
+@@ -732,7 +739,7 @@ typedef struct {
+ Bool skipswitchcheck;
+ ULong VBFlagsInit;
+ DisplayModePtr currentModeLast;
+- IOADDRESS MyPIOOffset;
++ unsigned long MyPIOOffset;
+
+ char messagebuffer[64];
+ unsigned int VGAMapSize; /* SiSVGA stuff */
+diff --git a/src/sisusb_dac.c b/src/sisusb_dac.c
+index 5e3eb7f..b5c4dce 100644
+--- a/src/sisusb_dac.c
++++ b/src/sisusb_dac.c
+@@ -672,7 +672,7 @@ SiSUSBMemCopyToVideoRam(SISUSBPtr pSiSUSB, UChar *to, UChar *from, int size)
+ int num, retry = 3;
+ if(pSiSUSB->sisusbfatalerror) return;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)to, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)to, SEEK_SET);
+ num = write(pSiSUSB->sisusbdev, from, size);
+ } while((num != size) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+@@ -958,7 +958,7 @@ void sisclearvram(SISUSBPtr pSiSUSB, UChar *where, unsigned int howmuch)
+ if(pSiSUSB->sisusbfatalerror) return;
+ do {
+ x.operation = SUCMD_CLRSCR;
+- x.data3 = (CARD32)where;
++ x.data3 = (CARD32)(uintptr_t)where;
+ x.data0 = (howmuch >> 16) & 0xff;
+ x.data1 = (howmuch >> 8) & 0xff;
+ x.data2 = howmuch & 0xff;
+@@ -990,7 +990,7 @@ void SIS_MMIO_OUT8(SISUSBPtr pSiSUSB, UChar *base, unsigned int offset, CARD8 va
+ int num, retry = 3;
+ if(pSiSUSB->sisusbfatalerror) return;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)base + offset, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)base + offset, SEEK_SET);
+ num = write(pSiSUSB->sisusbdev, &val, 1);
+ } while((num != 1) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+@@ -1002,7 +1002,7 @@ void SIS_MMIO_OUT16(SISUSBPtr pSiSUSB, UChar *base, unsigned int offset, CARD16
+ CARD16 buf = sisusb_cpu_to_le16(val);
+ if(pSiSUSB->sisusbfatalerror) return;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)base + offset, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)base + offset, SEEK_SET);
+ num = write(pSiSUSB->sisusbdev, &buf, 2);
+ } while((num != 2) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+@@ -1014,7 +1014,7 @@ void SIS_MMIO_OUT32(SISUSBPtr pSiSUSB, UChar *base, unsigned int offset, CARD32
+ CARD32 buf = sisusb_cpu_to_le32(val);
+ if(pSiSUSB->sisusbfatalerror) return;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)base + offset, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)base + offset, SEEK_SET);
+ num = write(pSiSUSB->sisusbdev, &buf, 4);
+ } while((num != 4) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+@@ -1026,7 +1026,7 @@ CARD8 SIS_MMIO_IN8(SISUSBPtr pSiSUSB, UChar *base, unsigned int offset)
+ CARD8 tmp;
+ if(pSiSUSB->sisusbfatalerror) return 0;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)base + offset, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)base + offset, SEEK_SET);
+ num = read(pSiSUSB->sisusbdev, &tmp, 1);
+ } while((num != 1) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+@@ -1039,7 +1039,7 @@ CARD16 SIS_MMIO_IN16(SISUSBPtr pSiSUSB, UChar *base, unsigned int offset)
+ CARD16 tmp;
+ if(pSiSUSB->sisusbfatalerror) return 0;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)base + offset, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)base + offset, SEEK_SET);
+ num = read(pSiSUSB->sisusbdev, &tmp, 2);
+ } while((num != 2) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+@@ -1052,7 +1052,7 @@ CARD32 SIS_MMIO_IN32(SISUSBPtr pSiSUSB, UChar *base, unsigned int offset)
+ CARD32 tmp;
+ if(pSiSUSB->sisusbfatalerror) return 0;
+ do {
+- lseek(pSiSUSB->sisusbdev, (int)base + offset, SEEK_SET);
++ lseek(pSiSUSB->sisusbdev, (uintptr_t)base + offset, SEEK_SET);
+ num = read(pSiSUSB->sisusbdev, &tmp, 4);
+ } while((num != 4) && --retry);
+ if(!retry) SiSLostConnection(pSiSUSB);
+diff --git a/src/sisusb_driver.c b/src/sisusb_driver.c
+index 8ba2c33..032225c 100644
+--- a/src/sisusb_driver.c
++++ b/src/sisusb_driver.c
+@@ -186,12 +186,12 @@ SISUSBFreeRec(ScrnInfoPtr pScrn)
+ /* Just to make sure... */
+ if(!pSiSUSB) return;
+
+- if(pSiSUSB->pstate) xfree(pSiSUSB->pstate);
++ if(pSiSUSB->pstate) free(pSiSUSB->pstate);
+ pSiSUSB->pstate = NULL;
+- if(pSiSUSB->fonts) xfree(pSiSUSB->fonts);
++ if(pSiSUSB->fonts) free(pSiSUSB->fonts);
+ pSiSUSB->fonts = NULL;
+
+- if(pSiSUSB->SiS_Pr) xfree(pSiSUSB->SiS_Pr);
++ if(pSiSUSB->SiS_Pr) free(pSiSUSB->SiS_Pr);
+ pSiSUSB->SiS_Pr = NULL;
+
+ if(pSiSUSB->sisusbdevopen) {
+@@ -200,12 +200,12 @@ SISUSBFreeRec(ScrnInfoPtr pScrn)
+ }
+
+ if(pScrn->chipset) {
+- xfree(pScrn->chipset);
++ free(pScrn->chipset);
+ pScrn->chipset = NULL;
+ }
+
+ if(pScrn->driverPrivate) {
+- xfree(pScrn->driverPrivate);
++ free(pScrn->driverPrivate);
+ pScrn->driverPrivate = NULL;
+ }
+ }
+@@ -217,14 +217,14 @@ SISUSBErrorLog(ScrnInfoPtr pScrn, const char *format, ...)
+ static const char *str = "**************************************************\n";
+
+ va_start(ap, format);
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, str);
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%s", str);
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ " ERROR:\n");
+ xf86VDrvMsgVerb(pScrn->scrnIndex, X_ERROR, 1, format, ap);
+ va_end(ap);
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ " END OF MESSAGE\n");
+- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, str);
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%s", str);
+ }
+
+ static int
+@@ -248,7 +248,7 @@ SiSUSBCheckForUSBDongle(char *filename, SISUSBPtr pSiSUSB, int *filehandle)
+
+ if((myfile = open(filename, O_RDWR, 0)) != -1) {
+ if(!ioctl(myfile, SISUSB_GET_CONFIG_SIZE, &sisusbinfosize)) {
+- if((mysisusbinfo = xalloc(sisusbinfosize))) {
++ if((mysisusbinfo = malloc(sisusbinfosize))) {
+ if(!ioctl(myfile, (SISUSB_GET_CONFIG | (sisusbinfosize << 16)), mysisusbinfo)) {
+ if(mysisusbinfo->sisusb_id == SISUSB_ID) {
+ sisusbversion = (mysisusbinfo->sisusb_version << 16) |
+@@ -280,7 +280,7 @@ SiSUSBCheckForUSBDongle(char *filename, SISUSBPtr pSiSUSB, int *filehandle)
+ retval = mysisusbinfo->sisusb_minor;
+ }
+ }
+- xfree(mysisusbinfo);
++ free(mysisusbinfo);
+ mysisusbinfo = NULL;
+ }
+ }
+@@ -307,13 +307,13 @@ SiSUSBFindUSBDongle(GDevPtr dev, int *minorArray, int numDevSections, char **nam
+ }
+ if((p) && (*p) && (*p == '/')) {
+ gotdev = 1;
+- *nameptr = xalloc(strlen(p) + 1);
++ *nameptr = malloc(strlen(p) + 1);
+ strcpy(*nameptr, p);
+ retval = SiSUSBCheckForUSBDongle(*nameptr, NULL, NULL);
+ } else if((p) && (*p) && (sscanf(p, "%d", &i) == 1)) {
+ if(i >= 0 && i <= 31) {
+ gotdev = 1;
+- *nameptr = xalloc(32);
++ *nameptr = malloc(32);
+ sprintf(*nameptr, "/dev/sisusbvga%d", i);
+ retval = SiSUSBCheckForUSBDongle(*nameptr, NULL, NULL);
+ if(retval < 0) {
+@@ -324,7 +324,7 @@ SiSUSBFindUSBDongle(GDevPtr dev, int *minorArray, int numDevSections, char **nam
+ }
+ }
+ if(!gotdev) {
+- *nameptr = xalloc(32);
++ *nameptr = malloc(32);
+ for(i = 0; i < 64; i++) {
+ if(i < 32) sprintf(*nameptr, "/dev/sisusbvga%d", i);
+ else sprintf(*nameptr, "/dev/usb/sisusbvga%d", i);
+@@ -338,7 +338,7 @@ SiSUSBFindUSBDongle(GDevPtr dev, int *minorArray, int numDevSections, char **nam
+ if(retval >= 0) {
+ xf86Msg(X_INFO, "Found SiSUSB dongle (node %s, minor %d)\n", *nameptr, retval);
+ } else if((*nameptr)) {
+- xfree(*nameptr);
++ free(*nameptr);
+ *nameptr = NULL;
+ }
+
+@@ -401,14 +401,14 @@ SISUSBProbe(DriverPtr drv, int flags)
+ */
+
+ /* Allocate and initialize an array of ints for storing the minors */
+- if(!(minorArray = (int *)xalloc(numDevSections * sizeof(int)))) {
++ if(!(minorArray = (int *)malloc(numDevSections * sizeof(int)))) {
+ return FALSE;
+ }
+ for(i = 0; i < numDevSections; i++) minorArray[i] = -1;
+
+ /* Allocate an array of char ptrs for storing the device node names */
+- if(!(devnameArray = (char **)xalloc(numDevSections * sizeof(char *)))) {
+- xfree(minorArray);
++ if(!(devnameArray = (char **)malloc(numDevSections * sizeof(char *)))) {
++ free(minorArray);
+ return FALSE;
+ }
+
+@@ -420,20 +420,20 @@ SISUSBProbe(DriverPtr drv, int flags)
+ if((myminor = SiSUSBFindUSBDongle(devSections[i], minorArray, numDevSections, &nameptr)) >= 0) {
+ if(!SiSUSBFindDuplicate(myminor, minorArray, numDevSections)) {
+ minorArray[numUsed] = myminor;
+- devnameArray[numUsed] = xalloc(strlen(nameptr) + 1);
++ devnameArray[numUsed] = malloc(strlen(nameptr) + 1);
+ strcpy(devnameArray[numUsed], nameptr);
+ numUsed++;
+ }
+- xfree(nameptr);
++ free(nameptr);
+ }
+ }
+
+ /* Free the minor array, we don't need it anymore */
+- xfree(minorArray);
++ free(minorArray);
+
+ if(numUsed <= 0) {
+- xfree(devSections);
+- xfree(devnameArray);
++ free(devSections);
++ free(devnameArray);
+ return FALSE;
+ }
+
+@@ -470,8 +470,8 @@ SISUSBProbe(DriverPtr drv, int flags)
+
+ }
+
+- xfree(devSections);
+- xfree(devnameArray);
++ free(devSections);
++ free(devnameArray);
+ return foundScreen;
+ }
+
+@@ -622,10 +622,10 @@ SISUSBCalculateGammaRamp(ScreenPtr pScreen, ScrnInfoPtr pScrn)
+ if(!(nramp = xf86GetGammaRampSize(pScreen))) return;
+
+ for(i=0; i<3; i++) {
+- ramp[i] = (UShort *)xalloc(nramp * sizeof(UShort));
++ ramp[i] = (UShort *)malloc(nramp * sizeof(UShort));
+ if(!ramp[i]) {
+- if(ramp[0]) { xfree(ramp[0]); ramp[0] = NULL; }
+- if(ramp[1]) { xfree(ramp[1]); ramp[1] = NULL; }
++ if(ramp[0]) { free(ramp[0]); ramp[0] = NULL; }
++ if(ramp[1]) { free(ramp[1]); ramp[1] = NULL; }
+ return;
+ }
+ }
+@@ -685,9 +685,9 @@ SISUSBCalculateGammaRamp(ScreenPtr pScreen, ScrnInfoPtr pScrn)
+
+ xf86ChangeGammaRamp(pScreen, nramp, ramp[0], ramp[1], ramp[2]);
+
+- xfree(ramp[0]);
+- xfree(ramp[1]);
+- xfree(ramp[2]);
++ free(ramp[0]);
++ free(ramp[1]);
++ free(ramp[2]);
+ ramp[0] = ramp[1] = ramp[2] = NULL;
+ }
+ #endif
+@@ -906,11 +906,11 @@ SISUSBPreInit(ScrnInfoPtr pScrn, int flags)
+ Bool gotit = FALSE;
+
+ if(!ioctl(fd, SISUSBFB_GET_INFO_SIZE, &sisfbinfosize)) {
+- if((mysisfbinfo = xalloc(sisfbinfosize))) {
++ if((mysisfbinfo = malloc(sisfbinfosize))) {
+ if(!ioctl(fd, (SISUSBFB_GET_INFO | (sisfbinfosize << 16)), mysisfbinfo)) {
+ gotit = TRUE;
+ } else {
+- xfree(mysisfbinfo);
++ free(mysisfbinfo);
+ mysisfbinfo = NULL;
+ }
+ }
+@@ -944,7 +944,7 @@ SISUSBPreInit(ScrnInfoPtr pScrn, int flags)
+
+ }
+ }
+- xfree(mysisfbinfo);
++ free(mysisfbinfo);
+ mysisfbinfo = NULL;
+ }
+ close (fd);
+@@ -1147,7 +1147,7 @@ SISUSBPreInit(ScrnInfoPtr pScrn, int flags)
+ #endif
+
+ if(pSiSUSB->HWCursor) {
+- if(!(pSiSUSB->USBCursorBuf = xcalloc(pSiSUSB->CursorSize * 4, 1))) pSiSUSB->HWCursor = FALSE;
++ if(!(pSiSUSB->USBCursorBuf = calloc(pSiSUSB->CursorSize * 4, 1))) pSiSUSB->HWCursor = FALSE;
+
+ pSiSUSB->availMem -= (pSiSUSB->CursorSize * 2);
+ if(pSiSUSB->OptUseColorCursor) pSiSUSB->availMem -= (pSiSUSB->CursorSize * 2);
+@@ -1456,8 +1456,8 @@ SISUSBMapMem(ScrnInfoPtr pScrn)
+ {
+ SISUSBPtr pSiSUSB = SISUSBPTR(pScrn);
+
+- pSiSUSB->FbBase = (UChar *)pSiSUSB->FbAddress;
+- pSiSUSB->IOBase = (UChar *)pSiSUSB->IOAddress;
++ pSiSUSB->FbBase = (UChar *)(uintptr_t)pSiSUSB->FbAddress;
++ pSiSUSB->IOBase = (UChar *)(uintptr_t)pSiSUSB->IOAddress;
+
+ return TRUE;
+ }
+@@ -1811,7 +1811,7 @@ SISUSBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+
+ if(pSiSUSB->ShadowFB) {
+ pSiSUSB->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * displayWidth);
+- pSiSUSB->ShadowPtr = xalloc(pSiSUSB->ShadowPitch * height);
++ pSiSUSB->ShadowPtr = malloc(pSiSUSB->ShadowPitch * height);
+ if(!(FBStart = pSiSUSB->ShadowPtr)) {
+ SISUSBSaveScreen(pScreen, SCREEN_SAVER_OFF);
+ SISUSBErrorLog(pScrn, "Failed to allocate shadow framebuffer\n");
+@@ -1820,7 +1820,7 @@ SISUSBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ #if X_BYTE_ORDER == X_BIG_ENDIAN
+ if(pScrn->bitsPerPixel == 16) {
+ /* For 16bpp, we need to swap the bytes in the framebuffer */
+- if(!(pSiSUSB->ShadowPtrSwap = xalloc(pSiSUSB->ShadowPitch * height))) {
++ if(!(pSiSUSB->ShadowPtrSwap = malloc(pSiSUSB->ShadowPitch * height))) {
+ SISUSBSaveScreen(pScreen, SCREEN_SAVER_OFF);
+ SISUSBErrorLog(pScrn, "Failed to allocate swap buffer for shadow framebuffer\n");
+ return FALSE;
+@@ -2238,24 +2238,24 @@ SISUSBCloseScreen(int scrnIndex, ScreenPtr pScreen)
+ }
+
+ if(pSiSUSB->USBCursorBuf) {
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/packages/xorg-driver-video-sisusb/xorg-driver-video-sisusb.spec?r1=1.26&r2=1.27
More information about the pld-cvs-commit
mailing list