diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-07-21 15:38:00 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-07-28 18:32:29 -0300 |
commit | 230858d8b3dfc18098cb89cdee3599714ac95375 (patch) | |
tree | 7b9d227b2146cb30b1a487f73cef6743196a40f3 | |
parent | 3cbb51c4a94b1d19cdc5b9542449281cc0952356 (diff) |
Protect xf86rush dependent code around #ifdef XF86RUSH
Also correct an incorrect #ifndef -> #ifdef, so that the driver now
doesn't have any calls to non existent symbols.
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-rw-r--r-- | src/apm.h | 2 | ||||
-rw-r--r-- | src/apm_driver.c | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -242,8 +242,10 @@ extern void ApmAdjustFrame(int scrnIndex, int x, int y, int flags); extern void ApmHWCursorReserveSpace(ApmPtr pApm); extern void ApmAccelReserveSpace(ApmPtr pApm); +#ifdef XF86RUSH extern int ApmPixmapIndex; #define APM_GET_PIXMAP_PRIVATE(pix)\ ((ApmPixmapPtr)(((PixmapPtr)(pix))->devPrivates[ApmPixmapIndex].ptr)) +#endif #include "apm_regs.h" diff --git a/src/apm_driver.c b/src/apm_driver.c index 49b74d3..9106d1f 100644 --- a/src/apm_driver.c +++ b/src/apm_driver.c @@ -53,9 +53,10 @@ static void ApmDisplayPowerManagementSet(ScrnInfoPtr pScrn, int flags); static void ApmProbeDDC(ScrnInfoPtr pScrn, int index); - +#ifdef XF86RUSH int ApmPixmapIndex = -1; static unsigned long ApmGeneration = 0; +#endif _X_EXPORT DriverRec APM = { APM_VERSION, @@ -1998,7 +1999,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) miSetPixmapDepths(); switch (pScrn->bitsPerPixel) { -#ifndef HAVE_XF1BPP +#ifdef HAVE_XF1BPP case 1: ret = xf1bppScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, @@ -2120,6 +2121,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); } +#ifdef XF86RUSH if (ApmGeneration != serverGeneration) { if ((ApmPixmapIndex = AllocatePixmapPrivateIndex()) < 0) return FALSE; @@ -2128,6 +2130,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if (!AllocatePixmapPrivate(pScreen, ApmPixmapIndex, sizeof(ApmPixmapRec))) return FALSE; +#endif /* Done */ return TRUE; |