diff --git a/ChangeLog b/ChangeLog index a82f7cb866..bdf34a663d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-03-08 Christian Stimming + * src/gnc-module/gnc-module.c, src/backend/file/sixtp-utils.c: + Replace setenv() by g_setenv for increased cross-platform + compatibility. + + * src/engine/gnc-filepath-utils.c: Replace mkdir by g_mkdir for + increased cross-platform compatibility. + * src/core-utils/gnc-gconf-utils.c, src/business/business-gnome/business-urls.c src/gnome-utils/dialog-preferences.c diff --git a/src/backend/file/sixtp-utils.c b/src/backend/file/sixtp-utils.c index 0bfc57419b..8ec0055f4a 100644 --- a/src/backend/file/sixtp-utils.c +++ b/src/backend/file/sixtp-utils.c @@ -39,9 +39,6 @@ #include #ifdef GNUCASH_MAJOR_VERSION -#ifndef HAVE_SETENV -#include "setenv.h" -#endif #ifndef HAVE_STRPTIME #include "strptime.h" #endif @@ -394,19 +391,19 @@ gnc_timegm (struct tm *tm) old_tz = getenv ("TZ"); /* FIXME: there's no way to report this error to the caller. */ - if(setenv("TZ", "UTC", 1) != 0) + if(g_setenv("TZ", "UTC", 1) != 0) PERR ("couldn't switch the TZ."); result = mktime (tm); if(old_tz) { /* FIXME: there's no way to report this error to the caller. */ - if(setenv("TZ", old_tz, 1) != 0) + if(g_setenv("TZ", old_tz, 1) != 0) PERR ("couldn't switch the TZ back."); } else { /* FIXME: there's no way to report this error to the caller. */ - unsetenv("TZ"); + g_unsetenv("TZ"); if(errno != 0) PERR ("couldn't restore the TZ to undefined."); } diff --git a/src/gnc-module/gnc-module.c b/src/gnc-module/gnc-module.c index 8687aac412..c28dbc4c80 100644 --- a/src/gnc-module/gnc-module.c +++ b/src/gnc-module/gnc-module.c @@ -14,9 +14,6 @@ #include #include -#ifndef HAVE_SETENV -#include "setenv.h" -#endif #include "gnc-module.h" #include "gw-gnc-module.h" @@ -143,7 +140,7 @@ gnc_module_system_setup_load_path(void) } g_list_free(dirs); - if(setenv("LD_LIBRARY_PATH", envt, 1) != 0) + if(g_setenv("LD_LIBRARY_PATH", envt, 1) != 0) { g_warning ("gnc-module failed to set LD_LIBRARY_PATH"); }