summaryrefslogtreecommitdiff
path: root/src/XF86DGA.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XF86DGA.c')
-rw-r--r--src/XF86DGA.c54
1 files changed, 3 insertions, 51 deletions
diff --git a/src/XF86DGA.c b/src/XF86DGA.c
index 24d9369..622095c 100644
--- a/src/XF86DGA.c
+++ b/src/XF86DGA.c
@@ -8,12 +8,6 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc
/* THIS IS NOT AN X CONSORTIUM STANDARD */
-#ifdef __UNIXOS2__ /* needed here to override certain constants in X headers */
-#define INCL_DOS
-#define INCL_DOSIOCTL
-#define I_NEED_OS2_H
-#include <os2.h>
-#endif
#if defined(linux)
#define HAS_MMAP_ANON
@@ -361,9 +355,7 @@ Bool XF86DGAViewPortChanged(
# include <errno.h>
# include <smem.h>
# else
-# if !defined(__UNIXOS2__)
-# include <sys/mman.h>
-# endif
+# include <sys/mman.h>
# endif
#endif
#include <sys/wait.h>
@@ -469,10 +461,6 @@ MapPhysAddress(unsigned long address, unsigned long size)
MapPtr mp;
#if defined(ISC) && defined(HAS_SVR3_MMAP)
struct kd_memloc mloc;
-#elif defined(__UNIXOS2__)
- APIRET rc;
- ULONG action;
- HFILE hfd;
#endif
if ((mp = FindMap(address, size))) {
@@ -513,40 +501,6 @@ MapPhysAddress(unsigned long address, unsigned long size)
if ((vaddr = (void *)ioctl(mapFd, MAP, &mloc)) == (void *)-1)
return NULL;
-#elif defined (__UNIXOS2__)
- /*
- * Dragon warning here! /dev/pmap$ is never closed, except on program exit.
- * Consecutive calling of this routine will make PMAP$ driver run out
- * of memory handles. Some umap/close mechanism should be provided
- */
-
- rc = DosOpen("/dev/pmap$", &hfd, &action, 0, FILE_NORMAL, FILE_OPEN,
- OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE, (PEAOP2)NULL);
- if (rc != 0)
- return NULL;
- {
- struct map_ioctl {
- union {
- ULONG phys;
- void* user;
- } a;
- ULONG size;
- } pmap,dmap;
- ULONG plen,dlen;
-#define XFREE86_PMAP 0x76
-#define PMAP_MAP 0x44
-
- pmap.a.phys = offset;
- pmap.size = size + delta;
- rc = DosDevIOCtl(hfd, XFREE86_PMAP, PMAP_MAP,
- (PULONG)&pmap, sizeof(pmap), &plen,
- (PULONG)&dmap, sizeof(dmap), &dlen);
- if (rc == 0) {
- vaddr = dmap.a.user;
- }
- }
- if (rc != 0)
- return NULL;
#elif defined(Lynx) && defined(NO_MMAP)
vaddr = (void *)smem_create("XF86DGA", (char *)offset,
size + delta, SM_READ|SM_WRITE);
@@ -623,15 +577,13 @@ XF86DGADirectVideo(
if (enable & XF86DGADirectGraphics) {
#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \
- && !(defined(Lynx) && defined(NO_MMAP)) \
- && !defined(__UNIXOS2__)
+ && !(defined(Lynx) && defined(NO_MMAP))
if (mp && mp->vaddr)
mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ | PROT_WRITE);
#endif
} else {
#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \
- && !(defined(Lynx) && defined(NO_MMAP)) \
- && !defined(__UNIXOS2__)
+ && !(defined(Lynx) && defined(NO_MMAP))
if (mp && mp->vaddr)
mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ);
#elif defined(Lynx) && defined(NO_MMAP)