summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2007-06-01 22:05:42 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2007-06-01 22:05:42 +0000
commit378053ba594cca44e1bc9e069eab91b0a0954308 (patch)
tree3c4398ba82d8d1675837f19f0642d84a5abb97f4 /bus
parent8d3dbfb1039778584e6476ec0ffadef882360160 (diff)
* bus/main.c (main): uses _dbus_get_config_file_name() to detect session.conf location on win32.
* dbus-sysdeps-win.h (_dbus_get_config_file_name,_dbus_file_exists): new prototyp, undefined interface after including windows.h because t makes trouble when a paramater is named interface. * dbus-sysdeps-win.c (_dbus_get_install_root,_dbus_get_config_file_name,_dbus_file_exists): new functions.
Diffstat (limited to 'bus')
-rw-r--r--bus/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bus/main.c b/bus/main.c
index bf471484..421bd8bf 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -24,6 +24,9 @@
#include "driver.h"
#include <dbus/dbus-internals.h>
#include <dbus/dbus-watch.h>
+#ifdef DBUS_WIN
+#include <dbus/dbus-sysdeps-win.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -296,8 +299,14 @@ main (int argc, char **argv)
{
check_two_config_files (&config_file, "session");
+#ifdef DBUS_WIN
+ if (!_dbus_get_config_file_name (&config_file,"session.conf"))
+ 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)
{