diff options
author | Thomas Anderson <thomasanderson@google.com> | 2019-03-26 19:51:30 +0000 |
---|---|---|
committer | Thomas Anderson <thomasanderson@google.com> | 2019-03-26 19:51:30 +0000 |
commit | d4d824a861b9bed09fe1e34c0a00be0df1ec851a (patch) | |
tree | 2826b46e4a777b2df19e49aa44b5d5fa7b364951 /lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h | |
parent | b66754a29ed7a479e36fed89e0b45d10d5e71e71 (diff) | |
download | bcm5719-llvm-d4d824a861b9bed09fe1e34c0a00be0df1ec851a.tar.gz bcm5719-llvm-d4d824a861b9bed09fe1e34c0a00be0df1ec851a.zip |
[libc++] Fix return value of snprintf_l() on Windows when buffer is too small
When the output buffer is too small to contain the output, `vsnprintf()`
fills the buffer and returns the number of characters that __would have__
been written if the buffer was sufficiently large.
`_vnsprintf_s()` on the other hand fills the buffer and returns -1 when this
happens. We want the former behavior, but we also want to be able to
pass in a locale to prevent having to call `setlocale()`.
`__stdio_common_vsprintf()` is the only function general enough to get
the behavior we want.
Differential Revision: https://reviews.llvm.org/D59727
llvm-svn: 357024
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h')
0 files changed, 0 insertions, 0 deletions