[Geany-devel] G_VA_COPY problem

Lex Trotman elextr at xxxxx
Sat Mar 12 00:28:51 UTC 2011


On 12 March 2011 06:30, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Le 11/03/2011 19:57, Nick Treleaven a écrit :
>> Hi,
>> tagmanager/mio/mio-memory.c uses G_VA_COPY() but on my system this is
>> defined as va_copy() (by glibconfig.h, I think).
>>
>> When I compile with my usual flags including warnings and -ansi,
>> va_copy is not defined. Any ideas how to solve this?
>>
>> It seems to be a GLib issue that may be solved in newer versions - I
>> still have glib2-2.14.4-1.fc8. Is anyone else using -ansi?
> Hum, that's problematic, right... This problem still happens with GLib 2.28.
> However, it may be quite hard to fix in the GLib side: they find the
> proper implementation at configure time, and if none found fallback to
> manual copy (implementation depends on the target then).
> The problem is that GLib has been built without -ansi on your system and
> found a working va_copy, but -ansi disabled it a compile-time...

Ouch nasty, raises the point that maybe we shouldn't be building the
application with different compile flags to the major binary
libraries, there ciould be other potential problems.

Cheers
Lex

>
> The only way I see we could fix this is to change the implementation of
> mio_printf() to use g_strdup_printf() internally, so no need for
> G_VA_COPY(). However, this would be a "slower" implementation (though,
> mio_printf() is only barely used in the tagmanager).
>
> OTOH, the current code would work perfectly well on a C89-only system,
> since GLib wouldn't have found a working va_copy() implementation, so...
> not sure what is the right fix, and if there is one needed.
>
> What do you think is the best?
>
>
> Cheers,
> Colomban
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>



More information about the Devel mailing list