Index: xc/programs/Xserver/Xprint/Init.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v retrieving revision 1.1.4.2.6.1.6.1 diff -u -r1.1.4.2.6.1.6.1 Init.c --- a/xc/programs/Xserver/Xprint/Init.c 13 Apr 2004 03:16:44 -0000 1.1.4.2.6.1.6.1 +++ b/xc/programs/Xserver/Xprint/Init.c 17 Apr 2004 05:10:35 -0000 @@ -288,6 +288,20 @@ static char *origFontPath = (char *)NULL; /* + * This function is responsible for doing initalisation of any global + * variables at an very early point of server startup (even before + * |ProcessCommandLine()|. + */ +void XprintInitGlobals(void) +{ + /* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX + * (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467 + * ("Xfree86's "smart scheduler" breaks Xprt") */ + SmartScheduleDisable = TRUE; + ErrorF("XprintInitGlobals called.\n"); +} + +/* * XprintUseMsg() prints usage for the Xprint-specific options */ void XprintUseMsg() Index: xc/programs/Xserver/Xprint/ddxInit.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ddxInit.c,v retrieving revision 1.1.4.2.6.1.6.1 diff -u -r1.1.4.2.6.1.6.1 ddxInit.c --- a/xc/programs/Xserver/Xprint/ddxInit.c 13 Apr 2004 03:16:44 -0000 1.1.4.2.6.1.6.1 +++ b/xc/programs/Xserver/Xprint/ddxInit.c 17 Apr 2004 05:10:35 -0000 @@ -229,6 +229,12 @@ } #endif +/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ +void ddxInitGlobals(void) +{ + XprintInitGlobals(); +} + /**************************************** * ddxUseMsg() * Index: xc/programs/Xserver/dix/dispatch.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/dispatch.c,v retrieving revision 1.1.4.4.2.3.6.1 diff -u -r1.1.4.4.2.3.6.1 dispatch.c --- a/xc/programs/Xserver/dix/dispatch.c 17 Apr 2004 02:34:47 -0000 1.1.4.4.2.3.6.1 +++ b/xc/programs/Xserver/dix/dispatch.c 17 Apr 2004 05:10:37 -0000 @@ -253,14 +253,7 @@ #define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */ #define SMART_SCHEDULE_MAX_SLICE 200 /* ms */ -#ifdef XPRINT -/* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX - * (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467 - * ("Xfree86's "smart scheduler" breaks Xprt") */ -Bool SmartScheduleDisable = TRUE; -#else Bool SmartScheduleDisable = FALSE; -#endif /* XPRINT */ long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; Index: xc/programs/Xserver/dix/main.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/dix/main.c,v retrieving revision 1.1.4.5.2.4 diff -u -r1.1.4.5.2.4 main.c --- a/xc/programs/Xserver/dix/main.c 8 Mar 2004 00:36:56 -0000 1.1.4.5.2.4 +++ b/xc/programs/Xserver/dix/main.c 17 Apr 2004 05:10:38 -0000 @@ -251,6 +251,8 @@ display = "0"; + InitGlobals(); + /* Quartz support on Mac OS X requires that the Cocoa event loop be in * the main thread. This allows the X server main to be called again * from another thread. */ Index: xc/programs/Xserver/include/os.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/include/os.h,v retrieving revision 1.1.4.3.6.2 diff -u -r1.1.4.3.6.2 os.h --- a/xc/programs/Xserver/include/os.h 17 Mar 2004 17:39:36 -0000 1.1.4.3.6.2 +++ b/xc/programs/Xserver/include/os.h 17 Apr 2004 05:10:40 -0000 @@ -231,6 +231,8 @@ extern void UseMsg(void); +extern void InitGlobals(void); + extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]); extern int set_font_authorizations( @@ -412,6 +414,8 @@ extern void ExpandCommandLine(int * /*pargc*/, char *** /*pargv*/); #endif +extern void ddxInitGlobals(void); + extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/); extern void ddxUseMsg(void); Index: xc/programs/Xserver/os/utils.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/utils.c,v retrieving revision 1.1.4.6.2.4.6.2 diff -u -r1.1.4.6.2.4.6.2 utils.c --- a/xc/programs/Xserver/os/utils.c 12 Apr 2004 12:21:07 -0000 1.1.4.6.2.4.6.2 +++ b/xc/programs/Xserver/os/utils.c 17 Apr 2004 05:10:41 -0000 @@ -576,6 +576,17 @@ } /* + * This function is responsible for doing initalisation of any global + * variables at an very early point of server startup (even before + * |ProcessCommandLine()|. + */ +void InitGlobals(void) +{ + ddxInitGlobals(); +} + + +/* * This function parses the command line. Handles device-independent fields * and allows ddx to handle additional fields. It is not allowed to modify * argc or any of the strings pointed to by argv.