fixes for macos/clang

This commit is contained in:
Günter Obiltschnig
2020-01-09 11:53:03 +01:00
parent 1bf40a0cd2
commit 03d1dd9822
41 changed files with 389 additions and 1317 deletions

View File

@@ -23,7 +23,7 @@
#if defined(_MSC_VER) || defined(__MINGW32__)
#define I64_FMT "I64"
#elif defined(__APPLE__)
#elif defined(__APPLE__)
#define I64_FMT "q"
#else
#define I64_FMT "ll"
@@ -236,101 +236,6 @@ void NumberFormatter::appendHex(std::string& str, unsigned long value, int width
#ifdef POCO_HAVE_INT64
#ifdef POCO_LONG_IS_64_BIT
void NumberFormatter::append(std::string& str, long long value)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
intToStr(value, 10, result, sz);
str.append(result, sz);
}
void NumberFormatter::append(std::string& str, long long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
intToStr(value, 10, result, sz, false, width, '0');
str.append(result, sz);
}
void NumberFormatter::append0(std::string& str, long long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
intToStr(value, 10, result, sz, false, width, '0');
str.append(result, sz);
}
void NumberFormatter::appendHex(std::string& str, long long value)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(static_cast<unsigned long long>(value), 0x10, result, sz);
str.append(result, sz);
}
void NumberFormatter::appendHex(std::string& str, long long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(static_cast<unsigned long long>(value), 0x10, result, sz, false, width, '0');
str.append(result, sz);
}
void NumberFormatter::append(std::string& str, unsigned long long value)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(value, 10, result, sz);
str.append(result, sz);
}
void NumberFormatter::append(std::string& str, unsigned long long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(value, 10, result, sz, false, width, '0');
str.append(result, sz);
}
void NumberFormatter::append0(std::string& str, unsigned long long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(value, 10, result, sz, false, width, '0');
str.append(result, sz);
}
void NumberFormatter::appendHex(std::string& str, unsigned long long value)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(value, 0x10, result, sz);
str.append(result, sz);
}
void NumberFormatter::appendHex(std::string& str, unsigned long long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
uIntToStr(value, 0x10, result, sz, false, width, '0');
str.append(result, sz);
}
#else // ifndef POCO_LONG_IS_64_BIT
void NumberFormatter::append(std::string& str, Int64 value)
{
@@ -422,8 +327,6 @@ void NumberFormatter::appendHex(std::string& str, UInt64 value, int width)
}
#endif // ifdef POCO_LONG_IS_64_BIT
#endif // ifdef POCO_HAVE_INT64