29 #include "dbus-sysdeps.h"
30 #include "dbus-internals.h"
31 #include "dbus-string.h"
37 #elif (defined __APPLE__)
38 # include <crt_externs.h>
39 # define environ (*_NSGetEnviron())
40 #elif HAVE_DECL_ENVIRON && defined(HAVE_UNISTD_H)
43 extern char **environ;
60 for (length = 0; environ[length] !=
NULL; length++);
67 if (environment ==
NULL)
70 for (i = 0; environ[i] !=
NULL; i++)
74 if (environment[i] ==
NULL)
78 if (environ[i] !=
NULL)
#define _dbus_assert(condition)
Aborts with an error message if the condition is false.
char * _dbus_strdup(const char *str)
Duplicates a string.
#define NULL
A null pointer, defined appropriately for C or C++.
#define dbus_new0(type, count)
Safe macro for using dbus_malloc0().
void dbus_free_string_array(char **str_array)
Frees a NULL-terminated array of strings.
char ** _dbus_get_environment(void)
Gets a NULL-terminated list of key=value pairs from the environment.