aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/os-support')
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/alpha_video.c98
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/arm_video.c48
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c48
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/i386_video.c32
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/ppc_video.c10
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c10
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Sbus.c16
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/nobus.c5
-rw-r--r--xorg-server/hw/xfree86/os-support/hurd/hurd_video.c6
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/int10/linux.c26
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c11
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_apm.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c36
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_init.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_video.c102
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/vidmem.c14
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_apm.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_init.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_vid.c6
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86OSpriv.h10
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSproc.h4
24 files changed, 251 insertions, 249 deletions
diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c
index 91f9fc826..95bd0591a 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c
@@ -189,10 +189,10 @@ static int devMemFd = -1;
#define DEV_APERTURE "/dev/xf86"
#endif
-static pointer mapVidMem(int, unsigned long, unsigned long, int);
-static void unmapVidMem(int, pointer, unsigned long);
-static pointer mapVidMemSparse(int, unsigned long, unsigned long, int);
-static void unmapVidMemSparse(int, pointer, unsigned long);
+static void *mapVidMem(int, unsigned long, unsigned long, int);
+static void unmapVidMem(int, void *, unsigned long);
+static void *mapVidMemSparse(int, unsigned long, unsigned long, int);
+static void unmapVidMemSparse(int, void *, unsigned long);
/*
* Check if /dev/mem can be mmap'd. If it can't print a warning when
@@ -203,7 +203,7 @@ checkDevMem(Bool warn)
{
static Bool devMemChecked = FALSE;
int fd;
- pointer base;
+ void *base;
if (devMemChecked)
return;
@@ -295,10 +295,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->initialised = TRUE;
}
-static pointer
+static void *
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
- pointer base;
+ void *base;
checkDevMem(FALSE);
Base = Base & ((1L << 32) - 1);
@@ -336,7 +336,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
}
static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
munmap((caddr_t) Base, Size);
}
@@ -424,40 +424,40 @@ xf86DisableIO()
#define vuip volatile unsigned int *
-static pointer memSBase = 0;
-static pointer memBase = 0;
+static void *memSBase = 0;
+static void *memBase = 0;
-extern int readDense8(pointer Base, register unsigned long Offset);
-extern int readDense16(pointer Base, register unsigned long Offset);
-extern int readDense32(pointer Base, register unsigned long Offset);
+extern int readDense8(void *Base, register unsigned long Offset);
+extern int readDense16(void *Base, register unsigned long Offset);
+extern int readDense32(void *Base, register unsigned long Offset);
extern void
- writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, void *Base, register unsigned long Offset);
extern void
- writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, void *Base, register unsigned long Offset);
extern void
- writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, void *Base, register unsigned long Offset);
extern void
- writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, void *Base, register unsigned long Offset);
extern void
- writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, void *Base, register unsigned long Offset);
extern void
- writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, void *Base, register unsigned long Offset);
-static int readSparse8(pointer Base, register unsigned long Offset);
-static int readSparse16(pointer Base, register unsigned long Offset);
-static int readSparse32(pointer Base, register unsigned long Offset);
+static int readSparse8(void *Base, register unsigned long Offset);
+static int readSparse16(void *Base, register unsigned long Offset);
+static int readSparse32(void *Base, register unsigned long Offset);
static void
- writeSparseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeSparseNB8(int Value, void *Base, register unsigned long Offset);
static void
- writeSparseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeSparseNB16(int Value, void *Base, register unsigned long Offset);
static void
- writeSparseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeSparseNB32(int Value, void *Base, register unsigned long Offset);
static void
- writeSparse8(int Value, pointer Base, register unsigned long Offset);
+ writeSparse8(int Value, void *Base, register unsigned long Offset);
static void
- writeSparse16(int Value, pointer Base, register unsigned long Offset);
+ writeSparse16(int Value, void *Base, register unsigned long Offset);
static void
- writeSparse32(int Value, pointer Base, register unsigned long Offset);
+ writeSparse32(int Value, void *Base, register unsigned long Offset);
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
extern int sysarch(int, void *);
@@ -481,7 +481,7 @@ sethae(u_int64_t hae)
}
#endif
-static pointer
+static void *
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size,
int flags)
{
@@ -514,16 +514,16 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size,
strerror(errno));
}
}
- return (pointer) ((unsigned long) memBase + Base);
+ return (void *) ((unsigned long) memBase + Base);
}
static void
-unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMemSparse(int ScreenNum, void *Base, unsigned long Size)
{
}
static int
-readSparse8(pointer Base, register unsigned long Offset)
+readSparse8(void *Base, register unsigned long Offset)
{
register unsigned long result, shift;
register unsigned long msb;
@@ -544,7 +544,7 @@ readSparse8(pointer Base, register unsigned long Offset)
}
static int
-readSparse16(pointer Base, register unsigned long Offset)
+readSparse16(void *Base, register unsigned long Offset)
{
register unsigned long result, shift;
register unsigned long msb;
@@ -566,14 +566,14 @@ readSparse16(pointer Base, register unsigned long Offset)
}
static int
-readSparse32(pointer Base, register unsigned long Offset)
+readSparse32(void *Base, register unsigned long Offset)
{
mem_barrier();
return *(vuip) ((unsigned long) Base + (Offset));
}
static void
-writeSparse8(int Value, pointer Base, register unsigned long Offset)
+writeSparse8(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int b = Value & 0xffU;
@@ -591,7 +591,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparse16(int Value, pointer Base, register unsigned long Offset)
+writeSparse16(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int w = Value & 0xffffU;
@@ -611,7 +611,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparse32(int Value, pointer Base, register unsigned long Offset)
+writeSparse32(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
*(vuip) ((unsigned long) Base + (Offset)) = Value;
@@ -619,7 +619,7 @@ writeSparse32(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
+writeSparseNB8(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int b = Value & 0xffU;
@@ -636,7 +636,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
+writeSparseNB16(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int w = Value & 0xffffU;
@@ -654,27 +654,27 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparseNB32(int Value, pointer Base, register unsigned long Offset)
+writeSparseNB32(int Value, void *Base, register unsigned long Offset)
{
*(vuip) ((unsigned long) Base + (Offset)) = Value;
return;
}
-void (*xf86WriteMmio8) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset)
= writeDense8;
-void (*xf86WriteMmio16) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset)
= writeDense16;
-void (*xf86WriteMmio32) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset)
= writeDense32;
-void (*xf86WriteMmioNB8) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset)
= writeDenseNB8;
-void (*xf86WriteMmioNB16) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset)
= writeDenseNB16;
-void (*xf86WriteMmioNB32) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset)
= writeDenseNB32;
-int (*xf86ReadMmio8) (pointer Base, unsigned long Offset)
+int (*xf86ReadMmio8) (void *Base, unsigned long Offset)
= readDense8;
-int (*xf86ReadMmio16) (pointer Base, unsigned long Offset)
+int (*xf86ReadMmio16) (void *Base, unsigned long Offset)
= readDense16;
-int (*xf86ReadMmio32) (pointer Base, unsigned long Offset)
+int (*xf86ReadMmio32) (void *Base, unsigned long Offset)
= readDense32;
diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c
index 71064af03..6a977c2db 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c
@@ -71,12 +71,12 @@
struct memAccess {
int ioctl;
struct map_info memInfo;
- pointer regionVirtBase;
+ void *regionVirtBase;
Bool Checked;
Bool OK;
};
-static pointer xf86MapInfoMap();
+static void *xf86MapInfoMap();
static void xf86MapInfoUnmap();
static struct memAccess *checkMapInfo();
extern int vgaPhysLinearBase;
@@ -111,8 +111,8 @@ struct memAccess ioMemInfo = { CONSOLE_GET_IO_INFO, NULL, NULL,
static Bool useDevMem = FALSE;
static int devMemFd = -1;
-static pointer mapVidMem(int, unsigned long, unsigned long, int);
-static void unmapVidMem(int, pointer, unsigned long);
+static void *mapVidMem(int, unsigned long, unsigned long, int);
+static void unmapVidMem(int, void *, unsigned long);
/*
* Check if /dev/mem can be mmap'd. If it can't print a warning when
@@ -123,7 +123,7 @@ checkDevMem(Bool warn)
{
static Bool devMemChecked = FALSE;
int fd;
- pointer base;
+ void *base;
if (devMemChecked)
return;
@@ -170,10 +170,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->initialised = TRUE;
}
-static pointer
+static void *
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
- pointer base;
+ void *base;
checkDevMem(FALSE);
@@ -210,7 +210,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
}
static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
munmap((caddr_t) Base, Size);
}
@@ -310,8 +310,8 @@ checkMapInfo(Bool warn, int Region)
}
}
-static pointer
-xf86MapInfoMap(struct memAccess *memInfoP, pointer Base, unsigned long Size)
+static void *
+xf86MapInfoMap(struct memAccess *memInfoP, void *Base, unsigned long Size)
{
struct map_info *mapInfoP = &(memInfoP->memInfo);
@@ -335,7 +335,7 @@ xf86MapInfoMap(struct memAccess *memInfoP, pointer Base, unsigned long Size)
MAP_SHARED,
xf86Info.consoleFd,
(unsigned long) mapInfoP->u.map_info_mmap.map_offset))
- == (pointer) -1) {
+ == (void *) -1) {
FatalError
("xf86MapInfoMap: Failed to map memory at 0x%x\n\t%s\n",
mapInfoP->u.map_info_mmap.map_offset, strerror(errno));
@@ -351,7 +351,7 @@ xf86MapInfoMap(struct memAccess *memInfoP, pointer Base, unsigned long Size)
break;
}
- return (pointer) ((int) memInfoP->regionVirtBase + (int) Base);
+ return (void *) ((int) memInfoP->regionVirtBase + (int) Base);
}
static void
@@ -374,7 +374,7 @@ xf86MapInfoUnmap(struct memAccess *memInfoP, unsigned long Size)
}
}
-static pointer
+static void *
armMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
struct memAccess *memInfoP;
@@ -404,7 +404,7 @@ armMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
}
static void
-armUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+armUnmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
struct memAccess *memInfoP;
@@ -450,17 +450,17 @@ Bool
xf86EnableIO()
{
int fd;
- pointer base;
+ void *base;
if (ExtendedEnabled)
return TRUE;
if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) {
/* Try to map a page at the pccons I/O space */
- base = (pointer) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE,
- MAP_FLAGS, fd, (off_t) 0x0000);
+ base = (void *) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE,
+ MAP_FLAGS, fd, (off_t) 0x0000);
- if (base != (pointer) -1) {
+ if (base != (void *) -1) {
IOPortBase = base;
}
else {
@@ -509,7 +509,7 @@ int ScreenNum;
{
int i;
int fd;
- pointer base;
+ void *base;
#ifdef __arm32__
struct memAccess *memInfoP;
@@ -524,10 +524,10 @@ int ScreenNum;
#ifdef USE_ARC_MMAP
if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) {
/* Try to map a page at the pccons I/O space */
- base = (pointer) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE,
- MAP_FLAGS, fd, (off_t) 0x0000);
+ base = (void *) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE,
+ MAP_FLAGS, fd, (off_t) 0x0000);
- if (base != (pointer) -1) {
+ if (base != (void *) -1) {
IOPortBase = base;
}
else {
@@ -563,10 +563,10 @@ int ScreenNum;
checkDevMem(TRUE);
if (devMemFd >= 0 && useDevMem) {
- base = (pointer) mmap((caddr_t) 0, 0x400, PROT_READ | PROT_WRITE,
+ base = (void *) mmap((caddr_t) 0, 0x400, PROT_READ | PROT_WRITE,
MAP_FLAGS, devMemFd, (off_t) DEV_MEM_IOBASE);
- if (base != (pointer) -1)
+ if (base != (void *) -1)
IOPortBase = (unsigned int) base;
}
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
index b1938cf0d..1b929625e 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -14,7 +14,7 @@
#define APM_DEVICE "/dev/apm"
-static pointer APMihPtr = NULL;
+static void *APMihPtr = NULL;
static void bsdCloseAPM(void);
static struct {
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
index 645377ed6..320bb23b6 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
@@ -22,77 +22,77 @@
*/
__asm(".arch ev56");
-int readDense8(pointer Base, register unsigned long Offset);
-int readDense16(pointer Base, register unsigned long Offset);
-int readDense32(pointer Base, register unsigned long Offset);
+int readDense8(void *Base, register unsigned long Offset);
+int readDense16(void *Base, register unsigned long Offset);
+int readDense32(void *Base, register unsigned long Offset);
void
- writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, void *Base, register unsigned long Offset);
void
- writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, void *Base, register unsigned long Offset);
void
- writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, void *Base, register unsigned long Offset);
void
- writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, void *Base, register unsigned long Offset);
void
- writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, void *Base, register unsigned long Offset);
void
- writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, void *Base, register unsigned long Offset);
int
-readDense8(pointer Base, register unsigned long Offset)
+readDense8(void *Base, register unsigned long Offset)
{
mem_barrier();
- return (alpha_ldbu((pointer) ((unsigned long) Base + (Offset))));
+ return (alpha_ldbu((void *) ((unsigned long) Base + (Offset))));
}
int
-readDense16(pointer Base, register unsigned long Offset)
+readDense16(void *Base, register unsigned long Offset)
{
mem_barrier();
- return (alpha_ldwu((pointer) ((unsigned long) Base + (Offset))));
+ return (alpha_ldwu((void *) ((unsigned long) Base + (Offset))));
}
int
-readDense32(pointer Base, register unsigned long Offset)
+readDense32(void *Base, register unsigned long Offset)
{
mem_barrier();
return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
}
void
-writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
+writeDenseNB8(int Value, void *Base, register unsigned long Offset)
{
- alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value);
+ alpha_stb((void *) ((unsigned long) Base + (Offset)), Value);
}
void
-writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
+writeDenseNB16(int Value, void *Base, register unsigned long Offset)
{
- alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value);
+ alpha_stw((void *) ((unsigned long) Base + (Offset)), Value);
}
void
-writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
+writeDenseNB32(int Value, void *Base, register unsigned long Offset)
{
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
void
-writeDense8(int Value, pointer Base, register unsigned long Offset)
+writeDense8(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
- alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value);
+ alpha_stb((void *) ((unsigned long) Base + (Offset)), Value);
}
void
-writeDense16(int Value, pointer Base, register unsigned long Offset)
+writeDense16(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
- alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value);
+ alpha_stw((void *) ((unsigned long) Base + (Offset)), Value);
}
void
-writeDense32(int Value, pointer Base, register unsigned long Offset)
+writeDense32(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 22943855b..32ea4892e 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -45,7 +45,7 @@
#define _PATH_APM_DEV "/dev/apm"
#define _PATH_APM_CTLDEV "/dev/apmctl"
-static pointer APMihPtr = NULL;
+static void *APMihPtr = NULL;
static int devFd = -1;
static int ctlFd = -1;
static void bsdCloseAPM(void);
diff --git a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c
index 569a4ec51..745319054 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c
@@ -85,18 +85,18 @@ static int devMemFd = -1;
#define DEV_APERTURE "/dev/xf86"
#endif
-static pointer mapVidMem(int, unsigned long, unsigned long, int);
-static void unmapVidMem(int, pointer, unsigned long);
+static void *mapVidMem(int, unsigned long, unsigned long, int);
+static void unmapVidMem(int, void *, unsigned long);
#ifdef HAS_MTRR_SUPPORT
-static pointer setWC(int, unsigned long, unsigned long, Bool, MessageType);
-static void undoWC(int, pointer);
+static void *setWC(int, unsigned long, unsigned long, Bool, MessageType);
+static void undoWC(int, void *);
static Bool cleanMTRR(void);
#endif
#if defined(HAS_MTRR_BUILTIN) && defined(__NetBSD__)
-static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool,
+static void *NetBSDsetWC(int, unsigned long, unsigned long, Bool,
MessageType);
-static void NetBSDundoWC(int, pointer);
+static void NetBSDundoWC(int, void *);
#endif
/*
@@ -108,7 +108,7 @@ checkDevMem(Bool warn)
{
static Bool devMemChecked = FALSE;
int fd;
- pointer base;
+ void *base;
if (devMemChecked)
return;
@@ -210,10 +210,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->initialised = TRUE;
}
-static pointer
+static void *
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
- pointer base;
+ void *base;
checkDevMem(FALSE);
@@ -250,7 +250,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
}
static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
munmap((caddr_t) Base, Size);
}
@@ -690,7 +690,7 @@ fullCoverage(unsigned long base, unsigned long size, RangePtr overlap)
return FALSE;
}
-static pointer
+static void *
addWC(int screenNum, unsigned long base, unsigned long size, MessageType from)
{
RangePtr uc = NULL, wc = NULL, retlist = NULL;
@@ -731,7 +731,7 @@ addWC(int screenNum, unsigned long base, unsigned long size, MessageType from)
}
}
-static pointer
+static void *
delWC(int screenNum, unsigned long base, unsigned long size, MessageType from)
{
RangePtr uc = NULL, wc = NULL, retlist = NULL;
@@ -776,7 +776,7 @@ delWC(int screenNum, unsigned long base, unsigned long size, MessageType from)
}
}
-static pointer
+static void *
setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
MessageType from)
{
@@ -787,7 +787,7 @@ setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
}
static void
-undoWC(int screenNum, pointer list)
+undoWC(int screenNum, void *list)
{
RangePtr rp;
struct mem_range_op mro;
@@ -835,7 +835,7 @@ undoWC(int screenNum, pointer list)
#endif /* HAS_MTRR_SUPPORT */
#if defined(HAS_MTRR_BUILTIN) && defined(__NetBSD__)
-static pointer
+static void *
NetBSDsetWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
MessageType from)
{
@@ -871,7 +871,7 @@ NetBSDsetWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
}
static void
-NetBSDundoWC(int screenNum, pointer list)
+NetBSDundoWC(int screenNum, void *list)
{
struct mtrr *mtrrp = (struct mtrr *) list;
int n;
diff --git a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c
index 417adbf4b..947a68678 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c
@@ -44,8 +44,8 @@
#define DEV_MEM "/dev/xf86"
#endif
-static pointer ppcMapVidMem(int, unsigned long, unsigned long, int flags);
-static void ppcUnmapVidMem(int, pointer, unsigned long);
+static void *ppcMapVidMem(int, unsigned long, unsigned long, int flags);
+static void ppcUnmapVidMem(int, void *, unsigned long);
Bool xf86EnableIO(void);
void xf86DisableIO(void);
@@ -62,11 +62,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
volatile unsigned char *ioBase = MAP_FAILED;
-static pointer
+static void *
ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
int fd = xf86Info.consoleFd;
- pointer base;
+ void *base;
#ifdef DEBUG
xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d", Base, Size, fd);
@@ -83,7 +83,7 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
}
static void
-ppcUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+ppcUnmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
munmap(Base, Size);
}
diff --git a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c
index 21c166105..02951d602 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -38,8 +38,8 @@
/* Video Memory Mapping section */
/***************************************************************************/
-static pointer sparc64MapVidMem(int, unsigned long, unsigned long, int);
-static void sparc64UnmapVidMem(int, pointer, unsigned long);
+static void *sparc64MapVidMem(int, unsigned long, unsigned long, int);
+static void sparc64UnmapVidMem(int, void *, unsigned long);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
@@ -50,12 +50,12 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->initialised = TRUE;
}
-static pointer
+static void *
sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
int flags)
{
int fd = xf86Info.consoleFd;
- pointer base;
+ void *base;
#ifdef DEBUG
xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d", Base, Size, fd);
@@ -71,7 +71,7 @@ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
}
static void
-sparc64UnmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+sparc64UnmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
munmap(Base, Size);
}
diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
index 14e6d4bfd..16ce5b58a 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c
@@ -641,10 +641,10 @@ sparcPromPathname2Node(const char *pathName)
return i;
}
-pointer
+void *
xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size)
{
- pointer ret;
+ void *ret;
unsigned long pagemask = getpagesize() - 1;
unsigned long off = offset & ~pagemask;
unsigned long len = ((offset + size + pagemask) & ~pagemask) - off;
@@ -657,26 +657,26 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size)
else if (psdp->fd < 0)
return NULL;
- ret = (pointer) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ ret = (void *) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE,
psdp->fd, off);
- if (ret == (pointer) -1) {
- ret = (pointer) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED,
+ if (ret == (void *) -1) {
+ ret = (void *) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED,
psdp->fd, off);
}
- if (ret == (pointer) -1)
+ if (ret == (void *) -1)
return NULL;
return (char *) ret + (offset - off);
}
void
-xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size)
+xf86UnmapSbusMem(sbusDevicePtr psdp, void *addr, unsigned long size)
{
unsigned long mask = getpagesize() - 1;
unsigned long base = (unsigned long) addr & ~mask;
unsigned long len = (((unsigned long) addr + size + mask) & ~mask) - base;
- munmap((pointer) base, len);
+ munmap((void *) base, len);
}
/* Tell OS that we are driving the HW cursor ourselves. */
diff --git a/xorg-server/hw/xfree86/os-support/bus/nobus.c b/xorg-server/hw/xfree86/os-support/bus/nobus.c
index dc36ecd0a..4872c5be8 100644
--- a/xorg-server/hw/xfree86/os-support/bus/nobus.c
+++ b/xorg-server/hw/xfree86/os-support/bus/nobus.c
@@ -1,4 +1,7 @@
-static void
+void
+__noop_to_appease_ar__(void);
+
+void
__noop_to_appease_ar__(void)
{
return;
diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
index b3b94c9f2..dc1a8e670 100644
--- a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
@@ -42,7 +42,7 @@
/**************************************************************************
* Video Memory Mapping section
***************************************************************************/
-static pointer
+static void *
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
{
mach_port_t device, mem_dev;
@@ -89,11 +89,11 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
("xf86MapVidMem() can't mach_port_deallocate.(mem_dev) (%s)\n",
strerror(errno));
}
- return (pointer) addr;
+ return (void *) addr;
}
static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
kern_return_t err = vm_deallocate(mach_task_self(), (int) Base, Size);
diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c
index 8bca37524..6181eb9c5 100644
--- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c
+++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c
@@ -18,7 +18,7 @@
#define DEV_MEM "/dev/mem"
#endif
#define ALLOC_ENTRIES(x) ((V_RAM / x) - 1)
-#define SHMERRORPTR (pointer)(-1)
+#define SHMERRORPTR (void *)(-1)
#include <fcntl.h>
#include <errno.h>
@@ -153,9 +153,9 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
goto error0;
pInt->mem = &linuxMem;
pagesize = getpagesize();
- pInt->private = (pointer) xnfcalloc(1, sizeof(linuxInt10Priv));
+ pInt->private = (void *) xnfcalloc(1, sizeof(linuxInt10Priv));
((linuxInt10Priv *) pInt->private)->alloc =
- (pointer) xnfcalloc(1, ALLOC_ENTRIES(pagesize));
+ (void *) xnfcalloc(1, ALLOC_ENTRIES(pagesize));
if (!xf86IsEntityPrimary(entityIndex)) {
DebugF("Mapping high memory area\n");
@@ -233,10 +233,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
* 64K bytes at a time.
*/
if (!videoBiosMapped) {
- memset((pointer) V_BIOS, 0, SYS_BIOS - V_BIOS);
+ memset((void *) V_BIOS, 0, SYS_BIOS - V_BIOS);
DebugF("Reading BIOS\n");
for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE)
- if (xf86ReadBIOS(cs, 0, (pointer) cs, V_BIOS_SIZE) < V_BIOS_SIZE)
+ if (xf86ReadBIOS(cs, 0, (void *) cs, V_BIOS_SIZE) < V_BIOS_SIZE)
xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x%06lX.\n",
(long) cs);
@@ -319,7 +319,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
Bool
MapCurrentInt10(xf86Int10InfoPtr pInt)
{
- pointer addr;
+ void *addr;
int fd = -1;
if (Int10Current) {
@@ -327,7 +327,7 @@ MapCurrentInt10(xf86Int10InfoPtr pInt)
if (((linuxInt10Priv *) Int10Current->private)->highMem >= 0)
shmdt((char *) HIGH_MEM);
else
- munmap((pointer) V_BIOS, (SYS_BIOS - V_BIOS));
+ munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS));
}
addr =
shmat(((linuxInt10Priv *) pInt->private)->lowMem, (char *) 1, SHM_RND);
@@ -392,7 +392,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt)
if (((linuxInt10Priv *) pInt->private)->highMem >= 0)
shmdt((char *) HIGH_MEM);
else
- munmap((pointer) V_BIOS, (SYS_BIOS - V_BIOS));
+ munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS));
Int10Current = NULL;
}
@@ -486,22 +486,22 @@ write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val)
*((CARD32 *) (memType) addr) = val;
}
-pointer
+void *
xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr)
{
if (addr < V_RAM)
return ((linuxInt10Priv *) pInt->private)->base + addr;
else if (addr < V_BIOS)
- return (pointer) (memType) addr;
+ return (void *) (memType) addr;
else if (addr < SYS_BIOS) {
if (((linuxInt10Priv *) pInt->private)->base_high)
- return (pointer) (((linuxInt10Priv *) pInt->private)->base_high
+ return (void *) (((linuxInt10Priv *) pInt->private)->base_high
- V_BIOS + addr);
else
- return (pointer) (memType) addr;
+ return (void *) (memType) addr;
}
else
- return (pointer) (memType) addr;
+ return (void *) (memType) addr;
}
#if defined DoSubModules
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
index dcaa19ee1..dbd5afe90 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
@@ -33,14 +33,14 @@
#define ACPI_VIDEO_HEAD_END (~0u)
static void lnxCloseACPI(void);
-static pointer ACPIihPtr = NULL;
+static void *ACPIihPtr = NULL;
PMClose lnxACPIOpen(void);
/* in milliseconds */
#define ACPI_REOPEN_DELAY 1000
static CARD32
-lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg)
+lnxACPIReopen(OsTimerPtr timer, CARD32 time, void *arg)
{
if (lnxACPIOpen()) {
TimerFree(timer);
@@ -74,13 +74,12 @@ lnxACPIGetEventFromOs(int fd, pmEvent * events, int num)
/* Check that we have a video event */
if (!strncmp(ev, "video", 5)) {
- char *video = NULL;
char *GFX = NULL;
char *notify = NULL;
char *data = NULL; /* doesn't appear to be used in the kernel */
- unsigned long int notify_l, data_l;
+ unsigned long int notify_l;
- video = strtok(ev, " ");
+ strtok(ev, " ");
if (!(GFX = strtok(NULL, " ")))
return 0;
@@ -97,8 +96,8 @@ lnxACPIGetEventFromOs(int fd, pmEvent * events, int num)
if (!(data = strtok(NULL, " ")))
return 0;
- data_l = strtoul(data, NULL, 16);
#if 0
+ data_l = strtoul(data, NULL, 16);
ErrorF("data: 0x%lx\n", data_l);
#endif
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
index 387934099..621691997 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
@@ -36,7 +36,7 @@ extern PMClose lnxACPIOpen(void);
static PMClose lnxAPMOpen(void);
static void lnxCloseAPM(void);
-static pointer APMihPtr = NULL;
+static void *APMihPtr = NULL;
static struct {
apm_event_t apmLinux;
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
index 49950705a..b6950009c 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
@@ -6,77 +6,77 @@
#include "xf86.h"
#include "compiler.h"
-int readDense8(pointer Base, register unsigned long Offset);
-int readDense16(pointer Base, register unsigned long Offset);
-int readDense32(pointer Base, register unsigned long Offset);
+int readDense8(void *Base, register unsigned long Offset);
+int readDense16(void *Base, register unsigned long Offset);
+int readDense32(void *Base, register unsigned long Offset);
void
- writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, void *Base, register unsigned long Offset);
void
- writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, void *Base, register unsigned long Offset);
void
- writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, void *Base, register unsigned long Offset);
void
- writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, void *Base, register unsigned long Offset);
void
- writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, void *Base, register unsigned long Offset);
void
- writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, void *Base, register unsigned long Offset);
int
-readDense8(pointer Base, register unsigned long Offset)
+readDense8(void *Base, register unsigned long Offset)
{
mem_barrier();
return *(volatile CARD8 *) ((unsigned long) Base + (Offset));
}
int
-readDense16(pointer Base, register unsigned long Offset)
+readDense16(void *Base, register unsigned long Offset)
{
mem_barrier();
return *(volatile CARD16 *) ((unsigned long) Base + (Offset));
}
int
-readDense32(pointer Base, register unsigned long Offset)
+readDense32(void *Base, register unsigned long Offset)
{
mem_barrier();
return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
}
void
-writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
+writeDenseNB8(int Value, void *Base, register unsigned long Offset)
{
*(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
}
void
-writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
+writeDenseNB16(int Value, void *Base, register unsigned long Offset)
{
*(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
}
void
-writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
+writeDenseNB32(int Value, void *Base, register unsigned long Offset)
{
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
void
-writeDense8(int Value, pointer Base, register unsigned long Offset)
+writeDense8(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
*(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
}
void
-writeDense16(int Value, pointer Base, register unsigned long Offset)
+writeDense16(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
*(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
}
void
-writeDense32(int Value, pointer Base, register unsigned long Offset)
+writeDense32(int Value, void *Base, register unsigned long Offset)
{
write_mem_barrier();
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
index bcb039f3f..e2e8d0826 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
@@ -83,8 +83,8 @@ xf86OpenConsole(void)
struct vt_mode VT;
struct vt_stat vts;
MessageType from = X_PROBED;
- char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
- char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
+ const char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
+ const char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
if (serverGeneration == 1) {
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
index 0a17c2a81..f5917eefb 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
@@ -37,7 +37,7 @@ int
xf86LoadKernelModule(const char *modName)
{
char mpPath[MAX_PATH] = "";
- int fd = -1, status, n;
+ int fd = -1, status;
pid_t pid;
/* get the path to the modprobe program */
@@ -76,7 +76,7 @@ xf86LoadKernelModule(const char *modName)
"Setting of real/effective user Id to 0/0 failed");
}
setenv("PATH", "/sbin", 1);
- n = execl(mpPath, "modprobe", modName, NULL);
+ execl(mpPath, "modprobe", modName, NULL);
xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno));
exit(EXIT_FAILURE); /* if we get here the child's exec failed */
break;
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
index 43d0a364a..824003d26 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c
@@ -80,17 +80,17 @@ extern int iopl(int __level);
/* Video Memory Mapping section */
/***************************************************************************/
-static pointer mapVidMem(int, unsigned long, unsigned long, int);
-static void unmapVidMem(int, pointer, unsigned long);
+static void *mapVidMem(int, unsigned long, unsigned long, int);
+static void unmapVidMem(int, void *, unsigned long);
#if defined (__alpha__)
extern void sethae(unsigned long hae);
extern unsigned long _bus_base __P((void)) __attribute__ ((const));
extern unsigned long _bus_base_sparse __P((void)) __attribute__ ((const));
-static pointer mapVidMemSparse(int, unsigned long, unsigned long, int);
+static void *mapVidMemSparse(int, unsigned long, unsigned long, int);
extern axpDevice lnxGetAXP(void);
-static void unmapVidMemSparse(int, pointer, unsigned long);
+static void unmapVidMemSparse(int, void *, unsigned long);
static axpDevice axpSystem = -1;
static Bool needSparse;
static unsigned long hae_thresh;
@@ -102,8 +102,8 @@ static unsigned long bus_base;
#define SPLIT_WC_REGIONS 1
-static pointer setWC(int, unsigned long, unsigned long, Bool, MessageType);
-static void undoWC(int, pointer);
+static void *setWC(int, unsigned long, unsigned long, Bool, MessageType);
+static void undoWC(int, void *);
/* The file desc for /proc/mtrr. Once opened, left opened, and the mtrr
driver will clean up when we exit. */
@@ -339,7 +339,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr)
}
}
-static pointer
+static void *
setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
MessageType from)
{
@@ -350,7 +350,7 @@ setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
}
static void
-undoWC(int screenNum, pointer regioninfo)
+undoWC(int screenNum, void *regioninfo)
{
mtrr_undo_wc_region(screenNum, regioninfo);
}
@@ -396,16 +396,16 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
/* Basically, you simply cannot do this on Sparc. You have to do something portable
* like use /dev/fb* or mmap() on /proc/bus/pci/X/Y nodes. -DaveM
*/
-static pointer
+static void *
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
return NULL;
}
#else
-static pointer
+static void *
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
- pointer base;
+ void *base;
int fd;
int mapflags = MAP_SHARED;
int prot;
@@ -460,7 +460,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
#endif /* !(__sparc__) */
static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
uintptr_t alignOff = (uintptr_t) Base
- ((uintptr_t) Base & ~(getpagesize() - 1));
@@ -565,44 +565,44 @@ xf86DisableIO(void)
#define vuip volatile unsigned int *
-extern int readDense8(pointer Base, register unsigned long Offset);
-extern int readDense16(pointer Base, register unsigned long Offset);
-extern int readDense32(pointer Base, register unsigned long Offset);
+extern int readDense8(void *Base, register unsigned long Offset);
+extern int readDense16(void *Base, register unsigned long Offset);
+extern int readDense32(void *Base, register unsigned long Offset);
extern void
- writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, void *Base, register unsigned long Offset);
extern void
- writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, void *Base, register unsigned long Offset);
extern void
- writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, void *Base, register unsigned long Offset);
extern void
- writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, void *Base, register unsigned long Offset);
extern void
- writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, void *Base, register unsigned long Offset);
extern void
- writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, void *Base, register unsigned long Offset);
-static int readSparse8(pointer Base, register unsigned long Offset);
-static int readSparse16(pointer Base, register unsigned long Offset);
-static int readSparse32(pointer Base, register unsigned long Offset);
+static int readSparse8(void *Base, register unsigned long Offset);
+static int readSparse16(void *Base, register unsigned long Offset);
+static int readSparse32(void *Base, register unsigned long Offset);
static void
- writeSparseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeSparseNB8(int Value, void *Base, register unsigned long Offset);
static void
- writeSparseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeSparseNB16(int Value, void *Base, register unsigned long Offset);
static void
- writeSparseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeSparseNB32(int Value, void *Base, register unsigned long Offset);
static void
- writeSparse8(int Value, pointer Base, register unsigned long Offset);
+ writeSparse8(int Value, void *Base, register unsigned long Offset);
static void
- writeSparse16(int Value, pointer Base, register unsigned long Offset);
+ writeSparse16(int Value, void *Base, register unsigned long Offset);
static void
- writeSparse32(int Value, pointer Base, register unsigned long Offset);
+ writeSparse32(int Value, void *Base, register unsigned long Offset);
#define DENSE_BASE 0x2ff00000000UL
#define SPARSE_BASE 0x30000000000UL
static unsigned long msb_set = 0;
-static pointer
+static void *
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size,
int flags)
{
@@ -689,11 +689,11 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size,
" to DENSE only at 0x%lx\n", Base, Size, ret);
#endif
- return (pointer) ret;
+ return (void *) ret;
}
static void
-unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size)
+unmapVidMemSparse(int ScreenNum, void *Base, unsigned long Size)
{
unsigned long Offset = (unsigned long) Base - DENSE_BASE;
@@ -709,7 +709,7 @@ unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size)
}
static int
-readSparse8(pointer Base, register unsigned long Offset)
+readSparse8(void *Base, register unsigned long Offset)
{
register unsigned long result, shift;
register unsigned long msb;
@@ -733,7 +733,7 @@ readSparse8(pointer Base, register unsigned long Offset)
}
static int
-readSparse16(pointer Base, register unsigned long Offset)
+readSparse16(void *Base, register unsigned long Offset)
{
register unsigned long result, shift;
register unsigned long msb;
@@ -757,7 +757,7 @@ readSparse16(pointer Base, register unsigned long Offset)
}
static int
-readSparse32(pointer Base, register unsigned long Offset)
+readSparse32(void *Base, register unsigned long Offset)
{
/* NOTE: this is really using DENSE. */
mem_barrier();
@@ -765,7 +765,7 @@ readSparse32(pointer Base, register unsigned long Offset)
}
static void
-writeSparse8(int Value, pointer Base, register unsigned long Offset)
+writeSparse8(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int b = Value & 0xffU;
@@ -786,7 +786,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparse16(int Value, pointer Base, register unsigned long Offset)
+writeSparse16(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int w = Value & 0xffffU;
@@ -807,7 +807,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparse32(int Value, pointer Base, register unsigned long Offset)
+writeSparse32(int Value, void *Base, register unsigned long Offset)
{
/* NOTE: this is really using DENSE. */
write_mem_barrier();
@@ -816,7 +816,7 @@ writeSparse32(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
+writeSparseNB8(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int b = Value & 0xffU;
@@ -834,7 +834,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
+writeSparseNB16(int Value, void *Base, register unsigned long Offset)
{
register unsigned long msb;
register unsigned int w = Value & 0xffffU;
@@ -852,30 +852,30 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
}
static void
-writeSparseNB32(int Value, pointer Base, register unsigned long Offset)
+writeSparseNB32(int Value, void *Base, register unsigned long Offset)
{
/* NOTE: this is really using DENSE. */
*(vuip) ((unsigned long) Base + (Offset)) = Value;
return;
}
-void (*xf86WriteMmio8) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset)
= writeDense8;
-void (*xf86WriteMmio16) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset)
= writeDense16;
-void (*xf86WriteMmio32) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset)
= writeDense32;
-void (*xf86WriteMmioNB8) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset)
= writeDenseNB8;
-void (*xf86WriteMmioNB16) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset)
= writeDenseNB16;
-void (*xf86WriteMmioNB32) (int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset)
= writeDenseNB32;
-int (*xf86ReadMmio8) (pointer Base, unsigned long Offset)
+int (*xf86ReadMmio8) (void *Base, unsigned long Offset)
= readDense8;
-int (*xf86ReadMmio16) (pointer Base, unsigned long Offset)
+int (*xf86ReadMmio16) (void *Base, unsigned long Offset)
= readDense16;
-int (*xf86ReadMmio32) (pointer Base, unsigned long Offset)
+int (*xf86ReadMmio32) (void *Base, unsigned long Offset)
= readDense32;
#endif /* __alpha__ */
diff --git a/xorg-server/hw/xfree86/os-support/shared/vidmem.c b/xorg-server/hw/xfree86/os-support/shared/vidmem.c
index 68ed30e41..f473293c7 100644
--- a/xorg-server/hw/xfree86/os-support/shared/vidmem.c
+++ b/xorg-server/hw/xfree86/os-support/shared/vidmem.c
@@ -51,8 +51,8 @@
typedef struct {
unsigned long size;
- pointer virtBase;
- pointer mtrrInfo;
+ void *virtBase;
+ void *mtrrInfo;
} MappingRec, *MappingPtr;
typedef struct {
@@ -104,7 +104,7 @@ newMapping(VidMapPtr vp)
}
static MappingPtr
-findMapping(VidMapPtr vp, pointer vbase, unsigned long size)
+findMapping(VidMapPtr vp, void *vbase, unsigned long size)
{
int i;
@@ -165,10 +165,10 @@ xf86InitVidMem(void)
}
}
-pointer
+void *
xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size)
{
- pointer vbase = NULL;
+ void *vbase = NULL;
VidMapPtr vp;
MappingPtr mp;
@@ -182,7 +182,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size)
vbase = vidMemInfo.mapMem(ScreenNum, Base, Size, Flags);
- if (!vbase || vbase == (pointer) -1)
+ if (!vbase || vbase == (void *) -1)
return NULL;
vp = getVidMapRec(ScreenNum);
@@ -208,7 +208,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size)
}
void
-xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+xf86UnMapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
VidMapPtr vp;
MappingPtr mp;
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
index b6a1432f6..38fa5ecf2 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
@@ -90,7 +90,7 @@ typedef struct apm_event_info {
#define APM_DEVICE "/dev/srn"
#define APM_DEVICE1 "/dev/apm"
-static pointer APMihPtr = NULL;
+static void *APMihPtr = NULL;
static void sunCloseAPM(void);
static struct {
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
index 68527a577..16fc1b739 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c
@@ -316,7 +316,7 @@ xf86CloseConsole(void)
" attributes (%s)\n", strerror(errno));
}
else {
- pointer fbdata;
+ void *fbdata;
fbdata = mmap(NULL, fbattr.fbtype.fb_size,
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c
index 67ef17689..fc464871d 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c
@@ -107,10 +107,10 @@ solOpenAperture(void)
return TRUE;
}
-static pointer
+static void *
solMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
{
- pointer base;
+ void *base;
int fd;
int prot;
@@ -144,7 +144,7 @@ solMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
/* ARGSUSED */
static void
-solUnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+solUnMapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
if (munmap(Base, Size) != 0) {
xf86DrvMsgVerb(ScreenNum, X_WARNING, 0,
diff --git a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
index bd734f554..7f003e8ce 100644
--- a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
+++ b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
@@ -32,12 +32,12 @@
#ifndef _XF86OSPRIV_H
#define _XF86OSPRIV_H
-typedef pointer (*MapMemProcPtr) (int, unsigned long, unsigned long, int);
-typedef void (*UnmapMemProcPtr) (int, pointer, unsigned long);
-typedef pointer (*SetWCProcPtr) (int, unsigned long, unsigned long, Bool,
+typedef void *(*MapMemProcPtr) (int, unsigned long, unsigned long, int);
+typedef void (*UnmapMemProcPtr) (int, void *, unsigned long);
+typedef void *(*SetWCProcPtr) (int, unsigned long, unsigned long, Bool,
MessageType);
-typedef void (*ProtectMemProcPtr) (int, pointer, unsigned long, Bool);
-typedef void (*UndoWCProcPtr) (int, pointer);
+typedef void (*ProtectMemProcPtr) (int, void *, unsigned long, Bool);
+typedef void (*UndoWCProcPtr) (int, void *);
typedef struct {
Bool initialised;
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
index 106168aba..8d27e8b7b 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
@@ -132,9 +132,9 @@ _XFUNCPROTOBEGIN
/* public functions */
extern _X_EXPORT Bool xf86LinearVidMem(void);
extern _X_EXPORT _X_DEPRECATED Bool xf86CheckMTRR(int);
-extern _X_EXPORT _X_DEPRECATED pointer xf86MapVidMem(int, int, unsigned long,
+extern _X_EXPORT _X_DEPRECATED void *xf86MapVidMem(int, int, unsigned long,
unsigned long);
-extern _X_EXPORT _X_DEPRECATED void xf86UnMapVidMem(int, pointer,
+extern _X_EXPORT _X_DEPRECATED void xf86UnMapVidMem(int, void *,
unsigned long);
extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *,
int);