DBusList *dirs;
DBusList *link;
DBusString progs;
- const char *common_progs;
int i;
#ifdef DBUS_WIN
+ const char *common_progs;
char buffer[1024];
+
if (_dbus_get_install_root(buffer, sizeof(buffer)))
{
strcat(buffer,DBUS_DATADIR);
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
- common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
+ common_progs = _dbus_getenv ("CommonProgramFiles");
+
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
DBusList *dirs;
DBusList *link;
DBusString progs;
+#ifndef DBUS_UNIX
const char *common_progs;
+#endif
int i;
/* On Unix we don't actually use this variable, but it's easier to handle the
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
- common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
+ common_progs = _dbus_getenv ("CommonProgramFiles");
+
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))