xserver: Branch 'pci-rework' - 42 commits
Ian Romanick
idr at kemper.freedesktop.org
Mon Jul 24 11:22:22 PDT 2006
GL/glx/Makefile.am | 4
GL/glx/g_disptab.h | 9 +
GL/glx/glxcmds.c | 63 ++++++++++++
GL/glx/glxcmdsswap.c | 29 +++++
GL/glx/glxdrawable.h | 2
GL/glx/glxdri.c | 48 ++++++++-
GL/glx/glxscreens.c | 1
GL/mesa/X/Makefile.am | 4
GL/mesa/array_cache/Makefile.am | 4
GL/mesa/glapi/Makefile.am | 4
GL/mesa/main/Makefile.am | 4
GL/mesa/math/Makefile.am | 4
GL/mesa/shader/Makefile.am | 4
GL/mesa/shader/grammar/Makefile.am | 4
GL/mesa/shader/slang/Makefile.am | 4
GL/mesa/swrast/Makefile.am | 4
GL/mesa/swrast_setup/Makefile.am | 4
GL/mesa/tnl/Makefile.am | 4
XTrap/Makefile.am | 2
Xext/Makefile.am | 2
Xext/xevie.c | 24 +++-
Xi/Makefile.am | 2
afb/Makefile.am | 2
cfb/Makefile.am | 2
cfb32/Makefile.am | 2
composite/Makefile.am | 2
configure.ac | 42 ++++----
damageext/Makefile.am | 2
dbe/Makefile.am | 2
dix/Makefile.am | 5
dix/atom.c | 2
dix/colormap.c | 3
dix/events.c | 6 -
dix/strcasecmp.c | 50 +++++++++
exa/Makefile.am | 2
exa/exa.c | 2
fb/Makefile.am | 2
fb/fb24_32.c | 3
hw/darwin/quartz/xpr/dri.c | 5
hw/dmx/Makefile.am | 2
hw/dmx/config/Makefile.am | 2
hw/dmx/dmx-config.h | 1
hw/dmx/dmxinit.c | 11 --
hw/dmx/dmxpict.c | 2
hw/dmx/glxProxy/Makefile.am | 4
hw/dmx/glxProxy/glxcmds.c | 7 -
hw/dmx/glxProxy/glxcmdsswap.c | 7 -
hw/dmx/glxProxy/glxext.c | 12 +-
hw/dmx/glxProxy/glxscreens.c | 5
hw/dmx/glxProxy/glxserver.h | 1
hw/dmx/glxProxy/glxutil.c | 3
hw/dmx/glxProxy/glxvisuals.c | 1
hw/dmx/input/Makefile.am | 2
hw/kdrive/ephyr/ephyr.c | 22 ++--
hw/kdrive/ephyr/ephyrinit.c | 7 +
hw/kdrive/ephyr/hostx.c | 20 +--
hw/kdrive/src/kxv.c | 2
hw/vfb/InitOutput.c | 11 --
hw/vfb/Makefile.am | 2
hw/xfree86/Makefile.am | 2
hw/xfree86/common/Makefile.am | 2
hw/xfree86/common/compiler.h | 21 +---
hw/xfree86/common/xf86.h | 2
hw/xfree86/common/xf86Config.c | 36 -------
hw/xfree86/common/xf86Configure.c | 10 -
hw/xfree86/common/xf86DGA.c | 4
hw/xfree86/common/xf86DoProbe.c | 4
hw/xfree86/common/xf86DoScanPci.c | 108 ++++++---------------
hw/xfree86/common/xf86Globals.c | 2
hw/xfree86/common/xf86Helper.c | 46 ---------
hw/xfree86/common/xf86InPriv.h | 4
hw/xfree86/common/xf86Init.c | 21 ----
hw/xfree86/common/xf86Io.c | 29 -----
hw/xfree86/common/xf86MiscExt.c | 6 -
hw/xfree86/common/xf86Priv.h | 4
hw/xfree86/common/xf86str.h | 18 ++-
hw/xfree86/common/xf86xv.c | 9 -
hw/xfree86/common/xf86xvmc.c | 6 -
hw/xfree86/ddc/Makefile.am | 2
hw/xfree86/ddc/xf86DDC.c | 2
hw/xfree86/dixmods/Makefile.am | 5
hw/xfree86/dixmods/extmod/Makefile.am | 2
hw/xfree86/dixmods/xkbPrivate.c | 8 -
hw/xfree86/doc/sgml/DESIGN.sgml | 7 -
hw/xfree86/dri/Makefile.am | 6 -
hw/xfree86/dri/dri.c | 8 -
hw/xfree86/dummylib/Makefile.am | 2
hw/xfree86/exa/Makefile.am | 2
hw/xfree86/fbdevhw/Makefile.am | 2
hw/xfree86/i2c/Makefile.am | 2
hw/xfree86/i2c/bt829.h | 18 ---
hw/xfree86/i2c/fi1236.h | 13 --
hw/xfree86/i2c/i2c_def.h | 15 --
hw/xfree86/i2c/msp3430.h | 12 --
hw/xfree86/i2c/tda8425.h | 11 --
hw/xfree86/i2c/tda9850.h | 13 --
hw/xfree86/i2c/tda9885.h | 12 --
hw/xfree86/i2c/uda1380.h | 15 --
hw/xfree86/int10/Makefile.am | 21 ++--
hw/xfree86/int10/generic.c | 151 +++++++-----------------------
hw/xfree86/int10/helper_exec.c | 8 +
hw/xfree86/int10/helper_mem.c | 147 +++++++++++++++++++++++------
hw/xfree86/int10/pci.c | 45 --------
hw/xfree86/int10/xf86int10.h | 18 +--
hw/xfree86/loader/Makefile.am | 2
hw/xfree86/os-support/bsd/Makefile.am | 2
hw/xfree86/os-support/bsd/bsd_jstk.c | 4
hw/xfree86/os-support/bus/Makefile.am | 2
hw/xfree86/os-support/bus/linuxPci.c | 24 ++--
hw/xfree86/os-support/drm/Makefile.am | 5
hw/xfree86/os-support/drm/xf86drm.c | 48 +--------
hw/xfree86/os-support/drm/xf86drmHash.c | 4
hw/xfree86/os-support/drm/xf86drmRandom.c | 4
hw/xfree86/os-support/drm/xf86drmSL.c | 7 -
hw/xfree86/os-support/linux/Makefile.am | 2
hw/xfree86/os-support/linux/int10/linux.c | 137 ++++-----------------------
hw/xfree86/os-support/linux/lnx_acpi.c | 18 ++-
hw/xfree86/os-support/linux/lnx_io.c | 38 -------
hw/xfree86/os-support/linux/lnx_jstk.c | 4
hw/xfree86/os-support/linux/lnx_kbd.c | 38 -------
hw/xfree86/os-support/linux/lnx_mouse.c | 2
hw/xfree86/os-support/misc/Makefile.am | 2
hw/xfree86/os-support/shared/sigio.c | 26 -----
hw/xfree86/os-support/shared/sigiostubs.c | 10 -
hw/xfree86/os-support/solaris/Makefile.am | 2
hw/xfree86/os-support/xf86_OSproc.h | 2
hw/xfree86/os-support/xf86_ansic.h | 52 ++--------
hw/xfree86/os-support/xf86_libc.h | 11 --
hw/xfree86/rac/Makefile.am | 2
hw/xfree86/ramdac/Makefile.am | 2
hw/xfree86/scanpci/Makefile.am | 2
hw/xfree86/shadowfb/Makefile.am | 2
hw/xfree86/utils/xorgcfg/Makefile.am | 2
hw/xfree86/utils/xorgcfg/loader.h | 3
hw/xfree86/utils/xorgconfig/Makefile.am | 2
hw/xfree86/vbe/Makefile.am | 2
hw/xfree86/vgahw/Makefile.am | 2
hw/xfree86/xaa/Makefile.am | 2
hw/xfree86/xf1bpp/Makefile.am | 3
hw/xfree86/xf4bpp/Makefile.am | 2
hw/xfree86/xf8_16bpp/Makefile.am | 2
hw/xfree86/xf8_32bpp/Makefile.am | 2
hw/xgl/Makefile.am | 2
hw/xgl/egl/Makefile.am | 2
hw/xgl/glx/Makefile.am | 2
hw/xgl/glxext/Makefile.am | 2
hw/xgl/glxext/module/Makefile.am | 2
hw/xnest/GetTime.c | 51 ----------
hw/xnest/Makefile.am | 3
hw/xnest/xnest-config.h | 1
hw/xprint/Makefile.am | 4
hw/xprint/ddxInit.c | 11 --
hw/xprint/etc/init.d/Makefile.am | 11 ++
hw/xprint/ps/Makefile.am | 2
hw/xprint/raster/Makefile.am | 2
hw/xwin/InitOutput.c | 9 -
include/dix-config.h.in | 3
include/dix.h | 6 +
include/kdrive-config.h.in | 3
include/misc.h | 14 --
include/os.h | 12 --
include/xorg-config.h.in | 3
include/xorg-server.h.in | 3
mfb/Makefile.am | 2
mfb/maskbits.h | 2
mi/Makefile.am | 2
mi/mibitblt.c | 2
mi/miinitext.c | 1
mi/mipushpxl.c | 10 -
mi/miwideline.c | 2
miext/cw/Makefile.am | 2
miext/damage/Makefile.am | 2
miext/damage/damage.c | 2
miext/shadow/Makefile.am | 2
os/Makefile.am | 2
os/utils.c | 18 ---
randr/Makefile.am | 2
record/Makefile.am | 2
render/Makefile.am | 2
xfixes/Makefile.am | 2
xkb/Makefile.am | 2
xkb/maprules.c | 16 ---
xkb/xkbActions.c | 4
xkb/xkbfmisc.c | 16 ---
xorg-server.pc.in | 2
185 files changed, 771 insertions(+), 1319 deletions(-)
New commits:
diff-tree 05f8b772aec2b05d92078bb60a07bd8413386363 (from 525257eb98b46209c69c8576daa6bd7afc1f48a9)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Mon Jul 24 11:23:03 2006 -0700
ScanPciDisplayPCICardInfo now uses pci_device interface for PCI
scanning. Log messages simplified to make the code shorter and less
convoluted. ScanPciDisplayPCICardInfo is now void since it was only
called from one place with a constant parameter.
diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c
index 8e41183..d07502a 100644
--- a/hw/xfree86/common/xf86DoScanPci.c
+++ b/hw/xfree86/common/xf86DoScanPci.c
@@ -45,93 +45,62 @@
#include "xf86Priv.h"
#include "xf86Pci.h"
-static void ScanPciDisplayPCICardInfo( int verbosity );
+static void ScanPciDisplayPCICardInfo();
void
-ScanPciDisplayPCICardInfo(int verbosity)
+ScanPciDisplayPCICardInfo()
{
struct pci_id_match match;
- pciConfigPtr pcrp, *pcrpp;
- int i;
+ struct pci_device_iterator *iter;
+ const struct pci_device *dev;
xf86EnableIO();
- pcrpp = xf86scanpci(0);
- if (pcrpp == NULL) {
- xf86MsgVerb(X_NONE,0,"No PCI info available\n");
+ if (xf86scanpci(0) == NULL) {
+ xf86MsgVerb(X_NONE, 0, "No PCI info available\n");
return;
}
- xf86MsgVerb(X_NONE,0,"Probing for PCI devices (Bus:Device:Function)\n\n");
- for (i = 0; (pcrp = pcrpp[i]); i++) {
+ xf86MsgVerb(X_NONE, 0,
+ "Probing for PCI devices (Bus:Device:Function)\n\n");
+
+ iter = pci_id_match_iterator_create(NULL);
+ while ((dev = pci_device_next(iter)) != NULL) {
const char *svendorname = NULL, *subsysname = NULL;
const char *vendorname = NULL, *devicename = NULL;
- Bool noCard = FALSE;
- const char *prefix1 = "", *prefix2 = "";
- xf86MsgVerb(X_NONE, -verbosity, "(%d:%d:%d) ",
- pcrp->busnum, pcrp->devnum, pcrp->funcnum);
+
+ xf86MsgVerb(X_NONE, 0, "(%d:%d:%d) ",
+ PCI_MAKE_BUS(dev->domain, dev->bus), dev->dev, dev->func);
/*
* Lookup as much as we can about the device.
*/
- match.vendor_id = pcrp->pci_vendor;
- match.device_id = pcrp->_pci_device;
- match.subvendor_id = (pcrp->pci_subsys_vendor != 0)
- ? pcrp->pci_subsys_vendor : PCI_MATCH_ANY;
- match.subdevice_id = (pcrp->pci_subsys_card != 0)
- ? pcrp->pci_subsys_card : PCI_MATCH_ANY;
+ match.vendor_id = dev->vendor_id;
+ match.device_id = dev->device_id;
+ match.subvendor_id = (dev->subvendor_id != 0)
+ ? dev->subvendor_id : PCI_MATCH_ANY;
+ match.subdevice_id = (dev->subdevice_id != 0)
+ ? dev->subdevice_id : PCI_MATCH_ANY;
match.device_class = 0;
match.device_class_mask = 0;
- pci_get_strings( & match, & vendorname, & devicename,
- & svendorname, & subsysname);
+ pci_get_strings(& match, & vendorname, & devicename,
+ & svendorname, & subsysname);
- if (svendorname)
- xf86MsgVerb(X_NONE, -verbosity, "%s ", svendorname);
- if (subsysname)
- xf86MsgVerb(X_NONE, -verbosity, "%s ", subsysname);
- if (svendorname && !subsysname) {
- if ( match.subdevice_id != PCI_MATCH_ANY ) {
- xf86MsgVerb(X_NONE, -verbosity, "unknown card (0x%04x) ",
- match.subdevice_id);
- } else {
- xf86MsgVerb(X_NONE, -verbosity, "card ");
- }
- }
- if (!svendorname && !subsysname) {
- /*
- * We didn't find a text representation of the information
- * about the card.
- */
- if ( (match.subvendor_id != PCI_MATCH_ANY)
- || (match.subdevice_id != PCI_MATCH_ANY) ) {
- /*
- * If there was information and we just couldn't interpret
- * it, print it out as unknown, anyway.
- */
- xf86MsgVerb(X_NONE, -verbosity,
- "unknown card (0x%04x/0x%04x) ",
- match.subvendor_id, match.subdevice_id);
- } else
- noCard = TRUE;
- }
- if (!noCard) {
- prefix1 = "using a ";
- prefix2 = "using an ";
- }
- if (vendorname && devicename) {
- xf86MsgVerb(X_NONE, -verbosity,"%s%s %s\n", prefix1, vendorname,
- devicename);
- } else if (vendorname) {
- xf86MsgVerb(X_NONE, -verbosity,
- "%sunknown chip (DeviceId 0x%04x) from %s\n",
- prefix2, match.device_id, vendorname);
- } else {
- xf86MsgVerb(X_NONE, -verbosity,
- "%sunknown chipset(0x%04x/0x%04x)\n",
- prefix2, match.vendor_id, match.device_id);
+ if ((dev->subvendor_id != 0) || (dev->subdevice_id != 0)) {
+ xf86MsgVerb(X_NONE, 0, "%s %s (0x%04 / 0x%04) using ",
+ (svendorname == NULL) ? "unknown vendor" : svendorname,
+ (subsysname == NULL) ? "unknown card" : subsysname,
+ dev->subvendor_id, dev->subdevice_id);
}
+
+ xf86MsgVerb(X_NONE, 0, "%s %s (0x%04 / 0x%04)\n",
+ (vendorname == NULL) ? "unknown vendor" : vendorname,
+ (devicename == NULL) ? "unknown chip" : devicename,
+ dev->vendor_id, dev->device_id);
}
+
+ pci_iterator_destroy(iter);
}
@@ -167,11 +136,7 @@ void DoScanPci(int argc, char **argv, in
if (xf86Verbose > globalVerbose)
xf86SetVerbosity(globalVerbose);
- /*
- * Setting scanpciVerbose to 0 will ensure that the output will go to
- * stderr for all reasonable default stderr verbosity levels.
- */
- ScanPciDisplayPCICardInfo( 0 );
+ ScanPciDisplayPCICardInfo();
/*
* That's it; we really should clean things up, but a simple
diff-tree 525257eb98b46209c69c8576daa6bd7afc1f48a9 (from e18d34f4238e13e226b0407fa2f5f77d2038de39)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 21 19:16:38 2006 -0700
Fix stupid typos.
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index aca0ccc..fa49ad3 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -168,7 +168,7 @@ xf86ExtendedInitInt10(int entityIndex, i
int err;
struct pci_device *rom_device = (bios.bus == BUS_PCI)
? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
- PCI_BUS_NO_DOM(bios.location.pci.bus),
+ PCI_BUS_NO_DOMAIN(bios.location.pci.bus),
bios.location.pci.dev,
bios.location.pci.func)
: xf86GetPciInfoForEntity(pInt->entityIndex);
@@ -269,7 +269,7 @@ xf86ExtendedInitInt10(int entityIndex, i
int err;
struct pci_device *rom_device = (bios.bus == BUS_PCI)
? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
- PCI_BUS_NO_DOM(bios.location.pci.bus),
+ PCI_BUS_NO_DOMAIN(bios.location.pci.bus),
bios.location.pci.dev,
bios.location.pci.func)
: xf86GetPciInfoForEntity(pInt->entityIndex);
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index d34bf6d..b83be1f 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -282,7 +282,7 @@ xf86ExtendedInitInt10(int entityIndex, i
int err;
struct pci_device *rom_device = (bios.bus == BUS_PCI)
? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
- PCI_BUS_NO_DOM(bios.location.pci.bus),
+ PCI_BUS_NO_DOMAIN(bios.location.pci.bus),
bios.location.pci.dev,
bios.location.pci.func)
: xf86GetPciInfoForEntity(pInt->entityIndex);
diff-tree e18d34f4238e13e226b0407fa2f5f77d2038de39 (from 07ad92d2c4cb07db8487d76efc822fd7b88137cb)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 21 16:47:45 2006 -0700
Make the various implementations of xf86ExtendedInitInt10 use the
libpciaccess interfaces. This eliminates all calls to mapPciRom,
which in turn allows the elimination of hw/xfree86/int10/pci.c.
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 60d9c66..d9e2557 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -46,11 +46,19 @@
#include <pciaccess.h>
-/*
- * memType is of the size of the addressable memory (machine size)
- * usually unsigned long.
+/**
+ * Integer type that is of the size of the addressable memory (machine size).
+ * On most platforms \c uintptr_t will suffice. However, on some mixed
+ * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
+ * must be 64-bits.
*/
-typedef unsigned long memType;
+#include <inttypes.h>
+#if defined(__powerpc__)
+typedef uint64_t memType;
+#else
+typedef uintptr_t memType;
+#endif
+
/* Video mode flags */
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index c059070..4656d68 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -9,7 +9,6 @@ libint10_la_LDFLAGS = -avoid-version
COMMON_SOURCES = \
helper_exec.c \
helper_mem.c \
- pci.c \
xf86int10.c \
xf86int10module.c
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 281e702..aca0ccc 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -57,8 +57,8 @@ int10MemRec genericMem = {
static void MapVRam(xf86Int10InfoPtr pInt);
static void UnmapVRam(xf86Int10InfoPtr pInt);
#ifdef _PC
-#define GET_HIGH_BASE(x) (((V_BIOS + size + getpagesize() - 1)/getpagesize()) \
- * getpagesize())
+#define GET_HIGH_BASE(x) (((V_BIOS + (x) + getpagesize() - 1)/getpagesize()) \
+ * getpagesize())
#endif
static void *sysMem = NULL;
@@ -165,18 +165,22 @@ xf86ExtendedInitInt10(int entityIndex, i
switch (location_type) {
case BUS_PCI: {
- const int pci_entity = (bios.bus == BUS_PCI)
- ? xf86GetPciEntity(bios.location.pci.bus,
- bios.location.pci.dev,
- bios.location.pci.func)
- : pInt->entityIndex;
+ int err;
+ struct pci_device *rom_device = (bios.bus == BUS_PCI)
+ ? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
+ PCI_BUS_NO_DOM(bios.location.pci.bus),
+ bios.location.pci.dev,
+ bios.location.pci.func)
+ : xf86GetPciInfoForEntity(pInt->entityIndex);
vbiosMem = (unsigned char *)base + bios_location;
- if (!(size = mapPciRom(pci_entity,(unsigned char *)(vbiosMem)))) {
- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (3)\n");
+ err = pci_device_read_rom(rom_device, vbiosMem);
+ if (err) {
+ xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (3) %s\n",
+ strerror(err));
goto error1;
}
- INTPriv(pInt)->highMemory = GET_HIGH_BASE(size);
+ INTPriv(pInt)->highMemory = GET_HIGH_BASE(rom_device->rom_size);
break;
}
case BUS_ISA:
@@ -262,24 +266,21 @@ xf86ExtendedInitInt10(int entityIndex, i
"No legacy BIOS found -- trying PCI\n");
}
if (!done) {
- int pci_entity;
-
- if (bios.bus == BUS_PCI) {
- xf86DrvMsg(screen,X_CONFIG,"Looking for BIOS at PCI:%i%i%i\n",
- bios.location.pci.bus,bios.location.pci.dev,
- bios.location.pci.func);
- pci_entity = xf86GetPciEntity(bios.location.pci.bus,
- bios.location.pci.dev,
- bios.location.pci.func);
- } else
- pci_entity = pInt->entityIndex;
-
- if (!mapPciRom(pci_entity, vbiosMem)) {
- xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS (5)\n");
- goto error1;
+ int err;
+ struct pci_device *rom_device = (bios.bus == BUS_PCI)
+ ? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
+ PCI_BUS_NO_DOM(bios.location.pci.bus),
+ bios.location.pci.dev,
+ bios.location.pci.func)
+ : xf86GetPciInfoForEntity(pInt->entityIndex);
+
+ err = pci_device_read_rom(rom_device, vbiosMem);
+ if (err) {
+ xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (3) %s\n",
+ strerror(err));
+ goto error1;
}
}
-
}
pInt->BIOSseg = V_BIOS >> 4;
diff --git a/hw/xfree86/int10/pci.c b/hw/xfree86/int10/pci.c
deleted file mode 100644
index d5758e7..0000000
--- a/hw/xfree86/int10/pci.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/pci.c,v 1.11 2001/10/01 13:44:13 eich Exp $ */
-
-/*
- * XFree86 int10 module
- * execute BIOS int 10h calls in x86 real mode environment
- * Copyright 1999 Egbert Eich
- */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <string.h>
-
-#include "xf86Pci.h"
-#include "xf86.h"
-#define _INT10_PRIVATE
-#include "xf86int10.h"
-
-int
-mapPciRom(int pciEntity, unsigned char * address)
-{
- struct pci_device * pvp = xf86GetPciInfoForEntity(pciEntity);
- int err;
-
- if (pvp == NULL) {
-#ifdef DEBUG
- ErrorF("mapPciRom: no PCI info\n");
-#endif
- return 0;
- }
-
- /* Read in entire PCI ROM */
- err = pci_device_read_rom( pvp, address );
-
-#ifdef DEBUG
- if ( err != 0 )
- ErrorF("mapPciRom: no BIOS found\n");
-#ifdef PRINT_PCI
- else
- dprint(address,0x20);
-#endif
-#endif
-
- return pvp->rom_size;
-}
diff --git a/hw/xfree86/int10/xf86int10.h b/hw/xfree86/int10/xf86int10.h
index 47f965d..a2e4c2a 100644
--- a/hw/xfree86/int10/xf86int10.h
+++ b/hw/xfree86/int10/xf86int10.h
@@ -196,8 +196,5 @@ Bool xf86int10GetBiosSegment(xf86Int10In
void dprint(unsigned long start, unsigned long size);
#endif
-/* pci.c */
-int mapPciRom(int pciEntity, unsigned char *address);
-
#endif /* _INT10_PRIVATE */
#endif /* _XF86INT10_H */
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 9f6d07e..d34bf6d 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -279,16 +279,21 @@ xf86ExtendedInitInt10(int entityIndex, i
switch (location_type) {
case BUS_PCI: {
- const int pci_entity = (bios.bus == BUS_PCI)
- ? xf86GetPciEntity(bios.location.pci.bus,
- bios.location.pci.dev,
- bios.location.pci.func)
- : pInt->entityIndex;
-
- if (!mapPciRom(pci_entity, (unsigned char *)(V_BIOS))) {
- xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS\n");
+ int err;
+ struct pci_device *rom_device = (bios.bus == BUS_PCI)
+ ? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
+ PCI_BUS_NO_DOM(bios.location.pci.bus),
+ bios.location.pci.dev,
+ bios.location.pci.func)
+ : xf86GetPciInfoForEntity(pInt->entityIndex);
+
+ err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS));
+ if (err) {
+ xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n",
+ strerror(err));
goto error3;
}
+
pInt->BIOSseg = V_BIOS >> 4;
break;
}
diff-tree 07ad92d2c4cb07db8487d76efc822fd7b88137cb (from parents)
Merge: 18624a9b7cf88e769c53cc3a876b3647c5d5057c 22db3fdb54d2f7f6b72638b46c186af6db04e214
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 21 15:25:35 2006 -0700
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:
hw/xfree86/common/xf86DoScanPci.c
hw/xfree86/common/xf86Init.c
hw/xfree86/common/xf86pciBus.c
diff --cc hw/xfree86/common/xf86Configure.c
index 907e94b,a0d622a..aee4507
@@@ -36,12 -36,8 +36,10 @@@
#include <fcntl.h>
#include <X11/X.h>
#include <X11/Xmd.h>
+#include <pciaccess.h>
+#include "Pci.h"
#include "os.h"
- #ifdef XFree86LOADER
#include "loaderProcs.h"
- #endif
#include "xf86.h"
#include "xf86Config.h"
#include "xf86_OSlib.h"
diff --cc hw/xfree86/common/xf86DoScanPci.c
index f08af2b,c63ef1c..8e41183
@@@ -39,11 -39,8 +39,8 @@@
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xmd.h>
+#include <pciaccess.h>
#include "os.h"
- #ifdef XFree86LOADER
--#include "loaderProcs.h"
- #endif
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Pci.h"
diff --cc hw/xfree86/common/xf86Init.c
index 3f456a1,9939184..51f091b
@@@ -605,8 -365,11 +600,7 @@@
LoaderFreeDirList(list);
}
#endif
- #endif
-
- /* Force load mandatory base modules */
- if (!xf86LoadModules(baseModules, NULL))
- FatalError("Unable to load required base modules, Exiting...\n");
-
+
xf86OpenConsole();
/* Do a general bus probe. This will be a PCI probe for x86 platforms */
diff-tree 22db3fdb54d2f7f6b72638b46c186af6db04e214 (from parents)
Merge: 2f98841fde6bad807967ed15e954291240714198 93cd53860c3aca182a0a02543c41b5d71d65926b
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 21 13:55:37 2006 -0700
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
diff-tree 93cd53860c3aca182a0a02543c41b5d71d65926b (from cd0874dda1c30ef91a7d2b3cd455676422599ccf)
Author: Daniel Stone <daniel.stone at nokia.com>
Date: Thu Jul 20 16:52:31 2006 -0400
kdrive: allow debugging
diff --git a/include/kdrive-config.h.in b/include/kdrive-config.h.in
index 9e611c5..2f454d7 100644
--- a/include/kdrive-config.h.in
+++ b/include/kdrive-config.h.in
@@ -22,4 +22,7 @@
/* Support tslib touchscreen abstraction library */
#undef TSLIB
+/* Verbose debugging output hilarity */
+#undef DEBUG
+
#endif /* _KDRIVE_CONFIG_H_ */
diff-tree cd0874dda1c30ef91a7d2b3cd455676422599ccf (from 093943d4d02f1dbc8935b8cf835866a6e3885193)
Author: Daniel Stone <daniel.stone at nokia.com>
Date: Wed Jul 19 20:13:02 2006 -0400
never define MEMBUG
Definining MEMBUG causes allocations to randomly fail.
diff --git a/os/utils.c b/os/utils.c
index 3900bff..ffa4958 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -264,12 +264,6 @@ int SyncOn = 0;
extern int SelectWaitTime;
#endif
-#ifdef DEBUG
-#ifndef SPECIAL_MALLOC
-#define MEMBUG
-#endif
-#endif
-
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#endif
diff-tree 093943d4d02f1dbc8935b8cf835866a6e3885193 (from 68b0678254240a984db9adefefb0cf68e9bfd4e4)
Author: Daniel Stone <daniel.stone at nokia.com>
Date: Wed Jul 19 20:09:55 2006 -0400
define DEBUG in DIX
Which makes #ifdef DEBUG actually useful. Incredible.
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 4c3a4b7..2b9f273 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -231,6 +231,9 @@
/* Disable some debugging code */
#undef NDEBUG
+/* Enable some debugging code */
+#undef DEBUG
+
/* Name of package */
#undef PACKAGE
diff-tree 68b0678254240a984db9adefefb0cf68e9bfd4e4 (from 27df2eda795681c9f05e2907d74e2c102d3441e4)
Author: Daniel Stone <daniel.stone at nokia.com>
Date: Wed Jul 19 20:08:32 2006 -0400
exa: only disable cw when COMPOSITE is built
diff --git a/exa/exa.c b/exa/exa.c
index 1022b2e..b490653 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -606,7 +606,9 @@ exaDriverInit (ScreenPtr pScreen,
}
#endif
+#ifdef COMPOSITE
miDisableCompositeWrapper(pScreen);
+#endif
/*
* Hookup offscreen pixmaps
diff-tree 27df2eda795681c9f05e2907d74e2c102d3441e4 (from 00b24f119f03da86fa98ffea545c5b041810ce53)
Author: Daniel Stone <daniel.stone at nokia.com>
Date: Wed Jul 19 16:18:28 2006 -0400
fix KdXvCopyPackedData to actually work
Remove extraneous bit shift in KdXvCopyPackedData, so it's actually
useful.
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 8580dc2..4e672f1 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -1814,7 +1814,7 @@ KdXVCopyPackedData(KdScreenInfo *screen,
src = src + top * srcDown + left * srcRight;
w >>= 1;
- srcRight >>= 1;
+ /* srcRight >>= 1; */
srcNext = srcRight >> 1;
while (h--) {
CARD16 *s = (CARD16 *)src;
diff-tree 00b24f119f03da86fa98ffea545c5b041810ce53 (from f8a7a1e40c14a85ebde11c5854c07a8d529d38b9)
Author: Daniel Stone <daniel at fooishbar.org>
Date: Wed Jul 19 17:01:20 2006 -0400
fix minor typo
diff --git a/configure.ac b/configure.ac
index 51b634e..a2af599 100644
--- a/configure.ac
+++ b/configure.ac
@@ -469,7 +469,7 @@ AC_MSG_RESULT([$SETUID])
AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"])
dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
-dnl was not expanded, since libX11 with no transport types is rather useless.
+dnl was not expanded, since xorg-server with no transport types is rather useless.
dnl
dnl If you're seeing an error here, be sure you installed the lib/xtrans module
dnl first and if it's not in the default location, that you set the ACLOCAL
diff-tree f8a7a1e40c14a85ebde11c5854c07a8d529d38b9 (from 985c34bf06af70a7296db8307899a17347a25558)
Author: Daniel Stone <daniel.stone at nokia.com>
Date: Wed Jul 19 17:06:00 2006 -0400
fix XEvIE build without XKB
Don't unconditionally play with XKB stuff in XEvIE.
diff --git a/Xext/xevie.c b/Xext/xevie.c
index ccc1237..41fdd1d 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -59,7 +59,9 @@ of the copyright holder.
#define NoSuchEvent 0x80000000
+#ifdef XKB
extern Bool noXkbExtension;
+#endif
extern int xeviegrabState;
static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client);
@@ -201,12 +203,14 @@ int ProcStart (register ClientPtr client
return BadAlloc;
} else
return BadAccess;
+#ifdef XKB
if (!noXkbExtension) {
if (!XevieStart()) {
DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL);
return BadAlloc;
}
}
+#endif
xevieModifiersOn = FALSE;
@@ -255,19 +259,23 @@ int ProcSend (register ClientPtr client)
case KeyPress:
case KeyRelease:
xevieKBEventSent = 1;
- if(noXkbExtension)
- CoreProcessKeyboardEvent (xE, xeviekb, 1);
- else
+#ifdef XKB
+ if(!noXkbExtension)
doSendEvent(xE, inputInfo.keyboard);
+ else
+#endif
+ CoreProcessKeyboardEvent (xE, xeviekb, 1);
break;
case ButtonPress:
case ButtonRelease:
case MotionNotify:
xevieEventSent = 1;
- if(noXkbExtension)
- CoreProcessPointerEvent(xE, xeviemouse, 1);
- else
+#ifdef XKB
+ if(!noXkbExtension)
doSendEvent(xE, inputInfo.pointer);
+ else
+#endif
+ CoreProcessPointerEvent(xE, xeviemouse, 1);
break;
default:
break;
@@ -464,6 +472,7 @@ XevieKbdProcessInputProc(xEvent *xE, Dev
xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state;
/* fix bug: sequence lost in Xlib */
xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence;
+#ifdef XKB
/* fix for bug5092586 */
if(!noXkbExtension) {
switch(xE->u.u.type) {
@@ -471,6 +480,7 @@ XevieKbdProcessInputProc(xEvent *xE, Dev
case KeyRelease: *kptr &= ~bit; break;
}
}
+#endif
keycq[keycqHead].time = xE->u.keyButtonPointer.time;
memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr));
memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec));
@@ -525,6 +535,7 @@ XevieEnd(int clientIndex)
{
if (!clientIndex || clientIndex == xevieClientIndex) {
+#ifdef XKB
if(!noXkbExtension) {
XevieRemove(inputInfo.keyboard,NULL);
@@ -540,6 +551,7 @@ XevieEnd(int clientIndex)
inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent;
XkbSetExtension(inputInfo.pointer,ProcessPointerEvent);
}
+#endif
xevieFlag = 0;
xevieClientIndex = 0;
diff-tree 2f98841fde6bad807967ed15e954291240714198 (from c69c00d6523a35232a32e54a533811fc2b37815a)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Thu Jul 20 16:08:27 2006 -0700
Remove unused variable.
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 48675a4..9f6d07e 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -76,7 +76,6 @@ xf86Int10InfoPtr
xf86ExtendedInitInt10(int entityIndex, int Flags)
{
xf86Int10InfoPtr pInt = NULL;
- CARD8 *bios_base;
int screen;
int fd;
static void* vidMem = NULL;
diff-tree 985c34bf06af70a7296db8307899a17347a25558 (from 84683f19b4d1c712281036bcabf8dc623e64b26a)
Author: Adam Jackson <ajax at theobromine.nwnk.net>
Date: Thu Jul 20 17:33:13 2006 -0400
Remove the DDXTIME conditional, for being unused.
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index e7f04df..9c5356e 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -1046,14 +1046,3 @@ void ddxUseMsg(void)
ErrorF(" Ctrl-Alt-q Quit (core devices only)\n");
ErrorF(" Ctrl-Alt-F* Switch to VC (local only)\n");
}
-
-#ifdef DDXTIME
-/** Return wall-clock time in milliseconds. */
-CARD32 GetTimeInMillis(void)
-{
- struct timeval tp;
-
- gettimeofday(&tp, 0);
- return tp.tv_sec * 1000 + tp.tv_usec / 1000;
-}
-#endif
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 212f79b..46e956c 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -450,17 +450,6 @@ ddxProcessArgument(int argc, char *argv[
return 0;
}
-#ifdef DDXTIME /* from ServerOSDefines */
-CARD32
-GetTimeInMillis()
-{
- struct timeval tp;
-
- X_GETTIMEOFDAY(&tp);
- return(tp.tv_sec * 1000) + (tp.tv_usec / 1000);
-}
-#endif
-
static ColormapPtr InstalledMaps[MAXSCREENS];
static int
diff --git a/hw/xfree86/common/xf86Io.c b/hw/xfree86/common/xf86Io.c
index 4dbbd7e..318b245 100644
--- a/hw/xfree86/common/xf86Io.c
+++ b/hw/xfree86/common/xf86Io.c
@@ -470,32 +470,3 @@ searchdone:
}
return (Success);
}
-
-#if defined(DDXTIME) && !defined(QNX4)
-/*
- * These are getting tossed in here until I can think of where
- * they really belong
- */
-#define HALFMONTH ((unsigned long) 1<<31)
-_X_EXPORT CARD32
-GetTimeInMillis()
-{
- struct timeval tp;
- register CARD32 val;
- register INT32 diff;
- static CARD32 oldval = 0;
- static CARD32 time = 0;
-
- gettimeofday(&tp, 0);
- val = (tp.tv_sec * 1000) + (tp.tv_usec / 1000);
- if (oldval) {
- diff = val - oldval;
- if (diff > 0)
- time += diff;
- }
- oldval = val;
-
- return time;
-}
-#endif /* DDXTIME && !QNX4 */
-
diff --git a/hw/xnest/GetTime.c b/hw/xnest/GetTime.c
deleted file mode 100644
index bdcc6be..0000000
--- a/hw/xnest/GetTime.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $Xorg: GetTime.c,v 1.3 2000/08/17 19:53:28 cpqbld Exp $ */
-/*
-
-Copyright (c) 1993 X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86$ */
-
-
-#ifdef HAVE_XNEST_CONFIG_H
-#include <xnest-config.h>
-#endif
-
-#include <X11/Xos.h>
-#include "os.h"
-#include <time.h>
-
-#ifdef DDXTIME
-CARD32
-GetTimeInMillis()
-{
- struct timeval tp;
-
- X_GETTIMEOFDAY(&tp);
- return(tp.tv_sec * 1000) + (tp.tv_usec / 1000);
-}
-#endif
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index b23782e..b237788 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -14,7 +14,6 @@ SRCS = Args.c \
GC.c \
GCOps.c \
GCOps.h \
- GetTime.c \
Handlers.c \
Handlers.h \
Init.c \
diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c
index d4c0b9a..e182ea1 100644
--- a/hw/xprint/ddxInit.c
+++ b/hw/xprint/ddxInit.c
@@ -245,17 +245,6 @@ ddxBeforeReset(void)
}
#endif
-#ifdef DDXTIME
-CARD32
-GetTimeInMillis(void)
-{
- struct timeval tp;
-
- X_GETTIMEOFDAY(&tp);
- return(tp.tv_sec * 1000) + (tp.tv_usec / 1000);
-}
-#endif
-
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
void ddxInitGlobals(void)
{
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index c5242cc..816dec9 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -944,15 +944,6 @@ void ddxInitGlobals(void)
{
}
-#ifdef DDXTIME /* from ServerOSDefines */
-CARD32
-GetTimeInMillis (void)
-{
- return GetTickCount ();
-}
-#endif /* DDXTIME */
-
-
/* See Porting Layer Definition - p. 20 */
/*
* Do any global initialization, then initialize each screen.
diff --git a/os/utils.c b/os/utils.c
index de3e7c9..3900bff 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -545,7 +545,6 @@ GiveUp(int sig)
errno = olderrno;
}
-#ifndef DDXTIME
_X_EXPORT CARD32
GetTimeInMillis(void)
{
@@ -554,7 +553,6 @@ GetTimeInMillis(void)
X_GETTIMEOFDAY(&tp);
return(tp.tv_sec * 1000) + (tp.tv_usec / 1000);
}
-#endif
_X_EXPORT void
AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
diff-tree c69c00d6523a35232a32e54a533811fc2b37815a (from parents)
Merge: 46369350d40819ecc2a9f37ed4aaa95866b80997 84683f19b4d1c712281036bcabf8dc623e64b26a
Author: Ian Romanick <idr at umwelt.(none)>
Date: Thu Jul 20 12:08:38 2006 -0700
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
diff-tree 84683f19b4d1c712281036bcabf8dc623e64b26a (from 881953813c7307f2aac4057b48d233e5f4a574cd)
Author: Daniel Stone <daniel at fooishbar.org>
Date: Tue Jul 18 18:16:12 2006 -0400
get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions. They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build. As well as
for miinitext.c. But largely gone.
diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am
index 646f7d1..1d4a986 100644
--- a/GL/glx/Makefile.am
+++ b/GL/glx/Makefile.am
@@ -13,9 +13,7 @@ AM_CFLAGS = \
@DRIPROTO_CFLAGS@ \
-I at MESA_SOURCE@/src/mesa/glapi \
-I at MESA_SOURCE@/src/mesa/main \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
-DNO_LIBCWRAPPER \
@GLX_DEFINES@
diff --git a/GL/mesa/X/Makefile.am b/GL/mesa/X/Makefile.am
index 1f740ee..2a9f422 100644
--- a/GL/mesa/X/Makefile.am
+++ b/GL/mesa/X/Makefile.am
@@ -20,9 +20,7 @@ INCLUDES = -I at MESA_SOURCE@/include \
# symbol means "being built in the server"
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@ \
-DXFree86Server
diff --git a/GL/mesa/array_cache/Makefile.am b/GL/mesa/array_cache/Makefile.am
index 4169f3d..5016b73 100644
--- a/GL/mesa/array_cache/Makefile.am
+++ b/GL/mesa/array_cache/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libac.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/glapi/Makefile.am b/GL/mesa/glapi/Makefile.am
index 223f0c2..de457b9 100644
--- a/GL/mesa/glapi/Makefile.am
+++ b/GL/mesa/glapi/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libglapi.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/main/Makefile.am b/GL/mesa/main/Makefile.am
index 2db76b6..4d5b0cd 100644
--- a/GL/mesa/main/Makefile.am
+++ b/GL/mesa/main/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmain.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/math/Makefile.am b/GL/mesa/math/Makefile.am
index 4b157c3..5e99d90 100644
--- a/GL/mesa/math/Makefile.am
+++ b/GL/mesa/math/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmath.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/shader/Makefile.am b/GL/mesa/shader/Makefile.am
index dd0ed71..4bd5736 100644
--- a/GL/mesa/shader/Makefile.am
+++ b/GL/mesa/shader/Makefile.am
@@ -4,9 +4,7 @@ noinst_LTLIBRARIES = libshader.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/shader/grammar/Makefile.am b/GL/mesa/shader/grammar/Makefile.am
index 9f9e5f6..0974d5b 100644
--- a/GL/mesa/shader/grammar/Makefile.am
+++ b/GL/mesa/shader/grammar/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libgrammar.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/shader/slang/Makefile.am b/GL/mesa/shader/slang/Makefile.am
index 7088ee1..8f2636e 100644
--- a/GL/mesa/shader/slang/Makefile.am
+++ b/GL/mesa/shader/slang/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libslang.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/swrast/Makefile.am b/GL/mesa/swrast/Makefile.am
index 904b772..d972af6 100644
--- a/GL/mesa/swrast/Makefile.am
+++ b/GL/mesa/swrast/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libswrast.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/swrast_setup/Makefile.am b/GL/mesa/swrast_setup/Makefile.am
index c52575d..8d70408 100644
--- a/GL/mesa/swrast_setup/Makefile.am
+++ b/GL/mesa/swrast_setup/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libss.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/GL/mesa/tnl/Makefile.am b/GL/mesa/tnl/Makefile.am
index cbf46fd..717e6fd 100644
--- a/GL/mesa/tnl/Makefile.am
+++ b/GL/mesa/tnl/Makefile.am
@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libtnl.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ -DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I at MESA_SOURCE@/include \
diff --git a/XTrap/Makefile.am b/XTrap/Makefile.am
index cdbfe11..1eddd4f 100644
--- a/XTrap/Makefile.am
+++ b/XTrap/Makefile.am
@@ -1,5 +1,5 @@
noinst_LTLIBRARIES = libxtrap.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
libxtrap_la_SOURCES = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 56c5053..fde0550 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -12,7 +12,7 @@ endif
INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
if XORG
sdk_HEADERS = xvdix.h xvmcext.h
diff --git a/Xi/Makefile.am b/Xi/Makefile.am
index 8eac59b..fbe4385 100644
--- a/Xi/Makefile.am
+++ b/Xi/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libXi.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
libXi_la_SOURCES = \
allowev.c \
diff --git a/afb/Makefile.am b/afb/Makefile.am
index e7dedfa..d83b674 100644
--- a/afb/Makefile.am
+++ b/afb/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libafb.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c
diff --git a/cfb/Makefile.am b/cfb/Makefile.am
index 89832fa..d24f027 100644
--- a/cfb/Makefile.am
+++ b/cfb/Makefile.am
@@ -9,7 +9,7 @@ libcfb_la_SOURCES = cfb8bit.c cfbteblt8.
libcfb_la_LIBADD = ../mfb/libmfb.la
-AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS)
INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common
diff --git a/cfb32/Makefile.am b/cfb32/Makefile.am
index a549d18..681a095 100644
--- a/cfb32/Makefile.am
+++ b/cfb32/Makefile.am
@@ -6,4 +6,4 @@ libcfb32_la_SOURCES = $(libcfb_common_so
INCLUDES = $(CFB_INCLUDES) $(DIX_CFLAGS) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common
-AM_CFLAGS = -DPSZ=32 $(PLATFORMDEFS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DPSZ=32 $(PLATFORMDEFS)
diff --git a/composite/Makefile.am b/composite/Makefile.am
index dbcb8c6..21504e6 100644
--- a/composite/Makefile.am
+++ b/composite/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libcomposite.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
libcomposite_la_SOURCES = \
compalloc.c \
diff --git a/configure.ac b/configure.ac
index 56bee79..51b634e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -865,11 +865,6 @@ dnl ------------------------------------
dnl DDX section.
dnl ---------------------------------------------------------------------------
-dnl These are used to define Xorg module, loader and general server defines
-MODULE_DEFINES=""
-LOADER_DEFINES=""
-SERVER_DEFINES=""
-
dnl DMX DDX
AC_MSG_CHECKING([whether to build Xdmx DDX])
@@ -1244,11 +1239,6 @@ int main () {
AC_SUBST([XORG_CFLAGS])
AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
- dnl Module defines are used in the Xorg server and the drivers
- MODULE_DEFINES="$MODULE_DEFINES -DIN_MODULE -DXFree86Module"
- LOADER_DEFINES="$LOADER_DEFINES -DXFree86LOADER"
- SERVER_DEFINES="$SERVER_DEFINES -DXFree86Server"
-
dnl these only go in xorg-config.h
XF86CONFIGFILE="xorg.conf"
CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
@@ -1256,6 +1246,7 @@ int main () {
AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
+ AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server])
AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
@@ -1593,10 +1584,6 @@ AM_CONDITIONAL(BUILD_KBD_MODE, [test x$B
AM_CONDITIONAL(BSD_KBD_MODE, [test x$KBD_MODE_TYPE = xbsd])
AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD_MODE_TYPE = xsun])
-AC_SUBST([MODULE_DEFINES])
-AC_SUBST([LOADER_DEFINES])
-AC_SUBST([SERVER_DEFINES])
-
CFLAGS="$XSERVER_CFLAGS $CFLAGS"
AC_SUBST([CFLAGS])
diff --git a/damageext/Makefile.am b/damageext/Makefile.am
index 171cd27..35f7620 100644
--- a/damageext/Makefile.am
+++ b/damageext/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libdamageext.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
libdamageext_la_SOURCES = \
damageext.c \
diff --git a/dbe/Makefile.am b/dbe/Makefile.am
index 01de470..043555b 100644
--- a/dbe/Makefile.am
+++ b/dbe/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libdbe.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
if XORG
sdk_HEADERS = dbestruct.h
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 414f125..d26d9ea 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libdix.la libxpstubs.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ \
+AM_CFLAGS = $(DIX_CFLAGS) \
-DVENDOR_STRING=\""@VENDOR_STRING@"\" \
-DVENDOR_RELEASE="@VENDOR_RELEASE@"
diff --git a/dix/atom.c b/dix/atom.c
index 53cd5c3..e6577fd 100644
--- a/dix/atom.c
+++ b/dix/atom.c
@@ -54,6 +54,8 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xatom.h>
+#include <stdio.h>
+#include <string.h>
#include "misc.h"
#include "resource.h"
#include "dix.h"
diff --git a/dix/colormap.c b/dix/colormap.c
index ba52c25..b8d8586 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -56,6 +56,9 @@ SOFTWARE.
#include <X11/X.h>
#define NEED_EVENTS
#include <X11/Xproto.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
#include "misc.h"
#include "dix.h"
#include "colormapst.h"
diff --git a/dix/events.c b/dix/events.c
index c67cf8c..479b4d8 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3019,9 +3019,6 @@ ProcessPointerEvent (register xEvent *xE
butc->buttonsDown++;
butc->motionMask = ButtonMotionMask;
*kptr |= bit;
-#if !defined(XFree86Server) || !defined(XINPUT)
- xE->u.u.detail = butc->map[key];
-#endif
if (xE->u.u.detail == 0)
return;
if (xE->u.u.detail <= 5)
@@ -3038,9 +3035,6 @@ ProcessPointerEvent (register xEvent *xE
if (!butc->buttonsDown)
butc->motionMask = 0;
*kptr &= ~bit;
-#if !defined(XFree86Server) || !defined(XINPUT)
- xE->u.u.detail = butc->map[key];
-#endif
if (xE->u.u.detail == 0)
return;
if (xE->u.u.detail <= 5)
diff --git a/exa/Makefile.am b/exa/Makefile.am
index 98db027..e2f7ed3 100644
--- a/exa/Makefile.am
+++ b/exa/Makefile.am
@@ -12,7 +12,7 @@ INCLUDES = \
$(XORG_INCS) \
-I$(srcdir)/../miext/cw
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ $(DIX_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
libexa_la_SOURCES = \
exa.c \
diff --git a/fb/Makefile.am b/fb/Makefile.am
index 7b024aa..11b2d2f 100644
--- a/fb/Makefile.am
+++ b/fb/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
-I$(top_srcdir)/hw/xfree86/os-support \
-I$(top_srcdir)/hw/xfree86/os-support/bus \
-I$(top_srcdir)/hw/xfree86/common
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
if XORG
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index d18ef70..92b8e1b 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -28,9 +28,6 @@
#endif
#include <string.h>
-#ifdef XFree86LOADER
-#include "xf86.h"
-#endif
#include "fb.h"
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c
index e8e49f9..c878e7d 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/darwin/quartz/xpr/dri.c
@@ -35,13 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
*
*/
-#ifdef XFree86LOADER
-#include "xf86.h"
-#include "xf86_ansic.h"
-#else
#include <sys/time.h>
#include <unistd.h>
-#endif
#define NEED_REPLIES
#define NEED_EVENTS
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 93abd7a..81b62f1 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -81,7 +81,7 @@ Xdmx_LDADD = $(XORG_CORE_LIBS) \
config/libdmxconfig.a \
@DMXMODULES_LIBS@
-Xdmx_CFLAGS = @SERVER_DEFINES@ \
+Xdmx_CFLAGS = \
-DHAVE_DMX_CONFIG_H \
$(GLX_INCS) \
$(GLX_DEFS) \
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
index 7376ec2..fbc7f35 100644
--- a/hw/dmx/config/Makefile.am
+++ b/hw/dmx/config/Makefile.am
@@ -27,7 +27,7 @@ endif
AM_YFLAGS = -d
AM_CFLAGS = \
- @SERVER_DEFINES@ \
+ \
-I$(top_srcdir)/hw/dmx \
$(GLX_INCS) \
-DHAVE_DMX_CONFIG_H \
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 11e8fb8..9647448 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -93,6 +93,5 @@
#undef DAMAGE
#undef COMPOSITE
#undef FONTCACHE
-#undef XFree86LOADER
#endif /* DMX_CONFIG_H */
diff --git a/hw/dmx/glxProxy/Makefile.am b/hw/dmx/glxProxy/Makefile.am
index a798647..2f4a3b7 100644
--- a/hw/dmx/glxProxy/Makefile.am
+++ b/hw/dmx/glxProxy/Makefile.am
@@ -31,8 +31,8 @@ libglxproxy_a_SOURCES = compsize.c \
renderpixswap.c \
unpack.h
-AM_CFLAGS = @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
+AM_CFLAGS = \
+ \
-I$(top_srcdir)/hw/dmx \
-I$(top_srcdir)/include \
-I$(top_srcdir)/GL/include \
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index a7d4ce1..2f63595 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -48,12 +48,7 @@
#include "glxserver.h"
-#ifdef IN_MODULE
#include <xf86_ansic.h>
-#else
-#include <string.h>
-#include <signal.h>
-#endif
#include <windowstr.h>
diff --git a/hw/dmx/input/Makefile.am b/hw/dmx/input/Makefile.am
index d37c2a9..326506e 100644
--- a/hw/dmx/input/Makefile.am
+++ b/hw/dmx/input/Makefile.am
@@ -60,7 +60,7 @@ GLX_DEFS = @GL_CFLAGS@
GLX_INCS = -I at MESA_SOURCE@/include
endif
-AM_CFLAGS = @SERVER_DEFINES@ \
+AM_CFLAGS = \
-I$(top_srcdir)/hw/dmx \
-I$(top_srcdir)/hw/xfree86/common \
$(GLX_INCS) \
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index bd87d1d..baab5ca 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -21,7 +21,7 @@ Xvfb_LDFLAGS =
AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
-DNO_HW_ONLY_EXTS \
-DNO_MODULE_EXTS \
- @SERVER_DEFINES@ \
+ \
$(XVFBMODULES_CFLAGS)
# Man page
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index b50b6ab..3a5ef65 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -16,7 +16,7 @@ DIST_SUBDIRS = common ddc dummylib i2c x
bin_PROGRAMS = Xorg
-AM_CFLAGS = @XORG_CFLAGS@ @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
Xorg_SOURCES = xorg.c
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 0fe8aff..84818ff 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -103,4 +103,4 @@ if LNXACPI
XORG_CFLAGS += -DHAVE_ACPI
endif
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 001bbf2..754ad7c 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1605,17 +1605,13 @@ extern void outl(unsigned int a, unsigne
# endif
# ifndef SCO325
# if defined(__UNIXWARE__)
-# if defined(IN_MODULE)
# /* avoid including <sys/types.h> for <sys/inline.h> on UnixWare */
-# define ushort unsigned short
-# define ushort_t unsigned short
-# define ulong unsigned long
-# define ulong_t unsigned long
-# define uint_t unsigned int
-# define uchar_t unsigned char
-# else
-# include <sys/types.h>
-# endif /* IN_MODULE */
+# define ushort unsigned short
+# define ushort_t unsigned short
+# define ulong unsigned long
+# define ulong_t unsigned long
+# define uint_t unsigned int
+# define uchar_t unsigned char
# endif /* __UNIXWARE__ */
# if !defined(sgi) && !defined(__SUNPRO_C)
# include <sys/inline.h>
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 3c416a0..87ae551 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -354,10 +354,8 @@ int xf86RegisterRootWindowProperty(int
pointer value);
Bool xf86IsUnblank(int mode);
-#ifdef XFree86LOADER
void xf86AddModuleInfo(ModuleInfoPtr info, pointer module);
void xf86DeleteModuleInfo(int idx);
-#endif
/* xf86Debug.c */
#ifdef BUILDDEBUG
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index bcad246..b932908 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -513,7 +513,6 @@ fixup_video_driver_list(char **drivers)
static char **
GenerateDriverlist(char * dirname, char * drivernames)
{
-#ifdef XFree86LOADER
char **ret;
const char *subdirs[] = { dirname, NULL };
static const char *patlist[] = {"(.*)_drv\\.so", "(.*)_drv\\.o", NULL};
@@ -524,39 +523,6 @@ GenerateDriverlist(char * dirname, char
fixup_video_driver_list(ret);
return ret;
-#else /* non-loadable server */
- char *cp, **driverlist;
- int count;
-
- /* Count the number needed */
- count = 0;
- cp = drivernames;
- while (*cp) {
- while (*cp && isspace(*cp)) cp++;
- if (!*cp) break;
- count++;
- while (*cp && !isspace(*cp)) cp++;
- }
-
- if (!count)
- return NULL;
-
- /* Now allocate the array of pointers to 0-terminated driver names */
- driverlist = (char **)xnfalloc((count + 1) * sizeof(char *));
- count = 0;
- cp = drivernames;
- while (*cp) {
- while (*cp && isspace(*cp)) cp++;
- if (!*cp) break;
- driverlist[count++] = cp;
- while (*cp && !isspace(*cp)) cp++;
- if (!*cp) break;
- *cp++ = 0;
- }
- driverlist[count] = NULL;
-
- return driverlist;
-#endif
}
@@ -732,7 +698,6 @@ configFiles(XF86ConfFilesPtr fileconf)
}
-#ifdef XFree86LOADER
/* ModulePath */
if (fileconf) {
@@ -743,7 +708,6 @@ configFiles(XF86ConfFilesPtr fileconf)
}
xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath);
-#endif
#if 0
/* LogFile */
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 4b9d418..a0d622a 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -37,9 +37,7 @@
#include <X11/X.h>
#include <X11/Xmd.h>
#include "os.h"
-#ifdef XFree86LOADER
#include "loaderProcs.h"
-#endif
#include "xf86.h"
#include "xf86Config.h"
#include "xf86_OSlib.h"
@@ -602,7 +600,6 @@ configureFlagsSection (void)
static XF86ConfModulePtr
configureModuleSection (void)
{
-#ifdef XFree86LOADER
char **elist, **el;
/* Find the list of extension modules. */
const char *esubdirs[] = {
@@ -613,10 +610,8 @@ configureModuleSection (void)
"fonts",
NULL
};
-#endif
parsePrologue (XF86ConfModulePtr, XF86ConfModuleRec)
-#ifdef XFree86LOADER
elist = LoaderListDirs(esubdirs, NULL);
if (elist) {
for (el = elist; *el; el++) {
@@ -653,7 +648,6 @@ configureModuleSection (void)
}
xfree(elist);
}
-#endif
return ptr;
}
@@ -663,10 +657,8 @@ configureFilesSection (void)
{
parsePrologue (XF86ConfFilesPtr, XF86ConfFilesRec)
-#ifdef XFree86LOADER
if (xf86ModulePath)
ptr->file_modulepath = strdup(xf86ModulePath);
-#endif
if (defaultFontPath)
ptr->file_fontpath = strdup(defaultFontPath);
if (rgbPath)
@@ -788,10 +780,8 @@ DoConfigure()
for (vl = vlist; *vl; vl++)
ErrorF("\t%s\n", *vl);
-#ifdef XFree86LOADER
/* Load all the drivers that were found. */
xf86LoadModules(vlist, NULL);
-#endif /* XFree86LOADER */
xfree(vlist);
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 88324eb..53186ea 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -63,11 +63,7 @@ DGACopyModeInfo(
XDGAModePtr xmode
);
-#if defined(XFree86LOADER) || !defined(XFreeXDGA)
_X_EXPORT int *XDGAEventBase = NULL;
-#else
-_X_EXPORT int *XDGAEventBase = &DGAEventBase;
-#endif
#define DGA_GET_SCREEN_PRIV(pScreen) \
((DGAScreenPtr)((pScreen)->devPrivates[DGAScreenIndex].ptr))
diff --git a/hw/xfree86/common/xf86DoProbe.c b/hw/xfree86/common/xf86DoProbe.c
index b74f37e..28064cb 100644
--- a/hw/xfree86/common/xf86DoProbe.c
+++ b/hw/xfree86/common/xf86DoProbe.c
@@ -40,10 +40,8 @@
#include <X11/X.h>
#include <X11/Xmd.h>
#include "os.h"
-#ifdef XFree86LOADER
#include "loaderProcs.h"
#include "xf86Config.h"
-#endif /* XFree86LOADER */
#include "xf86_OSlib.h"
#include "xf86.h"
#include "xf86Priv.h"
@@ -55,7 +53,6 @@ DoProbe()
Bool probeResult;
Bool ioEnableFailed = FALSE;
-#ifdef XFree86LOADER
/* Find the list of video driver modules. */
char **list = xf86DriverlistFromCompile();
char **l;
@@ -70,7 +67,6 @@ DoProbe()
/* Load all the drivers that were found. */
xf86LoadModules(list, NULL);
-#endif /* XFree86LOADER */
/* Disable PCI devices */
xf86AccessInit();
diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c
index 9f8c156..c63ef1c 100644
--- a/hw/xfree86/common/xf86DoScanPci.c
+++ b/hw/xfree86/common/xf86DoScanPci.c
@@ -40,9 +40,7 @@
#include <X11/X.h>
#include <X11/Xmd.h>
#include "os.h"
-#ifdef XFree86LOADER
#include "loaderProcs.h"
-#endif
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Pci.h"
@@ -54,9 +52,7 @@ void DoScanPci(int argc, char **argv, in
int j,skip,globalVerbose,scanpciVerbose;
ScanPciSetupProcPtr PciSetup;
ScanPciDisplayCardInfoProcPtr DisplayPCICardInfo;
-#ifdef XFree86LOADER
int errmaj, errmin;
-#endif
/*
* first we need to finish setup of the OS so that we can call other
@@ -95,7 +91,6 @@ void DoScanPci(int argc, char **argv, in
/*
* now get the loader set up and load the scanpci module
*/
-#ifdef XFree86LOADER
/* Initialise the loader */
LoaderInit();
/* Tell the loader the default module search path */
@@ -113,10 +108,6 @@ void DoScanPci(int argc, char **argv, in
PciSetup = (ScanPciSetupProcPtr)LoaderSymbol("ScanPciSetupPciIds");
DisplayPCICardInfo =
(ScanPciDisplayCardInfoProcPtr)LoaderSymbol("ScanPciDisplayPCICardInfo");
-#else
- PciSetup = ScanPciSetupPciIds;
- DisplayPCICardInfo = ScanPciDisplayPCICardInfo;
-#endif
if (!(*PciSetup)())
FatalError("ScanPciSetupPciIds() failed\n");
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index b3b5c1b..1e0ac79 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -189,14 +189,12 @@ Bool xf86Initialising = FALSE;
Bool xf86ProbeFailed = FALSE;
Bool xf86DoProbe = FALSE;
Bool xf86DoConfigure = FALSE;
-#ifdef XFree86LOADER
DriverPtr *xf86DriverList = NULL;
int xf86NumDrivers = 0;
InputDriverPtr *xf86InputDriverList = NULL;
int xf86NumInputDrivers = 0;
ModuleInfoPtr *xf86ModuleInfoList = NULL;
int xf86NumModuleInfos = 0;
-#endif
int xf86NumScreens = 0;
const char *xf86VisualNames[] = {
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1e77427..ebc460f 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -70,7 +70,6 @@
static int xf86ScrnInfoPrivateCount = 0;
-#ifdef XFree86LOADER
/* Add a pointer to a new DriverRec to xf86DriverList */
_X_EXPORT void
@@ -172,7 +171,6 @@ xf86DeleteModuleInfo(int idx)
xf86ModuleInfoList[idx] = NULL;
}
}
-#endif
/* Allocate a new ScrnInfoRec in xf86Screens */
@@ -199,11 +197,7 @@ xf86AllocateScreen(DriverPtr drv, int fl
xf86Screens[i]->drv = drv;
drv->refCount++;
-#ifdef XFree86LOADER
xf86Screens[i]->module = DuplicateModule(drv->module, NULL);
-#else
- xf86Screens[i]->module = NULL;
-#endif
/*
* set the initial access state. This will be modified after PreInit.
* XXX Or should we do it some other place?
@@ -260,10 +254,8 @@ xf86DeleteScreen(int scrnIndex, int flag
xf86OptionListFree(pScrn->options);
-#ifdef XFree86LOADER
if (pScrn->module)
UnloadModule(pScrn->module);
-#endif
if (pScrn->drv)
pScrn->drv->refCount--;
@@ -321,11 +313,7 @@ xf86AllocateInput(InputDriverPtr drv, in
new->drv = drv;
drv->refCount++;
-#ifdef XFree86LOADER
new->module = DuplicateModule(drv->module, NULL);
-#else
- new->module = NULL;
-#endif
new->next = xf86InputDevs;
xf86InputDevs = new;
return new;
@@ -352,10 +340,8 @@ xf86DeleteInput(InputInfoPtr pInp, int f
pInp->free(pInp, 0);
#endif
-#ifdef XFree86LOADER
if (pInp->module)
UnloadModule(pInp->module);
-#endif
if (pInp->drv)
pInp->drv->refCount--;
@@ -2381,17 +2367,12 @@ xf86GetVersion()
_X_EXPORT CARD32
xf86GetModuleVersion(pointer module)
{
-#ifdef XFree86LOADER
return (CARD32)LoaderGetModuleVersion(module);
-#else
- return 0;
-#endif
}
_X_EXPORT pointer
xf86LoadDrvSubModule(DriverPtr drv, const char *name)
{
-#ifdef XFree86LOADER
pointer ret;
int errmaj = 0, errmin = 0;
@@ -2400,15 +2381,11 @@ xf86LoadDrvSubModule(DriverPtr drv, cons
if (!ret)
LoaderErrorMsg(NULL, name, errmaj, errmin);
return ret;
-#else
- return (pointer)1;
-#endif
}
_X_EXPORT pointer
xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
{
-#ifdef XFree86LOADER
pointer ret;
int errmaj = 0, errmin = 0;
@@ -2417,9 +2394,6 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, con
if (!ret)
LoaderErrorMsg(pScrn->name, name, errmaj, errmin);
return ret;
-#else
- return (pointer)1;
-#endif
}
/*
@@ -2428,9 +2402,7 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, con
_X_EXPORT pointer
xf86LoadOneModule(char *name, pointer opt)
{
-#ifdef XFree86LOADER
int errmaj, errmin;
-#endif
char *Name;
pointer mod;
@@ -2452,13 +2424,9 @@ xf86LoadOneModule(char *name, pointer op
return NULL;
}
-#ifdef XFree86LOADER
mod = LoadModule(Name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin);
if (!mod)
LoaderErrorMsg(NULL, Name, errmaj, errmin);
-#else
- mod = (pointer)1;
-#endif
xfree(Name);
return mod;
}
@@ -2470,7 +2438,7 @@ xf86UnloadSubModule(pointer mod)
* This is disabled for now. The loader isn't smart enough yet to undo
* relocations.
*/
-#if defined(XFree86LOADER) && 0
+#if 0
UnloadSubModule(mod);
#endif
}
@@ -2478,59 +2446,47 @@ xf86UnloadSubModule(pointer mod)
_X_EXPORT Bool
xf86LoaderCheckSymbol(const char *name)
{
-#ifdef XFree86LOADER
return LoaderSymbol(name) != NULL;
-#else
- return TRUE;
-#endif
}
_X_EXPORT void
xf86LoaderReqSymLists(const char **list0, ...)
{
-#ifdef XFree86LOADER
va_list ap;
va_start(ap, list0);
LoaderVReqSymLists(list0, ap);
va_end(ap);
-#endif
}
_X_EXPORT void
xf86LoaderReqSymbols(const char *sym0, ...)
{
-#ifdef XFree86LOADER
va_list ap;
va_start(ap, sym0);
LoaderVReqSymbols(sym0, ap);
va_end(ap);
-#endif
}
_X_EXPORT void
xf86LoaderRefSymLists(const char **list0, ...)
{
-#ifdef XFree86LOADER
va_list ap;
va_start(ap, list0);
LoaderVRefSymLists(list0, ap);
va_end(ap);
-#endif
}
_X_EXPORT void
xf86LoaderRefSymbols(const char *sym0, ...)
{
-#ifdef XFree86LOADER
va_list ap;
va_start(ap, sym0);
LoaderVRefSymbols(sym0, ap);
va_end(ap);
-#endif
}
diff --git a/hw/xfree86/common/xf86InPriv.h b/hw/xfree86/common/xf86InPriv.h
index 4a02606..a14e9e7 100644
--- a/hw/xfree86/common/xf86InPriv.h
+++ b/hw/xfree86/common/xf86InPriv.h
@@ -35,11 +35,7 @@
#define _xf86InPriv_h
/* xf86Globals.c */
-#ifdef XFree86LOADER
extern InputDriverPtr *xf86InputDriverList;
-#else
-extern InputDriverPtr xf86InputDriverList[];
-#endif
extern int xf86NumInputDrivers;
/* xf86Xinput.c */
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 3aed369..9939184 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -62,9 +62,7 @@
#include "compiler.h"
-#ifdef XFree86LOADER
#include "loaderProcs.h"
-#endif
#ifdef XFreeXDGA
#include "dgaproc.h"
#endif
@@ -114,12 +112,10 @@ extern void os2ServerVideoAccess();
void (*xf86OSPMClose)(void) = NULL;
#endif
-#ifdef XFree86LOADER
static char *baseModules[] = {
"pcidata",
NULL
};
-#endif
/* Common pixmap formats */
@@ -272,10 +268,8 @@ InitOutput(ScreenInfo *pScreenInfo, int
{
int i, j, k, scr_index;
static unsigned long generation = 0;
-#ifdef XFree86LOADER
char **modulelist;
pointer *optionlist;
-#endif
screenLayoutPtr layout;
Pix24Flags screenpix24, pix24;
MessageType pix24From = X_DEFAULT;
@@ -333,7 +327,6 @@ InitOutput(ScreenInfo *pScreenInfo, int
if (!autoconfig)
PostConfigInit();
-#ifdef XFree86LOADER
/* Initialise the loader */
LoaderInit();
@@ -377,8 +370,6 @@ InitOutput(ScreenInfo *pScreenInfo, int
if (!xf86LoadModules(baseModules, NULL))
FatalError("Unable to load required base modules, Exiting...\n");
-#endif
-
xf86OpenConsole();
/* Do a general bus probe. This will be a PCI probe for x86 platforms */
@@ -401,7 +392,6 @@ InitOutput(ScreenInfo *pScreenInfo, int
/* Initialise the resource broker */
xf86ResourceBrokerInit();
-#ifdef XFree86LOADER
/* Load all modules specified explicitly in the config file */
if ((modulelist = xf86ModulelistFromConfig(&optionlist))) {
xf86LoadModules(modulelist, optionlist);
@@ -432,7 +422,6 @@ InitOutput(ScreenInfo *pScreenInfo, int
* XXX Nothing keeps track of them for other modules.
*/
/* XXX What do we do if not all of these could be loaded? */
-#endif
/*
* At this point, xf86DriverList[] is all filled in with entries for
@@ -672,12 +661,10 @@ InitOutput(ScreenInfo *pScreenInfo, int
exit(0);
}
-#ifdef XFree86LOADER
/* Remove (unload) drivers that are not required */
for (i = 0; i < xf86NumDrivers; i++)
if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0)
xf86DeleteDriver(i);
-#endif
/*
* At this stage we know how many screens there are.
@@ -982,12 +969,10 @@ InitOutput(ScreenInfo *pScreenInfo, int
#endif
}
-#ifdef XFree86LOADER
if ((serverGeneration == 1) && LoaderCheckUnresolved(LD_RESOLV_IFDONE)) {
/* For now, just a warning */
xf86Msg(X_WARNING, "Some symbols could not be resolved!\n");
}
-#endif
xf86PostScreenInit();
@@ -1167,9 +1152,7 @@ OsVendorInit()
signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */
#endif
OsDelayInitColors = TRUE;
-#ifdef XFree86LOADER
loadableFonts = TRUE;
-#endif
if (!beenHere)
xf86LogInit();
@@ -1461,9 +1444,7 @@ ddxProcessArgument(int argc, char **argv
}
if (!strcmp(argv[i],"-ignoreABI"))
{
-#ifdef XFree86LOADER
LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL);
-#endif
return 1;
}
if (!strcmp(argv[i],"-verbose"))
@@ -1870,9 +1851,7 @@ xf86PrintBanner()
#endif
ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
"\tto make sure that you have the latest version.\n");
-#ifdef XFree86LOADER
ErrorF("Module Loader present\n");
-#endif
}
static void
@@ -1919,7 +1898,6 @@ xf86RunVtInit(void)
}
}
-#ifdef XFree86LOADER
/*
* xf86LoadModules iterates over a list that is being passed in.
*/
@@ -1962,8 +1940,6 @@ xf86LoadModules(char **list, pointer *op
return !failed;
}
-#endif
-
/* Pixmap format stuff */
_X_EXPORT PixmapFormatPtr
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index 80fbf41..bdb02ce 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -459,12 +459,10 @@ MiscExtApply(pointer structure, MiscExtS
mseParamsPtr mse = structure;
InputInfoPtr pInfo;
MouseDevPtr pMse;
-#ifdef XFree86LOADER
pointer xf86MouseProtocolIDToName
= LoaderSymbol("xf86MouseProtocolIDToName");
if (!xf86MouseProtocolIDToName)
return MISC_RET_NOMODULE;
-#endif
if (mse->type < MTYPE_MICROSOFT
|| ( mse->type > MTYPE_EXPPS2
&& (mse->type!=MTYPE_OSMOUSE && mse->type!=MTYPE_XQUEUE)))
@@ -563,12 +561,8 @@ MiscExtApply(pointer structure, MiscExtS
pMse->chordMiddle = mse->chordmiddle;
pMse->mouseFlags = mse->flags;
-#ifdef XFree86LOADER
pMse->protocol = ((const char *(*)(MouseProtocolID))
xf86MouseProtocolIDToName)(pMse->protocolID);
-#else
- pMse->protocol = xf86MouseProtocolIDToName(pMse->protocolID);
-#endif
if (mse->device) {
if (MiscExtAuthorizeDevice(pInfo, mse->device)) {
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 0794de7..f97bbb3 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -95,13 +95,9 @@ extern unsigned short xf86MouseCflags[];
extern Bool xf86SupportedMouseTypes[];
extern int xf86NumMouseTypes;
-#ifdef XFree86LOADER
extern DriverPtr *xf86DriverList;
extern ModuleInfoPtr *xf86ModuleInfoList;
extern int xf86NumModuleInfos;
-#else
-extern DriverPtr xf86DriverList[];
-#endif
extern int xf86NumDrivers;
extern Bool xf86Resetting;
extern Bool xf86Initialising;
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 4d587a1..8444966 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1690,19 +1690,12 @@ xf86PciProbe(void)
/*
* Initialise the pcidata entry points.
*/
-#ifdef XFree86LOADER
xf86SetupPciIds = (ScanPciSetupProcPtr)LoaderSymbol("ScanPciSetupPciIds");
xf86ClosePciIds = (ScanPciCloseProcPtr)LoaderSymbol("ScanPciClosePciIds");
xf86FindPciNamesByDevice =
(ScanPciFindByDeviceProcPtr)LoaderSymbol("ScanPciFindPciNamesByDevice");
xf86FindPciNamesBySubsys =
(ScanPciFindBySubsysProcPtr)LoaderSymbol("ScanPciFindPciNamesBySubsys");
-#else
- xf86SetupPciIds = ScanPciSetupPciIds;
- xf86ClosePciIds = ScanPciClosePciIds;
- xf86FindPciNamesByDevice = ScanPciFindPciNamesByDevice;
- xf86FindPciNamesBySubsys = ScanPciFindPciNamesBySubsys;
-#endif
if (!xf86SetupPciIds())
FatalError("xf86SetupPciIds() failed\n");
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 25e3a20..70e3261 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -319,7 +319,6 @@ typedef struct _DriverRec {
#define HaveDriverFuncs 1
-#ifdef XFree86LOADER
/*
* The optional module list struct. This allows modules exporting helping
* functions to configuration tools, the Xserver, or any other
@@ -333,7 +332,6 @@ typedef struct _ModuleInfoRec {
const OptionInfoRec * (*AvailableOptions)(void *unused);
pointer unused[8]; /* leave some space for more fields */
} ModuleInfoRec, *ModuleInfoPtr;
-#endif
/*
* These are the private bus types. New types can be added here. Types
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index ede2e06..a7cbd0e 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -53,9 +53,7 @@
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvproto.h>
#include "xvdix.h"
-#ifdef XFree86LOADER
#include "xvmodproc.h"
-#endif
#include "xf86xvpriv.h"
@@ -118,16 +116,9 @@ int XF86XvScreenIndex = -1;
static unsigned long XF86XVGeneration = 0;
static unsigned long PortResource = 0;
-#ifdef XFree86LOADER
int (*XvGetScreenIndexProc)(void) = NULL;
unsigned long (*XvGetRTPortProc)(void) = NULL;
int (*XvScreenInitProc)(ScreenPtr) = NULL;
-#else
-int (*XvGetScreenIndexProc)(void) = XvGetScreenIndex;
-unsigned long (*XvGetRTPortProc)(void) = XvGetRTPort;
-int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit;
-#endif
-
#define GET_XV_SCREEN(pScreen) \
((XvScreenPtr)((pScreen)->devPrivates[XF86XvScreenIndex].ptr))
diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c
index 40c82c7..7dc4e9d 100644
--- a/hw/xfree86/common/xf86xvmc.c
+++ b/hw/xfree86/common/xf86xvmc.c
@@ -41,19 +41,13 @@
#include "resource.h"
#include "dixstruct.h"
-#ifdef XFree86LOADER
#include "xvmodproc.h"
-#endif
#include "xf86xvpriv.h"
#include "xf86xvmc.h"
typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr);
-#ifdef XFree86LOADER
_X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc = NULL;
-#else
-_X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc = XvMCScreenInit;
-#endif
typedef struct {
diff --git a/hw/xfree86/ddc/Makefile.am b/hw/xfree86/ddc/Makefile.am
index 0f56386..7cfff47 100644
--- a/hw/xfree86/ddc/Makefile.am
+++ b/hw/xfree86/ddc/Makefile.am
@@ -8,6 +8,6 @@ libddc_la_SOURCES = xf86DDC.c edid.c int
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
EXTRA_DIST = ddcPriv.h DDC.HOWTO
diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 8822bac..564e72e 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -121,14 +121,12 @@ static const OptionInfoRec DDCOptions[]
{ -1, NULL, OPTV_NONE, {0}, FALSE },
};
-#ifdef XFree86LOADER
/*ARGSUSED*/
static const OptionInfoRec *
DDCAvailableOptions(void *unused)
{
return (DDCOptions);
}
-#endif
/**
* Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 9023a0c..65dad8a 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -31,7 +31,7 @@ fontsmoduledir = $(moduledir)/fonts
fontsmodule_LTLIBRARIES = libfreetype.la \
libtype1.la
-AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/afb \
-I$(top_srcdir)/cfb \
@@ -64,6 +64,7 @@ libdbe_la_SOURCES = dbemodule.c
libfb_la_LDFLAGS = -avoid-version
libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
libfb_la_SOURCES = $(top_builddir)/fb/fbcmap.c fbmodule.c
+libfb_la_CFLAGS = -DXFree86Server $(AM_CFLAGS)
libglx_la_LDFLAGS = -avoid-version
if AIGLX
@@ -93,6 +94,7 @@ libtype1_la_LDFLAGS = -avoid-version
libtype1_la_SOURCES = type1mod.c
libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_CFLAGS = -DXFree86LOADER $(AM_CFLAGS)
libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
libxorgxkb_la_LIBADD = $(top_builddir)/dix/libdix.la
diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am
index 0b1245d..229d4e5 100644
--- a/hw/xfree86/dixmods/extmod/Makefile.am
+++ b/hw/xfree86/dixmods/extmod/Makefile.am
@@ -11,7 +11,7 @@ if XV
XV_SRCS = xvmod.c xvmodproc.h
endif
-AM_CFLAGS = @XORG_CFLAGS@ @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = @XORG_CFLAGS@
INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/afb \
-I$(top_srcdir)/mfb \
diff --git a/hw/xfree86/doc/sgml/DESIGN.sgml b/hw/xfree86/doc/sgml/DESIGN.sgml
index 84e4fad..5beff65 100644
--- a/hw/xfree86/doc/sgml/DESIGN.sgml
+++ b/hw/xfree86/doc/sgml/DESIGN.sgml
@@ -6436,7 +6436,6 @@ static PciChipsets ZZZPciChipsets[] = {
driver. This is required for the dynamically loaded version:
<p>
<code>
-#ifdef XFree86LOADER
static XF86ModuleVersionInfo zzzVersRec =
{
"zzz",
@@ -6450,7 +6449,6 @@ static XF86ModuleVersionInfo zzzVersRec
MOD_CLASS_VIDEODRV,
{0,0,0,0}
};
-#endif
</code>
<p>
<item>Define a data structure to hold the driver's screen-specific data.
@@ -6508,9 +6506,7 @@ static const OptionInfoRec ZZZOptions[]
the driver to the main list of drivers.
<code>
-#ifdef XFree86LOADER
-
-static MODULESETUPPROTO(mgaSetup);
+static MODULESETUPPROTO(zzzSetup);
XF86ModuleData zzzModuleData = { &zzzVersRec, zzzSetup, NULL };
@@ -6540,7 +6536,6 @@ zzzSetup(pointer module, pointer opts, i
return NULL;
}
}
-#endif
</code>
<sect2>GetRec, FreeRec
diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index 6de88e2..e711846 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -7,9 +7,9 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xf
-I$(top_builddir)/GL/include \
-I at MESA_SOURCE@/include \
-DHAVE_XORG_CONFIG_H \
- @SERVER_DEFINES@ \
- @MODULE_DEFINES@ \
- @LOADER_DEFINES@ \
+ \
+ \
+ \
@DRIPROTO_CFLAGS@ \
@LIBDRM_CFLAGS@ \
@GL_CFLAGS@
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index b58b670..462b9ad 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -69,7 +69,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
#include "mi.h"
#include "mipointer.h"
-#if defined(XFree86LOADER) && !defined(PANORAMIX)
+#if !defined(PANORAMIX)
extern Bool noPanoramiXExtension;
#endif
@@ -135,14 +135,9 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfo
* If Xinerama is on, don't allow DRI to initialise. It won't be usable
* anyway.
*/
-#if defined(PANORAMIX) && !defined(XFree86LOADER)
- xineramaInCore = TRUE;
-#elif defined(XFree86LOADER)
if (xf86LoaderCheckSymbol("noPanoramiXExtension"))
xineramaInCore = TRUE;
-#endif
-#if defined(PANORAMIX) || defined(XFree86LOADER)
if (xineramaInCore) {
if (!noPanoramiXExtension) {
DRIDrvMsg(pScreen->myNum, X_WARNING,
@@ -150,7 +145,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfo
return FALSE;
}
}
-#endif
drmWasAvailable = drmAvailable();
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index ab62a6b..bd69b57 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -6,7 +6,7 @@ noinst_LIBRARIES = libdummy.a libdummy-n
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
if NEED_STRLCAT
STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
diff --git a/hw/xfree86/exa/Makefile.am b/hw/xfree86/exa/Makefile.am
index 7f0a20e..1a2831c 100644
--- a/hw/xfree86/exa/Makefile.am
+++ b/hw/xfree86/exa/Makefile.am
@@ -7,7 +7,7 @@ INCLUDES = \
-I$(srcdir)/../../../exa \
-I$(srcdir)/../../../miext/cw
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
libexa_la_SOURCES = \
examodule.c
diff --git a/hw/xfree86/fbdevhw/Makefile.am b/hw/xfree86/fbdevhw/Makefile.am
index 9d79fa7..10de50e 100644
--- a/hw/xfree86/fbdevhw/Makefile.am
+++ b/hw/xfree86/fbdevhw/Makefile.am
@@ -11,7 +11,7 @@ endif
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
sdk_HEADERS = fbdevhw.h
diff --git a/hw/xfree86/i2c/Makefile.am b/hw/xfree86/i2c/Makefile.am
index 6e36f0c..cbf4f65 100644
--- a/hw/xfree86/i2c/Makefile.am
+++ b/hw/xfree86/i2c/Makefile.am
@@ -15,7 +15,7 @@ libi2c_la_SOURCES = xf86i2c.c xf86i2cmod
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
sdk_HEADERS = xf86i2c.h bt829.h fi1236.h msp3430.h tda8425.h tda9850.h tda9885.h uda1380.h i2c_def.h
diff --git a/hw/xfree86/i2c/bt829.h b/hw/xfree86/i2c/bt829.h
index 2c7c00d..bca9d37 100644
--- a/hw/xfree86/i2c/bt829.h
+++ b/hw/xfree86/i2c/bt829.h
@@ -82,8 +82,6 @@ int bt829_SetCC(BT829Ptr bt);
"bt829_SetOUT_EN", \
"bt829_SetP_IO"
-#ifdef XFree86LOADER
-
#define xf86_bt829_Detect ((BT829Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("bt829_Detect"))
#define xf86_bt829_ATIInit ((int (*)(BT829Ptr))LoaderSymbol("bt829_ATIInit"))
#define xf86_bt829_SetFormat ((int (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetFormat"))
@@ -96,20 +94,4 @@ int bt829_SetCC(BT829Ptr bt);
#define xf86_bt829_SetOUT_EN ((void (*)(BT829Ptr, Bool))LoaderSymbol("bt829_SetOUT_EN"))
#define xf86_bt829_SetP_IO ((void (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetP_IO"))
-#else
-
-#define xf86_bt829_Detect bt829_Detect
-#define xf86_bt829_ATIInit bt829_ATIInit
-#define xf86_bt829_SetFormat bt829_SetFormat
-#define xf86_bt829_SetMux bt829_SetMux
-#define xf86_bt829_SetCaptSize bt829_SetCaptSize
-#define xf86_bt829_SetBrightness bt829_SetBrightness
-#define xf86_bt829_SetContrast bt829_SetContrast
-#define xf86_bt829_SetSaturation bt829_SetSaturation
-#define xf86_bt829_SetTint bt829_SetTint
-#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN
-#define xf86_bt829_SetP_IO bt829_SetP_IO
-
-#endif
-
#endif
diff --git a/hw/xfree86/i2c/fi1236.h b/hw/xfree86/i2c/fi1236.h
index 7c1d070..eda1c78 100644
--- a/hw/xfree86/i2c/fi1236.h
+++ b/hw/xfree86/i2c/fi1236.h
@@ -100,8 +100,6 @@ void fi1236_dump_status(FI1236Ptr f);
"FI1236_set_tuner_type", \
"TUNER_set_frequency"
-#ifdef XFree86LOADER
-
#define xf86_Detect_FI1236 ((FI1236Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_FI1236"))
#define xf86_FI1236_set_tuner_type ((void (*)(FI1236Ptr, int))LoaderSymbol("FI1236_set_tuner_type"))
#define xf86_TUNER_set_frequency ((void (*)(FI1236Ptr, CARD32))LoaderSymbol("TUNER_set_frequency"))
@@ -109,15 +107,4 @@ void fi1236_dump_status(FI1236Ptr f);
#define xf86_TUNER_get_afc_hint ((int (*)(FI1236Ptr))LoaderSymbol("TUNER_get_afc_hint"))
#define xf86_fi1236_dump_status ((void (*)(FI1236Ptr))LoaderSymbol("fi1236_dump_status"))
-#else
-
-#define xf86_Detect_FI1236 Detect_FI1236
-#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type
-#define xf86_TUNER_set_frequency TUNER_set_frequency
-#define xf86_FI1236_AFC FI1236_AFC
-#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint
-#define xf86_fi1236_dump_status fi1236_dump_status
-
-#endif
-
#endif
diff --git a/hw/xfree86/i2c/i2c_def.h b/hw/xfree86/i2c/i2c_def.h
index 84b9c5d..6e119e4 100644
--- a/hw/xfree86/i2c/i2c_def.h
+++ b/hw/xfree86/i2c/i2c_def.h
@@ -3,8 +3,6 @@
/* the following are a workaround for possible loader bug..
WATCH function types ! */
-#if XFree86LOADER
-
#define CreateI2CBusRec ((pointer (*)(void))LoaderSymbol("xf86CreateI2CBusRec"))
#define DestroyI2CBusRec ((pointer (*)(I2CBusPtr, Bool, Bool))LoaderSymbol("xf86DestroyI2CBusRec"))
#define I2CBusInit ((Bool (*)(pointer))LoaderSymbol("xf86I2CBusInit"))
@@ -13,17 +11,4 @@
#define I2CDevInit ((Bool (*)(I2CDevPtr))LoaderSymbol("xf86I2CDevInit"))
#define I2CProbeAddress ((Bool (*)(I2CBusPtr,I2CSlaveAddr))LoaderSymbol("xf86I2CProbeAddress"))
-#else
-
-#define CreateI2CBusRec xf86CreateI2CBusRec
-#define DestroyI2CBusRec xf86DestroyI2CBusRec
-#define I2CBusInit xf86I2CBusInit
-#define I2C_WriteRead xf86I2CWriteRead
-#define CreateI2CDevRec xf86CreateI2CDevRec
-#define I2CDevInit xf86I2CDevInit
-#define I2CProbeAddress xf86I2CProbeAddress
-
-#endif
-
-
#endif
diff --git a/hw/xfree86/i2c/msp3430.h b/hw/xfree86/i2c/msp3430.h
index 8726bac..1cb9b86 100644
--- a/hw/xfree86/i2c/msp3430.h
+++ b/hw/xfree86/i2c/msp3430.h
@@ -105,22 +105,10 @@ void MSP3430SetSAP (MSP3430Ptr m, int mo
"MSP3430SetVolume", \
"MSP3430SetSAP"
-#ifdef XFree86LOADER
-
#define xf86_DetectMSP3430 ((MSP3430Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("DetectMSP3430"))
#define xf86_ResetMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("ResetMSP3430"))
#define xf86_MSP3430SetVolume ((void (*)(MSP3430Ptr, CARD8))LoaderSymbol("MSP3430SetVolume"))
#define xf86_MSP3430SetSAP ((void (*)(MSP3430Ptr, int))LoaderSymbol("MSP3430SetSAP"))
#define xf86_InitMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("InitMSP3430"))
-#else
-
-#define xf86_DetectMSP3430 DetectMSP3430
-#define xf86_ResetMSP3430 ResetMSP3430
-#define xf86_MSP3430SetVolume MSP3430SetVolume
-#define xf86_MSP3430SetSAP MSP3430SetSAP
-#define xf86_InitMSP3430 InitMSP3430
-
-#endif
-
#endif
diff --git a/hw/xfree86/i2c/tda8425.h b/hw/xfree86/i2c/tda8425.h
index ec1908b..4abb417 100644
--- a/hw/xfree86/i2c/tda8425.h
+++ b/hw/xfree86/i2c/tda8425.h
@@ -34,20 +34,9 @@ void tda8425_mute(TDA8425Ptr t, Bool mut
"tda8425_setaudio", \
"tda8425_mute"
-#ifdef XFree86LOADER
-
#define xf86_Detect_tda8425 ((TDA8425Ptr (*)(I2CBusPtr, I2CSlaveAddr,Bool))LoaderSymbol("Detect_tda8425"))
#define xf86_tda8425_init ((Bool (*)(TDA8425Ptr))LoaderSymbol("tda8425_init"))
#define xf86_tda8425_setaudio ((void (*)(TDA8425Ptr))LoaderSymbol("tda8425_setaudio"))
#define xf86_tda8425_mute ((void (*)(TDA8425Ptr, Bool))LoaderSymbol("tda8425_mute"))
-#else
-
-#define xf86_Detect_tda8425 Detect_tda8425
-#define xf86_tda8425_init tda8425_init
-#define xf86_tda8425_setaudio tda8425_setaudio
-#define xf86_tda8425_mute tda8425_mute
-
-#endif
-
#endif
diff --git a/hw/xfree86/i2c/tda9850.h b/hw/xfree86/i2c/tda9850.h
index 2c8ddcc..d5dec36 100644
--- a/hw/xfree86/i2c/tda9850.h
+++ b/hw/xfree86/i2c/tda9850.h
@@ -29,8 +29,6 @@ CARD16 tda9850_getstatus(TDA9850Ptr t);
"tda9850_mute", \
"tda9850_sap_mute"
-#ifdef XFree86LOADER
-
#define xf86_Detect_tda9850 ((TDA9850Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_tda9850"))
#define xf86_tda9850_init ((Bool (*)(TDA9850Ptr))LoaderSymbol("tda9850_init"))
#define xf86_tda9850_setaudio ((void (*)(TDA9850Ptr))LoaderSymbol("tda9850_setaudio"))
@@ -38,15 +36,4 @@ CARD16 tda9850_getstatus(TDA9850Ptr t);
#define xf86_tda9850_sap_mute ((void (*)(TDA9850Ptr, Bool))LoaderSymbol("tda9850_sap_mute"))
#define xf86_tda9850_getstatus ((CARD16 (*)(TDA9850Ptr))LoaderSymbol("tda9850_getstatus"))
-#else
-
-#define xf86_Detect_tda9850 Detect_tda9850
-#define xf86_tda9850_init tda9850_init
-#define xf86_tda9850_setaudio tda9850_setaudio
-#define xf86_tda9850_mute tda9850_mute
-#define xf86_tda9850_sap_mute tda9850_sap_mute
-#define xf86_tda9850_getstatus tda9850_getstatus
-
-#endif
-
#endif
diff --git a/hw/xfree86/i2c/tda9885.h b/hw/xfree86/i2c/tda9885.h
index a63b347..46ae9fc 100644
--- a/hw/xfree86/i2c/tda9885.h
+++ b/hw/xfree86/i2c/tda9885.h
@@ -51,22 +51,10 @@ void tda9885_dumpstatus(TDA9885Ptr t);
"tda9885_setaudio", \
"tda9885_mute"
-#ifdef XFree86LOADER
-
#define xf86_Detect_tda9885 ((TDA9885Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_tda9885"))
#define xf86_tda9885_init ((Bool (*)(TDA9885Ptr))LoaderSymbol("tda9885_init"))
#define xf86_tda9885_setparameters ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_setparameters"))
#define xf86_tda9885_getstatus ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_getstatus"))
#define xf86_tda9885_dumpstatus ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_dumpstatus"))
-#else
-
-#define xf86_Detect_tda9885 Detect_tda9885
-#define xf86_tda9885_init tda9885_init
-#define xf86_tda9885_setparameters tda9885_setparameters
-#define xf86_tda9885_getstatus tda9885_getstatus
-#define xf86_tda9885_dumpstatus tda9885_dumpstatus
-
-#endif
-
#endif
diff --git a/hw/xfree86/i2c/uda1380.h b/hw/xfree86/i2c/uda1380.h
index acf96c5..95ad92b 100644
--- a/hw/xfree86/i2c/uda1380.h
+++ b/hw/xfree86/i2c/uda1380.h
@@ -66,8 +66,6 @@ void uda1380_dumpstatus(UDA1380Ptr t);
"uda1380_getstatus", \
"uda1380_dumpstatus"
-#ifdef XFree86LOADER
-
#define xf86_Detect_uda1380 ((UDA1380Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_uda1380"))
#define xf86_uda1380_init ((Bool (*)(UDA1380Ptr))LoaderSymbol("uda1380_init"))
#define xf86_uda1380_shutdown ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_shutdown"))
@@ -77,17 +75,4 @@ void uda1380_dumpstatus(UDA1380Ptr t);
#define xf86_uda1380_getstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_getstatus"))
#define xf86_uda1380_dumpstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_dumpstatus"))
-#else
-
-#define xf86_Detect_uda1380 Detect_uda1380
-#define xf86_uda1380_init uda1380_init
-#define xf86_uda1380_shutdown uda1380_shutdown
-#define xf86_uda1380_setvolume uda1380_setvolume
-#define xf86_uda1380_mute uda1380_mute
-#define xf86_uda1380_setparameters uda1380_setparameters
-#define xf86_uda1380_getstatus uda1380_getstatus
-#define xf86_uda1380_dumpstatus uda1380_dumpstatus
-
-#endif
-
#endif
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index f606f5e..130e085 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -2,7 +2,7 @@ module_LTLIBRARIES = libint10.la
sdk_HEADERS = xf86int10.h
-EXTRA_CFLAGS = @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+EXTRA_CFLAGS =
libint10_la_LDFLAGS = -avoid-version
diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index 0cda5c1..357af77 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../p
-I$(srcdir)/../ddc -I$(srcdir)/../i2c
#AM_LDFLAGS = -r
-AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS)
if XORG_LOADER_SPARC
SPARC_SOURCES = SparcMulDiv.S
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index ae89a6b..20885e8 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -50,7 +50,7 @@ ARCH_SOURCES = \
endif
# FIXME: NetBSD Aperture defines (configure.ac)
-AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/os-support/bsd/bsd_jstk.c b/hw/xfree86/os-support/bsd/bsd_jstk.c
index bc99f29..895d64e 100644
--- a/hw/xfree86/os-support/bsd/bsd_jstk.c
+++ b/hw/xfree86/os-support/bsd/bsd_jstk.c
@@ -36,9 +36,7 @@
#include <machine/joystick.h>
#include <fcntl.h>
-#ifdef XFree86LOADER
#include "misc.h"
-#endif
#include "xf86.h"
#define JS_RETURN sizeof(struct joystick)
@@ -174,7 +172,6 @@ xf86JoystickGetState(int fd, int *x, int
return 1;
}
-#ifdef XFree86LOADER
/*
* Entry point for XFree86 Loader
*/
@@ -184,5 +181,4 @@ bsd_jstkModuleInit(pointer *data, INT32
*magic = MAGIC_DONE;
*data = NULL;
}
-#endif
/* end of bsd_jstk.c */
diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
index 308a01b..c56f3d7 100644
--- a/hw/xfree86/os-support/bus/Makefile.am
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -53,6 +53,6 @@ libbus_la_SOURCES = Pci.c Pci.h $(PCI_SO
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
EXTRA_DIST = $(sdk_HEADERS)
diff --git a/hw/xfree86/os-support/drm/Makefile.am b/hw/xfree86/os-support/drm/Makefile.am
index 8270f43..5389325 100644
--- a/hw/xfree86/os-support/drm/Makefile.am
+++ b/hw/xfree86/os-support/drm/Makefile.am
@@ -7,9 +7,8 @@ libdrm_la_CFLAGS = -I$(top_srcdir)/hw/xf
-I$(top_srcdir)/GL/glx \
-I$(top_srcdir)/GL/include \
-DHAVE_XORG_CONFIG_H \
- @LIBDRM_CFLAGS@ \
- @SERVER_DEFINES@ \
- @LOADER_DEFINES@
+ @LIBDRM_CFLAGS@
+
libdrm_la_LDFLAGS = -module -avoid-version
libdrm_ladir = $(moduledir)/@XORG_OS@
libdrm_la_SOURCES = \
diff --git a/hw/xfree86/os-support/drm/xf86drm.c b/hw/xfree86/os-support/drm/xf86drm.c
index a466304..f3d7745 100644
--- a/hw/xfree86/os-support/drm/xf86drm.c
+++ b/hw/xfree86/os-support/drm/xf86drm.c
@@ -37,18 +37,10 @@
#include <xorg-config.h>
#endif
-#ifdef XFree86Server
-# include "xf86.h"
-# include "xf86_OSproc.h"
-# define _DRM_MALLOC xalloc
-# define _DRM_FREE xfree
-# ifndef XFree86LOADER
-# include <sys/mman.h>
-# endif
-#else
-# define _DRM_MALLOC malloc
-# define _DRM_FREE free
-#endif
+#include "xf86.h"
+#include "xf86_OSproc.h"
+#define _DRM_MALLOC xalloc
+#define _DRM_FREE xfree
#include "drm.h"
#include <stdio.h>
@@ -124,19 +116,9 @@ drmMsg(const char *format, ...)
{
va_list ap;
-#ifndef XFree86Server
- const char *env;
- if ((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose"))
-#endif
- {
- va_start(ap, format);
-#ifdef XFree86Server
- xf86VDrvMsgVerb(-1, X_NONE, DRM_MSG_VERBOSITY, format, ap);
-#else
- vfprintf(stderr, format, ap);
-#endif
- va_end(ap);
- }
+ va_start(ap, format);
+ xf86VDrvMsgVerb(-1, X_NONE, DRM_MSG_VERBOSITY, format, ap);
+ va_end(ap);
}
static void *drmHashTable = NULL; /* Context switch callbacks */
@@ -270,19 +252,15 @@ static int drmOpenDevice(long dev, int m
int fd;
mode_t devmode = DRM_DEV_MODE;
int isroot = !geteuid();
-#if defined(XFree86Server)
uid_t user = DRM_DEV_UID;
gid_t group = DRM_DEV_GID;
-#endif
sprintf(buf, DRM_DEV_NAME, DRM_DIR_NAME, minor);
drmMsg("drmOpenDevice: node name is %s\n", buf);
-#if defined(XFree86Server)
devmode = xf86ConfigDRI.mode ? xf86ConfigDRI.mode : DRM_DEV_MODE;
devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
group = (xf86ConfigDRI.group >= 0) ? xf86ConfigDRI.group : DRM_DEV_GID;
-#endif
if (stat(DRM_DIR_NAME, &st)) {
if (!isroot) return DRM_ERR_NOT_ROOT;
@@ -297,10 +275,8 @@ static int drmOpenDevice(long dev, int m
remove(buf);
mknod(buf, S_IFCHR | devmode, dev);
}
-#if defined(XFree86Server)
chown(buf, user, group);
chmod(buf, devmode);
-#endif
fd = open(buf, O_RDWR, 0);
drmMsg("drmOpenDevice: open result is %d, (%s)\n",
@@ -314,10 +290,8 @@ static int drmOpenDevice(long dev, int m
if (!isroot) return DRM_ERR_NOT_ROOT;
remove(buf);
mknod(buf, S_IFCHR | devmode, dev);
-#if defined(XFree86Server)
chown(buf, user, group);
chmod(buf, devmode);
-#endif
}
fd = open(buf, O_RDWR, 0);
drmMsg("drmOpenDevice: open result is %d, (%s)\n",
@@ -454,16 +428,12 @@ static int drmOpenByName(const char *nam
char * id;
if (!drmAvailable()) {
-#if !defined(XFree86Server)
- return -1;
-#else
/* try to load the kernel module now */
if (!xf86LoadKernelModule(name)) {
ErrorF("[drm] failed to load kernel module \"%s\"\n",
name);
return -1;
}
-#endif
}
/*
@@ -546,7 +516,6 @@ static int drmOpenByName(const char *nam
*/
int drmOpen(const char *name, const char *busid)
{
-#ifdef XFree86Server
if (!drmAvailable() && name != NULL) {
/* try to load the kernel */
if (!xf86LoadKernelModule(name)) {
@@ -555,7 +524,6 @@ int drmOpen(const char *name, const char
return -1;
}
}
-#endif
if (busid) {
int fd;
@@ -2259,7 +2227,6 @@ int drmCommandWriteRead(int fd, unsigned
return 0;
}
-#if defined(XFree86Server)
static void drmSIGIOHandler(int interrupt, void *closure)
{
unsigned long key;
@@ -2323,4 +2290,3 @@ int drmRemoveSIGIOHandler(int fd)
return xf86RemoveSIGIOHandler(fd);
}
-#endif
diff --git a/hw/xfree86/os-support/drm/xf86drmHash.c b/hw/xfree86/os-support/drm/xf86drmHash.c
index a256708..ae967b2 100644
--- a/hw/xfree86/os-support/drm/xf86drmHash.c
+++ b/hw/xfree86/os-support/drm/xf86drmHash.c
@@ -81,9 +81,7 @@
#if !HASH_MAIN
# include "drm.h"
# include "xf86drm.h"
-# ifdef XFree86LOADER
-# include "xf86.h"
-# endif
+# include "xf86.h"
#endif
#define N(x) drm##x
diff --git a/hw/xfree86/os-support/drm/xf86drmRandom.c b/hw/xfree86/os-support/drm/xf86drmRandom.c
index cc40dcc..e3e94a2 100644
--- a/hw/xfree86/os-support/drm/xf86drmRandom.c
+++ b/hw/xfree86/os-support/drm/xf86drmRandom.c
@@ -84,9 +84,7 @@
#if !RANDOM_MAIN
# include "drm.h"
# include "xf86drm.h"
-# ifdef XFree86LOADER
-# include "xf86.h"
-# endif
+# include "xf86.h"
#endif
#define N(x) drm##x
diff --git a/hw/xfree86/os-support/drm/xf86drmSL.c b/hw/xfree86/os-support/drm/xf86drmSL.c
index 23283a9..e948250 100644
--- a/hw/xfree86/os-support/drm/xf86drmSL.c
+++ b/hw/xfree86/os-support/drm/xf86drmSL.c
@@ -53,12 +53,7 @@
#else
# include "drm.h"
# include "xf86drm.h"
-# ifdef XFree86LOADER
-# include "xf86.h"
-# else
-# include <stdio.h>
-# include <stdlib.h>
-# endif
+# include "xf86.h"
#endif
#define N(x) drm##x
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index d492f96..6fdc1bc 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -34,7 +34,7 @@ liblinux_la_SOURCES = lnx_init.c lnx_vid
$(APM_SOURCES) \
$(PLATFORM_PCI_SUPPORT)
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS) -I/usr/include/drm # FIXME this last part is crack
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index a911378..4f9e62b 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -18,12 +18,6 @@
#else
#define DEV_MEM "/dev/mem"
#endif
-#ifndef XFree86LOADER
-#include <sys/mman.h>
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void *)-1)
-#endif
-#endif
#define ALLOC_ENTRIES(x) ((V_RAM / x) - 1)
#define SHMERRORPTR (pointer)(-1)
diff --git a/hw/xfree86/os-support/linux/lnx_jstk.c b/hw/xfree86/os-support/linux/lnx_jstk.c
index 6675863..36a81e4 100644
--- a/hw/xfree86/os-support/linux/lnx_jstk.c
+++ b/hw/xfree86/os-support/linux/lnx_jstk.c
@@ -40,9 +40,7 @@ static const char rcs_id[] = "Id: lnx_js
#include <fcntl.h>
#include <sys/ioctl.h>
-#ifdef XFree86LOADER
#include "xf86.h"
-#endif
#if !defined(JSIOCGTIMELIMIT)
/* make 2.1.x joystick.h backward compatable */
@@ -172,7 +170,6 @@ xf86JoystickGetState(int fd, int *x, int
return 1;
}
-#ifdef XFree86LOADER
/*
* Entry point for XFree86 Loader
*/
@@ -182,6 +179,5 @@ linux_jstkModuleInit(pointer *data, INT3
*magic = MAGIC_DONE;
*data = NULL;
}
-#endif
/* end of lnx_jstk.c */
diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
index 5ce23a1..f546e1a 100644
--- a/hw/xfree86/os-support/misc/Makefile.am
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -18,6 +18,6 @@ libmisc_la_SOURCES = xf86_Util.c Delay.c
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
EXTRA_DIST = $(I386_SOURCES) $(PORTIO_SOURCES) $(ILHACK_SOURCES)
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index ecdc1cd..8d47805 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -58,22 +58,11 @@
#include <xorg-config.h>
#endif
-#ifdef XFree86Server
# include <X11/X.h>
# include "xf86.h"
# include "xf86Priv.h"
# include "xf86_OSlib.h"
# include "inputstr.h"
-#else
-# include <unistd.h>
-# include <signal.h>
-# include <fcntl.h>
-# include <sys/time.h>
-# include <errno.h>
-# include <stdio.h>
-# include <string.h>
-# define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
-#endif
/*
* Linux libc5 defines FASYNC, but not O_ASYNC. Don't know if it is
@@ -126,11 +115,9 @@ xf86SIGIO (int sig)
xf86SigIOFuncs[i].closure);
r--;
}
-#ifdef XFree86Server
if (r > 0) {
xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r);
}
-#endif
}
static int
@@ -159,24 +146,14 @@ xf86InstallSIGIOHandler(int fd, void (*f
return 0;
blocked = xf86BlockSIGIO();
if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) {
-#ifdef XFree86Server
xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n",
fd, strerror(errno));
-#else
- fprintf(stderr,"fcntl(%d, O_ASYNC): %s\n",
- fd, strerror(errno));
-#endif
xf86UnblockSIGIO(blocked);
return 0;
}
if (fcntl(fd, F_SETOWN, getpid()) == -1) {
-#ifdef XFree86Server
xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n",
fd, strerror(errno));
-#else
- fprintf(stderr,"fcntl(%d, F_SETOWN): %s\n",
- fd, strerror(errno));
-#endif
xf86UnblockSIGIO(blocked);
return 0;
}
@@ -289,7 +266,6 @@ xf86UnblockSIGIO (int wasset)
}
}
-#ifdef XFree86Server
void
xf86AssertBlockedSIGIO (char *where)
{
@@ -308,5 +284,3 @@ xf86SIGIOSupported (void)
{
return 1;
}
-
-#endif
diff --git a/hw/xfree86/os-support/shared/sigiostubs.c b/hw/xfree86/os-support/shared/sigiostubs.c
index eb5e2db..db54e53 100644
--- a/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/hw/xfree86/os-support/shared/sigiostubs.c
@@ -31,7 +31,6 @@
#include <xorg-config.h>
#endif
-#ifdef XFree86Server
#ifdef __UNIXOS2__
# define I_NEED_OS2_H
#endif
@@ -39,13 +38,6 @@
# include "xf86.h"
# include "xf86Priv.h"
# include "xf86_OSlib.h"
-#else
-# include <unistd.h>
-# include <signal.h>
-# include <fcntl.h>
-# include <sys/time.h>
-# include <errno.h>
-#endif
_X_EXPORT int
xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
@@ -70,12 +62,10 @@ xf86UnblockSIGIO (int wasset)
{
}
-#ifdef XFree86Server
void
xf86AssertBlockedSIGIO (char *where)
{
}
-#endif
/* XXX This is a quick hack for the benefit of xf86SetSilkenMouse() */
Bool
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index 63b8e9a..6b29b30 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -34,7 +34,7 @@ nodist_libsolaris_la_SOURCES = $(SOLARIS
sdk_HEADERS = agpgart.h
nodist_sdk_HEADERS = solaris-$(SOLARIS_INOUT_ARCH).il
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 83ce9ed..7922fde 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -212,9 +212,7 @@ extern int xf86InstallSIGIOHandler(int f
extern int xf86RemoveSIGIOHandler(int fd);
extern int xf86BlockSIGIO (void);
extern void xf86UnblockSIGIO (int);
-#ifdef XFree86Server
extern void xf86AssertBlockedSIGIO (char *);
-#endif
extern Bool xf86SIGIOSupported (void);
#ifdef XF86_OS_PRIVS
diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h
index 25dabfe..31c0cac 100644
--- a/hw/xfree86/os-support/xf86_ansic.h
+++ b/hw/xfree86/os-support/xf86_ansic.h
@@ -28,33 +28,27 @@
/* Handle <stdarg.h> */
-#ifndef IN_MODULE
+#ifndef __OS2ELF__
# include <stdarg.h>
-#else /* !IN_MODULE */
-# ifndef __OS2ELF__
-# include <stdarg.h>
-# else /* __OS2ELF__ */
- /* EMX/gcc_elf under OS/2 does not have native header files */
-# if !defined (_VA_LIST)
-# define _VA_LIST
- typedef char *va_list;
-# endif
-# define _VA_ROUND(t) ((sizeof (t) + 3) & -4)
-# if !defined (va_start)
-# define va_start(ap,v) ap = (va_list)&v + ((sizeof (v) + 3) & -4)
-# define va_end(ap) (ap = 0, (void)0)
-# define va_arg(ap,t) (ap += _VA_ROUND (t), *(t *)(ap - _VA_ROUND (t)))
-# endif
-# endif /* __OS2ELF__ */
-#endif /* IN_MODULE */
+#else /* __OS2ELF__ */
+ /* EMX/gcc_elf under OS/2 does not have native header files */
+# if !defined (_VA_LIST)
+# define _VA_LIST
+ typedef char *va_list;
+# endif
+# define _VA_ROUND(t) ((sizeof (t) + 3) & -4)
+# if !defined (va_start)
+# define va_start(ap,v) ap = (va_list)&v + ((sizeof (v) + 3) & -4)
+# define va_end(ap) (ap = 0, (void)0)
+# define va_arg(ap,t) (ap += _VA_ROUND (t), *(t *)(ap - _VA_ROUND (t)))
+# endif
+#endif /* __OS2ELF__ */
/*
* The first set of definitions are required both for modules and
* libc_wrapper.c.
*/
-#if defined(XFree86LOADER) || defined(NEED_XF86_TYPES)
-
#if !defined(SYSV) && !defined(SVR4) && !defined(Lynx) || \
defined(__SCO__) || defined(__UNIXWARE__)
#define HAVE_VSSCANF
@@ -133,9 +127,6 @@
#define MAXLONG LONG_MAX
#endif
-#endif /* XFree86LOADER || NEED_XF86_TYPES */
-
-#if defined(XFree86LOADER) || defined(NEED_XF86_PROTOTYPES)
/*
* ANSI C compilers only.
*/
@@ -321,21 +312,6 @@ extern void xf86longjmp(xf86jmp_buf env,
(xf86getjmptype() == 1 ? xf86setjmp1((env), xf86setjmp1_arg2()) : \
xf86setjmperror((env))))
-#else /* XFree86LOADER || NEED_XF86_PROTOTYPES */
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <ctype.h>
-#ifdef HAVE_SYSV_IPC
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#endif
-#include <sys/stat.h>
-#define stat_t struct stat
-#endif /* XFree86LOADER || NEED_XF86_PROTOTYPES */
-
/*
* These things are always required by drivers (but not by libc_wrapper.c),
* even for a static server because some OSs don't provide them.
diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h
index 5a6056b..75b6225 100644
--- a/hw/xfree86/os-support/xf86_libc.h
+++ b/hw/xfree86/os-support/xf86_libc.h
@@ -53,8 +53,6 @@
* libc_wrapper.c.
*/
-#if defined(XFree86LOADER) || defined(NEED_XF86_TYPES)
-
/*
* First, the new data types
*
@@ -215,14 +213,12 @@ typedef int xf86jmp_buf[1024];
/* xf86shmclt() */
#define XF86IPC_RMID 0
-#endif /* defined(XFree86LOADER) || defined(NEED_XF86_TYPES) */
-
/*
* the rest of this file should only be included for code that is supposed
* to go into modules
*/
-#if defined(XFree86LOADER) && !defined(DONT_DEFINE_WRAPPERS)
+#if !defined(DONT_DEFINE_WRAPPERS)
#undef abort
#define abort() xf86abort()
@@ -713,10 +709,9 @@ typedef int xf86jmp_buf[1024];
# define _FILEDEFED /* Already have FILE defined, don't redefine it */
#endif
-#endif /* XFree86LOADER && !DONT_DEFINE_WRAPPERS */
+#endif /* !DONT_DEFINE_WRAPPERS */
-#if defined(XFree86LOADER) && \
- (!defined(DONT_DEFINE_WRAPPERS) || defined(DEFINE_SETJMP_WRAPPERS))
+#if (!defined(DONT_DEFINE_WRAPPERS) || defined(DEFINE_SETJMP_WRAPPERS))
#undef setjmp
#define setjmp(a) xf86setjmp_macro(a)
#undef longjmp
diff --git a/hw/xfree86/rac/Makefile.am b/hw/xfree86/rac/Makefile.am
index 0e7cc72..328ed19 100644
--- a/hw/xfree86/rac/Makefile.am
+++ b/hw/xfree86/rac/Makefile.am
@@ -5,4 +5,4 @@ sdk_HEADERS = xf86RAC.h
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/ramdac/Makefile.am b/hw/xfree86/ramdac/Makefile.am
index 136bc7c..c9afdad 100644
--- a/hw/xfree86/ramdac/Makefile.am
+++ b/hw/xfree86/ramdac/Makefile.am
@@ -13,7 +13,7 @@ EXTRA_DIST = BTPriv.h IBMPriv.h TIPriv.h
CURSOR.NOTES
AM_CFLAGS = -DXAAReverseBitOrder=xf86ReverseBitOrder -DRAMDAC_MODULE \
- $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+ $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS)
xf86BitOrder.c:
diff --git a/hw/xfree86/scanpci/Makefile.am b/hw/xfree86/scanpci/Makefile.am
index d473833..7e5671a 100644
--- a/hw/xfree86/scanpci/Makefile.am
+++ b/hw/xfree86/scanpci/Makefile.am
@@ -8,7 +8,7 @@ libscanpci_la_SOURCES = xf86ScanPci.c
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
BUILT_SOURCES = xf86PciIds.h
diff --git a/hw/xfree86/shadowfb/Makefile.am b/hw/xfree86/shadowfb/Makefile.am
index c373e81..cb5ebb1 100644
--- a/hw/xfree86/shadowfb/Makefile.am
+++ b/hw/xfree86/shadowfb/Makefile.am
@@ -6,4 +6,4 @@ sdk_HEADERS = shadowfb.h
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/utils/xorgcfg/Makefile.am b/hw/xfree86/utils/xorgcfg/Makefile.am
index 0705eb5..73e4042 100644
--- a/hw/xfree86/utils/xorgcfg/Makefile.am
+++ b/hw/xfree86/utils/xorgcfg/Makefile.am
@@ -33,7 +33,7 @@ INCLUDES = $(XORG_INCS) -I$(top_srcdir)/
OPTIONSPATH=$(libdir)/X11
-xorgcfg_CFLAGS = @SERVER_DEFINES@ $(XORG_CFLAGS) $(CURSESDEFINES) \
+xorgcfg_CFLAGS = $(XORG_CFLAGS) $(CURSESDEFINES) \
$(XORGCFG_DEP_CFLAGS) -DXKB_RULES_DIR=\"$(XKB_BASE_DIRECTORY)/rules\" \
-DPROJECT_ROOT=\"$(PROJECTROOT)\" -DOPTIONSPATH=\"$(OPTIONSPATH)\"
xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libxf86config.a $(LOADERLIB) \
diff --git a/hw/xfree86/utils/xorgcfg/loader.h b/hw/xfree86/utils/xorgcfg/loader.h
index 92ca704..847dbae 100644
--- a/hw/xfree86/utils/xorgcfg/loader.h
+++ b/hw/xfree86/utils/xorgcfg/loader.h
@@ -36,9 +36,6 @@
#else
-#ifndef XFree86LOADER
-#define XFree86LOADER /* not really */
-#endif
#define IN_LOADER
#include "xf86.h"
diff --git a/hw/xfree86/utils/xorgconfig/Makefile.am b/hw/xfree86/utils/xorgconfig/Makefile.am
index ec0b01f..dabfc32 100644
--- a/hw/xfree86/utils/xorgconfig/Makefile.am
+++ b/hw/xfree86/utils/xorgconfig/Makefile.am
@@ -31,7 +31,7 @@ bin_PROGRAMS = xorgconfig
X11dir = $(libdir)/X11
dist_X11_DATA = Cards
-xorgconfig_CFLAGS = @SERVER_DEFINES@ @XORGCONFIG_DEP_CFLAGS@ \
+xorgconfig_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ \
-DCARD_DATABASE_FILE='"$(X11dir)/Cards"' \
-DPROJECTROOT='"$(PROJECTROOT)"' \
-DFILEMANSUFFIX='"$(FILE_MAN_SUFFIX)"' \
diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am
index 7da8f12..02fdb48 100644
--- a/hw/xfree86/vbe/Makefile.am
+++ b/hw/xfree86/vbe/Makefile.am
@@ -4,7 +4,7 @@ libvbe_la_SOURCES = vbe.c vbeModes.c vbe
sdk_HEADERS = vbe.h vbeModes.h
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
-I$(srcdir)/../int10
diff --git a/hw/xfree86/vgahw/Makefile.am b/hw/xfree86/vgahw/Makefile.am
index 6c7fe1b..2aa27fa 100644
--- a/hw/xfree86/vgahw/Makefile.am
+++ b/hw/xfree86/vgahw/Makefile.am
@@ -2,7 +2,7 @@ module_LTLIBRARIES = libvgahw.la
libvgahw_la_LDFLAGS = -avoid-version
libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
sdk_HEADERS = vgaHW.h
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index 39f0155..23b7e16 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -68,4 +68,4 @@ EXTRA_DIST = xaacexp.h xaawrap.h xaaLine
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/xf1bpp/Makefile.am b/hw/xfree86/xf1bpp/Makefile.am
index b8e4c3d..e7c873a 100644
--- a/hw/xfree86/xf1bpp/Makefile.am
+++ b/hw/xfree86/xf1bpp/Makefile.am
@@ -60,8 +60,7 @@ libxf1bppmfb_a_SOURCES = \
libxf1bpp_la_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES)
-AM_CFLAGS = -DXF86MONO -include mfbmap.h $(DIX_CFLAGS) $(XORG_CFLAGS) \
- @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DXF86MONO -include mfbmap.h $(DIX_CFLAGS) $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb
mfbseg.c:
diff --git a/hw/xfree86/xf4bpp/Makefile.am b/hw/xfree86/xf4bpp/Makefile.am
index 56b690f..7a9dc3a 100644
--- a/hw/xfree86/xf4bpp/Makefile.am
+++ b/hw/xfree86/xf4bpp/Makefile.am
@@ -59,4 +59,4 @@ mfbseg.c:
INCLUDES = $(XORG_INCS) -I$(srcdir)/../xf1bpp -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/xf8_16bpp/Makefile.am b/hw/xfree86/xf8_16bpp/Makefile.am
index 6538d1f..5b30f45 100644
--- a/hw/xfree86/xf8_16bpp/Makefile.am
+++ b/hw/xfree86/xf8_16bpp/Makefile.am
@@ -4,7 +4,7 @@ sdk_HEADERS = cfb8_16.h
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/fb
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
libxf8_16bpp_la_LDFLAGS = -avoid-version
diff --git a/hw/xfree86/xf8_32bpp/Makefile.am b/hw/xfree86/xf8_32bpp/Makefile.am
index 1212fc0..3050b81 100644
--- a/hw/xfree86/xf8_32bpp/Makefile.am
+++ b/hw/xfree86/xf8_32bpp/Makefile.am
@@ -4,7 +4,7 @@ sdk_HEADERS = cfb8_32.h
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
-AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(XORG_CFLAGS)
libxf8_32bpp_la_LDFLAGS = -avoid-version
diff --git a/hw/xgl/Makefile.am b/hw/xgl/Makefile.am
index 0aa94f9..48a9825 100644
--- a/hw/xgl/Makefile.am
+++ b/hw/xgl/Makefile.am
@@ -19,7 +19,7 @@ SUBDIRS = \
$(XEGL_SUBDIRS)
AM_CFLAGS = \
- @SERVER_DEFINES@ \
+ \
-DHAVE_XGL_CONFIG_H \
-DHAVE_DIX_CONFIG_H \
-I$(top_srcdir)/GL/glx \
diff --git a/hw/xgl/egl/Makefile.am b/hw/xgl/egl/Makefile.am
index 701320d..ded4a15 100644
--- a/hw/xgl/egl/Makefile.am
+++ b/hw/xgl/egl/Makefile.am
@@ -9,7 +9,7 @@ SUBDIRS = \
$(XGL_MODULE_DIRS)
AM_CFLAGS = \
- @SERVER_DEFINES@ \
+ \
-DHAVE_XGL_CONFIG_H \
-DHAVE_DIX_CONFIG_H \
$(XEGLMODULES_CFLAGS)
diff --git a/hw/xgl/glx/Makefile.am b/hw/xgl/glx/Makefile.am
index 4929212..10a831f 100644
--- a/hw/xgl/glx/Makefile.am
+++ b/hw/xgl/glx/Makefile.am
@@ -15,7 +15,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/GL/include \
-I at MESA_SOURCE@/include \
-I at MESA_SOURCE@/src/mesa/glapi \
- @SERVER_DEFINES@ \
+ \
-DHAVE_XGL_CONFIG_H \
-DHAVE_DIX_CONFIG_H \
$(XGLXMODULES_CFLAGS)
diff --git a/hw/xgl/glxext/Makefile.am b/hw/xgl/glxext/Makefile.am
index f9b9c0d..c400f36 100644
--- a/hw/xgl/glxext/Makefile.am
+++ b/hw/xgl/glxext/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = module
AM_CFLAGS = \
- @SERVER_DEFINES@ \
+ \
-DHAVE_XGL_CONFIG_H \
-DHAVE_DIX_CONFIG_H \
$(XGLMODULES_CFLAGS) \
diff --git a/hw/xgl/glxext/module/Makefile.am b/hw/xgl/glxext/module/Makefile.am
index 660838d..82c4211 100644
--- a/hw/xgl/glxext/module/Makefile.am
+++ b/hw/xgl/glxext/module/Makefile.am
@@ -1,5 +1,5 @@
AM_CFLAGS = \
- @SERVER_DEFINES@ \
+ \
-DHAVE_XGL_CONFIG_H \
-DHAVE_DIX_CONFIG_H \
$(XGLMODULES_CFLAGS) \
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index 67a2e98..b23782e 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -52,7 +52,7 @@ Xnest_LDFLAGS =
AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \
-DNO_HW_ONLY_EXTS \
- @SERVER_DEFINES@ \
+ \
$(XNESTMODULES_CFLAGS)
EXTRA_DIST = os2Stub.c \
diff --git a/hw/xnest/xnest-config.h b/hw/xnest/xnest-config.h
index 8b47776..4889f1f 100644
--- a/hw/xnest/xnest-config.h
+++ b/hw/xnest/xnest-config.h
@@ -32,6 +32,5 @@
#include <xkb-config.h>
#undef MITSHM
-#undef XFree86LOADER
#endif /* XNEST_CONFIG_H */
diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am
index de0a1d9..27a7e30 100644
--- a/hw/xprint/Makefile.am
+++ b/hw/xprint/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = doc pcl pcl-mono raster ps etc
bin_PROGRAMS = Xprt
-Xprt_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
+Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
-DXPRINT -DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_ \
-DXPRINTDIR=\"$(libdir)/X11/xserver\" \
-DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX
diff --git a/hw/xprint/ps/Makefile.am b/hw/xprint/ps/Makefile.am
index 90872d9..0e81937 100644
--- a/hw/xprint/ps/Makefile.am
+++ b/hw/xprint/ps/Makefile.am
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libps.la
INCLUDES = -I$(top_srcdir)/hw/xprint
-AM_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ @FREETYPE_CFLAGS@ \
+AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ @FREETYPE_CFLAGS@ \
-D_XP_PRINT_SERVER_ -DPSZ=8 -DXP_PSTEXT
libps_la_SOURCES = \
diff --git a/hw/xprint/raster/Makefile.am b/hw/xprint/raster/Makefile.am
index fcd1e73..bf5471d 100644
--- a/hw/xprint/raster/Makefile.am
+++ b/hw/xprint/raster/Makefile.am
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libraster.la
INCLUDES = -I$(top_srcdir)/hw/xprint
-AM_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
+AM_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
-D_XP_PRINT_SERVER_ -DPSZ=8
libraster_la_SOURCES = \
diff --git a/include/misc.h b/include/misc.h
index 5944a42..199ad5d 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -83,11 +83,7 @@ extern unsigned long serverGeneration;
#include <X11/X.h>
#include <X11/Xdefs.h>
-#ifndef IN_MODULE
-#ifndef NULL
#include <stddef.h>
-#endif
-#endif
#ifndef MAXSCREENS
#define MAXSCREENS 16
@@ -115,9 +111,7 @@ typedef struct _CallbackList *CallbackLi
typedef struct _xReq *xReqPtr;
#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
-#ifndef IN_MODULE
#include <X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
-#endif
#define NullBox ((BoxPtr)0)
#define MILLI_PER_MIN (1000 * 60)
@@ -145,12 +139,10 @@ typedef struct _xReq *xReqPtr;
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
-#ifndef IN_MODULE
/* abs() is a function, not a macro; include the file declaring
* it in case we haven't done that yet.
- */
+ */
#include <stdlib.h>
-#endif /* IN_MODULE */
#ifndef Fabs
#define Fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */
#endif
@@ -166,7 +158,6 @@ typedef struct _xReq *xReqPtr;
*/
#define lowbit(x) ((x) & (~(x) + 1))
-#ifndef IN_MODULE
/* XXX Not for modules */
#include <limits.h>
#if !defined(MAXSHORT) || !defined(MINSHORT) || \
@@ -177,7 +168,6 @@ typedef struct _xReq *xReqPtr;
*/
#include <math.h>
-#endif
#undef MAXSHORT
#define MAXSHORT SHRT_MAX
#undef MINSHORT
@@ -189,7 +179,7 @@ typedef struct _xReq *xReqPtr;
#include <assert.h>
#include <ctype.h>
-#include <stdio.h> /* for fopen, etc... */
+#include <stdio.h> /* for fopen, etc... */
#endif
diff --git a/include/os.h b/include/os.h
index 0885bb2..e16839c 100644
--- a/include/os.h
+++ b/include/os.h
@@ -88,12 +88,8 @@ typedef struct _NewClientRec *NewClientP
#define xnfstrdup(s) XNFstrdup(s)
#endif
-#ifndef IN_MODULE
-#ifdef __SCO__
#include <stdio.h>
-#endif
-#include <string.h>
-#endif
+#include <stdarg.h>
/* have to put $(SIGNAL_DEFINES) in DEFINES in Imakefile to get this right */
#ifdef SIGNALRETURNSINT
@@ -517,10 +513,4 @@ extern void ErrorF(const char *f, ...) _
extern void Error(char *str);
extern void LogPrintMarkers(void);
-#if defined(NEED_SNPRINTF) && !defined(IN_MODULE)
-extern int snprintf(char *str, size_t size, const char *format, ...)
- _printf_attribute(3,4);
-extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif
-
#endif /* OS_H */
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index f31d98a..48196d8 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -235,4 +235,7 @@
/* System has wscons console */
#undef WSCONS_SUPPORT
+/* Loadable XFree86 server awesomeness */
+#undef XFree86LOADER
+
#endif /* _XORG_SERVER_H_ */
diff --git a/mfb/Makefile.am b/mfb/Makefile.am
index f72867e..fe0bb1c 100644
--- a/mfb/Makefile.am
+++ b/mfb/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libmfb.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
INCLUDES = -I$(top_srcdir)/hw/xfree86/os-support
diff --git a/mfb/maskbits.h b/mfb/maskbits.h
index ed5cc26..d5e1eba 100644
--- a/mfb/maskbits.h
+++ b/mfb/maskbits.h
@@ -253,7 +253,7 @@ extern PixelType mfbGetmask(int);
#define BitLeft(b,s) SCRLEFT(b,s)
#define BitRight(b,s) SCRRIGHT(b,s)
-#ifdef XFree86Server
+#if 1
#define LONG2CHARSSAMEORDER(x) ((MfbBits)(x))
#define LONG2CHARSDIFFORDER( x ) ( ( ( ( x ) & (MfbBits)0x000000FF ) << 0x18 ) \
| ( ( ( x ) & (MfbBits)0x0000FF00 ) << 0x08 ) \
diff --git a/mi/Makefile.am b/mi/Makefile.am
index c77eac7..42f75ae 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -6,7 +6,7 @@ sdk_HEADERS = mibank.h micmap.h miline.h
mispans.h miwideline.h mistruct.h mifpoly.h
endif
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
# libminimi is for dmx - it has different defines for miinitext.c
libminimi_la_SOURCES = \
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index b7fb4cc..2bccc2f 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -360,7 +360,7 @@ miGetPlane(
* Now get the bit and insert into a bitmap in XY format.
*/
bit = (pixel >> planeNum) & 1;
-#ifndef XFree86Server
+#if 0
/* XXX assuming bit order == byte order */
#if BITMAP_BIT_ORDER == LSBFirst
bit <<= k;
diff --git a/mi/mipushpxl.c b/mi/mipushpxl.c
index 9cdb09a..d83d2fc 100644
--- a/mi/mipushpxl.c
+++ b/mi/mipushpxl.c
@@ -95,7 +95,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx
Bool fInBox;
DDXPointRec pt[NPT], ptThisLine;
int width[NPT];
-#ifdef XFree86Server
+#if 1
PixelType startmask;
if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER)
if (screenInfo.bitmapBitOrder == LSBFirst)
@@ -135,7 +135,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx
while(pw < pwEnd)
{
w = *pw;
-#ifdef XFree86Server
+#if 1
msk = startmask;
#else
msk = (MiBits)(-1) ^ SCRRIGHT((MiBits)(-1), 1);
@@ -168,7 +168,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx
fInBox = FALSE;
}
}
-#ifdef XFree86Server
+#if 1
/* This is not quite right, but it'll do for now */
if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER)
if (screenInfo.bitmapBitOrder == LSBFirst)
@@ -191,7 +191,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx
{
/* Process final partial word on line */
w = *pw;
-#ifdef XFree86Server
+#if 1
msk = startmask;
#else
msk = (MiBits)(-1) ^ SCRRIGHT((MiBits)(-1), 1);
@@ -224,7 +224,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx
fInBox = FALSE;
}
}
-#ifdef XFree86Server
+#if 1
/* This is not quite right, but it'll do for now */
if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER)
if (screenInfo.bitmapBitOrder == LSBFirst)
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 33170a3..3554e3e 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -2072,7 +2072,7 @@ miWideDash (pDrawable, pGC, mode, npt, p
Bool endIsFg = FALSE, startIsFg = FALSE;
Bool firstIsFg = FALSE, prevIsFg = FALSE;
-#ifndef XFree86Server
+#if 0
/* XXX backward compatibility */
if (pGC->lineWidth == 0)
{
diff --git a/miext/cw/Makefile.am b/miext/cw/Makefile.am
index 9b8e2c2..e056f42 100644
--- a/miext/cw/Makefile.am
+++ b/miext/cw/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libcw.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
INCLUDES = -I$(top_srcdir)/hw/xfree86/os-support
diff --git a/miext/damage/Makefile.am b/miext/damage/Makefile.am
index 2af9ac2..5958357 100644
--- a/miext/damage/Makefile.am
+++ b/miext/damage/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libdamage.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
INCLUDES = -I$(srcdir)/../cw -I$(top_srcdir)/hw/xfree86/os-support
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index ef7bca4..2e80011 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1770,7 +1770,6 @@ DamageSetup (ScreenPtr pScreen)
if (!pScrPriv)
return FALSE;
-#ifdef XFree86Server
#ifdef COMPOSITE
/* This is a kludge to ensure wrapping order with the composite wrapper.
* If it's done from compinit.c, then DamageSetup may be called before the
@@ -1780,7 +1779,6 @@ DamageSetup (ScreenPtr pScreen)
if (!noCompositeExtension)
miInitializeCompositeWrapper (pScreen);
#endif
-#endif
pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0;
diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index 1426c03..a73d0ec 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libshadow.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
INCLUDES = -I$(top_srcdir)/hw/xfree86/os-support
diff --git a/os/Makefile.am b/os/Makefile.am
index d7fd58d..71e24c0 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libos.la libcwrapper.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
# FIXME: Add support for these in configure.ac
K5AUTH_SOURCES = k5auth.c
diff --git a/os/utils.c b/os/utils.c
index e41c366..de3e7c9 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -139,13 +139,9 @@ _X_EXPORT Bool noTestExtensions;
_X_EXPORT Bool noBigReqExtension = FALSE;
#endif
#ifdef COMPOSITE
- #ifdef XFree86Server
- /* COMPOSITE is disabled by default for now until the
- * interface is stable */
- #define COMPOSITE_DEFAULT FALSE
- #else
- #define COMPOSITE_DEFAULT TRUE
- #endif
+ /* COMPOSITE is disabled by default for now until the
+ * interface is stable */
+ #define COMPOSITE_DEFAULT FALSE
_X_EXPORT Bool noCompositeExtension = !COMPOSITE_DEFAULT;
#endif
diff --git a/randr/Makefile.am b/randr/Makefile.am
index 753eebb..bd30aed 100644
--- a/randr/Makefile.am
+++ b/randr/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = librandr.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
if XORG
sdk_HEADERS = randrstr.h
diff --git a/record/Makefile.am b/record/Makefile.am
index 9bb2f7a..2a64f31 100644
--- a/record/Makefile.am
+++ b/record/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = librecord.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
librecord_la_SOURCES = record.c set.c
diff --git a/render/Makefile.am b/render/Makefile.am
index addabc6..830778a 100644
--- a/render/Makefile.am
+++ b/render/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = librender.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
librender_la_SOURCES = \
animcur.c \
diff --git a/xfixes/Makefile.am b/xfixes/Makefile.am
index a9ba762..2a95c06 100644
--- a/xfixes/Makefile.am
+++ b/xfixes/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libxfixes.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = $(DIX_CFLAGS)
libxfixes_la_SOURCES = \
cursor.c \
diff --git a/xkb/Makefile.am b/xkb/Makefile.am
index 1669d88..5763ce8 100644
--- a/xkb/Makefile.am
+++ b/xkb/Makefile.am
@@ -1,6 +1,6 @@
noinst_LTLIBRARIES = libxkb.la libxkbstubs.la
-AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ \
+AM_CFLAGS = $(DIX_CFLAGS) \
-DHAVE_XKB_CONFIG_H
DDX_SRCS = \
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index e4f74fb..2027722 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -1000,7 +1000,6 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xk
return 1;
}
-#ifdef XFree86Server
static int
_XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
@@ -1022,7 +1021,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkb
}
return 1;
}
-#endif
#ifdef XINPUT
@@ -1252,12 +1250,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEI
sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act);
break;
#endif
-#ifdef XFree86Server
case XkbSA_XFree86Private:
filter = _XkbNextFreeFilter();
sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act);
break;
-#endif
}
}
}
diff --git a/xorg-server.pc.in b/xorg-server.pc.in
index 04206e4..7b4b2fb 100644
--- a/xorg-server.pc.in
+++ b/xorg-server.pc.in
@@ -8,5 +8,5 @@ sdkdir=@sdkdir@
Name: xorg-server
Description: Modular X.Org X Server
Version: @PACKAGE_VERSION@
-Cflags: -I${sdkdir} @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+Cflags: -I${sdkdir}
Libs: -L${libdir}
diff-tree 881953813c7307f2aac4057b48d233e5f4a574cd (from f029e9a32dcaa95b84e08ec173a0cc78fd92bdbf)
Author: Adam Jackson <ajax at theobromine.nwnk.net>
Date: Mon Jul 17 13:50:38 2006 -0400
Fix the Linux ACPI reopen code to use a repeating timer, rather than a
one-shot sleep-and-reopen attempt.
diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c
index 6712c09..eca76db 100644
--- a/hw/xfree86/os-support/linux/lnx_acpi.c
+++ b/hw/xfree86/os-support/linux/lnx_acpi.c
@@ -36,6 +36,20 @@ static void lnxCloseACPI(void);
static pointer ACPIihPtr = NULL;
PMClose lnxACPIOpen(void);
+/* in milliseconds */
+#define ACPI_REOPEN_DELAY 1000
+
+static CARD32
+lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg)
+{
+ if (lnxACPIOpen()) {
+ TimerFree(timer);
+ return 0;
+ }
+
+ return ACPI_REOPEN_DELAY;
+}
+
#define LINE_LENGTH 80
static int
@@ -52,8 +66,7 @@ lnxACPIGetEventFromOs(int fd, pmEvent *e
if (n <= 0) {
lnxCloseACPI();
- sleep(1);
- lnxACPIOpen();
+ TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL);
return 0;
}
@@ -171,4 +184,3 @@ lnxCloseACPI(void)
ACPIihPtr = NULL;
}
}
-
diff-tree f029e9a32dcaa95b84e08ec173a0cc78fd92bdbf (from 4c225a3a8b2e7e5e5510347d8473f1318bbac769)
Author: Kristian Høgsberg <krh at redhat.com>
Date: Sat Jul 15 22:05:38 2006 -0400
Un-glx-libcwrap DMX GLX proxy so it works without GL/include.
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index d7ea707..f18b1fb 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -59,7 +59,6 @@
#include "glxutil.h"
#include "glxext.h"
#include "unpack.h"
-#include "GL/glx_ansic.h"
#include "GL/glxproto.h"
#include "glxvendor.h"
@@ -158,7 +157,7 @@ static int CreateContext(__GLXclientStat
if (!glxc) {
return BadAlloc;
}
- __glXMemset(glxc, 0, sizeof(__GLXcontext));
+ memset(glxc, 0, sizeof(__GLXcontext));
pScreen = screenInfo.screens[screen];
pGlxScreen = &__glXActiveScreens[screen];
@@ -610,7 +609,7 @@ static int AddCurrentContext(__GLXclient
cl->currentContexts = table;
cl->numCurrentContexts++;
- __glXMemset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
+ memset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
screenInfo.numScreens * sizeof(GLXContextTag));
return num+1;
@@ -2589,7 +2588,7 @@ int __glXClientInfo(__GLXclientState *cl
cl->GLClientminorVersion = req->minor;
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
buf = (const char *)(req+1);
- cl->GLClientextensions = __glXStrdup(buf);
+ cl->GLClientextensions = strdup(buf);
to_screen = screenInfo.numScreens - 1;
diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c
index 565793e..25f8c5d 100644
--- a/hw/dmx/glxProxy/glxcmdsswap.c
+++ b/hw/dmx/glxProxy/glxcmdsswap.c
@@ -44,7 +44,6 @@
#include <windowstr.h>
#include "unpack.h"
#include "glxext.h"
-#include "GL/glx_ansic.h"
#include "glxvendor.h"
extern int glxIsExtensionSupported( char *ext );
@@ -714,7 +713,7 @@ int __glXSwapRenderLarge(__GLXclientStat
}
cl->largeCmdBufSize = hdr->length;
}
- __glXMemcpy(cl->largeCmdBuf, pc, req->dataBytes);
+ memcpy(cl->largeCmdBuf, pc, req->dataBytes);
cl->largeCmdBytesSoFar = req->dataBytes;
cl->largeCmdBytesTotal = hdr->length;
@@ -737,7 +736,7 @@ int __glXSwapRenderLarge(__GLXclientStat
return __glXBadLargeRequest;
}
- __glXMemcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
+ memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
pc, req->dataBytes);
cl->largeCmdBytesSoFar += req->dataBytes;
@@ -759,7 +758,7 @@ int __glXSwapRenderLarge(__GLXclientStat
return __glXBadLargeRequest;
}
- __glXMemcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
+ memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
pc, req->dataBytes);
cl->largeCmdBytesSoFar += req->dataBytes;
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
index 5ddfbe6..872cfaf 100644
--- a/hw/dmx/glxProxy/glxext.c
+++ b/hw/dmx/glxProxy/glxext.c
@@ -79,7 +79,7 @@ static void ResetClientState(int clientI
}
keep_be_displays = cl->be_displays;
- __glXMemset(cl, 0, sizeof(__GLXclientState));
+ memset(cl, 0, sizeof(__GLXclientState));
cl->be_displays = keep_be_displays;
/*
@@ -90,7 +90,7 @@ static void ResetClientState(int clientI
cl->GLClientminorVersion = 0;
if (cl->GLClientextensions) __glXFree(cl->GLClientextensions);
- __glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
+ memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
}
@@ -414,14 +414,14 @@ static int __glXDispatch(ClientPtr clien
if (!cl) {
return BadAlloc;
}
- __glXMemset(cl, 0, sizeof(__GLXclientState));
+ memset(cl, 0, sizeof(__GLXclientState));
cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) );
if (!cl->be_displays) {
__glXFree( cl );
return BadAlloc;
}
- __glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
+ memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
}
if (!cl->inUse) {
@@ -468,7 +468,7 @@ static int __glXSwapDispatch(ClientPtr c
if (!cl) {
return BadAlloc;
}
- __glXMemset(cl, 0, sizeof(__GLXclientState));
+ memset(cl, 0, sizeof(__GLXclientState));
cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) );
if (!cl->be_displays) {
@@ -476,7 +476,7 @@ static int __glXSwapDispatch(ClientPtr c
return BadAlloc;
}
- __glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
+ memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
}
if (!cl->inUse) {
diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
index 7db7efe..2b4ed0a 100644
--- a/hw/dmx/glxProxy/glxserver.h
+++ b/hw/dmx/glxProxy/glxserver.h
@@ -46,7 +46,6 @@
#include <extnsionst.h>
#include <resource.h>
#include <scrnintstr.h>
-#include "GL/glx_ansic.h"
/*
diff --git a/hw/dmx/glxProxy/glxutil.c b/hw/dmx/glxProxy/glxutil.c
index 822ef25..0893f15 100644
--- a/hw/dmx/glxProxy/glxutil.c
+++ b/hw/dmx/glxProxy/glxutil.c
@@ -41,7 +41,6 @@
#include <pixmapstr.h>
#include <windowstr.h>
#include "glxutil.h"
-#include "GL/glx_ansic.h"
/************************************************************************/
@@ -82,7 +81,7 @@ __glXCalloc(size_t numElements, size_t e
/* XXX: handle out of memory error */
return NULL;
}
- __glXMemset(addr, 0, size);
+ memset(addr, 0, size);
return addr;
}
diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c
index c20e955..77bb137 100644
--- a/hw/dmx/glxProxy/glxvisuals.c
+++ b/hw/dmx/glxProxy/glxvisuals.c
@@ -37,6 +37,7 @@
#include <dmx-config.h>
#endif
+#include <assert.h>
#include "dmx.h"
#include "glxserver.h"
#include "glxutil.h"
diff-tree 46369350d40819ecc2a9f37ed4aaa95866b80997 (from 490fb304599b1f24b36439e5c1397781e7d2f612)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 14 15:51:55 2006 -0700
Add some const qualifiers to serveral function parameters.
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 97ed757..4ffd74b 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -576,7 +576,7 @@ pciCfg1outb(CARD16 addr, CARD8 val)
}
CARD8
-bios_checksum(CARD8 *start, int size)
+bios_checksum(const CARD8 *start, int size)
{
CARD8 sum = 0;
diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 0338a86..b845713 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -224,7 +224,7 @@ xf86HandleInt10Options(ScrnInfoPtr pScrn
}
Bool
-int10skip(void* options)
+int10skip(const void* options)
{
Bool noint10 = FALSE;
@@ -235,7 +235,7 @@ int10skip(void* options)
}
Bool
-int10_check_bios(int scrnIndex, int codeSeg, unsigned char* vbiosMem)
+int10_check_bios(int scrnIndex, int codeSeg, const unsigned char* vbiosMem)
{
int size;
@@ -262,7 +262,7 @@ int10_check_bios(int scrnIndex, int code
}
Bool
-initPrimary(void* options)
+initPrimary(const void* options)
{
Bool initPrimary = FALSE;
@@ -281,7 +281,7 @@ initPrimary(void* options)
* be used with extreme care.
*/
void
-xf86int10ParseBiosLocation(void* options,
+xf86int10ParseBiosLocation(const void* options,
xf86int10BiosLocationPtr bios)
{
const char *p;
diff --git a/hw/xfree86/int10/xf86int10.h b/hw/xfree86/int10/xf86int10.h
index 581a3bd..47f965d 100644
--- a/hw/xfree86/int10/xf86int10.h
+++ b/hw/xfree86/int10/xf86int10.h
@@ -143,7 +143,7 @@ void dump_code(xf86Int10InfoPtr pInt);
void dump_registers(xf86Int10InfoPtr pInt);
void stack_trace(xf86Int10InfoPtr pInt);
xf86Int10InfoPtr getInt10Rec(int entityIndex);
-CARD8 bios_checksum(CARD8 *start, int size);
+CARD8 bios_checksum(const CARD8 *start, int size);
void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
#if defined (_PC)
@@ -182,10 +182,11 @@ int setup_system_bios(void *base_addr);
void reset_int_vect(xf86Int10InfoPtr pInt);
void set_return_trap(xf86Int10InfoPtr pInt);
void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex);
-Bool int10skip(void* options);
-Bool int10_check_bios(int scrnIndex, int codeSeg, unsigned char* vbiosMem);
-Bool initPrimary(void* options);
-void xf86int10ParseBiosLocation(void* options,
+Bool int10skip(const void* options);
+Bool int10_check_bios(int scrnIndex, int codeSeg,
+ const unsigned char* vbiosMem);
+Bool initPrimary(const void* options);
+void xf86int10ParseBiosLocation(const void* options,
xf86int10BiosLocationPtr bios);
BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt,
const xf86int10BiosLocationPtr bios);
diff-tree 490fb304599b1f24b36439e5c1397781e7d2f612 (from d3ee49bcbafe4b4e6b308686020847e978473779)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 14 15:26:56 2006 -0700
Rearrange code in xf86int10ParseBiosLocation to use strncasecmp. This
eliminates the need for the first use of xstrdup in this function.
The second use of xstrdup was *never* necessary and has also been
eliminated.
diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 624359f..0338a86 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -284,36 +284,30 @@ void
xf86int10ParseBiosLocation(void* options,
xf86int10BiosLocationPtr bios)
{
- char *s;
- char *p;
- char *str = NULL;
-
- if (options)
- str = xf86GetOptValString(options,OPT_BIOS_LOCATION);
+ const char *p;
+ const char *str;
bios->bus = BUS_NONE;
- if (!str)
+
+ if ((options == NULL)
+ || ((str = xf86GetOptValString(options, OPT_BIOS_LOCATION)) == NULL)) {
return;
-
- s = xstrdup(str);
- p = strtok(s,":");
- if (xf86NameCmp(p,"pci") == 0) bios->bus = BUS_PCI;
- else
- if (xf86NameCmp(p,"primary") == 0) bios->bus = BUS_ISA;
+ }
- xfree(s);
-
- if (bios->bus == BUS_NONE) return;
+ if (strncasecmp(str, "pci", 3) == 0) {
+ bios->bus = BUS_PCI;
+ } else if (strncasecmp(str, "primary", 7) == 0) {
+ bios->bus = BUS_ISA;
+ }
+ else {
+ return;
+ }
- s = xstrdup(str);
- p = strchr(s, ':');
+ p = strchr(str, ':');
switch (bios->bus) {
case BUS_ISA:
- if (p)
- bios->location.legacy = atoi(++p);
- else
- bios->location.legacy = 0;
+ bios->location.legacy = (p != NULL) ? atoi(++p) : 0;
break;
case BUS_PCI:
if (p) {
@@ -332,7 +326,6 @@ xf86int10ParseBiosLocation(void* options
default:
break;
}
- xfree(s);
}
diff-tree d3ee49bcbafe4b4e6b308686020847e978473779 (from 8793c7fd4ba7d1b3e2eff3f2c18d042ee9bb3f62)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 14 15:13:35 2006 -0700
Refactor common code from the generic.c and linux.c version of
xf86ExtendedInitInt10 to xf86int10GetBiosLocationType and
xf86int10GetBiosSegment.
These changes were tested on MGA hardware on x86-64 with various
combinations of InitPrimary and BiosLocation.
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 03fc89c..1b4475f 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -136,59 +136,12 @@ xf86ExtendedInitInt10(int entityIndex, i
if (xf86IsEntityPrimary(entityIndex)
&& !(initPrimary(options))) {
-
- if (bios.bus == BUS_ISA && bios.location.legacy) {
- xf86DrvMsg(screen, X_CONFIG,
- "Overriding BIOS location: 0x%x\n",
- bios.location.legacy);
- cs = bios.location.legacy >> 4;
-#define CHECK_V_SEGMENT_RANGE(x) \
- if (((x) << 4) < V_BIOS) {\
- xf86DrvMsg(screen, X_ERROR, \
- "V_BIOS address 0x%lx out of range\n", \
- (unsigned long)(x) << 4); \
- goto error1; \
- }
- CHECK_V_SEGMENT_RANGE(cs);
- vbiosMem = (unsigned char *)sysMem - V_BIOS + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
- xf86DrvMsg(screen, X_ERROR,
- "No V_BIOS at specified address 0x%lx\n",
- (unsigned long)cs << 4);
- goto error1;
- }
- } else {
- if (bios.bus == BUS_PCI) {
- xf86DrvMsg(screen, X_WARNING,
- "Option BiosLocation for primary device ignored: "
- "It points to PCI.\n");
- xf86DrvMsg(screen, X_WARNING,
- "You must set Option InitPrimary also\n");
- }
-
- cs = MEM_RW(pInt,((0x10<<2)+2));
- CHECK_V_SEGMENT_RANGE(cs);
- vbiosMem = (unsigned char *)sysMem - V_BIOS + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
- cs = MEM_RW(pInt, (0x42 << 2) + 2);
- CHECK_V_SEGMENT_RANGE(cs);
- vbiosMem = (unsigned char *)sysMem - V_BIOS + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
- cs = V_BIOS >> 4;
- vbiosMem = (unsigned char *)sysMem - V_BIOS + (cs << 4);
- if (!int10_check_bios(screen, cs, vbiosMem)) {
- xf86DrvMsg(screen, X_ERROR, "No V_BIOS found\n");
- goto error1;
- }
- }
- }
+ if (! xf86int10GetBiosSegment(pInt, &bios,
+ (unsigned char *)sysMem - V_BIOS)) {
+ goto error1;
}
-
- xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%lx\n",
- (unsigned long)cs);
set_return_trap(pInt);
- pInt->BIOSseg = cs;
pInt->Flags = Flags & (SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH);
if (! (pInt->Flags & SET_BIOS_SCRATCH))
@@ -196,54 +149,33 @@ xf86ExtendedInitInt10(int entityIndex, i
xf86Int10SaveRestoreBIOSVars(pInt, TRUE);
} else {
- BusType location_type;
+ const BusType location_type = xf86int10GetBiosLocationType(pInt,
+ &bios);
int bios_location = V_BIOS;
- int pci_entity;
-
- EntityInfoPtr pEnt = xf86GetEntityInfo(pInt->entityIndex);
+
reset_int_vect(pInt);
set_return_trap(pInt);
- if (bios.bus != BUS_NONE) {
- switch (location_type = bios.bus) {
- case BUS_PCI:
- xf86DrvMsg(screen,X_CONFIG,"Overriding bios location: "
- "PCI:%i:%i%i\n",bios.location.pci.bus,
- bios.location.pci.dev,bios.location.pci.func);
- break;
- case BUS_ISA:
- bios_location = bios.location.legacy;
- if (bios.location.legacy)
- xf86DrvMsg(screen,X_CONFIG,"Overriding bios location: "
- "Legacy:0x%x\n",bios.location.legacy);
- else
- xf86DrvMsg(screen,X_CONFIG,"Overriding bios location: "
- "Legacy\n");
- break;
- default:
- break;
- }
- } else
- location_type = pEnt->location.type;
-
- xfree(pEnt);
-
switch (location_type) {
- case BUS_PCI:
+ case BUS_PCI: {
+ const int pci_entity = (bios.bus == BUS_PCI)
+ ? xf86GetPciEntity(bios.location.pci.bus,
+ bios.location.pci.dev,
+ bios.location.pci.func)
+ : pInt->entityIndex;
+
vbiosMem = (unsigned char *)base + bios_location;
- if (bios.bus == BUS_PCI)
- pci_entity = xf86GetPciEntity(bios.location.pci.bus,
- bios.location.pci.dev,
- bios.location.pci.func);
- else
- pci_entity = pInt->entityIndex;
if (!(size = mapPciRom(pci_entity,(unsigned char *)(vbiosMem)))) {
xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (3)\n");
goto error1;
}
INTPriv(pInt)->highMemory = GET_HIGH_BASE(size);
break;
+ }
case BUS_ISA:
+ if (bios.bus == BUS_ISA) {
+ bios_location = bios.location.legacy;
+ }
vbiosMem = (unsigned char *)sysMem + bios_location;
#if 0
(void)memset(vbiosMem, 0, V_BIOS_SIZE);
diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 65ffe3d..624359f 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -336,4 +336,104 @@ xf86int10ParseBiosLocation(void* options
}
+BusType
+xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt,
+ const xf86int10BiosLocationPtr bios)
+{
+ BusType location_type = bios->bus;
+ switch (location_type) {
+ case BUS_PCI:
+ xf86DrvMsg(pInt->scrnIndex,X_CONFIG,"Overriding bios location: "
+ "PCI:%i:%i%i\n",bios->location.pci.bus,
+ bios->location.pci.dev,bios->location.pci.func);
+ break;
+ case BUS_ISA:
+ if (bios->location.legacy)
+ xf86DrvMsg(pInt->scrnIndex,X_CONFIG,"Overriding bios location: "
+ "Legacy:0x%x\n",bios->location.legacy);
+ else
+ xf86DrvMsg(pInt->scrnIndex,X_CONFIG,"Overriding bios location: "
+ "Legacy\n");
+ break;
+ case BUS_NONE: {
+ EntityInfoPtr pEnt = xf86GetEntityInfo(pInt->entityIndex);
+ location_type = pEnt->location.type;
+ xfree(pEnt);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return location_type;
+}
+
+
+#define CHECK_V_SEGMENT_RANGE(x) \
+ if (((x) << 4) < V_BIOS) { \
+ xf86DrvMsg(pInt->scrnIndex, X_ERROR, \
+ "V_BIOS address 0x%lx out of range\n", \
+ (unsigned long)(x) << 4); \
+ return FALSE; \
+ }
+
+Bool
+xf86int10GetBiosSegment(xf86Int10InfoPtr pInt,
+ const xf86int10BiosLocationPtr bios, void * base)
+{
+ unsigned i;
+ int cs = ~0;
+ int segments[4];
+ const char * format;
+
+
+ if (bios->bus == BUS_ISA && bios->location.legacy) {
+ xf86DrvMsg(pInt->scrnIndex, X_CONFIG,
+ "Overriding BIOS location: 0x%x\n",
+ bios->location.legacy);
+
+ segments[0] = bios->location.legacy >> 4;
+ segments[1] = ~0;
+
+ format = "No V_BIOS at specified address 0x%lx\n";
+ } else {
+ if (bios->bus == BUS_PCI) {
+ xf86DrvMsg(pInt->scrnIndex, X_WARNING,
+ "Option BiosLocation for primary device ignored: "
+ "It points to PCI.\n");
+ xf86DrvMsg(pInt->scrnIndex, X_WARNING,
+ "You must set Option InitPrimary also\n");
+ }
+
+ segments[0] = MEM_RW(pInt, (0x10 << 2) + 2);
+ segments[1] = MEM_RW(pInt, (0x42 << 2) + 2);
+ segments[2] = V_BIOS >> 4;
+ segments[3] = ~0;
+
+ format = "No V_BIOS found\n";
+ }
+
+ for (i = 0; segments[i] != ~0; i++) {
+ unsigned char * vbiosMem;
+
+ cs = segments[i];
+
+ CHECK_V_SEGMENT_RANGE(cs);
+ vbiosMem = (unsigned char *)base + (cs << 4);
+ if (int10_check_bios(pInt->scrnIndex, cs, vbiosMem)) {
+ break;
+ }
+ }
+
+ if (segments[i] == ~0) {
+ xf86DrvMsg(pInt->scrnIndex, X_ERROR, format, (unsigned long)cs << 4);
+ return FALSE;
+ }
+
+ xf86DrvMsg(pInt->scrnIndex, X_INFO, "Primary V_BIOS segment is: 0x%lx\n",
+ (unsigned long)cs);
+
+ pInt->BIOSseg = cs;
+ return TRUE;
+}
diff --git a/hw/xfree86/int10/xf86int10.h b/hw/xfree86/int10/xf86int10.h
index 9e137df..581a3bd 100644
--- a/hw/xfree86/int10/xf86int10.h
+++ b/hw/xfree86/int10/xf86int10.h
@@ -187,6 +187,10 @@ Bool int10_check_bios(int scrnIndex, int
Bool initPrimary(void* options);
void xf86int10ParseBiosLocation(void* options,
xf86int10BiosLocationPtr bios);
+BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt,
+ const xf86int10BiosLocationPtr bios);
+Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt,
+ const xf86int10BiosLocationPtr bios, void * base);
#ifdef DEBUG
void dprint(unsigned long start, unsigned long size);
#endif
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 64087a2..6190024 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -264,52 +264,15 @@ xf86ExtendedInitInt10(int entityIndex, i
ErrorF("done\n");
#endif
}
-
+
xf86int10ParseBiosLocation(options,&bios);
if (xf86IsEntityPrimary(entityIndex)
&& !(initPrimary(options))) {
- if (bios.bus == BUS_ISA && bios.location.legacy) {
- xf86DrvMsg(screen, X_CONFIG,
- "Overriding BIOS location: 0x%x\n",
- bios.location.legacy);
- cs = bios.location.legacy >> 4;
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- xf86DrvMsg(screen, X_ERROR,
- "No V_BIOS at specified address 0x%lx\n",cs << 4);
- goto error3;
- }
- } else {
- if (bios.bus == BUS_PCI) {
- xf86DrvMsg(screen, X_WARNING,
- "Option BiosLocation for primary device ignored: "
- "It points to PCI.\n");
- xf86DrvMsg(screen, X_WARNING,
- "You must set Option InitPrimary also\n");
- }
-
- cs = ((CARD16*)0)[(0x10<<1) + 1];
-
- bios_base = (unsigned char *)(cs << 4);
-
- if (!int10_check_bios(screen, cs, bios_base)) {
- cs = ((CARD16*)0)[(0x42 << 1) + 1];
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- cs = V_BIOS >> 4;
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- xf86DrvMsg(screen, X_ERROR, "No V_BIOS found\n");
- goto error3;
- }
- }
- }
+ if (! xf86int10GetBiosSegment(pInt, &bios, NULL)) {
+ goto error3;
}
- xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%lx\n", cs);
-
- pInt->BIOSseg = cs;
set_return_trap(pInt);
#ifdef _PC
pInt->Flags = Flags & (SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH);
@@ -318,41 +281,17 @@ xf86ExtendedInitInt10(int entityIndex, i
xf86Int10SaveRestoreBIOSVars(pInt, TRUE);
#endif
} else {
- EntityInfoPtr pEnt = xf86GetEntityInfo(pInt->entityIndex);
- BusType location_type;
-
- if (bios.bus != BUS_NONE) {
- switch (location_type = bios.bus) {
- case BUS_PCI:
- xf86DrvMsg(screen,X_CONFIG,"Overriding bios location: "
- "PCI:%i:%i%i\n",bios.location.pci.bus,
- bios.location.pci.dev,bios.location.pci.func);
- break;
- case BUS_ISA:
- if (bios.location.legacy)
- xf86DrvMsg(screen,X_CONFIG,"Overriding bios location: "
- "Legacy:0x%x\n",bios.location.legacy);
- else
- xf86DrvMsg(screen,X_CONFIG,"Overriding bios location: "
- "Legacy\n");
- break;
- default:
- break;
- }
- } else
- location_type = pEnt->location.type;
+ const BusType location_type = xf86int10GetBiosLocationType(pInt,
+ &bios);
switch (location_type) {
- case BUS_PCI:
- {
- int pci_entity;
+ case BUS_PCI: {
+ const int pci_entity = (bios.bus == BUS_PCI)
+ ? xf86GetPciEntity(bios.location.pci.bus,
+ bios.location.pci.dev,
+ bios.location.pci.func)
+ : pInt->entityIndex;
- if (bios.bus == BUS_PCI)
- pci_entity = xf86GetPciEntity(bios.location.pci.bus,
- bios.location.pci.dev,
- bios.location.pci.func);
- else
- pci_entity = pInt->entityIndex;
if (!mapPciRom(pci_entity, (unsigned char *)(V_BIOS))) {
xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS\n");
goto error3;
@@ -361,38 +300,14 @@ xf86ExtendedInitInt10(int entityIndex, i
break;
}
case BUS_ISA:
- if (bios.bus == BUS_ISA && bios.location.legacy) {
- cs = bios.location.legacy >> 4;
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- xf86DrvMsg(screen,X_ERROR,"No V_BIOS found "
- "on override address %p\n",bios_base);
- goto error3;
- }
- } else {
- cs = ((CARD16*)0)[(0x10<<1)+1];
- bios_base = (unsigned char *)(cs << 4);
-
- if (!int10_check_bios(screen, cs, bios_base)) {
- cs = ((CARD16*)0)[(0x42<<1)+1];
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- cs = V_BIOS >> 4;
- bios_base = (unsigned char *)(cs << 4);
- if (!int10_check_bios(screen, cs, bios_base)) {
- xf86DrvMsg(screen,X_ERROR,"No V_BIOS found\n");
- goto error3;
- }
- }
- }
+ if (! xf86int10GetBiosSegment(pInt, &bios, NULL)) {
+ goto error3;
}
- xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%lx\n",cs);
- pInt->BIOSseg = cs;
break;
default:
goto error3;
}
- xfree(pEnt);
+
pInt->num = 0xe6;
reset_int_vect(pInt);
set_return_trap(pInt);
diff-tree 8793c7fd4ba7d1b3e2eff3f2c18d042ee9bb3f62 (from 1450fd596433f7adfe3d0798dc2ddceb9d0a9034)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 14 09:11:39 2006 -0700
Refactor identical xf86InitInt10 function from generic.c and linux.c
to helper_exec.c.
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 69596d4..03fc89c 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -63,12 +63,6 @@ static void UnmapVRam(xf86Int10InfoPtr p
static void *sysMem = NULL;
xf86Int10InfoPtr
-xf86InitInt10(int entityIndex)
-{
- return xf86ExtendedInitInt10(entityIndex, 0);
-}
-
-xf86Int10InfoPtr
xf86ExtendedInitInt10(int entityIndex, int Flags)
{
xf86Int10InfoPtr pInt;
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 1809e2d..97ed757 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -685,3 +685,9 @@ xf86Int10SaveRestoreBIOSVars(xf86Int10In
xf86UnMapVidMem(pInt->scrnIndex,base - BIOS_SCRATCH_OFF ,pagesize);
}
#endif
+
+xf86Int10InfoPtr
+xf86InitInt10(int entityIndex)
+{
+ return xf86ExtendedInitInt10(entityIndex, 0);
+}
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index a911378..64087a2 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -79,12 +79,6 @@ static Int10LinuxSubModuleState int10Lin
#endif /* DoSubModules */
xf86Int10InfoPtr
-xf86InitInt10(int entityIndex)
-{
- return xf86ExtendedInitInt10(entityIndex, 0);
-}
-
-xf86Int10InfoPtr
xf86ExtendedInitInt10(int entityIndex, int Flags)
{
xf86Int10InfoPtr pInt = NULL;
diff-tree 1450fd596433f7adfe3d0798dc2ddceb9d0a9034 (from 4c225a3a8b2e7e5e5510347d8473f1318bbac769)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Fri Jul 14 09:10:32 2006 -0700
Trivial refactor of libint10_la_SOURCES.
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index f606f5e..35abd42 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -6,15 +6,18 @@ EXTRA_CFLAGS = @SERVER_DEFINES@ @MODULE_
libint10_la_LDFLAGS = -avoid-version
-if INT10_VM86
-AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS)
-INCLUDES = $(XORG_INCS)
-libint10_la_SOURCES = \
+COMMON_SOURCES = \
helper_exec.c \
helper_mem.c \
pci.c \
xf86int10.c \
- xf86int10module.c \
+ xf86int10module.c
+
+if INT10_VM86
+AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS)
+INCLUDES = $(XORG_INCS)
+libint10_la_SOURCES = \
+ $(COMMON_SOURCES) \
$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
$(srcdir)/../os-support/linux/int10/linux.c
endif
@@ -22,8 +25,11 @@ endif
if INT10_X86EMU
AM_CFLAGS = -D_X86EMU -DNO_SYS_HEADERS -D_PC $(XORG_CFLAGS) $(EXTRA_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../x86emu
-libint10_la_SOURCES = pci.c xf86int10module.c helper_exec.c helper_mem.c \
- xf86int10.c xf86x86emu.c generic.c x86emu.c
+libint10_la_SOURCES = \
+ $(COMMON_SOURCES) \
+ xf86x86emu.c \
+ generic.c \
+ x86emu.c
endif
if INT10_STUB
diff-tree 18624a9b7cf88e769c53cc3a876b3647c5d5057c (from 12595a77d6c2f037f48dfe751bdc10505b3317df)
Author: Ian Romanick <idr at umwelt.(none)>
Date: Thu Jul 13 21:10:48 2006 -0700
Modify linuxGetSizesStruct to use pci_device instead of pciConfigPtr.
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 9ecac8d..df8edc0 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -445,15 +445,19 @@ linuxGetSizesStruct(PCITAG Tag)
static const struct pciSizes default_size = {
0, 0, 1U << 16, (unsigned long)(1ULL << 32)
};
- pciConfigPtr pPCI;
+ struct pci_device *dev;
int i;
/* Find host bridge */
- if ((pPCI = xf86GetPciHostConfigFromTag(Tag))) {
+ dev = pci_device_find_by_slot(PCI_DOM_FROM_TAG(Tag),
+ PCI_BUS_NO_DOMAIN(PCI_BUS_FROM_TAG(Tag)),
+ PCI_DEV_FROM_TAG(Tag),
+ PCI_FUNC_FROM_TAG(Tag));
+ if (dev != NULL) {
/* Look up vendor/device */
for (i = 0; i < NUM_SIZES; i++) {
- if ((pPCI->pci_vendor == pciControllerSizes[i].vendor)
- && (pPCI->_pci_device == pciControllerSizes[i].device)) {
+ if ((dev->vendor_id == pciControllerSizes[i].vendor)
+ && (dev->device_id == pciControllerSizes[i].device)) {
return & pciControllerSizes[i];
}
}
@@ -660,18 +664,18 @@ xf86MapDomainMemory(int ScreenNum, int F
return (pointer)((char *)DomainMmappedMem[domain] + Base);
}
-/*
- * xf86MapDomainIO - map I/O space in this domain
+/**
+ * Map I/O space in this domain
*
* Each domain has a legacy ISA I/O space. This routine will try to
* map it using the Linux sysfs legacy_io interface. If that fails,
* it'll fall back to using /proc/bus/pci.
*
- * If the legacy_io interface *does* exist, the file descriptor (fd below)
- * will be saved in the DomainMmappedIO array in the upper bits of the
+ * If the legacy_io interface \b does exist, the file descriptor (\c fd below)
+ * will be saved in the \c DomainMmappedIO array in the upper bits of the
* pointer. Callers will do I/O with small port numbers (<64k values), so
- * the platform I/O code can extract the port number and the fd, lseek to
- * the port number in the legacy_io file, and issue the read or write.
+ * the platform I/O code can extract the port number and the \c fd, \c lseek
+ * to the port number in the legacy_io file, and issue the read or write.
*
* This has no means of returning failure, so all errors are fatal
*/
diff-tree 12595a77d6c2f037f48dfe751bdc10505b3317df (from parents)
Merge: 37838de62edc474f44c0a48bd56470a6c23f8956 4c225a3a8b2e7e5e5510347d8473f1318bbac769
Author: Ian Romanick <idr at umwelt.(none)>
Date: Thu Jul 13 12:48:03 2006 -0700
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
diff-tree 4c225a3a8b2e7e5e5510347d8473f1318bbac769 (from bb3aa94845a74d7718ba9539bb76203ec82957fc)
Author: James Steven Supancic III <arrummzen at arrummzen.net>
Date: Thu Jul 13 10:03:57 2006 -0400
Bug #7482: Fix Xdmx's Render code to match reality; fixes BadLength client
crashes.
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index 9a76a66..9cdd123 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -662,7 +662,7 @@ static int dmxProcRenderSetPictureFilter
int nparams;
REQUEST(xRenderSetPictureFilterReq);
- REQUEST_SIZE_MATCH(xRenderSetPictureFilterReq);
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess,
RenderErrBase + BadPicture);
diff-tree bb3aa94845a74d7718ba9539bb76203ec82957fc (from 10f3e32726d5b4981abd1a3a022e5b4f219fb41e)
Author: Drew Parsons <dparsons at debian.org>
Date: Tue Jul 11 18:26:55 2006 -0700
Bug #7346: Disable Composite extension in Xprt
Xorg Bug #7346 <https://bugs.freedesktop.org/show_bug.cgi?id=7346>
Patch #6184 <https://bugs.freedesktop.org/attachment.cgi?id=6184>
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 51faac9..2c1b1e2 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -108,6 +108,7 @@ SOFTWARE.
#undef XF86DRI
#undef DPMSExtension
#undef FONTCACHE
+#undef COMPOSITE
#undef DAMAGE
#undef XFIXES
#undef XEVIE
diff-tree 10f3e32726d5b4981abd1a3a022e5b4f219fb41e (from 2194d99d9ca3c607e0f5ddd911ee3df536d77564)
Author: Gustavo Pichorim Boiko <boiko at mandriva.com>
Date: Mon Jul 10 16:37:53 2006 -0700
Fix the configure check for the --{enable,disable}-dpms option
diff --git a/configure.ac b/configure.ac
index c8bdf38..56bee79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -421,7 +421,7 @@ AC_ARG_ENABLE(multibuffer, AS_HELP_ST
AC_ARG_ENABLE(fontcache, AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
-AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMS=$enableval], [DPMSExtension=yes])
+AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
dnl DDXes.
diff-tree 2194d99d9ca3c607e0f5ddd911ee3df536d77564 (from 90a9b82272446fdaebe71c966325fd7e670f75c6)
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Sun Jul 9 16:16:08 2006 +0200
Replace GNU make-ism.
diff --git a/hw/xprint/etc/init.d/Makefile.am b/hw/xprint/etc/init.d/Makefile.am
index dfe8012..0cf1adc 100644
--- a/hw/xprint/etc/init.d/Makefile.am
+++ b/hw/xprint/etc/init.d/Makefile.am
@@ -7,6 +7,6 @@ CLEANFILES = $(noinst_PRE) xprint.pre
CPP_FILES_FLAGS = -DProjectRoot='"$(PROJECTROOT)"' -DOS_LINUX
xprint.pre: xprint.cpp
- $(SED) -e 's/^\(\s\+\)#/\1XCOMM/' $< > $@
+ $(SED) -e 's/^\(\s\+\)#/\1XCOMM/' ${srcdir}/xprint.cpp > $@
EXTRA_DIST = xprint.cpp
diff-tree 90a9b82272446fdaebe71c966325fd7e670f75c6 (from 21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b)
Author: Matthew Allum <mallum at polystyrene.(none)>
Date: Sat Jul 8 21:57:07 2006 +0100
Fix crash in Xephyr when running on host X with keymap width < 4 ( i.e xvnc )
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index ae776a7..32a46dc 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -669,7 +669,7 @@ void
hostx_load_keymap(void)
{
KeySym *keymap;
- int mapWidth, min_keycode, max_keycode;
+ int host_width, min_keycode, max_keycode, width;
int i,j;
XDisplayKeycodes(HostX.dpy, &min_keycode, &max_keycode);
@@ -679,25 +679,21 @@ hostx_load_keymap(void)
keymap = XGetKeyboardMapping(HostX.dpy,
min_keycode,
max_keycode - min_keycode + 1,
- &mapWidth);
+ &host_width);
/* Try and copy the hosts keymap into our keymap to avoid loads
* of messing around.
*
* kdrive cannot can have more than 4 keysyms per keycode
- * so we only copy the first 4 ( xorg has 6 per keycode )
+ * so we only copy at most the first 4 ( xorg has 6 per keycode, XVNC 2 )
*/
+ width = (host_width > 4) ? 4 : host_width;
for (i=0; i<(max_keycode - min_keycode+1); i++)
- for (j=0; j<4; j++)
- kdKeymap[ (i*4)+j ] = keymap[ (i*mapWidth) + j ];
+ for (j=0; j<width; j++)
+ kdKeymap[ (i*width)+j ] = keymap[ (i*host_width) + j ];
- /* old way
- memcpy (kdKeymap, keymap,
- (max_keycode - min_keycode + 1)*mapWidth*sizeof(KeySym));
- */
-
- EPHYR_DBG("keymap width: %d", mapWidth);
+ EPHYR_DBG("keymap width, host:%d kdrive:%d", host_width, width);
/* all kdrive vars - see kkeymap.c */
@@ -705,7 +701,7 @@ hostx_load_keymap(void)
kdMaxScanCode = max_keycode;
kdMinKeyCode = min_keycode;
kdMaxKeyCode = max_keycode;
- kdKeymapWidth = (mapWidth > 4) ? 4 : mapWidth;
+ kdKeymapWidth = width;
XFree(keymap);
}
diff-tree 21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b (from parents)
Merge: e8056218944e873135c93039d1e9646d51364467 39b2f7b2182aedb1ab45415efb4c263012ace512
Author: Matthew Allum <mallum at polystyrene.(none)>
Date: Sat Jul 8 21:13:52 2006 +0100
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
diff-tree e8056218944e873135c93039d1e9646d51364467 (from 5416f90e9c939027005fc01fa3ce3df56919ae0d)
Author: Matthew Allum <mallum at polystyrene.(none)>
Date: Sat Jul 8 21:10:58 2006 +0100
Add support to Xephyr for simulating 8bit grayscale.
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index a9ea0eb..fbb16a4 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -40,6 +40,8 @@ extern DeviceIntPtr pKdKeyboard;
static int mouseState = 0;
+Bool EphyrWantGrayScale = 0;
+
Bool
ephyrInitialize (KdCardInfo *card, EphyrPriv *priv)
{
@@ -80,7 +82,10 @@ ephyrScreenInitialize (KdScreenInfo *scr
screen->width = width;
screen->height = height;
}
-
+
+ if (EphyrWantGrayScale)
+ screen->fb[0].depth = 8;
+
if (screen->fb[0].depth && screen->fb[0].depth != hostx_get_depth())
{
if (screen->fb[0].depth < hostx_get_depth()
@@ -98,12 +103,15 @@ ephyrScreenInitialize (KdScreenInfo *scr
if (screen->fb[0].depth <= 8)
{
- screen->fb[0].visuals = ((1 << StaticGray) |
- (1 << GrayScale) |
- (1 << StaticColor) |
- (1 << PseudoColor) |
- (1 << TrueColor) |
- (1 << DirectColor));
+ if (EphyrWantGrayScale)
+ screen->fb[0].visuals = ((1 << StaticGray) | (1 << GrayScale));
+ else
+ screen->fb[0].visuals = ((1 << StaticGray) |
+ (1 << GrayScale) |
+ (1 << StaticColor) |
+ (1 << PseudoColor) |
+ (1 << TrueColor) |
+ (1 << DirectColor));
screen->fb[0].redMask = 0x00;
screen->fb[0].greenMask = 0x00;
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 58478e6..1aa608e 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -29,6 +29,7 @@
#include "ephyr.h"
extern Window EphyrPreExistingHostWin;
+extern Bool EphyrWantGrayScale;
void
InitCard (char *name)
@@ -62,6 +63,7 @@ ddxUseMsg (void)
ErrorF("-parent XID Use existing window as Xephyr root win\n");
ErrorF("-host-cursor Re-use exisiting X host server cursor\n");
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
+ ErrorF("-grayscale Simulate 8bit grayscale\n");
ErrorF("-fakexa Simulate acceleration using software rendering\n");
ErrorF("\n");
@@ -94,6 +96,11 @@ ddxProcessArgument (int argc, char **arg
hostx_use_fullscreen();
return 1;
}
+ else if (!strcmp (argv[i], "-grayscale"))
+ {
+ EphyrWantGrayScale = 1;
+ return 1;
+ }
else if (!strcmp (argv[i], "-fakexa"))
{
ephyrFuncs.initAccel = ephyrDrawInit;
diff-tree 39b2f7b2182aedb1ab45415efb4c263012ace512 (from 63f13e01ee6e7df1753f2113f4cff9538596be0a)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Sat Jul 8 19:55:53 2006 +0200
Bug #3042: Use autoconf to get the correct name of a struct member.
This allows us to remove the kernel version ifdefs from the code, which
are ugly and broken.
diff --git a/configure.ac b/configure.ac
index 6d056fe..c8bdf38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1061,6 +1061,25 @@ dnl has it in libc), or if libdl is need
*)
;;
esac
+
+ # check whether struct kbd_repeat has the 'period' field.
+ # on kernels < 2.5.42 it's called 'rate' instead.
+ AC_TRY_COMPILE([
+#include <linux/kd.h>
+#ifdef __sparc__
+#include <asm/param.h>
+#include <asm/kbio.h>
+#endif
+],[
+int main () {
+ struct kbd_repeat k;
+ k.period = 0;
+ return 0;
+}],
+ [period_field="period"],
+ [period_field="rate"])
+ AC_DEFINE_UNQUOTED(LNX_KBD_PERIOD_NAME, [$period_field],
+ [Name of the period field in struct kbd_repeat])
;;
freebsd* | kfreebsd*-gnu)
XORG_OS="freebsd"
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 32f6601..eb8cd53 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -67,25 +67,6 @@ xf86GetKbdLeds()
return(leds);
}
-/* kbd rate stuff based on kbdrate.c from Rik Faith <faith at cs.unc.edu> et.al.
- * from util-linux-2.9t package */
-
-#include <linux/kd.h>
-#include <linux/version.h>
-#ifdef __sparc__
-#include <asm/param.h>
-#include <asm/kbio.h>
-#endif
-
-/* Deal with spurious kernel header change in struct kbd_repeat.
- We undo this define after the routine using that struct is over,
- so as not to interfere with other 'rate' elements. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# define rate period
-# endif
-#endif
-
static int
KDKBDREP_ioctl_ok(int rate, int delay) {
#if defined(KDKBDREP) && !defined(__sparc__)
@@ -94,18 +75,18 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
struct kbd_repeat kbdrep_s;
/* don't change, just test */
- kbdrep_s.rate = -1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = -1;
kbdrep_s.delay = -1;
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
}
/* do the change */
if (rate == 0) /* switch repeat off */
- kbdrep_s.rate = 0;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 0;
else
- kbdrep_s.rate = 10000 / rate; /* convert cps to msec */
- if (kbdrep_s.rate < 1)
- kbdrep_s.rate = 1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 10000 / rate; /* convert cps to msec */
+ if (kbdrep_s.LNX_KBD_PERIOD_NAME < 1)
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 1;
kbdrep_s.delay = delay;
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
@@ -120,15 +101,6 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
#endif /* KDKBDREP */
}
-#undef rate
-
-/* Undo the earlier define for the struct kbd_repeat problem. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# undef rate
-# endif
-#endif
-
static int
KIOCSRATE_ioctl_ok(int rate, int delay) {
#ifdef KIOCSRATE
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.c b/hw/xfree86/os-support/linux/lnx_kbd.c
index 504c527..2912f16 100644
--- a/hw/xfree86/os-support/linux/lnx_kbd.c
+++ b/hw/xfree86/os-support/linux/lnx_kbd.c
@@ -97,25 +97,6 @@ GetKbdLeds(InputInfoPtr pInfo)
return(leds);
}
-/* kbd rate stuff based on kbdrate.c from Rik Faith <faith at cs.unc.edu> et.al.
- * from util-linux-2.9t package */
-
-#include <linux/kd.h>
-#include <linux/version.h>
-#ifdef __sparc__
-#include <asm/param.h>
-#include <asm/kbio.h>
-#endif
-
-/* Deal with spurious kernel header change in struct kbd_repeat.
- We undo this define after the routine using that struct is over,
- so as not to interfere with other 'rate' elements. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# define rate period
-# endif
-#endif
-
static int
KDKBDREP_ioctl_ok(int rate, int delay) {
#if defined(KDKBDREP) && !defined(__sparc__)
@@ -124,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
struct kbd_repeat kbdrep_s;
/* don't change, just test */
- kbdrep_s.rate = -1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = -1;
kbdrep_s.delay = -1;
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
return 0;
@@ -132,11 +113,11 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
/* do the change */
if (rate == 0) /* switch repeat off */
- kbdrep_s.rate = 0;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 0;
else
- kbdrep_s.rate = 10000 / rate; /* convert cps to msec */
- if (kbdrep_s.rate < 1)
- kbdrep_s.rate = 1;
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 10000 / rate; /* convert cps to msec */
+ if (kbdrep_s.LNX_KBD_PERIOD_NAME < 1)
+ kbdrep_s.LNX_KBD_PERIOD_NAME = 1;
kbdrep_s.delay = delay;
if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1;
@@ -151,15 +132,6 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
#endif /* KDKBDREP */
}
-#undef rate
-
-/* Undo the earlier define for the struct kbd_repeat problem. */
-#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
-# undef rate
-# endif
-#endif
-
static int
KIOCSRATE_ioctl_ok(int rate, int delay) {
#ifdef KIOCSRATE
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index a5074f6..e43d1d1 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -106,4 +106,7 @@
/* Has backtrace support */
#undef HAVE_BACKTRACE
+/* Name of the period field in struct kbd_repeat */
+#undef LNX_KBD_PERIOD_NAME
+
#endif /* _XORG_CONFIG_H_ */
diff-tree 63f13e01ee6e7df1753f2113f4cff9538596be0a (from 5416f90e9c939027005fc01fa3ce3df56919ae0d)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Sat Jul 8 11:33:44 2006 +0200
Bug #7097: do case-insensitive comparison for some hotkeys.
xkb's strcasecmp implementation has been moved to the dix so it's now
safe to just use strcasecmp().
diff --git a/dix/Makefile.am b/dix/Makefile.am
index c9a19f7..414f125 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -29,7 +29,8 @@ libdix_la_SOURCES = \
swaprep.c \
swapreq.c \
tables.c \
- window.c
+ window.c \
+ strcasecmp.c
libxpstubs_la_SOURCES = \
xpstubs.c
diff --git a/dix/strcasecmp.c b/dix/strcasecmp.c
new file mode 100644
index 0000000..bf3f008
--- /dev/null
+++ b/dix/strcasecmp.c
@@ -0,0 +1,50 @@
+/* $Xorg: xkbmisc.c,v 1.4 2000/08/17 19:46:44 cpqbld Exp $ */
+/************************************************************
+ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.7 2003/07/16 02:31:10 dawes Exp $ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <ctype.h>
+#include "dix.h"
+
+#ifdef NEED_STRCASECMP
+int
+xstrcasecmp(char *str1,char *str2)
+{
+ const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
+
+ while (tolower(*us1) == tolower(*us2)) {
+ if (*us1++ == '\0')
+ return (0);
+ us2++;
+ }
+
+ return (tolower(*us1) - tolower(*us2));
+}
+#endif
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index d1b806a..9023a0c 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -95,6 +95,7 @@ libtype1_la_SOURCES = type1mod.c
libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
+libxorgxkb_la_LIBADD = $(top_builddir)/dix/libdix.la
libxtrap_la_LDFLAGS = -avoid-version
libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrap.la
diff --git a/hw/xfree86/dixmods/xkbPrivate.c b/hw/xfree86/dixmods/xkbPrivate.c
index 0479bca..b986432 100644
--- a/hw/xfree86/dixmods/xkbPrivate.c
+++ b/hw/xfree86/dixmods/xkbPrivate.c
@@ -26,13 +26,13 @@ XkbDDXPrivate(DeviceIntPtr dev,KeyCode k
if (xf86act->type == XkbSA_XFree86Private) {
memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
msgbuf[XkbAnyActionDataSize]= '\0';
- if (strcmp(msgbuf, "-vmode")==0)
+ if (strcasecmp(msgbuf, "-vmode")==0)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
- else if (strcmp(msgbuf, "+vmode")==0)
+ else if (strcasecmp(msgbuf, "+vmode")==0)
xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
- else if (strcmp(msgbuf, "ungrab")==0)
+ else if (strcasecmp(msgbuf, "ungrab")==0)
xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
- else if (strcmp(msgbuf, "clsgrb")==0)
+ else if (strcasecmp(msgbuf, "clsgrb")==0)
xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
else
xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
diff --git a/include/dix.h b/include/dix.h
index 0177721..84fc849 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -820,4 +820,10 @@ typedef struct {
SelectionCallbackKind kind;
} SelectionInfoRec;
+/* strcasecmp.c */
+#if NEED_STRCASECMP
+#define strcasecmp xstrcasecmp
+extern int xstrcasecmp(char *s1, char *s2);
+#endif
+
#endif /* DIX_H */
diff --git a/xkb/maprules.c b/xkb/maprules.c
index d4e9829..eff02ad 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -62,12 +62,6 @@
#define PR_DEBUG2(s,a,b)
#endif
-#ifdef NEED_STRCASECMP
-extern int _XkbStrCaseCmp(char *s1, char *s2);
-#else
-#define _XkbStrCaseCmp strcasecmp
-#endif
-
/***====================================================================***/
#define DFLT_LINE_SIZE 128
@@ -1092,20 +1086,20 @@ int len,headingtype,extra_ndx = 0;
for ( ; GetInputLine(file,&line,False); line.num_line= 0) {
if (line.line[0]=='!') {
tok = strtok(&(line.line[1]), " \t");
- if (_XkbStrCaseCmp(tok,"model") == 0)
+ if (strcasecmp(tok,"model") == 0)
headingtype = HEAD_MODEL;
- else if (_XkbStrCaseCmp(tok,"layout") == 0)
+ else if (strcasecmp(tok,"layout") == 0)
headingtype = HEAD_LAYOUT;
- else if (_XkbStrCaseCmp(tok,"variant") == 0)
+ else if (strcasecmp(tok,"variant") == 0)
headingtype = HEAD_VARIANT;
- else if (_XkbStrCaseCmp(tok,"option") == 0)
+ else if (strcasecmp(tok,"option") == 0)
headingtype = HEAD_OPTION;
else {
int i;
headingtype = HEAD_EXTRA;
extra_ndx= -1;
for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) {
- if (!_XkbStrCaseCmp(tok,rules->extra_names[i]))
+ if (!strcasecmp(tok,rules->extra_names[i]))
extra_ndx= i;
}
if (extra_ndx<0) {
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 3389ba8..3ed68c2 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -247,19 +247,3 @@ XkbNameMatchesPattern(char *name,char *p
/* if we get here, the pattern is exhausted (-:just like me:-) */
return (name[0]=='\0');
}
-
-#ifdef NEED_STRCASECMP
-_X_HIDDEN int
-_XkbStrCaseCmp(char *str1,char *str2)
-{
- const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
-
- while (tolower(*us1) == tolower(*us2)) {
- if (*us1++ == '\0')
- return (0);
- us2++;
- }
-
- return (tolower(*us1) - tolower(*us2));
-}
-#endif
diff-tree 5416f90e9c939027005fc01fa3ce3df56919ae0d (from b84374b2917a91a7732e780ffab6a29c807a3ecc)
Author: Kristian Høgsberg <krh at redhat.com>
Date: Thu Jul 6 21:22:34 2006 -0400
Implement GLX_MESA_copy_sub_buffer.
diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 3ec796c..e2aaf3a 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -1605,8 +1605,13 @@ int __glXReleaseTexImageEXT(__GLXclientS
int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ GLXContextTag tag = req->contextTag;
+ __GLXcontext *glxc = NULL;
+ __GLXdrawable *pGlxDraw;
+ __GLXpixmap *pPixmap;
ClientPtr client = cl->client;
GLXDrawable drawId;
+ int error;
int x, y, width, height;
(void) client;
@@ -1620,7 +1625,40 @@ int __glXCopySubBufferMESA(__GLXclientSt
width = *((INT32 *) (pc + 12));
height = *((INT32 *) (pc + 16));
- return BadRequest;
+ if (tag) {
+ glxc = __glXLookupContextByTag(cl, tag);
+ if (!glxc) {
+ return __glXError(GLXBadContextTag);
+ }
+ /*
+ ** The calling thread is swapping its current drawable. In this case,
+ ** glxSwapBuffers is in both GL and X streams, in terms of
+ ** sequentiality.
+ */
+ if (__glXForceCurrent(cl, tag, &error)) {
+ /*
+ ** Do whatever is needed to make sure that all preceding requests
+ ** in both streams are completed before the swap is executed.
+ */
+ CALL_Finish( GET_DISPATCH(), () );
+ __GLX_NOTE_FLUSHED_CMDS(glxc);
+ } else {
+ return error;
+ }
+ }
+
+ error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client);
+ if (error != Success)
+ return error;
+
+ if (pGlxDraw == NULL ||
+ pGlxDraw->type != DRAWABLE_WINDOW ||
+ pGlxDraw->copySubBuffer == NULL)
+ return __glXError(GLXBadDrawable);
+
+ (*pGlxDraw->copySubBuffer)(pGlxDraw, x, y, width, height);
+
+ return Success;
}
/*
diff --git a/GL/glx/glxdrawable.h b/GL/glx/glxdrawable.h
index 4514e26..e6d2cd6 100644
--- a/GL/glx/glxdrawable.h
+++ b/GL/glx/glxdrawable.h
@@ -58,6 +58,8 @@ struct __GLXdrawable {
void (*destroy)(__GLXdrawable *private);
GLboolean (*resize)(__GLXdrawable *private);
GLboolean (*swapBuffers)(__GLXdrawable *);
+ void (*copySubBuffer)(__GLXdrawable *drawable,
+ int x, int y, int w, int h);
/*
** list of drawable private structs
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 4239229..6a10554 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -112,12 +112,28 @@ struct __GLXDRIdrawable {
* months ago. :(
* 20050727 - Gut all the old interfaces. This breaks compatability with
* any DRI driver built to any previous version.
+ * 20060314 - Added support for GLX_MESA_copy_sub_buffer.
*/
+
#define INTERNAL_VERSION 20050727
static const char CREATE_NEW_SCREEN_FUNC[] =
"__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION);
+/* The DRI driver entry point version wasn't bumped when the
+ * copySubBuffer functionality was added to the DRI drivers, but the
+ * functionality is still conditional on the value of the
+ * internal_api_version passed to __driCreateNewScreen. However, the
+ * screen constructor doesn't fail for a DRI driver that's older than
+ * the passed in version number, so there's no way we can know for
+ * sure that we can actually use the copySubBuffer functionality. But
+ * since the earliest (and at this point only) released mesa version
+ * (6.5) that uses the 20050727 entry point does have copySubBuffer,
+ * we'll just settle for that. We still have to pass in a higher to
+ * the screen constructor to enable the functionality.
+ */
+#define COPY_SUB_BUFFER_INTERNAL_VERSION 20060314
+
static void
__glXDRIleaveServer(void)
{
@@ -178,6 +194,27 @@ __glXDRIdrawableSwapBuffers(__GLXdrawabl
}
static void
+__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
+ int x, int y, int w, int h)
+{
+ __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
+ __GLXDRIscreen *screen;
+
+ /* FIXME: We're jumping through hoops here to get the DRIdrawable
+ * which the dri driver tries to keep to it self... cf. FIXME in
+ * createDrawable. */
+
+ screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
+ private->driDrawable = (screen->driScreen.getDrawable)(NULL,
+ private->base.drawId,
+ screen->driScreen.private);
+
+ (*private->driDrawable->copySubBuffer)(NULL,
+ private->driDrawable->private,
+ x, y, w, h);
+}
+
+static void
__glXDRIcontextDestroy(__GLXcontext *baseContext)
{
__GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
@@ -474,10 +511,11 @@ __glXDRIscreenCreateDrawable(__GLXscreen
return NULL;
}
- private->base.destroy = __glXDRIdrawableDestroy;
- private->base.resize = __glXDRIdrawableResize;
- private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
-
+ private->base.destroy = __glXDRIdrawableDestroy;
+ private->base.resize = __glXDRIdrawableResize;
+ private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
+ private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
+
#if 0
/* FIXME: It would only be natural that we called
* driScreen->createNewDrawable here but the DRI drivers manage
@@ -770,7 +808,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__DRIframebuffer framebuffer;
int fd = -1;
int status;
- int api_ver = INTERNAL_VERSION;
+ int api_ver = COPY_SUB_BUFFER_INTERNAL_VERSION;
drm_magic_t magic;
drmVersionPtr version;
char *driverName;
diff-tree b84374b2917a91a7732e780ffab6a29c807a3ecc (from 2152e2d364bdd179cf218cde446c763d8c8bb833)
Author: Kristian Høgsberg <krh at redhat.com>
Date: Thu Jul 6 02:28:55 2006 -0400
Add GLX_MESA_copy_sub_buffer marshalling support.
diff --git a/GL/glx/g_disptab.h b/GL/glx/g_disptab.h
index 9be5bdf..a83c7a8 100644
--- a/GL/glx/g_disptab.h
+++ b/GL/glx/g_disptab.h
@@ -48,6 +48,7 @@ extern int __glXCopyContext(__GLXclientS
extern int __glXSwapBuffers(__GLXclientState*, GLbyte*);
extern int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
+extern int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc);
extern int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXUseXFont(__GLXclientState*, GLbyte*);
extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*);
@@ -85,6 +86,7 @@ extern int __glXSwapCopyContext(__GLXcli
extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*);
extern int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
+extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*);
extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*);
@@ -124,4 +126,11 @@ extern __GLXdispatchRenderProcPtr __glXR
extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE];
extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE];
+
+/* Copied from mesa src/glx/x11/glxcmds.c
+ *
+ * Apparently there's no standardized opcode for this extension.
+ */
+#define X_GLXvop_CopySubBufferMESA 5154 /* temporary */
+
#endif /* _GLX_g_disptab_h_ */
diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 8033f5d..3ec796c 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -1602,6 +1602,27 @@ int __glXReleaseTexImageEXT(__GLXclientS
pGlxPixmap);
}
+int __glXCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ ClientPtr client = cl->client;
+ GLXDrawable drawId;
+ int x, y, width, height;
+
+ (void) client;
+ (void) req;
+
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+
+ drawId = *((CARD32 *) (pc));
+ x = *((INT32 *) (pc + 4));
+ y = *((INT32 *) (pc + 8));
+ width = *((INT32 *) (pc + 12));
+ height = *((INT32 *) (pc + 16));
+
+ return BadRequest;
+}
+
/*
** Get drawable attributes
*/
@@ -2238,7 +2259,9 @@ int __glXVendorPrivate(__GLXclientState
case X_GLXvop_BindTexImageEXT:
return __glXBindTexImageEXT(cl, pc);
case X_GLXvop_ReleaseTexImageEXT:
- return __glXReleaseTexImageEXT(cl, pc);
+ return __glXReleaseTexImageEXT(cl, pc);
+ case X_GLXvop_CopySubBufferMESA:
+ return __glXCopySubBufferMESA(cl, pc);
}
#endif
diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c
index b8f958b..4ce53b7 100644
--- a/GL/glx/glxcmdsswap.c
+++ b/GL/glx/glxcmdsswap.c
@@ -494,6 +494,31 @@ int __glXSwapReleaseTexImageEXT(__GLXcli
return __glXReleaseTexImageEXT(cl, (GLbyte *)pc);
}
+int __glXSwapCopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ GLXDrawable *drawId;
+ int *buffer;
+
+ (void) drawId;
+ (void) buffer;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ pc += __GLX_VENDPRIV_HDR_SIZE;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+ __GLX_SWAP_INT(pc);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+
+ return __glXCopySubBufferMESA(cl, pc);
+
+}
+
int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc;
@@ -973,7 +998,9 @@ int __glXSwapVendorPrivate(__GLXclientSt
case X_GLXvop_BindTexImageEXT:
return __glXSwapBindTexImageEXT(cl, pc);
case X_GLXvop_ReleaseTexImageEXT:
- return __glXSwapReleaseTexImageEXT(cl, pc);
+ return __glXSwapReleaseTexImageEXT(cl, pc);
+ case X_GLXvop_CopySubBufferMESA:
+ return __glXSwapCopySubBufferMESA(cl, pc);
}
#endif
diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c
index 77654d3..3809af3 100644
--- a/GL/glx/glxscreens.c
+++ b/GL/glx/glxscreens.c
@@ -139,6 +139,7 @@ static char GLXServerExtensions[] =
"GLX_SGIX_swap_barrier "
#endif
"GLX_SGIX_fbconfig "
+ "GLX_MESA_copy_sub_buffer "
;
__GLXscreen **__glXActiveScreens;
diff-tree 2152e2d364bdd179cf218cde446c763d8c8bb833 (from 233c004641483a75985e09fea5416ab2c7a97fc4)
Author: Ed Catmur <ed at catmur.co.uk>
Date: Thu Jul 6 17:45:36 2006 -0700
Remove hardcoded 'lib' in XPRINTDIR.
diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am
index 46647a5..de0a1d9 100644
--- a/hw/xprint/Makefile.am
+++ b/hw/xprint/Makefile.am
@@ -4,7 +4,7 @@ bin_PROGRAMS = Xprt
Xprt_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
-DXPRINT -DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_ \
- -DXPRINTDIR=\"$(prefix)/X11/xserver\" \
+ -DXPRINTDIR=\"$(libdir)/X11/xserver\" \
-DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX
Xprt_LDFLAGS = -L$(top_srcdir)
diff-tree 233c004641483a75985e09fea5416ab2c7a97fc4 (from b3e4d1d1f4bcf900146d7b8cd19e008209294663)
Author: Ed Catmur <ed at catmur.co.uk>
Date: Thu Jul 6 17:41:53 2006 -0700
Generate xprint.pre from xprint.cpp.
diff --git a/hw/xprint/etc/init.d/Makefile.am b/hw/xprint/etc/init.d/Makefile.am
index cc03cfa..dfe8012 100644
--- a/hw/xprint/etc/init.d/Makefile.am
+++ b/hw/xprint/etc/init.d/Makefile.am
@@ -1 +1,12 @@
+include $(top_srcdir)/cpprules.in
+
+noinst_PRE = xprint
+BUILT_SOURCES = $(noinst_PRE)
+CLEANFILES = $(noinst_PRE) xprint.pre
+
+CPP_FILES_FLAGS = -DProjectRoot='"$(PROJECTROOT)"' -DOS_LINUX
+
+xprint.pre: xprint.cpp
+ $(SED) -e 's/^\(\s\+\)#/\1XCOMM/' $< > $@
+
EXTRA_DIST = xprint.cpp
diff-tree b3e4d1d1f4bcf900146d7b8cd19e008209294663 (from f847f3c0a956c0aec8ade8e32f770daae147f40b)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Thu Jul 6 18:51:29 2006 -0400
PPC64 build fix.
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 39c8b8c..001bbf2 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1079,7 +1079,10 @@ xf86WriteMmio32Be(__volatile__ void *bas
extern volatile unsigned char *ioBase;
#if defined(linux) && defined(__powerpc64__)
-# include <asm/memory.h>
+# include <linux/version.h>
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+# include <asm/memory.h>
+# endif
#endif /* defined(linux) && defined(__powerpc64__) */
#ifndef eieio /* We deal with arch-specific eieio() routines above... */
# define eieio() __asm__ __volatile__ ("eieio" ::: "memory")
diff-tree f847f3c0a956c0aec8ade8e32f770daae147f40b (from 27ffd7e03c05dd2083a10e5acebd2b385d729eeb)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Thu Jul 6 15:33:31 2006 -0700
xorgcfg now needs libxkbui version 1.0.2 or better.
Old versions of libxkbui use XkbStrCaseCmp which doesn't exist any longer;
the server fails to link with that version of the libkbui library, so
require the current version (1.0.2).
diff --git a/configure.ac b/configure.ac
index fae6d7b..6d056fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1536,7 +1536,7 @@ AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([-
[XORGCFG=$enableval],[XORGCFG=yes])
if test x$XORGCFG = xyes ; then
PKG_CHECK_MODULES([XORGCFG_DEP],
- [xkbui xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
+ [xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
AC_CHECK_LIB([curses],[waddstr],
[XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes],
AC_CHECK_LIB([ncurses],[waddstr],
diff-tree 27ffd7e03c05dd2083a10e5acebd2b385d729eeb (from d7a96dd6f18e54c26fc5881772d033ac078db3a1)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Thu Jul 6 14:43:10 2006 -0700
GL proto version 1.4.7 needed for texture-from-pixmap defines.
GLX_TEXTURE_TARGET_EXT and GLX_TEXTURE_RECTANGLE_EXT are defined as a part
of the new texture from pixmap GL extension in gl proto version 1.4.7 and
are now used by the X server code.
diff --git a/configure.ac b/configure.ac
index 55f002e..fae6d7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -572,7 +572,7 @@ fi
if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
PKG_CHECK_MODULES([XLIB], [x11])
- PKG_CHECK_MODULES([GL], [glproto >= 1.4.6])
+ PKG_CHECK_MODULES([GL], [glproto >= 1.4.7])
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la'
diff-tree d7a96dd6f18e54c26fc5881772d033ac078db3a1 (from 8d07ee070ecf0d403d9d27c80764d343b80af6f0)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Thu Jul 6 17:39:14 2006 -0400
Switch the default mouse device on Linux to /dev/input/mice.
diff --git a/hw/xfree86/os-support/linux/lnx_mouse.c b/hw/xfree86/os-support/linux/lnx_mouse.c
index afd2160..ae4bddd 100644
--- a/hw/xfree86/os-support/linux/lnx_mouse.c
+++ b/hw/xfree86/os-support/linux/lnx_mouse.c
@@ -29,7 +29,7 @@ DefaultProtocol(void)
return "Auto";
}
-#define DEFAULT_MOUSE_DEV "/dev/mouse"
+#define DEFAULT_MOUSE_DEV "/dev/input/mice"
#define DEFAULT_PS2_DEV "/dev/psaux"
#define DEFAULT_GPM_DATA_DEV "/dev/gpmdata"
#define DEFAULT_GPM_CTL_DEV "/dev/gpmdata"
More information about the xorg-commit
mailing list