Subject: Re: XFree86 changes 4.7.99.2 to compile better defined:
To: None <port-alpha@netbsd.org>
From: mel kravitz <melk@switchpwr.com>
List: port-alpha
Date: 10/04/2007 19:23:38
For x/.../bsd/alpha_video.c changes are:
--- alpha_video.orig.c 2006-01-09 10:00:19.000000000 -0500
+++ alpha_video.c 2007-09-29 11:19:24.000000000 -0400
@@ -706,22 +706,28 @@
return;
}
-void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio8)(int Value, volatile void * Base, unsigned
+long Offset)
= writeDense8;
-void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio16)(int Value, volatile void * Base, unsigned
+long Offset)
= writeDense16;
-void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmio32)(int Value, volatile void * Base, unsigned
+long Offset)
= writeDense32;
-void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB8)(int Value, volatile void * Base, unsigned
+long Offset)
= writeDenseNB8;
-void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB16)(int Value, volatile void * Base, unsigned
+long Offset)
= writeDenseNB16;
-void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset)
+void (*xf86WriteMmioNB32)(int Value, volatile void * Base, unsigned
+long Offset)
= writeDenseNB32;
-int (*xf86ReadMmio8)(pointer Base, unsigned long Offset)
+int (*xf86ReadMmio8)(volatile void * Base, unsigned long Offset)
= readDense8;
-int (*xf86ReadMmio16)(pointer Base, unsigned long Offset)
+int (*xf86ReadMmio16)(volatile void * Base, unsigned long Offset)
= readDense16;
-int (*xf86ReadMmio32)(pointer Base, unsigned long Offset)
+int (*xf86ReadMmio32)(volatile void * Base, unsigned long Offset)
= readDense32;
For xc/..../bus/netbasdPci.c changes are:
--- netbsdPci.orig.c 2007-07-10 13:15:54.000000000 -0400
+++ netbsdPci.c 2004-02-13 18:58:47.000000000 -0500
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/netbsdPci.c,v 1.9 2007/07/10 17:15:54 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/netbsdPci.c,v 1.5 2004/02/13 23:58:47 dawes Exp $ */
/*
* Copyright (C) 1994-2003 The XFree86 Project, Inc.
* All rights reserved.
@@ -89,38 +89,17 @@
{
struct pciio_businfo pci_businfo;
- /* Always prefer a hardware-derived mechanism over an OS-provided one */
- if (pciNumBuses)
- return;
-
devpci = open("/dev/pci0", O_RDWR);
- if (devpci < 0) {
- if (errno != EPERM)
- return;
-
- /* Try again without write access */
- devpci = open("/dev/pci0", O_RDONLY);
- if (devpci < 0)
- return;
-
- xf86MsgVerb(X_WARNING, 3,
- "OS limits PCI configuration space access to"
- " read-only\n");
- }
-
- /* Use businfo to get the number of devs */
- if (ioctl(devpci, PCI_IOC_BUSINFO, &pci_businfo) != 0) {
- ErrorF("netbsdPciInit: /dev/pci0 not a PCI bus device (%s)",
- strerror(errno));
- close(devpci);
- devpci = -1;
- return;
- }
+ if (devpci == -1)
+ FatalError("netbsdPciInit: can't open /dev/pci0\n");
pciNumBuses = 1;
pciBusInfo[0] = &netbsdPci0;
pciFindFirstFP = pciGenFindFirst;
pciFindNextFP = pciGenFindNext;
+ /* use businfo to get the number of devs */
+ if (ioctl(devpci, PCI_IOC_BUSINFO, &pci_businfo) != 0)
+ FatalError("netbsdPciInit: not a PCI bus device");
netbsdPci0.numDevices = pci_businfo.maxdevs;
}
@@ -134,13 +113,9 @@
bdfr.function = PCI_FUNC_FROM_TAG(tag);
bdfr.cfgreg.reg = reg;
- if (ioctl(devpci, PCI_IOC_BDF_CFGREAD, &bdfr) == -1) {
- xf86MsgVerb(X_WARNING, 4,
- "netbsdPciConfRead: failed on %d:%d:%d %02x (%s)\n",
- bdfr.bus, bdfr.device, bdfr.function, reg,
- strerror(errno));
- return ~0;
- }
+ if (ioctl(devpci, PCI_IOC_BDF_CFGREAD, &bdfr) == -1)
+ FatalError("netbsdPciConfRead: failed on %d/%d/%d\n",
+ bdfr.bus, bdfr.device, bdfr.function);
return (bdfr.cfgreg.val);
}
@@ -157,10 +132,8 @@
bdfr.cfgreg.val = val;
if (ioctl(devpci, PCI_IOC_BDF_CFGWRITE, &bdfr) == -1)
- xf86MsgVerb(X_WARNING, 4,
- "netbsdPciConfWrite: failed on %d:%d:%d %02x %08lx (%s)\n",
- bdfr.bus, bdfr.device, bdfr.function, reg,
- (unsigned long)val, strerror(errno));
+ FatalError("netbsdPciConfWrite: failed on %d/%d/%d\n",
+ bdfr.bus, bdfr.device, bdfr.function);
}
static void
for /usr/include/sys/types.h:
--- /usr/include/sys/types.h.orig 2006-05-14
04:08:59.000000000 -0700
+++ /usr/include/sys/types.h 2006-05-14 04:12:32.000000000 -0700
@@ -153,7 +153,10 @@
typedef int64_t daddr_t; /* disk address */
#endif
+#ifndef dev_t
typedef uint32_t dev_t; /* device number */
+#endif
+
typedef uint32_t fixpt_t; /* fixed point number */
#ifndef gid_t
@@ -163,7 +166,10 @@
typedef uint32_t id_t; /* group id, process
id or user id */
typedef uint64_t ino_t; /* inode number */
+
+#ifndef key_t
typedef long key_t; /* IPC key (for Sys V
IPC) */
+#endif
#ifndef mode_t
typedef __mode_t mode_t; /* permissions */
Add host.def as previously stated.
-Mel