mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 08:58:54 +02:00
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...)
This commit is contained in:
committed by
Tor Lillqvist
parent
7e6be89c62
commit
714887d0fa
@@ -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,
|
||||
|
Reference in New Issue
Block a user