summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/Makefile.am2
-rw-r--r--hw/xfree86/common/Makefile.am2
-rw-r--r--hw/xfree86/common/compiler.h16
-rw-r--r--hw/xfree86/common/xf86.h2
-rw-r--r--hw/xfree86/common/xf86Config.c36
-rw-r--r--hw/xfree86/common/xf86Configure.c10
-rw-r--r--hw/xfree86/common/xf86DGA.c4
-rw-r--r--hw/xfree86/common/xf86DoProbe.c4
-rw-r--r--hw/xfree86/common/xf86DoScanPci.c3
-rw-r--r--hw/xfree86/common/xf86Globals.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c46
-rw-r--r--hw/xfree86/common/xf86InPriv.h4
-rw-r--r--hw/xfree86/common/xf86Init.c21
-rw-r--r--hw/xfree86/common/xf86Io.c29
-rw-r--r--hw/xfree86/common/xf86MiscExt.c6
-rw-r--r--hw/xfree86/common/xf86Priv.h4
-rw-r--r--hw/xfree86/common/xf86str.h2
-rw-r--r--hw/xfree86/common/xf86xv.c9
-rw-r--r--hw/xfree86/common/xf86xvmc.c6
-rw-r--r--hw/xfree86/ddc/Makefile.am2
-rw-r--r--hw/xfree86/ddc/xf86DDC.c2
-rw-r--r--hw/xfree86/dixmods/Makefile.am4
-rw-r--r--hw/xfree86/dixmods/extmod/Makefile.am2
-rw-r--r--hw/xfree86/doc/sgml/DESIGN.sgml7
-rw-r--r--hw/xfree86/dri/Makefile.am6
-rw-r--r--hw/xfree86/dri/dri.c8
-rw-r--r--hw/xfree86/dummylib/Makefile.am2
-rw-r--r--hw/xfree86/exa/Makefile.am2
-rw-r--r--hw/xfree86/fbdevhw/Makefile.am2
-rw-r--r--hw/xfree86/i2c/Makefile.am2
-rw-r--r--hw/xfree86/i2c/bt829.h18
-rw-r--r--hw/xfree86/i2c/fi1236.h13
-rw-r--r--hw/xfree86/i2c/i2c_def.h15
-rw-r--r--hw/xfree86/i2c/msp3430.h12
-rw-r--r--hw/xfree86/i2c/tda8425.h11
-rw-r--r--hw/xfree86/i2c/tda9850.h13
-rw-r--r--hw/xfree86/i2c/tda9885.h12
-rw-r--r--hw/xfree86/i2c/uda1380.h15
-rw-r--r--hw/xfree86/int10/Makefile.am22
-rw-r--r--hw/xfree86/int10/generic.c108
-rw-r--r--hw/xfree86/int10/helper_exec.c8
-rw-r--r--hw/xfree86/int10/helper_mem.c147
-rw-r--r--hw/xfree86/int10/xf86int10.h15
-rw-r--r--hw/xfree86/loader/Makefile.am2
-rw-r--r--hw/xfree86/os-support/bsd/Makefile.am2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_jstk.c4
-rw-r--r--hw/xfree86/os-support/bus/Makefile.am2
-rw-r--r--hw/xfree86/os-support/drm/Makefile.am5
-rw-r--r--hw/xfree86/os-support/drm/xf86drm.c48
-rw-r--r--hw/xfree86/os-support/drm/xf86drmHash.c4
-rw-r--r--hw/xfree86/os-support/drm/xf86drmRandom.c4
-rw-r--r--hw/xfree86/os-support/drm/xf86drmSL.c7
-rw-r--r--hw/xfree86/os-support/linux/Makefile.am2
-rw-r--r--hw/xfree86/os-support/linux/int10/linux.c126
-rw-r--r--hw/xfree86/os-support/linux/lnx_acpi.c18
-rw-r--r--hw/xfree86/os-support/linux/lnx_jstk.c4
-rw-r--r--hw/xfree86/os-support/misc/Makefile.am2
-rw-r--r--hw/xfree86/os-support/shared/sigio.c26
-rw-r--r--hw/xfree86/os-support/shared/sigiostubs.c10
-rw-r--r--hw/xfree86/os-support/solaris/Makefile.am2
-rw-r--r--hw/xfree86/os-support/xf86_OSproc.h2
-rw-r--r--hw/xfree86/os-support/xf86_ansic.h52
-rw-r--r--hw/xfree86/os-support/xf86_libc.h11
-rw-r--r--hw/xfree86/rac/Makefile.am2
-rw-r--r--hw/xfree86/ramdac/Makefile.am2
-rw-r--r--hw/xfree86/scanpci/Makefile.am2
-rw-r--r--hw/xfree86/shadowfb/Makefile.am2
-rw-r--r--hw/xfree86/utils/xorgcfg/Makefile.am2
-rw-r--r--hw/xfree86/utils/xorgcfg/loader.h3
-rw-r--r--hw/xfree86/utils/xorgconfig/Makefile.am2
-rw-r--r--hw/xfree86/vbe/Makefile.am2
-rw-r--r--hw/xfree86/vgahw/Makefile.am2
-rw-r--r--hw/xfree86/xaa/Makefile.am2
-rw-r--r--hw/xfree86/xf1bpp/Makefile.am3
-rw-r--r--hw/xfree86/xf4bpp/Makefile.am2
-rw-r--r--hw/xfree86/xf8_16bpp/Makefile.am2
-rw-r--r--hw/xfree86/xf8_32bpp/Makefile.am2
77 files changed, 268 insertions, 751 deletions
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 80202a154..be0af3542 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -16,7 +16,7 @@ DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
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 37cb9d174..7855be3a6 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 001bbf2b3..754ad7c77 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1605,17 +1605,13 @@ extern void outl(unsigned int a, unsigned int l);
# 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 941b36b02..fc7e7a7f2 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -347,10 +347,8 @@ int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
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 bcad246f5..b932908d7 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 * drivernames)
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 907e94bcd..aee4507a0 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -39,9 +39,7 @@
#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"
@@ -605,7 +603,6 @@ configureFlagsSection (void)
static XF86ConfModulePtr
configureModuleSection (void)
{
-#ifdef XFree86LOADER
char **elist, **el;
/* Find the list of extension modules. */
const char *esubdirs[] = {
@@ -616,10 +613,8 @@ configureModuleSection (void)
"fonts",
NULL
};
-#endif
parsePrologue (XF86ConfModulePtr, XF86ConfModuleRec)
-#ifdef XFree86LOADER
elist = LoaderListDirs(esubdirs, NULL);
if (elist) {
for (el = elist; *el; el++) {
@@ -656,7 +651,6 @@ configureModuleSection (void)
}
xfree(elist);
}
-#endif
return ptr;
}
@@ -666,10 +660,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)
@@ -791,10 +783,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 88324eb19..53186ea3b 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 e76fd91d0..e4de9ffc3 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 f08af2bb3..8e411832f 100644
--- a/hw/xfree86/common/xf86DoScanPci.c
+++ b/hw/xfree86/common/xf86DoScanPci.c
@@ -41,9 +41,6 @@
#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 --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index b3b5c1b29..1e0ac7996 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 200d8fbff..4397309b8 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -73,7 +73,6 @@
static int xf86ScrnInfoPrivateCount = 0;
-#ifdef XFree86LOADER
/* Add a pointer to a new DriverRec to xf86DriverList */
_X_EXPORT void
@@ -175,7 +174,6 @@ xf86DeleteModuleInfo(int idx)
xf86ModuleInfoList[idx] = NULL;
}
}
-#endif
/* Allocate a new ScrnInfoRec in xf86Screens */
@@ -202,11 +200,7 @@ xf86AllocateScreen(DriverPtr drv, int flags)
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?
@@ -263,10 +257,8 @@ xf86DeleteScreen(int scrnIndex, int flags)
xf86OptionListFree(pScrn->options);
-#ifdef XFree86LOADER
if (pScrn->module)
UnloadModule(pScrn->module);
-#endif
if (pScrn->drv)
pScrn->drv->refCount--;
@@ -324,11 +316,7 @@ xf86AllocateInput(InputDriverPtr drv, int flags)
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;
@@ -355,10 +343,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
pInp->free(pInp, 0);
#endif
-#ifdef XFree86LOADER
if (pInp->module)
UnloadModule(pInp->module);
-#endif
if (pInp->drv)
pInp->drv->refCount--;
@@ -2386,17 +2372,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;
@@ -2405,15 +2386,11 @@ xf86LoadDrvSubModule(DriverPtr drv, const char *name)
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;
@@ -2422,9 +2399,6 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
if (!ret)
LoaderErrorMsg(pScrn->name, name, errmaj, errmin);
return ret;
-#else
- return (pointer)1;
-#endif
}
/*
@@ -2433,9 +2407,7 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
_X_EXPORT pointer
xf86LoadOneModule(char *name, pointer opt)
{
-#ifdef XFree86LOADER
int errmaj, errmin;
-#endif
char *Name;
pointer mod;
@@ -2457,13 +2429,9 @@ xf86LoadOneModule(char *name, pointer opt)
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;
}
@@ -2475,7 +2443,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
}
@@ -2483,59 +2451,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 4a02606d3..a14e9e7bb 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 3f456a13b..51f091bd0 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
@@ -505,10 +503,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
{
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;
@@ -566,7 +562,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
if (!autoconfig)
PostConfigInit();
-#ifdef XFree86LOADER
/* Initialise the loader */
LoaderInit();
@@ -605,7 +600,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
LoaderFreeDirList(list);
}
#endif
-#endif
xf86OpenConsole();
@@ -629,7 +623,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/* Initialise the resource broker */
xf86ResourceBrokerInit();
-#ifdef XFree86LOADER
/* Load all modules specified explicitly in the config file */
if ((modulelist = xf86ModulelistFromConfig(&optionlist))) {
xf86LoadModules(modulelist, optionlist);
@@ -660,7 +653,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
* 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
@@ -892,12 +884,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
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.
@@ -1202,12 +1192,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
#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();
@@ -1387,9 +1375,7 @@ OsVendorInit()
signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */
#endif
OsDelayInitColors = TRUE;
-#ifdef XFree86LOADER
loadableFonts = TRUE;
-#endif
if (!beenHere)
xf86LogInit();
@@ -1681,9 +1667,7 @@ ddxProcessArgument(int argc, char **argv, int i)
}
if (!strcmp(argv[i],"-ignoreABI"))
{
-#ifdef XFree86LOADER
LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL);
-#endif
return 1;
}
if (!strcmp(argv[i],"-verbose"))
@@ -2090,9 +2074,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
@@ -2139,7 +2121,6 @@ xf86RunVtInit(void)
}
}
-#ifdef XFree86LOADER
/*
* xf86LoadModules iterates over a list that is being passed in.
*/
@@ -2182,8 +2163,6 @@ xf86LoadModules(char **list, pointer *optlist)
return !failed;
}
-#endif
-
/* Pixmap format stuff */
_X_EXPORT PixmapFormatPtr
diff --git a/hw/xfree86/common/xf86Io.c b/hw/xfree86/common/xf86Io.c
index 4dbbd7e93..318b24584 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/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index 80fbf417d..bdb02cef0 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -459,12 +459,10 @@ MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd)
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, MiscExtStructType mse_or_kbd)
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 f40a217f5..6d7f4cffe 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -97,13 +97,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/xf86str.h b/hw/xfree86/common/xf86str.h
index 43fa85416..60d9c66ef 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -328,7 +328,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
@@ -342,7 +341,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 ede2e064e..a7cbd0e26 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 40c82c75d..7dc4e9dfc 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 0f563869a..7cfff4763 100644
--- a/hw/xfree86/ddc/Makefile.am
+++ b/hw/xfree86/ddc/Makefile.am
@@ -8,6 +8,6 @@ libddc_la_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \
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 8822bacc1..564e72e3c 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 9023a0cb0..65dad8a86 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 0b1245dd7..229d4e592 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 84e4fad21..5beff653f 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 = { &amp;zzzVersRec, zzzSetup, NULL };
@@ -6540,7 +6536,6 @@ zzzSetup(pointer module, pointer opts, int *errmaj, int *errmin)
return NULL;
}
}
-#endif
</code>
<sect2>GetRec, FreeRec
diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index 6de88e2bb..e711846b2 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -7,9 +7,9 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
-I$(top_builddir)/GL/include \
-I@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 cbd4e60e9..c0dab15bd 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 THE SOFTWARE.
#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, DRIInfoPtr pDRIInfo, int *pDRMFD)
* 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, DRIInfoPtr pDRIInfo, int *pDRMFD)
return FALSE;
}
}
-#endif
drmWasAvailable = drmAvailable();
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index ab62a6b54..bd69b570a 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -6,7 +6,7 @@ noinst_LIBRARIES = libdummy.a libdummy-nonserver.a
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 7f0a20e4c..1a2831c10 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 9d79fa7f5..10de50e83 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 6e36f0cc8..cbf4f6571 100644
--- a/hw/xfree86/i2c/Makefile.am
+++ b/hw/xfree86/i2c/Makefile.am
@@ -15,7 +15,7 @@ libi2c_la_SOURCES = xf86i2c.c xf86i2cmodule.c
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 2c7c00d34..bca9d37de 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 7c1d07024..eda1c781c 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 84b9c5d91..6e119e478 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 8726bacf5..1cb9b869d 100644
--- a/hw/xfree86/i2c/msp3430.h
+++ b/hw/xfree86/i2c/msp3430.h
@@ -105,22 +105,10 @@ void MSP3430SetSAP (MSP3430Ptr m, int mode);
"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 ec1908ba9..4abb4175f 100644
--- a/hw/xfree86/i2c/tda8425.h
+++ b/hw/xfree86/i2c/tda8425.h
@@ -34,20 +34,9 @@ void tda8425_mute(TDA8425Ptr t, Bool mute);
"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 2c8ddcc6e..d5dec36fe 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 a63b34764..46ae9fc0d 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 acf96c556..95ad92b92 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 f606f5e12..c059070ec 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -2,19 +2,22 @@ module_LTLIBRARIES = libint10.la
sdk_HEADERS = xf86int10.h
-EXTRA_CFLAGS = @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
+EXTRA_CFLAGS =
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 --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 512277122..281e702ab 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -64,12 +64,6 @@ static void UnmapVRam(xf86Int10InfoPtr pInt);
static void *sysMem = NULL;
xf86Int10InfoPtr
-xf86InitInt10(int entityIndex)
-{
- return xf86ExtendedInitInt10(entityIndex, 0);
-}
-
-xf86Int10InfoPtr
xf86ExtendedInitInt10(int entityIndex, int Flags)
{
xf86Int10InfoPtr pInt;
@@ -149,59 +143,12 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
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))
@@ -209,54 +156,33 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
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_exec.c b/hw/xfree86/int10/helper_exec.c
index 2d730fa03..1c48c3166 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -594,7 +594,7 @@ pciCfg1outb(CARD16 addr, CARD8 val)
}
CARD8
-bios_checksum(CARD8 *start, int size)
+bios_checksum(const CARD8 *start, int size)
{
CARD8 sum = 0;
@@ -703,3 +703,9 @@ xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save)
xf86UnMapVidMem(pInt->scrnIndex,base - BIOS_SCRATCH_OFF ,pagesize);
}
#endif
+
+xf86Int10InfoPtr
+xf86InitInt10(int entityIndex)
+{
+ return xf86ExtendedInitInt10(entityIndex, 0);
+}
diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 65ffe3df5..b84571302 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -224,7 +224,7 @@ xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex)
}
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 codeSeg, unsigned char* vbiosMem)
}
Bool
-initPrimary(void* options)
+initPrimary(const void* options)
{
Bool initPrimary = FALSE;
@@ -281,39 +281,33 @@ initPrimary(void* options)
* be used with extreme care.
*/
void
-xf86int10ParseBiosLocation(void* options,
+xf86int10ParseBiosLocation(const 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,8 +326,107 @@ xf86int10ParseBiosLocation(void* options,
default:
break;
}
- xfree(s);
}
+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 9e137df41..47f965d74 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,11 +182,16 @@ 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);
+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/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index 0cda5c159..357af77b6 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \
-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 ae89a6bf6..20885e866 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 bc99f2914..895d64e15 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 *y, int *buttons)
return 1;
}
-#ifdef XFree86LOADER
/*
* Entry point for XFree86 Loader
*/
@@ -184,5 +181,4 @@ bsd_jstkModuleInit(pointer *data, INT32 *magic)
*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 308a01b31..c56f3d717 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_SOURCES) $(PLATFORM_PCI_SOURCES) \
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 8270f4304..53893251a 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/xfree86/common \
-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 a4663048b..f3d774521 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 minor)
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 minor)
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 minor)
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 *name)
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 *name)
*/
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 *busid)
return -1;
}
}
-#endif
if (busid) {
int fd;
@@ -2259,7 +2227,6 @@ int drmCommandWriteRead(int fd, unsigned long drmCommandIndex,
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 a2567080a..ae967b22f 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 cc40dccad..e3e94a2af 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 23283a950..e94825009 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 d492f962e..6fdc1bc42 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_video.c lnx_io.c lnx_kbd.c lnx_mouse.c \
$(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 a91137810..9f6d07ee6 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)
@@ -79,16 +73,9 @@ static Int10LinuxSubModuleState int10LinuxLoadSubModule(ScrnInfoPtr pScrn);
#endif /* DoSubModules */
xf86Int10InfoPtr
-xf86InitInt10(int entityIndex)
-{
- return xf86ExtendedInitInt10(entityIndex, 0);
-}
-
-xf86Int10InfoPtr
xf86ExtendedInitInt10(int entityIndex, int Flags)
{
xf86Int10InfoPtr pInt = NULL;
- CARD8 *bios_base;
int screen;
int fd;
static void* vidMem = NULL;
@@ -270,52 +257,15 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
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);
@@ -324,41 +274,17 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
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;
@@ -367,38 +293,14 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
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 --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c
index 6712c090f..eca76dbf3 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 *events, int num)
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 --git a/hw/xfree86/os-support/linux/lnx_jstk.c b/hw/xfree86/os-support/linux/lnx_jstk.c
index 667586359..36a81e490 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_jstk.c,v 1.1 1995/12/20 14:06:09 lepied Ex
#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 *y, int *buttons)
return 1;
}
-#ifdef XFree86LOADER
/*
* Entry point for XFree86 Loader
*/
@@ -182,6 +179,5 @@ linux_jstkModuleInit(pointer *data, INT32 *magic)
*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 5ce23a1f1..f546e1a92 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 $(ARCH_SOURCES)
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 ecdc1cdd7..8d47805fe 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)(int, void *), void *closure)
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 eb5e2db2c..db54e53d3 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 63b8e9a90..6b29b3080 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_INOUT_SRC)
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 83ce9ed2b..7922fde4e 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 fd, void (*f)(int, void *), void *);
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 25dabfe89..31c0cac99 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, int val);
(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 5a6056ba9..75b622529 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 0e7cc72b5..328ed197d 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 136bc7c57..c9afdad60 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 xf86CursorPriv.h xf86RamDacPriv.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 d473833ed..7e5671aa1 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 c373e8178..cb5ebb14a 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 0705eb5bb..73e4042ae 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)/hw/xfree86/parser
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 92ca70485..847dbae70 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 ec0b01fe1..dabfc3214 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 7da8f124b..02fdb4837 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_module.c
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 6c7fe1b28..2aa27fa41 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 39f0155a6..23b7e16b1 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -68,4 +68,4 @@ EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
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 b8e4c3d53..e7c873ae8 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 56b690f4b..7a9dc3a9c 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 6538d1fab..5b30f45ed 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 1212fc0de..3050b81d1 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