Add -dridir and -xkbcompdir parameters to Xvnc when it is built with the Xorg 7.4 code base


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4290 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch b/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch
new file mode 100644
index 0000000..d9d47d4
--- /dev/null
+++ b/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch
@@ -0,0 +1,33 @@
+Only in b/xkb: ._xkbInit.c
+diff -r -C2 a/xkb/xkbInit.c b/xkb/xkbInit.c
+*** a/xkb/xkbInit.c	2011-02-16 14:07:03.000000000 -0600
+--- b/xkb/xkbInit.c	2011-02-16 14:08:08.000000000 -0600
+***************
+*** 875,879 ****
+--- 875,900 ----
+  	}
+  	return j;
++     } else if (strncmp(argv[i], "-xkbcompdir", 11)==0) {
++ 	if (++i < argc) {
++ #if !defined(WIN32) && !defined(__CYGWIN__)
++             if (getuid() != geteuid()) {
++                 LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
++                 return -1;
++             } else
++ #endif
++ 	    {
++ 		if (strlen(argv[i]) < PATH_MAX) {
++ 		    XkbBinDirectory = argv[i];
++ 		    return 2;
++ 		} else {
++ 		    LogMessage(X_ERROR, "-xkbcompdir pathname too long\n");
++ 		    return -1;
++ 		}
++ 	    }
++ 	} else {
++ 	    return -1;
++ 	}
+      }
++ 
+      if ((strcmp(argv[i], "-ardelay") == 0) ||
+          (strcmp (argv[i], "-ar1") == 0)) {	/* -ardelay int */