Re: glib 1.2.10 compile problem?

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

 



Le jeudi 05 mai 2005 Ã 13:28 +0800, Xu Qiang a Ãcrit :
> Hi, all: 
> 
> I am trying to compile glib 1.2.10 from the src in my FreeBSD 5.3 (i383) PC (with gcc 3.4.2). Yet I met the following error with configure script: 
> 
> gstrfuncs.c: In function `g_printf_string_upper_bound':
> gstrfuncs.c:870: error: syntax error before string constant
> gstrfuncs.c:1037: error: syntax error before string constant
> gstrfuncs.c:1080: error: syntax error before string constant
> gstrfuncs.c:1111: error: syntax error before string constant
> 
> How to overcome this error?
> 

Apply this patch (found in Gentoo) to glib-1.2.10.
--- glib-1.2.10/gstrfuncs.c.orig	2001-02-27 07:00:22.000000000 +0100
+++ glib-1.2.10/gstrfuncs.c	2004-03-01 13:19:49.531603760 +0100
@@ -867,7 +867,7 @@
                   /* beware of positional parameters
                    */
                 case '$':
-                  g_warning (G_GNUC_PRETTY_FUNCTION
+                  g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
                              "(): unable to handle positional parameters (%%n$)");
                   len += 1024; /* try adding some safety padding */
                   break;
@@ -1034,7 +1034,7 @@
                   /*          n   .   dddddddddddddddddddddddd   E   +-  eeee */
                   conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4;
                   if (spec.mod_extra_long)
-                    g_warning (G_GNUC_PRETTY_FUNCTION
+                    g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
                                "(): unable to handle long double, collecting double only");
 #ifdef HAVE_LONG_DOUBLE
 #error need to implement special handling for long double
@@ -1077,7 +1077,7 @@
                   conv_done = TRUE;
                   if (spec.mod_long)
                     {
-                      g_warning (G_GNUC_PRETTY_FUNCTION
+                      g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
                                  "(): unable to handle wide char strings");
                       len += 1024; /* try adding some safety padding */
                     }
@@ -1108,9 +1108,8 @@
                   conv_len += format - spec_start;
                   break;
                 default:
-                  g_warning (G_GNUC_PRETTY_FUNCTION
-                             "(): unable to handle `%c' while parsing format",
-                             c);
+                  g_warning ("%s(): unable to handle `%c' while parsing format",
+                             G_GNUC_PRETTY_FUNCTION, c);
                   break;
                 }
               conv_done |= conv_len > 0;
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux