From 43b8136a07fbbdf6e5bdd786d06be89904fc0854 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 17 Jul 2022 18:57:28 -0700 Subject: unifdef Lynx Signed-off-by: Alan Coopersmith --- src/XF86DGA.c | 21 +-------------------- src/XF86DGA2.c | 12 +----------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/XF86DGA.c b/src/XF86DGA.c index c582939..ffae13c 100644 --- a/src/XF86DGA.c +++ b/src/XF86DGA.c @@ -329,13 +329,7 @@ Bool XF86DGAViewPortChanged( #include #include #include -# if defined(Lynx) && defined(NO_MMAP) -# include -# include -# include -# else -# include -# endif +#include #include #include #include @@ -463,10 +457,6 @@ MapPhysAddress(unsigned long address, unsigned long size) delta = address % pagesize; offset = address - delta; -#if defined(Lynx) && defined(NO_MMAP) - vaddr = (void *)smem_create("XF86DGA", (char *)offset, - size + delta, SM_READ|SM_WRITE); -#else #ifndef MAP_FILE #define MAP_FILE 0 #endif @@ -478,7 +468,6 @@ MapPhysAddress(unsigned long address, unsigned long size) MAP_FILE | MAP_SHARED, mapFd, (off_t)offset); if (vaddr == (void *)-1) return NULL; -#endif if (!vaddr) { if (!(mp = AddMap())) @@ -538,19 +527,11 @@ XF86DGADirectVideo( mp = sp->map; if (enable & XF86DGADirectGraphics) { -#if !(defined(Lynx) && defined(NO_MMAP)) if (mp && mp->vaddr) mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ | PROT_WRITE); -#endif } else { -#if !(defined(Lynx) && defined(NO_MMAP)) if (mp && mp->vaddr) mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ); -#elif defined(Lynx) && defined(NO_MMAP) - /* XXX this doesn't allow enable after disable */ - smem_create(NULL, mp->vaddr, mp->size + mp->delta, SM_DETACH); - smem_remove("XF86DGA"); -#endif } XF86DGADirectVideoLL(dis, screen, enable); diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c index 6479c18..deb4267 100644 --- a/src/XF86DGA2.c +++ b/src/XF86DGA2.c @@ -737,13 +737,7 @@ void XDGAKeyEventToXKeyEvent( #include #include #include -# if defined(Lynx) && defined(NO_MMAP) -# include -# include -# include -# else -# include -# endif +#include #include #include #include @@ -876,9 +870,6 @@ DGAMapPhysical( pMap->physical = base; pMap->size = size; -#if defined (Lynx) && defined(NO_MMAP) - pMap->virtual = smem_create("XF86DGA", (char*)base, size, SM_READ|SM_WRITE); -#else #ifndef MAP_FILE #define MAP_FILE 0 #endif @@ -891,7 +882,6 @@ DGAMapPhysical( if (pMap->virtual == (void *)-1) return False; mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE); -#endif return True; } -- cgit v1.2.3