Commit 5303f3a4 by Paul Pluzhnikov Committed by Paul Pluzhnikov

Unbreak i386 and other builds where size_t != unsigned long.

2013-09-23  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* src/c++11/snprintf_lite.cc (__concat_size_t): Use only
	std::__int_to_char<unsigned long long>()

From-SVN: r202832
parent a895a2b8
2013-09-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* src/c++11/snprintf_lite.cc (__concat_size_t): Use only
std::__int_to_char<unsigned long long>()
2013-09-21 Paul Pluzhnikov <ppluzhnikov@google.com>
* include/bits/functexcept.h (__throw_out_of_range_fmt): New.
......
......@@ -70,9 +70,10 @@ namespace __gnu_cxx {
int __concat_size_t(char *__buf, size_t __bufsize, size_t __val)
{
// Long enough for decimal representation.
int __ilen = 3 * sizeof(__val);
unsigned long long __val_ull = __val;
int __ilen = 3 * sizeof(__val_ull);
char *__cs = static_cast<char*>(__builtin_alloca(__ilen));
size_t __len = std::__int_to_char(__cs + __ilen, __val,
size_t __len = std::__int_to_char(__cs + __ilen, __val_ull,
std::__num_base::_S_atoms_out,
std::ios_base::dec, true);
if (__bufsize < __len)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment