mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-19 11:52:25 +02:00
WinCE Compatibility Fix
Note: str.imbue and std::locale::classic() are not supported on WINCE
This commit is contained in:
parent
8582876c5c
commit
27e3263894
@ -781,7 +781,11 @@ std::string Reader::getLocationLineAndColumn(Location location) const {
|
|||||||
getLocationLineAndColumn(location, line, column);
|
getLocationLineAndColumn(location, line, column);
|
||||||
char buffer[18 + 16 + 16 + 1];
|
char buffer[18 + 16 + 16 + 1];
|
||||||
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
|
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
|
||||||
|
#if defined(WINCE)
|
||||||
|
_snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
||||||
|
#else
|
||||||
sprintf_s(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
sprintf_s(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
||||||
#endif
|
#endif
|
||||||
|
@ -73,7 +73,11 @@ std::string valueToString(double value) {
|
|||||||
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with
|
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with
|
||||||
// visual studio 2005 to
|
// visual studio 2005 to
|
||||||
// avoid warning.
|
// avoid warning.
|
||||||
|
#if defined(WINCE)
|
||||||
|
_snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||||
|
#else
|
||||||
sprintf_s(buffer, sizeof(buffer), "%.16g", value);
|
sprintf_s(buffer, sizeof(buffer), "%.16g", value);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
snprintf(buffer, sizeof(buffer), "%.16g", value);
|
snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user