summaryrefslogtreecommitdiff
path: root/glib/gutils.h
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2005-01-01 02:09:51 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-01-01 02:09:51 +0000
commit714887d0fad7c55d623142e3efcedbf77e3e0b94 (patch)
treef2d64c1c454639b9f0daabc57a9084efad51a96f /glib/gutils.h
parent7e6be89c62d92cd8663e21e4fe7449bbaef4e44f (diff)
downloadglib-714887d0fad7c55d623142e3efcedbf77e3e0b94.tar.gz
glib/glib.symbols glib/gutils.h Make also g_getenv(), g_setenv(),
2005-01-01 Tor Lillqvist <tml@iki.fi> * glib/glib.symbols * glib/gutils.h * glib/gutils.c: Make also g_getenv(), g_setenv(), g_unsetenv() and g_find_program_in_path() take and return UTF-8 strings on Win32. Implement DLL ABI backward compatility for them, too. Move all the DLL ABI stability wrappers to the end of the file. Use wide character API when available in inner_find_program_in_path(). * glib/gfileutils.c: With the UTF-8ness of g_getenv() above, just use g_getenv() to get PATHEXT. (Yeah, it's probably overdoing it to consider somebody actually having anything else than ASCII in PATHEXT, but...)
Diffstat (limited to 'glib/gutils.h')
-rw-r--r--glib/gutils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/glib/gutils.h b/glib/gutils.h
index 6544c0f25..8e43cde01 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -192,6 +192,13 @@ void g_nullify_pointer (gpointer *nullify_location);
/* return the environment string for the variable. The returned memory
* must not be freed. */
+#ifdef G_OS_WIN32
+#define g_getenv g_getenv_utf8
+#define g_setenv g_setenv_utf8
+#define g_unsetenv g_unsetenv_utf8
+#define g_find_program_in_path g_find_program_in_path_utf8
+#endif
+
G_CONST_RETURN gchar* g_getenv (const gchar *variable);
gboolean g_setenv (const gchar *variable,
const gchar *value,