diff options
Diffstat (limited to 'Xprint/Init.c')
-rw-r--r-- | Xprint/Init.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Xprint/Init.c b/Xprint/Init.c index 43647f187..d773ccf62 100644 --- a/Xprint/Init.c +++ b/Xprint/Init.c @@ -287,6 +287,24 @@ static char *configFileName = (char *)NULL; static Bool freeDefaultFontPath = FALSE; static char *origFontPath = (char *)NULL; +static Bool xprintInitGlobalsCalled = FALSE; +/* + * 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) +{ + xprintInitGlobalsCalled = TRUE; + +#ifdef SMART_SCHEDULE + /* 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; +#endif /* SMART_SCHEDULE */ +} + /* * XprintUseMsg() prints usage for the Xprint-specific options */ @@ -1272,6 +1290,18 @@ PrinterInitOutput( char **driverNames; char *configDir; + /* This should NEVER happen, but... */ + if( !xprintInitGlobalsCalled ) + { + FatalError("Internal error: XprintInitGlobals() not called."); + } +#ifdef SMART_SCHEDULE + if( SmartScheduleDisable != TRUE ) + { + FatalError("Internal error: XF86 smart scheduler incompatible to Xprint DDX."); + } +#endif /* SMART_SCHEDULE */ + /* * this little test is just a warning at startup to make sure * that the config directory exists. |