Yes, only VS2015 provides snprintf, which is why Fan's commit only
enables the preproc flag for it when compiling with VS2015.

I've filed https://bugzilla.gnome.org/show_bug.cgi?id=756382 for this
(and https://bugzilla.gnome.org/show_bug.cgi?id=756381 for another
VS2015-related issue in gdk-pixbuf). Fan: please take a look at both
when you can. Apart from these two I didn't have any problems building
GTK2 with VS2015.

-Arnav

On Sun, Oct 11, 2015 at 1:35 AM, Ignacio Casal Quinteiro
<nacho.r...@gmail.com> wrote:
> Hi Arnavion,
>
> is this problem just specific to VS 2015? It seems weird that I managed to
> build it without this problem with VS 2013.
>
> Cheers.
>
> On Sun, Oct 11, 2015 at 6:22 AM, Arnavion <arnav...@gmail.com> wrote:
>>
>> You're right. It does seem to have been fixed in gnulib.
>>
>>
>> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/vasnprintf.c;h=5254c8cfcbfc4f9145b1565de305585df8f7dd84;hb=master#l4875
>> introduced by
>> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blobdiff;f=lib/vasnprintf.c;h=968835a1e7d5a704ae5a330ecda091b78851f73c;hp=8377d31eb591687186815e1de5cf973aac465120;hb=ba739e5686c1488280341451c3eb01a8f7b0aaa1;hpb=8c1ff97529b4f5b6462f1be302cc526ccb1960a1
>>
>> -Arnav
>>
>> On Sat, Oct 10, 2015 at 9:08 PM, LRN <lrn1...@gmail.com> wrote:
>> > On 11.10.2015 7:00, Arnavion wrote:
>> >> Hi Fan,
>> >>
>> >> In your commit 53d487e31bc41cca9bca147e02e81b69e404fe07 to glib you
>> >> enabled glib to use VS2015's snprintf. Did you confirm it works?
>> >>
>> >> I'm updating our gtk-win32 repo to use glib 2.46.0 (from 2.44.1) and
>> >> ATK fails to build - it runs glib-genmarshal as part of build when
>> >> calling g_strdup_printf. I narrowed it down to
>> >> glib/glib/gnulib/vasnprintf.c 's vasnprintf() function at the place
>> >> where it effectively calls
>> >>
>> >>     snprintf("%s%n", 12, "atkmarshal.list", &count);
>> >>
>> >> This aborts with exit code 0xc0000417 (invalid parameters to a CRT
>> >> function).
>> >>
>> >> The Windows printf family of functions has historically not supported
>> >> %n (see
>> >> http://blogs.msdn.com/b/michael_howard/archive/2006/09/28/775780.aspx
>> >> ) so that is probably the reason.
>> >>
>> >> I see code below that call that tries to see if snprintf failed to use
>> >> %n and recover from it, but this of course doesn't work when the
>> >> implementation has already aborted inside snprintf.
>> >
>> > This is gnulib ...print...() implementation. I would suggest asking
>> > gnulib
>> > developers (maybe this is already fixed upstream, in which case glib
>> > should
>> > pull newer gnulib source).
>> >
>> > --
>> > O< ascii ribbon - stop html email! - www.asciiribbon.org
>> >
>> > _______________________________________________
>> > gtk-devel-list mailing list
>> > gtk-devel-list@gnome.org
>> > https://mail.gnome.org/mailman/listinfo/gtk-devel-list
>> >
>> _______________________________________________
>> gtk-devel-list mailing list
>> gtk-devel-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
>
>
>
> --
> Ignacio Casal Quinteiro
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to