summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2011-06-07 10:49:29 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2011-06-07 10:49:29 +0800
commit09c98f18fcfdaa58864ef127788cbf6332728a94 (patch)
tree47f7b424ff2484a38c05c8ac8223643f27a966af
parent1d1f44ca64c671e5e8853279ffb70260ac22a5ba (diff)
downloadglib-09c98f18fcfdaa58864ef127788cbf6332728a94.tar.gz
Update gsettings utilities in GIO
Avoid C99-style variable declaration
-rw-r--r--gio/glib-compile-schemas.c9
-rw-r--r--gio/gsettings-tool.c7
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