diff options
author | Francis Dupont <Francis.Dupont@fdupont.fr> | 2014-10-13 15:09:43 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2014-10-13 15:09:43 +0800 |
commit | 12fd65434037d50429587792ed2e7e98f2fb739b (patch) | |
tree | c3b2b9460ae5a5d423dd5343581adc3b6714de85 /buf.h | |
parent | 8854e4631844eac8dbae10cc32904f27d5268af7 (diff) | |
download | android_external_libxml2-12fd65434037d50429587792ed2e7e98f2fb739b.tar.gz android_external_libxml2-12fd65434037d50429587792ed2e7e98f2fb739b.tar.bz2 android_external_libxml2-12fd65434037d50429587792ed2e7e98f2fb739b.zip |
Visual Studio 14 CTP defines snprintf()
For https://bugzilla.gnome.org/show_bug.cgi?id=737937
Visual Studio 14 CTP (the VS which comes with Windows 10) defines snprintf().
It could be seen as a good idea as snprintf() is part of the C99 standard but
unfortunately libxml2 as many packages defines snprintf as _snprintf, the
function to use for any previous versions of the Visual Studio runtime. More,
to avoid hiding/shadowing snprintf() declaration in stdio.h is protected by an
"#ifdef snprintf" followed by an "#error", so compilation fails.
But the fix is easy: the corresponding C/C++ compiler defines _MSC_VER to 1900
so it is enough to guard the snprintf define against it, cf. the attached patch
for win32config.h (from 2.9.1 "latest" tarball).
Diffstat (limited to 'buf.h')
0 files changed, 0 insertions, 0 deletions