diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-05-22 21:06:50 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-05-22 21:06:50 +0000 |
commit | 59513b1790e86840f13755751e327df80e4bec33 (patch) | |
tree | c815edac4eacd13c8e02107b4fc97271a7919ab3 /cpp/src/IceUtil/OutputUtil.cpp | |
parent | Bug 1022. (diff) | |
download | ice-59513b1790e86840f13755751e327df80e4bec33.tar.bz2 ice-59513b1790e86840f13755751e327df80e4bec33.tar.xz ice-59513b1790e86840f13755751e327df80e4bec33.zip |
bug 1854 - adding int64ToString
Diffstat (limited to 'cpp/src/IceUtil/OutputUtil.cpp')
-rw-r--r-- | cpp/src/IceUtil/OutputUtil.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/OutputUtil.cpp b/cpp/src/IceUtil/OutputUtil.cpp index e3ef63d1a45..953606520af 100644 --- a/cpp/src/IceUtil/OutputUtil.cpp +++ b/cpp/src/IceUtil/OutputUtil.cpp @@ -27,6 +27,20 @@ EndEscapes endEscapes; } +string +IceUtil::int64ToString(Int64 val) +{ + char buf[64]; +#ifdef WIN32 + sprintf(buf, "%I64d", val); +#elif defined(ICE_64) + sprintf(buf, "%ld", val); // Avoids a format warning from GCC. +#else + sprintf(buf, "%lld", val); +#endif + return string(buf); +} + // ---------------------------------------------------------------------- // OutputBase // ---------------------------------------------------------------------- |