From: Mikael Magnusson Date: Thu, 18 Oct 2007 06:21:53 +0000 (+0200) Subject: Change setenv and unsetenv to putenv for portability. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=8cdf412aed60bd4c943281b2a6e577ed68f5ba18;p=chaz%2Fopenbox Change setenv and unsetenv to putenv for portability. Solaris apparently does not have setenv and unsetenv. --- diff --git a/openbox/openbox.c b/openbox/openbox.c index 06afffc8..77bb0363 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -511,7 +511,7 @@ static void remove_args(gint *argc, gchar **argv, gint index, gint num) static void parse_env() { /* unset this so we don't pass it on unknowingly */ - unsetenv("DESKTOP_STARTUP_ID"); + putenv("DESKTOP_STARTUP_ID"); } static void parse_args(gint *argc, gchar **argv) diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index 002bd2dc..4c929e7e 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -61,7 +61,7 @@ void sn_startup(gboolean reconfig) if (reconfig) return; /* unset this so we don't pass it on unknowingly */ - unsetenv("DESKTOP_STARTUP_ID"); + putenv("DESKTOP_STARTUP_ID"); sn_display = sn_display_new(ob_display, NULL, NULL); sn_context = sn_monitor_context_new(sn_display, ob_screen, @@ -259,7 +259,7 @@ void sn_setup_spawn_environment(gchar *program, gchar *name, g_direct_equal, (GDestroyNotify)sn_launcher_context_unref); - setenv("DESKTOP_STARTUP_ID", id, TRUE); + putenv(g_strdup_printf("DESKTOP_STARTUP_ID=%s", id)); g_free(desc); }