diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-01-28 23:58:57 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-01-28 23:58:57 +0000 |
commit | c98f255154798847bdd1fc6ce33266c1a1ddc13a (patch) | |
tree | 50629732a762e2e1fbf837659328b807a224d806 /libstdc++-v3/config/os | |
parent | f4b7e754cc9db79e4239ffcdf56acc780543ed05 (diff) | |
download | gcc-c98f255154798847bdd1fc6ce33266c1a1ddc13a.tar.gz |
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
Diffstat (limited to 'libstdc++-v3/config/os')
-rw-r--r-- | libstdc++-v3/config/os/hpux/os_defines.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libstdc++-v3/config/os/hpux/os_defines.h b/libstdc++-v3/config/os/hpux/os_defines.h index 04834b0cd0c..20a8b3ed30b 100644 --- a/libstdc++-v3/config/os/hpux/os_defines.h +++ b/libstdc++-v3/config/os/hpux/os_defines.h @@ -109,4 +109,9 @@ typedef long int __padding_type; #if defined (__hppa__) #define _GLIBCXX_HAVE_BROKEN_STRTOLD 1 #endif + +// The vnsprintf function returns -1 when the buffer is too small. +// See PR libstdc++/68737. +#define _GLIBCXX_HAVE_BROKEN_VSNPRINTF 1 + #endif |