Commit graph

4 commits

Author SHA1 Message Date
Nirbheek Chauhan
55f9406f30 printf: On MSVC, also define HAVE_STDINT_H_WITH_UINTMAX
MSVC provides stdint.h but not inttypes.h, and we need to include stdint.h to
get intmax_t
2016-02-20 10:07:37 +00:00
Tim-Philipp Müller
91c42b9380 printf: use sprintf() to work around glibc complaining about %n in a writable format string
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
2013-04-14 11:23:10 +01:00
Tim-Philipp Müller
5299a0cd65 printf: deal with some of the HAVE_FOO used in the printf code
Probably needs some more work for MSVC.
2013-04-12 23:05:59 +01:00
Tim-Philipp Müller
8fc876f09f printf: add our own printf implementation for debug logging
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
2013-04-12 23:05:56 +01:00