[xorg-commit-diffs] xc/programs/Xserver/Xprint Init.c,
1.1.4.2.6.1.6.1, 1.1.4.2.6.1.6.2 ddxInit.c, 1.1.4.2.6.1.6.1,
1.1.4.2.6.1.6.2
Roland Mainz
xorg-commit at pdx.freedesktop.org
Tue Apr 20 13:27:10 EST 2004
Committed by: gisburn
Update of /cvs/xorg/xc/programs/Xserver/Xprint
In directory pdx:/tmp/cvs-serv1812/xc/programs/Xserver/Xprint
Modified Files:
Tag: XPRINT
Init.c ddxInit.c
Log Message:
Fix for http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=491 - RFE: Need workaround for bug 467 ("Xfree86 smart scheduler breaks Xprt")
Index: Init.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v
retrieving revision 1.1.4.2.6.1.6.1
retrieving revision 1.1.4.2.6.1.6.2
diff -u -d -r1.1.4.2.6.1.6.1 -r1.1.4.2.6.1.6.2
--- a/Init.c 13 Apr 2004 03:16:44 -0000 1.1.4.2.6.1.6.1
+++ b/Init.c 20 Apr 2004 03:27:08 -0000 1.1.4.2.6.1.6.2
@@ -287,6 +287,24 @@
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 @@
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.
Index: ddxInit.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ddxInit.c,v
retrieving revision 1.1.4.2.6.1.6.1
retrieving revision 1.1.4.2.6.1.6.2
diff -u -d -r1.1.4.2.6.1.6.1 -r1.1.4.2.6.1.6.2
--- a/ddxInit.c 13 Apr 2004 03:16:44 -0000 1.1.4.2.6.1.6.1
+++ b/ddxInit.c 20 Apr 2004 03:27:08 -0000 1.1.4.2.6.1.6.2
@@ -229,6 +229,12 @@
}
#endif
+/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
+void ddxInitGlobals(void)
+{
+ XprintInitGlobals();
+}
+
/****************************************
* ddxUseMsg()
*
More information about the xorg-commit-diffs
mailing list