Fixes abort when the old specifiers are used. Fix up the conversion
specifier, it would get overwritten with 'c' below to the extension
format char, which then later is unhandled, leading to the abort.
Also fix up and enable unit test for this.
https://bugzilla.gnome.org/process_bug.cgi
Don't use snprintf(), but use sprintf instead and do our own
length calculations, because glibc may complain about us passing
%n in a format string if the string is in writable memory, and
here the format string is always in writable memory since we
construct it on the fly. This happens if glibc has been compiled
with _FORTIFY_SOURCE=2, which seems to be the case on some
distros/systems). On the upside, we now use the sprintf code path
on all systems which should be better from a maintenance point
of view.
https://bugzilla.gnome.org/show_bug.cgi?id=697970
Don't use just GLIB_HAVE_ALLOCA_H to check if alloca is available,
that's just for the header. GLib may define alloca for us otherwise
too irrespective of GLIB_HAVE_ALLOCA_H.
Fixes compiler warning with mingw32:
gst/printf/vasnprintf.c:73:0: warning: "alloca" redefined
Does not do anything yet. On a sidenote, we can't just use
%p\001 or so to signal the extension because g-i complains
about an invalid ascii character then, so have to resort to
something more elaborate, such as %p\aA etc.
https://bugzilla.gnome.org/show_bug.cgi?id=613081
We will add support for our own printf modifiers, so we can
get nice debug log output on all operating systems irrespective
of the specific libc version used.
https://bugzilla.gnome.org/show_bug.cgi?id=613081