diff --git a/ChangeLog b/ChangeLog index 47b063d1e4..cccb711e26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2007-11-06 Michael Natterer + + * configure.in: remove check for putenv(). + + * app/composite/gimp-composite-3dnow-test.c + * app/composite/gimp-composite-altivec-test.c + * app/composite/gimp-composite-mmx-test.c + * app/composite/gimp-composite-sse-test.c + * app/composite/gimp-composite-sse2-test.c + * app/composite/gimp-composite-vis-test.c + * libgimp/gimpui.c + * plug-ins/uri/uri-backend-wget.c + * tools/gimp-remote-x11.c: use g_setenv() instead of putenv(). + 2007-11-06 Sven Neumann * tools/pdbgen/pdb/plug_in.pdb: improved documentation for diff --git a/app/composite/gimp-composite-3dnow-test.c b/app/composite/gimp-composite-3dnow-test.c index 8b24bad867..14f94f679b 100644 --- a/app/composite/gimp-composite-3dnow-test.c +++ b/app/composite/gimp-composite-3dnow-test.c @@ -1,6 +1,5 @@ #include "config.h" -#include #include #include @@ -74,7 +73,7 @@ main (int argc, char *argv[]) srand (314159); - putenv ("GIMP_COMPOSITE=0x1"); + g_setenv ("GIMP_COMPOSITE", "0x1", TRUE); iterations = 10; n_pixels = 8388625; diff --git a/app/composite/gimp-composite-altivec-test.c b/app/composite/gimp-composite-altivec-test.c index aac29e71e3..69b0c20208 100644 --- a/app/composite/gimp-composite-altivec-test.c +++ b/app/composite/gimp-composite-altivec-test.c @@ -1,6 +1,5 @@ #include "config.h" -#include #include #include @@ -74,7 +73,7 @@ main (int argc, char *argv[]) srand (314159); - putenv ("GIMP_COMPOSITE=0x1"); + g_setenv ("GIMP_COMPOSITE", "0x1", TRUE); iterations = 10; n_pixels = 8388625; diff --git a/app/composite/gimp-composite-mmx-test.c b/app/composite/gimp-composite-mmx-test.c index 148892c472..a7a17c9951 100644 --- a/app/composite/gimp-composite-mmx-test.c +++ b/app/composite/gimp-composite-mmx-test.c @@ -1,6 +1,5 @@ #include "config.h" -#include #include #include @@ -218,7 +217,7 @@ main (int argc, char *argv[]) srand (314159); - putenv ("GIMP_COMPOSITE=0x1"); + g_setenv ("GIMP_COMPOSITE", "0x1", TRUE); iterations = 10; n_pixels = 8388625; diff --git a/app/composite/gimp-composite-sse-test.c b/app/composite/gimp-composite-sse-test.c index 9b6908d9c4..d5868b9225 100644 --- a/app/composite/gimp-composite-sse-test.c +++ b/app/composite/gimp-composite-sse-test.c @@ -1,6 +1,5 @@ #include "config.h" -#include #include #include @@ -195,7 +194,7 @@ main (int argc, char *argv[]) srand (314159); - putenv ("GIMP_COMPOSITE=0x1"); + g_setenv ("GIMP_COMPOSITE", "0x1", TRUE); iterations = 10; n_pixels = 8388625; diff --git a/app/composite/gimp-composite-sse2-test.c b/app/composite/gimp-composite-sse2-test.c index 81015a8e3e..c6873898b6 100644 --- a/app/composite/gimp-composite-sse2-test.c +++ b/app/composite/gimp-composite-sse2-test.c @@ -1,6 +1,5 @@ #include "config.h" -#include #include #include @@ -151,7 +150,7 @@ main (int argc, char *argv[]) srand (314159); - putenv ("GIMP_COMPOSITE=0x1"); + g_setenv ("GIMP_COMPOSITE", "0x1", TRUE); iterations = 10; n_pixels = 8388625; diff --git a/app/composite/gimp-composite-vis-test.c b/app/composite/gimp-composite-vis-test.c index 6ccb033d0c..b8be2055f9 100644 --- a/app/composite/gimp-composite-vis-test.c +++ b/app/composite/gimp-composite-vis-test.c @@ -1,6 +1,5 @@ #include "config.h" -#include #include #include @@ -74,7 +73,7 @@ main (int argc, char *argv[]) srand (314159); - putenv ("GIMP_COMPOSITE=0x1"); + g_setenv ("GIMP_COMPOSITE", "0x1", TRUE); iterations = 10; n_pixels = 8388625; diff --git a/configure.in b/configure.in index c3a247b113..412cc1d2d0 100644 --- a/configure.in +++ b/configure.in @@ -381,7 +381,7 @@ AC_FUNC_VPRINTF AC_FUNC_ALLOCA dnl check some more funcs -AC_CHECK_FUNCS(difftime putenv mmap) +AC_CHECK_FUNCS(difftime mmap) AM_BINRELOC diff --git a/libgimp/gimpui.c b/libgimp/gimpui.c index 36b74a9da4..5186fbfb29 100644 --- a/libgimp/gimpui.c +++ b/libgimp/gimpui.c @@ -19,8 +19,6 @@ #include "config.h" -#include - #include #include "libgimpmodule/gimpmodule.h" @@ -83,12 +81,10 @@ gimp_ui_init (const gchar *prog_name, if (display_name) { #if defined (GDK_WINDOWING_X11) - const gchar var_name[] = "DISPLAY"; + g_setenv ("DISPLAY", display_name, TRUE); #else - const gchar var_name[] = "GDK_DISPLAY"; + g_setenv ("GDK_DISPLAY", display_name, TRUE); #endif - - putenv (g_strdup_printf ("%s=%s", var_name, display_name)); } gtk_init (NULL, NULL); diff --git a/plug-ins/uri/uri-backend-wget.c b/plug-ins/uri/uri-backend-wget.c index 68a2027adf..6b787a347d 100644 --- a/plug-ins/uri/uri-backend-wget.c +++ b/plug-ins/uri/uri-backend-wget.c @@ -20,7 +20,6 @@ #include "config.h" -#include #include #include #include @@ -113,12 +112,10 @@ uri_backend_load_image (const gchar *uri, dup (p[1]); close (p[1]); -#ifdef HAVE_PUTENV /* produce deterministic output */ - putenv ("LANGUAGE=C"); - putenv ("LC_ALL=C"); - putenv ("LANG=C"); -#endif + g_setenv ("LANGUAGE", "C", TRUE); + g_setenv ("LC_ALL", "C", TRUE); + g_setenv ("LANG", "C", TRUE); g_snprintf (timeout_str, sizeof (timeout_str), "%d", TIMEOUT); diff --git a/tools/gimp-remote-x11.c b/tools/gimp-remote-x11.c index fdbdc01bed..8b18cf2d0b 100644 --- a/tools/gimp-remote-x11.c +++ b/tools/gimp-remote-x11.c @@ -24,8 +24,8 @@ #include "config.h" -#include #include +#include #include #ifdef HAVE_UNISTD_H @@ -163,7 +163,7 @@ gimp_remote_launch (GdkScreen *screen, gint i; if (startup_id) - putenv (g_strdup_printf ("DESKTOP_STARTUP_ID=%s", startup_id)); + g_setenv ("DESKTOP_STARTUP_ID", startup_id, TRUE); if (file_list->len > 0) file_list = g_string_prepend (file_list, "\n");