Add g_get_environ(): portable access to 'environ'

Return a copy of 'environ' on platforms where that is possible, or do
something else on other platforms.
This commit is contained in:
Ryan Lortie
2010-10-28 21:26:09 -04:00
parent b4d3b6e0de
commit 29ce7385bb
4 changed files with 42 additions and 0 deletions

View File

@@ -258,6 +258,7 @@ gboolean g_setenv (const gchar *variable,
gboolean overwrite);
void g_unsetenv (const gchar *variable);
gchar** g_listenv (void);
gchar** g_get_environ (void);
/* private */
const gchar* _g_getenv_nomalloc (const gchar *variable,