[gtk-osx] Patch gio build failure due to 'in' being a reserved word in gcc-4.8.



commit 255fd32fe2fb7bdc9c99839c5fed9e5f54466ffa
Author: John Ralls <jralls ceridwen us>
Date:   Sun Dec 21 10:14:11 2014 -0800

    Patch gio build failure due to 'in' being a reserved word in gcc-4.8.

 modulesets-stable/gtk-osx.modules       |    1 +
 patches/gio-in-reserved-in-gcc-48.patch |   69 +++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx.modules b/modulesets-stable/gtk-osx.modules
index 6b60f84..6e6f8f0 100644
--- a/modulesets-stable/gtk-osx.modules
+++ b/modulesets-stable/gtk-osx.modules
@@ -72,6 +72,7 @@
             hash="sha256:8f3f0865280e45b8ce840e176ef83bcfd511148918cc8d39df2ee89b67dcf89a">
       <patch 
file="http://git.gnome.org/browse/gtk-osx/plain/patches/0001-Fix-g_get_monotonic_time-on-non-Intel-Darwin.patch";
 strip="1"/>
       <patch 
file="http://git.gnome.org/browse/gtk-osx/plain/patches/0001-Bug-724590-GSlice-slab_stack-corruption.patch"; 
strip="1"/>
+      <patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/gio-in-reserved-in-gcc-48.patch"; 
strip="1"/>
     </branch>
     <dependencies>
       <dep package="libffi"/>
diff --git a/patches/gio-in-reserved-in-gcc-48.patch b/patches/gio-in-reserved-in-gcc-48.patch
new file mode 100644
index 0000000..6be676f
--- /dev/null
+++ b/patches/gio-in-reserved-in-gcc-48.patch
@@ -0,0 +1,69 @@
+
+--- a/gio/gdummyfile.c Sat Jun 28 10:02:43 2014
++++ b/gio/gdummyfile.c Tue Dec  9 13:17:43 2014
+@@ -441,7 +441,7 @@
+                const gchar *escaped_string_End,
+                const gchar *illegal_characters)
+ {
+-  const gchar *in;
++  const gchar *inchar;
+   gchar *out, *result;
+   gint character;
+   
+@@ -454,19 +454,19 @@
+   result = g_malloc (escaped_string_end - escaped_string + 1);
+       
+   out = result;
+-  for (in = escaped_string; in < escaped_string_end; in++) 
++  for (inchar = escaped_string; inchar < escaped_string_end; inchar++) 
+     {
+-      character = *in;
+-      if (*in == '%') 
++      character = *inchar;
++      if (*inchar == '%') 
+         {
+-          in++;
+-          if (escaped_string_end - in < 2)
++          inchar++;
++          if (escaped_string_end - inchar < 2)
+           {
+             g_free (result);
+             return NULL;
+           }
+       
+-          character = unescape_character (in);
++          character = unescape_character (inchar);
+       
+           /* Check for an illegal character. We consider '\0' illegal here. */
+           if (character <= 0 ||
+@@ -476,7 +476,7 @@
+             g_free (result);
+             return NULL;
+           }
+-          in++; /* The other char will be eaten in the loop header */
++          inchar++; /* The other char will be eaten in the loop header */
+         }
+       *out++ = (char)character;
+     }
+@@ -516,7 +516,7 @@
+ _g_decode_uri (const char *uri)
+ {
+   GDecodedUri *decoded;
+-  const char *p, *in, *hier_part_start, *hier_part_end, *query_start, *fragment_start;
++  const char *p, *inchar, *hier_part_start, *hier_part_end, *query_start, *fragment_start;
+   char *out;
+   char c;
+ 
+@@ -551,8 +551,8 @@
+   
+   decoded->scheme = g_malloc (p - uri);
+   out = decoded->scheme;
+-  for (in = uri; in < p - 1; in++)
+-    *out++ = g_ascii_tolower (*in);
++  for (inchar = uri; inchar < p - 1; inchar++)
++    *out++ = g_ascii_tolower (*inchar);
+   *out = 0;
+ 
+   hier_part_start = p;
+
+Diff finished.  Sun Dec 21 10:08:53 2014


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]