? config.cache
? dbus-1.1.1.tar.gz
? test/data/valid-config-files/session.d
? test/name-test/run-with-tmp-session-bus.conf
Index: ChangeLog
===================================================================
RCS file: /cvs/dbus/dbus/ChangeLog,v
retrieving revision 1.1327
diff -u -p -r1.1327 ChangeLog
--- ChangeLog	15 Jun 2007 19:28:36 -0000	1.1327
+++ ChangeLog	15 Jun 2007 20:09:13 -0000
@@ -1,5 +1,16 @@
 2007-06-15  Havoc Pennington  <hp@redhat.com>
 
+	* dbus/dbus-sysdeps-unix.c (_dbus_append_session_config_file)
+	(_dbus_append_system_config_file): new functions
+
+	* bus/main.c (main): use _dbus_append_system_config_file() and 
+	_dbus_append_session_config_file()
+
+	* dbus/Makefile.am (INCLUDES): move DBUS_SYSTEM_CONFIG_FILE and
+	DBUS_SESSION_CONFIG_FILE into this makefile
+
+2007-06-15  Havoc Pennington  <hp@redhat.com>
+
 	* dbus/dbus-sysdeps.c (_dbus_set_errno_to_zero)
 	(_dbus_get_is_errno_nonzero, _dbus_get_is_errno_eintr)
 	(_dbus_strerror_from_errno): family of functions to abstract
Index: bus/Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/bus/Makefile.am,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile.am
--- bus/Makefile.am	23 May 2007 19:45:56 -0000	1.43
+++ bus/Makefile.am	15 Jun 2007 20:09:13 -0000
@@ -2,9 +2,7 @@
 configdir=$(sysconfdir)/dbus-1
 
 INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS)				\
-	-DDAEMON_NAME=\"dbus-daemon\"  -DDBUS_COMPILATION		\
-	-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"	\
-	-DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\"
+	-DDAEMON_NAME=\"dbus-daemon\"  -DDBUS_COMPILATION
 
 EFENCE=
 
Index: bus/main.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/main.c,v
retrieving revision 1.40
diff -u -p -r1.40 main.c
--- bus/main.c	15 Jun 2007 19:28:36 -0000	1.40
+++ bus/main.c	15 Jun 2007 20:09:13 -0000
@@ -291,21 +291,15 @@ main (int argc, char **argv)
         {
           check_two_config_files (&config_file, "system");
 
-          if (!_dbus_string_append (&config_file, DBUS_SYSTEM_CONFIG_FILE))
+          if (!_dbus_append_system_config_file (&config_file))
             exit (1);
         }
       else if (strcmp (arg, "--session") == 0)
         {
           check_two_config_files (&config_file, "session");
 
-#ifdef DBUS_WIN
-          if (!_dbus_get_config_file_name (&config_file,"session.conf"))
+          if (!_dbus_append_session_config_file (&config_file))
             exit (1);
-          /* don't know how to map DBUS_SESSION_CONFIG_FILE to the function above */
-#else
-          if (!_dbus_string_append (&config_file, DBUS_SESSION_CONFIG_FILE))
-            exit (1);
-#endif
         }
       else if (strstr (arg, "--config-file=") == arg)
         {
Index: dbus/Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/dbus/Makefile.am,v
retrieving revision 1.90
diff -u -p -r1.90 Makefile.am
--- dbus/Makefile.am	9 Jun 2007 21:53:18 -0000	1.90
+++ dbus/Makefile.am	15 Jun 2007 20:09:13 -0000
@@ -1,7 +1,10 @@
 
 configdir=$(sysconfdir)/dbus-1
 
-INCLUDES=-I$(top_builddir) -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"
+INCLUDES=-I$(top_builddir) -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) -DDBUS_COMPILATION	\
+	-DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"		\
+	-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"			\
+	-DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\"
 
 dbusincludedir=$(includedir)/dbus-1.0/dbus
 dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus
Index: dbus/dbus-sysdeps-unix.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps-unix.c,v
retrieving revision 1.32
diff -u -p -r1.32 dbus-sysdeps-unix.c
--- dbus/dbus-sysdeps-unix.c	15 Jun 2007 19:28:36 -0000	1.32
+++ dbus/dbus-sysdeps-unix.c	15 Jun 2007 20:09:15 -0000
@@ -2906,6 +2906,32 @@ _dbus_get_standard_session_servicedirs (
 }
 
 /**
+ * Append the absolute path of the system.conf file
+ * (there is no system bus on Windows so this can just
+ * return FALSE and print a warning or something)
+ * 
+ * @param str the string to append to
+ * @returns #FALSE if no memory
+ */
+dbus_bool_t
+_dbus_append_system_config_file (DBusString *str)
+{
+  return _dbus_string_append (str, DBUS_SYSTEM_CONFIG_FILE);
+}
+
+/**
+ * Append the absolute path of the session.conf file.
+ * 
+ * @param str the string to append to
+ * @returns #FALSE if no memory
+ */
+dbus_bool_t
+_dbus_append_session_config_file (DBusString *str)
+{
+  return _dbus_string_append (str, DBUS_SESSION_CONFIG_FILE);
+}
+
+/**
  * Called when the bus daemon is signaled to reload its configuration; any
  * caches should be nuked. Of course any caches that need explicit reload
  * are probably broken, but c'est la vie.
Index: dbus/dbus-sysdeps.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.h,v
retrieving revision 1.81
diff -u -p -r1.81 dbus-sysdeps.h
--- dbus/dbus-sysdeps.h	15 Jun 2007 19:28:36 -0000	1.81
+++ dbus/dbus-sysdeps.h	15 Jun 2007 20:09:18 -0000
@@ -261,6 +261,9 @@ dbus_bool_t _dbus_path_is_absolute    (c
 
 dbus_bool_t _dbus_get_standard_session_servicedirs (DBusList **dirs);
 
+dbus_bool_t _dbus_append_system_config_file  (DBusString *str);
+dbus_bool_t _dbus_append_session_config_file (DBusString *str);
+
 typedef struct {
   int fd_or_handle;
 } DBusPipe;
