File 0002-Reorder-code-to-avoid-forward-declaration.patch of Package mingw32-glib2

From 08057ee1eea5e8ebdb3817cc9a9b77160d1eda89 Mon Sep 17 00:00:00 2001
From: Hib Eris <hib@hiberis.nl>
Date: Fri, 8 Mar 2013 10:00:28 +0100
Subject: [PATCH 2/4] Reorder code to avoid forward declaration

---
 glib/goption.c | 94 +++++++++++++++++++++++++++-------------------------------
 1 file changed, 44 insertions(+), 50 deletions(-)

diff --git a/glib/goption.c b/glib/goption.c
index 76013f5..3edb30a 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -241,12 +241,6 @@ static void free_changes_list (GOptionContext *context,
                                gboolean        revert);
 static void free_pending_nulls (GOptionContext *context,
                                 gboolean        perform_nulls);
-static gboolean
-option_context_parse_internal (GOptionContext   *context,
-                               gboolean          utf8_flag,
-                               gint             *argc,
-                               gchar          ***argv,
-                               GError          **error);
 
 
 static int
@@ -1740,50 +1734,6 @@ platform_get_argv0 (void)
   return NULL;
 }
 
-/**
- * g_option_context_parse:
- * @context: a #GOptionContext
- * @argc: (inout) (allow-none): a pointer to the number of command line arguments
- * @argv: (inout) (array length=argc) (allow-none): a pointer to the array of command line arguments
- * @error: a return location for errors
- *
- * Parses the command line arguments, recognizing options
- * which have been added to @context. A side-effect of
- * calling this function is that g_set_prgname() will be
- * called.
- *
- * If the parsing is successful, any parsed arguments are
- * removed from the array and @argc and @argv are updated
- * accordingly. A '--' option is stripped from @argv
- * unless there are unparsed options before and after it,
- * or some of the options after it start with '-'. In case
- * of an error, @argc and @argv are left unmodified.
- *
- * If automatic <option>--help</option> support is enabled
- * (see g_option_context_set_help_enabled()), and the
- * @argv array contains one of the recognized help options,
- * this function will produce help output to stdout and
- * call <literal>exit (0)</literal>.
- *
- * Note that function depends on the
- * <link linkend="setlocale">current locale</link> for
- * automatic character set conversion of string and filename
- * arguments.
- *
- * Return value: %TRUE if the parsing was successful,
- *               %FALSE if an error occurred
- *
- * Since: 2.6
- **/
-gboolean
-g_option_context_parse (GOptionContext   *context,
-                        gint             *argc,
-                        gchar          ***argv,
-                        GError          **error)
-{
-  return option_context_parse_internal (context, FALSE, argc, argv, error);
-}
-
 static gboolean
 option_context_parse_internal (GOptionContext   *context,
                                gboolean          utf8_flag,
@@ -2110,6 +2060,50 @@ option_context_parse_internal (GOptionContext   *context,
 }
 
 /**
+ * g_option_context_parse:
+ * @context: a #GOptionContext
+ * @argc: (inout) (allow-none): a pointer to the number of command line arguments
+ * @argv: (inout) (array length=argc) (allow-none): a pointer to the array of command line arguments
+ * @error: a return location for errors
+ *
+ * Parses the command line arguments, recognizing options
+ * which have been added to @context. A side-effect of
+ * calling this function is that g_set_prgname() will be
+ * called.
+ *
+ * If the parsing is successful, any parsed arguments are
+ * removed from the array and @argc and @argv are updated
+ * accordingly. A '--' option is stripped from @argv
+ * unless there are unparsed options before and after it,
+ * or some of the options after it start with '-'. In case
+ * of an error, @argc and @argv are left unmodified.
+ *
+ * If automatic <option>--help</option> support is enabled
+ * (see g_option_context_set_help_enabled()), and the
+ * @argv array contains one of the recognized help options,
+ * this function will produce help output to stdout and
+ * call <literal>exit (0)</literal>.
+ *
+ * Note that function depends on the
+ * <link linkend="setlocale">current locale</link> for
+ * automatic character set conversion of string and filename
+ * arguments.
+ *
+ * Return value: %TRUE if the parsing was successful,
+ *               %FALSE if an error occurred
+ *
+ * Since: 2.6
+ **/
+gboolean
+g_option_context_parse (GOptionContext   *context,
+                        gint             *argc,
+                        gchar          ***argv,
+                        GError          **error)
+{
+  return option_context_parse_internal (context, FALSE, argc, argv, error);
+}
+
+/**
  * g_option_context_parse_utf8:
  * @context: a #GOptionContext
  * @argc: (inout) (allow-none): a pointer to the number of strings in @argv
-- 
1.8.1.2

openSUSE Build Service is sponsored by