Commit 84683f19 authored by Daniel Stone's avatar Daniel Stone Committed by Daniel Stone

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.
parent 88195381
......@@ -13,9 +13,7 @@ AM_CFLAGS = \
@DRIPROTO_CFLAGS@ \
-I@MESA_SOURCE@/src/mesa/glapi \
-I@MESA_SOURCE@/src/mesa/main \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
-DNO_LIBCWRAPPER \
@GLX_DEFINES@
......
......@@ -20,9 +20,7 @@ INCLUDES = -I@MESA_SOURCE@/include \
# symbol means "being built in the server"
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@ \
-DXFree86Server
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libac.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libglapi.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmain.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmath.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -4,9 +4,7 @@ noinst_LTLIBRARIES = libshader.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libgrammar.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libslang.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libswrast.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libss.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
......@@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libtnl.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
......
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
......@@ -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
......
noinst_LTLIBRARIES = libXi.la
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(DIX_CFLAGS)
libXi_la_SOURCES = \
allowev.c \
......
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
......
......@@ -9,7 +9,7 @@ libcfb_la_SOURCES = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c \
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
......
......@@ -6,4 +6,4 @@ libcfb32_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
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)
noinst_LTLIBRARIES = libcomposite.la
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(DIX_CFLAGS)
libcomposite_la_SOURCES = \
compalloc.c \
......
......@@ -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$BUILD_KBD_MODE = xyes])
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])
......
noinst_LTLIBRARIES = libdamageext.la
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(DIX_CFLAGS)
libdamageext_la_SOURCES = \
damageext.c \
......
noinst_LTLIBRARIES = libdbe.la
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(DIX_CFLAGS)
if XORG
sdk_HEADERS = dbestruct.h
......
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@"
......
......@@ -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"
......
......@@ -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"
......
......@@ -3019,9 +3019,6 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count
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, register DeviceIntPtr mouse, int count
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)
......
......@@ -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 \
......
......@@ -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
......
......@@ -28,9 +28,6 @@
#endif
#include <string.h>
#ifdef XFree86LOADER
#include "xf86.h"
#endif
#include "fb.h"
......
......@@ -35,13 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
#else
#include <sys/time.h>
#include <unistd.h>
#endif
#define NEED_REPLIES
#define NEED_EVENTS
......
......@@ -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) \
......
......@@ -27,7 +27,7 @@ endif
AM_YFLAGS = -d
AM_CFLAGS = \
@SERVER_DEFINES@ \
\
-I$(top_srcdir)/hw/dmx \
$(GLX_INCS) \
-DHAVE_DMX_CONFIG_H \
......
......@@ -93,6 +93,5 @@
#undef DAMAGE
#undef COMPOSITE
#undef FONTCACHE
#undef XFree86LOADER
#endif /* DMX_CONFIG_H */
......@@ -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 \
......
......@@ -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>
......
......@@ -60,7 +60,7 @@ GLX_DEFS = @GL_CFLAGS@
GLX_INCS = -I@MESA_SOURCE@/include
endif
AM_CFLAGS = @SERVER_DEFINES@ \
AM_CFLAGS = \
-I$(top_srcdir)/hw/dmx \
-I$(top_srcdir)/hw/xfree86/common \
$(GLX_INCS) \
......
......@@ -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
......
......@@ -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
......
......@@ -103,4 +103,4 @@ if LNXACPI
XORG_CFLAGS += -DHAVE_ACPI
endif
AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(XORG_CFLAGS)
......@@ -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>
......
......@@ -354,10 +354,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
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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))
......
......@@ -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;