aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/parser
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-16 09:32:42 +0000
committermarha <marha@users.sourceforge.net>2010-04-16 09:32:42 +0000
commit0afd2d366de6470b72f0d305643be9afd8cc461d (patch)
tree9363104b0080ddd001256d1b3a0eceae078f13a0 /xorg-server/hw/xfree86/parser
parent6412df1b3df28c6213b43821c4a98cc3857d9a3f (diff)
downloadvcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.tar.gz
vcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.tar.bz2
vcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.zip
git update 16/4/2010
Diffstat (limited to 'xorg-server/hw/xfree86/parser')
-rw-r--r--xorg-server/hw/xfree86/parser/Makefile.am4
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/parser/Makefile.am b/xorg-server/hw/xfree86/parser/Makefile.am
index 49c191f2a..caf7079d4 100644
--- a/xorg-server/hw/xfree86/parser/Makefile.am
+++ b/xorg-server/hw/xfree86/parser/Makefile.am
@@ -34,7 +34,9 @@ libxf86config_a_SOURCES = \
$(INTERNAL_SOURCES)
libxf86config_a_CFLAGS = $(AM_CFLAGS)
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DDATADIR=\"$(datadir)\"
EXTRA_DIST = \
Configint.h \
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c
index cdca9ca1c..8aab0cf41 100644
--- a/xorg-server/hw/xfree86/parser/scan.c
+++ b/xorg-server/hw/xfree86/parser/scan.c
@@ -599,6 +599,8 @@ xf86pathIsSafe(const char *path)
* %F config file environment ($XORGCONFIG) as a relative path
* %G config file environment ($XORGCONFIG) as a safe path
* %P projroot
+ * %C sysconfdir
+ * %D datadir
* %M major version number
* %% %
*/
@@ -615,6 +617,12 @@ xf86pathIsSafe(const char *path)
#ifndef PROJECTROOT
#define PROJECTROOT "/usr/X11R6"
#endif
+#ifndef SYSCONFDIR
+#define SYSCONFDIR PROJECTROOT "/etc"
+#endif
+#ifndef DATADIR
+#define DATADIR PROJECTROOT "/share"
+#endif
#ifndef XCONFENV
#define XCONFENV "XORGCONFIG"
#endif
@@ -755,6 +763,12 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
else
BAIL_OUT;
break;
+ case 'C':
+ APPEND_STR(SYSCONFDIR);
+ break;
+ case 'D':
+ APPEND_STR(DATADIR);
+ break;
case 'M':
if (!majorvers[0]) {
if (XF86_VERSION_MAJOR < 0 || XF86_VERSION_MAJOR > 99) {