[PATCH xserver 1/2] xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c.

Eric Anholt eric at anholt.net
Fri Apr 21 18:57:31 UTC 2017


parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and
defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed
__XCONFIGFILE__ to anything else, it would have got out of sync.
Settle on the name without gratuitous underscores.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 configure.ac                 | 4 ++--
 hw/xfree86/common/xf86Init.c | 6 +++---
 include/xorg-config.h.in     | 4 ++--
 include/xorg-server.h.in     | 2 +-
 manpages.am                  | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 07c5520940a1..4ee43d2d064b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2024,9 +2024,9 @@ if test "x$XORG" = xyes; then
 	AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
 	AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
 	AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
-	AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file])
+	AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
 	AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
-	AC_DEFINE_DIR(__XCONFIGDIR__, XF86CONFIGDIR, [Name of configuration directory])
+	AC_DEFINE_DIR(XCONFIGDIR, XF86CONFIGDIR, [Name of configuration directory])
 	AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
 	AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path])
 	AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location])
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 88f99ac5ecc0..d3c7c47b01e2 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1359,17 +1359,17 @@ ddxUseMsg(void)
         ErrorF("-modulepath paths      specify the module search path\n");
         ErrorF("-logfile file          specify a log file name\n");
         ErrorF("-configure             probe for devices and write an "
-               __XCONFIGFILE__ "\n");
+               XCONFIGFILE "\n");
         ErrorF
             ("-showopts              print available options for all installed drivers\n");
     }
     ErrorF
         ("-config file           specify a configuration file, relative to the\n");
-    ErrorF("                       " __XCONFIGFILE__
+    ErrorF("                       " XCONFIGFILE
            " search path, only root can use absolute\n");
     ErrorF
         ("-configdir dir         specify a configuration directory, relative to the\n");
-    ErrorF("                       " __XCONFIGDIR__
+    ErrorF("                       " XCONFIGDIR
            " search path, only root can use absolute\n");
     ErrorF("-verbose [n]           verbose startup messages\n");
     ErrorF("-logverbose [n]        verbose log messages\n");
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index a7d80b5afbf6..b8d6a87a3363 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -34,10 +34,10 @@
 #undef XF86CONFIGFILE
 
 /* Path to configuration file. */
-#undef __XCONFIGFILE__
+#undef XCONFIGFILE
 
 /* Name of configuration directory. */
-#undef __XCONFIGDIR__
+#undef XCONFIGDIR
 
 /* Path to loadable modules. */
 #undef DEFAULT_MODULE_PATH
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index dafc27f4ae79..570893e34bb1 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -180,7 +180,7 @@
 #undef __VENDORDWEBSUPPORT__
 
 /* Location of configuration file */
-#undef __XCONFIGFILE__
+#undef XCONFIGFILE
 
 /* Name of X server */
 #undef __XSERVERNAME__
diff --git a/manpages.am b/manpages.am
index 648210b4efbd..124bb557551f 100644
--- a/manpages.am
+++ b/manpages.am
@@ -22,7 +22,7 @@ MAN_SUBSTS += 	-e 's|__logdir__|$(logdir)|g' \
 		-e 's|__datadir__|$(datadir)|g' \
 		-e 's|__mandir__|$(mandir)|g' \
 		-e 's|__sysconfdir__|$(sysconfdir)|g' \
-		-e 's|__xconfigdir__|$(__XCONFIGDIR__)|g' \
+		-e 's|__xconfigdir__|$(XCONFIGDIR)|g' \
 		-e 's|__xkbdir__|$(XKB_BASE_DIRECTORY)|g' \
 		-e 's|__XKB_DFLT_RULES__|$(XKB_DFLT_RULES)|g' \
 		-e 's|__XKB_DFLT_MODEL__|$(XKB_DFLT_MODEL)|g' \
-- 
2.11.0



More information about the xorg-devel mailing list