PR libstdc++/68737 Do not use vsnprintf on HPUX
authorJonathan Wakely <jwakely@redhat.com>
Mon, 28 Jan 2019 23:58:57 +0000 (23:58 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 28 Jan 2019 23:58:57 +0000 (23:58 +0000)
commitc98f255154798847bdd1fc6ce33266c1a1ddc13a
tree50629732a762e2e1fbf837659328b807a224d806
parentf4b7e754cc9db79e4239ffcdf56acc780543ed05
PR libstdc++/68737 Do not use vsnprintf on HPUX

It doesn't conform to the spec, so use vsprintf with a large buffer
instead.

PR libstdc++/68737
* config/locale/generic/c_locale.h (__convert_from_v)
[_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
* config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
* include/bits/locale_facets.tcc (num_put::_M_insert_float)
[_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.

From-SVN: r268350
libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/generic/c_locale.h
libstdc++-v3/config/os/hpux/os_defines.h
libstdc++-v3/include/bits/locale_facets.tcc