mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-05 05:49:10 +00:00
Replace getenv/setenv with g_getenv/g_setenv for Win32 portability
This commit is contained in:
parent
3073e240f3
commit
e82757283f
@ -49,12 +49,12 @@ void spice_util_set_debug(gboolean enabled)
|
||||
{
|
||||
#if GLIB_CHECK_VERSION(2, 31, 0)
|
||||
if (enabled) {
|
||||
gchar *doms = getenv("G_MESSAGES_DEBUG");
|
||||
gchar *doms = g_getenv("G_MESSAGES_DEBUG");
|
||||
if (!doms) {
|
||||
setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
|
||||
g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
|
||||
} else if (!strstr(doms, G_LOG_DOMAIN)) {
|
||||
gchar *newdoms = g_strdup_printf("%s %s", doms, G_LOG_DOMAIN);
|
||||
setenv("G_MESSAGES_DEBUG", newdoms, 1);
|
||||
g_setenv("G_MESSAGES_DEBUG", newdoms, 1);
|
||||
g_free(newdoms);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user