2007-08-03 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / bus / main.c
index 421bd8b..3652935 100644 (file)
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-file-style: "gnu" -*- */
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /* main.c  main() for message bus
  *
  * Copyright (C) 2003 Red Hat, Inc.
 #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>
 #include <signal.h>
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 #include "selinux.h"
 
 static BusContext *context;
@@ -292,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)
         {