--- a/open-src/xserver/xorg/xorgcfg.patch Sat Jan 10 10:35:32 2009 -0800
+++ b/open-src/xserver/xorg/xorgcfg.patch Thu Jan 15 12:55:00 2009 -0800
@@ -26,9 +26,9 @@
# of the copyright holder.
#
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/cards.c hw/xfree86/utils/xorgcfg/cards.c
---- hw/xfree86/utils/xorgcfg/cards.c 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/cards.c 2007-01-05 15:23:49.350763000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/cards.c hw/xfree86/utils/xorgcfg/cards.c
+--- hw/xfree86/utils/xorgcfg/cards.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/cards.c 2008-09-23 16:32:33.107719000 -0700
@@ -691,5 +691,8 @@ CompareCards(_Xconst void *left, _Xconst
static int
BCompareCards(_Xconst void *name, _Xconst void *card)
@@ -38,9 +38,9 @@
+
return (strcasecmp((char*)name, (*(CardsEntry**)card)->name));
}
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/config.c hw/xfree86/utils/xorgcfg/config.c
---- hw/xfree86/utils/xorgcfg/config.c 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/config.c 2007-01-05 15:23:49.351310000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/config.c hw/xfree86/utils/xorgcfg/config.c
+--- hw/xfree86/utils/xorgcfg/config.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/config.c 2008-09-23 16:32:33.108368000 -0700
@@ -107,14 +107,25 @@ StartConfig(void)
static int first = 1;
Widget pane, top, bottom, cancel;
@@ -93,13 +93,13 @@
configp = XtCreateManagedWidget("work", formWidgetClass,
pane, NULL, 0);
current = XtCreateManagedWidget("wellcome", labelWidgetClass,
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/config.h hw/xfree86/utils/xorgcfg/config.h
---- hw/xfree86/utils/xorgcfg/config.h 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/config.h 2007-01-05 15:23:49.382920000 -0800
-@@ -104,6 +104,29 @@
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/config.h hw/xfree86/utils/xorgcfg/config.h
+--- hw/xfree86/utils/xorgcfg/config.h 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/config.h 2008-09-23 16:32:33.130156000 -0700
+@@ -97,6 +97,29 @@
+ #define CONFIG_ACCESSX 3
extern int config_mode;
- #ifndef __UNIXOS2__
+#ifdef sun
+#define CONFPATH "%A," "%R," \
+ "/etc/X11/%R," "%P/etc/X11/%R," \
@@ -126,18 +126,18 @@
#define CONFPATH "%A," "%R," \
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
-@@ -120,6 +143,7 @@ extern int config_mode;
+@@ -112,6 +135,7 @@ extern int config_mode;
"%P/etc/X11/%X," \
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
"%P/lib/X11/%X"
+#endif
- #else
- #define CONFPATH "%&"XF86CONFIGDIR"/%R," "%&"XF86CONFIGDIR"/%X," \
- "%A," "%R," \
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/interface.c hw/xfree86/utils/xorgcfg/interface.c
---- hw/xfree86/utils/xorgcfg/interface.c 2006-12-21 10:50:47.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/interface.c 2007-01-05 15:23:49.384667000 -0800
-@@ -63,12 +63,16 @@
+
+ /*
+ * Types
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/interface.c hw/xfree86/utils/xorgcfg/interface.c
+--- hw/xfree86/utils/xorgcfg/interface.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/interface.c 2008-09-23 16:32:33.132868000 -0700
+@@ -63,11 +63,15 @@
#ifdef PROJECT_ROOT
#define DefaultXFree86Dir PROJECT_ROOT
#else
@@ -145,8 +145,7 @@
+#define DefaultXFree86Dir "/usr/X11"
#endif
- #define IS_KBDDRIV(S) ((strcasecmp((S),"kbd") == 0) || \
- (strcasecmp((S), "keyboard") == 0))
+ #define IS_KBDDRIV(S) ((strcasecmp((S),"kbd") == 0))
+#ifdef sun
+#define DefaultOpenwinDir "/usr/openwin"
@@ -155,7 +154,7 @@
/*
* Prototypes
*/
-@@ -130,6 +134,9 @@ char *XF86Font_path = NULL;
+@@ -129,6 +133,9 @@ char *XF86Font_path = NULL;
char *XF86RGB_path = NULL;
char *XkbConfig_path = NULL;
char *XFree86Dir;
@@ -165,7 +164,7 @@
static char XF86Config_path_static[1024];
static char XkbConfig_path_static[1024];
Bool xf86config_set = False;
-@@ -199,7 +206,7 @@ static XtResource appResources[] = {
+@@ -198,7 +205,7 @@ static XtResource appResources[] = {
0, XtRString, "/etc/X11/"__XCONFIGFILE__},
#endif
{"menuBitmap", "MenuBitmap", XtRString, sizeof(char*),
@@ -174,7 +173,7 @@
};
static void
-@@ -243,10 +250,19 @@ main(int argc, char *argv[])
+@@ -241,10 +248,19 @@ main(int argc, char *argv[])
int i, startedx;
char *menuPixmapPath = NULL;
XrmValue from, to;
@@ -194,7 +193,7 @@
chdir(XFree86Dir);
#ifdef USE_MODULES
-@@ -308,6 +324,20 @@ main(int argc, char *argv[])
+@@ -303,6 +319,20 @@ main(int argc, char *argv[])
"%s/%s%s", XFree86Dir, XkbConfigDir, XkbConfigFile);
XkbConfig_path = XkbConfig_path_static;
}
@@ -215,7 +214,7 @@
toplevel = XtAppInitialize(&appcon, "XOrgCfg",
NULL, 0,
&argc, argv,
-@@ -507,7 +537,11 @@ main(int argc, char *argv[])
+@@ -502,7 +532,11 @@ main(int argc, char *argv[])
case 0: {
char path[PATH_MAX];
@@ -227,7 +226,7 @@
execl(path, "twm", (void *)NULL);
exit(-127);
} break;
-@@ -543,6 +577,11 @@ main(int argc, char *argv[])
+@@ -538,6 +572,11 @@ main(int argc, char *argv[])
if (startedx)
endx();
@@ -239,9 +238,33 @@
return (0);
}
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/loader.c hw/xfree86/utils/xorgcfg/loader.c
---- hw/xfree86/utils/xorgcfg/loader.c 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/loader.c 2007-01-05 15:23:49.385165000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/keyboard-cfg.c hw/xfree86/utils/xorgcfg/keyboard-cfg.c
+--- hw/xfree86/utils/xorgcfg/keyboard-cfg.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/keyboard-cfg.c 2008-09-23 16:32:33.164601000 -0700
+@@ -70,7 +70,7 @@ static void UpdateRulesPopups(void);
+ */
+ static XF86XkbRulesDescInfo **xkb_desc, *xkb_rules;
+ static int num_xkb_desc;
+-static char *XkbRulesDir = "share/X11/xkb/rules/";
++static char *XkbRulesDir = "lib/X11/xkb/rules/";
+ #ifdef XFREE98_XKB
+ static char *XkbRulesFile = "xfree98";
+ #else
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/keyboard-cfg.h hw/xfree86/utils/xorgcfg/keyboard-cfg.h
+--- hw/xfree86/utils/xorgcfg/keyboard-cfg.h 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/keyboard-cfg.h 2008-09-23 16:32:33.165075000 -0700
+@@ -37,7 +37,7 @@
+ /*
+ * All file names are from XProjectRoot or XWINHOME environment variable.
+ */
+-#define XkbConfigDir "share/X11/xkb/"
++#define XkbConfigDir "lib/X11/xkb/"
+ #define XkbConfigFile "X0-config.keyboard"
+
+ /*
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/loader.c hw/xfree86/utils/xorgcfg/loader.c
+--- hw/xfree86/utils/xorgcfg/loader.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/loader.c 2008-09-23 16:32:33.133513000 -0700
@@ -277,7 +277,7 @@ LoaderInitializeOptions(void)
nfont_modules = numFontModules;
error_level = 0;
@@ -260,9 +283,9 @@
}
signal(SIGTRAP, SIG_DFL);
signal(SIGBUS, SIG_DFL);
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/loader.h hw/xfree86/utils/xorgcfg/loader.h
---- hw/xfree86/utils/xorgcfg/loader.h 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/loader.h 2007-01-05 15:23:49.397328000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/loader.h hw/xfree86/utils/xorgcfg/loader.h
+--- hw/xfree86/utils/xorgcfg/loader.h 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/loader.h 2008-09-23 16:32:33.133963000 -0700
@@ -35,6 +35,9 @@
#else
@@ -298,9 +321,9 @@
typedef struct _xf86cfgModuleOptions {
char *name;
ModuleType type;
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/loadmod.c hw/xfree86/utils/xorgcfg/loadmod.c
---- hw/xfree86/utils/xorgcfg/loadmod.c 2006-12-21 10:50:47.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/loadmod.c 2007-01-05 15:23:49.398123000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/loadmod.c hw/xfree86/utils/xorgcfg/loadmod.c
+--- hw/xfree86/utils/xorgcfg/loadmod.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/loadmod.c 2008-09-23 16:32:33.152176000 -0700
@@ -41,6 +41,7 @@
#define LOADER_PRIVATE
@@ -309,7 +332,7 @@
#define True 1
#define False 0
-@@ -322,6 +323,51 @@ LOOKUP xfree86LookupTab[] = {
+@@ -320,6 +321,51 @@ LOOKUP xfree86LookupTab[] = {
{0,0}
};
@@ -361,7 +384,7 @@
static DriverPtr driver;
static ModuleInfoPtr info;
static SymTabPtr chips;
-@@ -335,6 +381,7 @@ AddModuleOptions(char *name, const Optio
+@@ -333,6 +379,7 @@ AddModuleOptions(char *name, const Optio
const OptionInfoRec *tmp;
SymTabPtr ctmp;
int count;
@@ -369,7 +392,7 @@
/* XXX If the module is already in the list, then it means that
* it is now being properly loaded by xf86cfg and the "fake" entry
-@@ -364,6 +411,13 @@ AddModuleOptions(char *name, const Optio
+@@ -362,6 +409,13 @@ AddModuleOptions(char *name, const Optio
}
else
ptr->option = NULL;
@@ -383,7 +406,7 @@
if (vendor != -1 && chips) {
ptr->vendor = vendor;
for (count = 0, ctmp = chips; ctmp->name; ctmp++, count++)
-@@ -436,12 +490,16 @@ xf86cfgLoaderInitList(int type)
+@@ -434,12 +488,16 @@ xf86cfgLoaderInitList(int type)
/* XXX Xf86cfg isn't able to provide enough wrapper functions
* to these drivers. Maybe the drivers could also be changed
* to work better when being loaded "just for testing" */
@@ -400,7 +423,7 @@
}
void
-@@ -451,12 +509,16 @@ xf86cfgLoaderFreeList(void)
+@@ -449,12 +507,16 @@ xf86cfgLoaderFreeList(void)
}
int
@@ -418,7 +441,7 @@
driver = NULL;
chips = NULL;
-@@ -472,14 +534,35 @@ xf86cfgCheckModule(void)
+@@ -470,14 +532,35 @@ xf86cfgCheckModule(void)
}
else if (driver && driver->AvailableOptions) {
/* at least fbdev does not call xf86MatchPciInstances in Probe */
@@ -456,36 +479,10 @@
if (!noverify) {
XF86ModuleData *initdata = NULL;
-
---- hw/xfree86/utils/xorgcfg/keyboard-cfg.c
-+++ hw/xfree86/utils/xorgcfg/keyboard-cfg.c
-@@ -71,7 +71,7 @@ static void UpdateRulesPopups(void);
- */
- static XF86XkbRulesDescInfo **xkb_desc, *xkb_rules;
- static int num_xkb_desc;
--static char *XkbRulesDir = "share/X11/xkb/rules/";
-+static char *XkbRulesDir = "lib/X11/xkb/rules/";
- #ifdef XFREE98_XKB
- static char *XkbRulesFile = "xfree98";
- #else
-
---- hw/xfree86/utils/xorgcfg/keyboard-cfg.h
-+++ hw/xfree86/utils/xorgcfg/keyboard-cfg.h
-@@ -37,7 +37,7 @@ #define _xf86cfg_keyboard_h
- /*
- * All file names are from XProjectRoot or XWINHOME environment variable.
- */
--#define XkbConfigDir "share/X11/xkb/"
-+#define XkbConfigDir "lib/X11/xkb/"
- #define XkbConfigFile "X0-config.keyboard"
-
- /*
-
-
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/mouse-cfg.c hw/xfree86/utils/xorgcfg/mouse-cfg.c
---- hw/xfree86/utils/xorgcfg/mouse-cfg.c 2006-12-21 10:50:47.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/mouse-cfg.c 2007-01-05 15:23:49.414822000 -0800
-@@ -278,7 +278,10 @@ MouseApplyCallback(Widget w, XtPointer u
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/mouse-cfg.c hw/xfree86/utils/xorgcfg/mouse-cfg.c
+--- hw/xfree86/utils/xorgcfg/mouse-cfg.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/mouse-cfg.c 2008-09-23 16:32:33.175273000 -0700
+@@ -272,7 +272,10 @@ MouseApplyCallback(Widget w, XtPointer u
XF86MiscMouseSettings mouse;
XF86MiscGetMouseSettings(XtDisplay(w), &mouse);
@@ -496,7 +493,7 @@
if (mouse.baudrate == 0 || mouse.baudrate < 0 || mouse.baudrate > 9600 ||
mouse.baudrate % 1200)
-@@ -294,7 +297,9 @@ MouseApplyCallback(Widget w, XtPointer u
+@@ -288,7 +291,9 @@ MouseApplyCallback(Widget w, XtPointer u
mouse.emulate3buttons = emulate;
mouse.flags |= MF_REOPEN;
@@ -506,9 +503,9 @@
XFlush(XtDisplay(w));
XF86MiscSetMouseSettings(XtDisplay(w), &mouse);
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/screen-cfg.c hw/xfree86/utils/xorgcfg/screen-cfg.c
---- hw/xfree86/utils/xorgcfg/screen-cfg.c 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/screen-cfg.c 2007-01-05 15:23:49.415382000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/screen-cfg.c hw/xfree86/utils/xorgcfg/screen-cfg.c
+--- hw/xfree86/utils/xorgcfg/screen-cfg.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/screen-cfg.c 2008-09-23 16:32:33.175877000 -0700
@@ -73,6 +73,7 @@ static char *standard_modes[] = {
"512x384",
"1400x1050",
@@ -517,9 +514,9 @@
"1920x1440",
};
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/startx.c hw/xfree86/utils/xorgcfg/startx.c
---- hw/xfree86/utils/xorgcfg/startx.c 2006-11-13 16:59:40.000000000 -0800
-+++ hw/xfree86/utils/xorgcfg/startx.c 2007-01-05 15:23:49.415853000 -0800
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/startx.c hw/xfree86/utils/xorgcfg/startx.c
+--- hw/xfree86/utils/xorgcfg/startx.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/startx.c 2008-09-23 16:32:33.182971000 -0700
@@ -46,11 +46,32 @@ Bool
startx(void)
{
@@ -553,7 +550,7 @@
if (XF86Config_path == NULL) {
char *home, filename[PATH_MAX];
char commandline[PATH_MAX * 4];
-@@ -103,13 +124,25 @@ startx(void)
+@@ -100,13 +121,25 @@ startx(void)
switch (xpid = fork()) {
case 0: {
char path[PATH_MAX];
@@ -581,11 +578,11 @@
exit(-127);
} break;
case -1:
-diff -urp -x '*~' hw/xfree86/utils/xorgcfg/text-mode.c hw/xfree86/utils/xorgcfg/text-mode.c
---- hw/xfree86/utils/xorgcfg/text-mode.c 2007-01-05 15:23:35.567891000 -0800
-+++ hw/xfree86/utils/xorgcfg/text-mode.c 2007-01-05 15:23:49.417927000 -0800
-@@ -50,16 +50,14 @@
- (strcmp((X), "keyboard") == 0))
+diff -urp -x '*~' -x '*.orig' hw/xfree86/utils/xorgcfg/text-mode.c hw/xfree86/utils/xorgcfg/text-mode.c
+--- hw/xfree86/utils/xorgcfg/text-mode.c 2008-09-23 11:24:59.000000000 -0700
++++ hw/xfree86/utils/xorgcfg/text-mode.c 2008-09-23 16:32:33.186900000 -0700
+@@ -49,12 +49,10 @@
+ #define IS_KBDDRIV(X) ((strcmp((X),"kbd") == 0))
#ifndef PROJECT_ROOT
-#define PROJECT_ROOT "/usr"
@@ -593,17 +590,13 @@
#endif
-#ifndef XKB_RULES_DIR
- #ifndef __UNIXOS2__
-#define XKB_RULES_DIR PROJECT_ROOT "/share/X11/xkb/rules"
+-#endif
+#define XKB_RULES_DIR PROJECT_ROOT "/lib/X11/xkb/rules"
- #else
- #define XKB_RULES_DIR XF86CONFIGDIR "/xkb/rules"
- #endif
--#endif
#define CONTROL_A 1
#define CONTROL_D 4
-@@ -302,9 +300,21 @@ static int
+@@ -293,9 +291,21 @@ static int
WriteXF86Config(void)
{
char *xf86config;
@@ -624,4 +617,4 @@
+
xf86config = DialogInput("Write "__XCONFIGFILE__, "Write configuration to file:",
10, 60, XF86Config_path ? XF86Config_path :
- #ifndef __UNIXOS2__
+ "/etc/X11/"__XCONFIGFILE__, " Ok ", " Cancel ", 0);