diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2011-06-07 10:49:29 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2011-06-07 10:49:29 +0800 |
commit | 09c98f18fcfdaa58864ef127788cbf6332728a94 (patch) | |
tree | 47f7b424ff2484a38c05c8ac8223643f27a966af | |
parent | 1d1f44ca64c671e5e8853279ffb70260ac22a5ba (diff) | |
download | glib-09c98f18fcfdaa58864ef127788cbf6332728a94.tar.gz |
Update gsettings utilities in GIO
Avoid C99-style variable declaration
-rw-r--r-- | gio/glib-compile-schemas.c | 9 | ||||
-rw-r--r-- | gio/gsettings-tool.c | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c index 0c8a58daf..8d20bbfe7 100644 --- a/gio/glib-compile-schemas.c +++ b/gio/glib-compile-schemas.c @@ -1947,11 +1947,16 @@ main (int argc, char **argv) { NULL } }; +#ifdef G_OS_WIN32 + extern gchar *_glib_get_locale_dir (void); + gchar *tmp; +#endif + setlocale (LC_ALL, ""); textdomain (GETTEXT_PACKAGE); + #ifdef G_OS_WIN32 - extern gchar *_glib_get_locale_dir (void); - gchar *tmp = _glib_get_locale_dir (); + tmp = _glib_get_locale_dir (); bindtextdomain (GETTEXT_PACKAGE, tmp); g_free (tmp); #else diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c index 04a1954f5..087288d5a 100644 --- a/gio/gsettings-tool.c +++ b/gio/gsettings-tool.c @@ -690,11 +690,16 @@ main (int argc, char **argv) GSettings *settings; const gchar *key; +#ifdef G_OS_WIN32 + extern gchar *_glib_get_locale_dir (void); + gchar *tmp; +#endif + setlocale (LC_ALL, ""); textdomain (GETTEXT_PACKAGE); #ifdef G_OS_WIN32 - gchar *tmp = _glib_get_locale_dir (); + tmp = _glib_get_locale_dir (); bindtextdomain (GETTEXT_PACKAGE, tmp); g_free (tmp); #else |