0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-26 12:41:06 +08:00

tests: Fix MSVC 2005 build

... I forgot we still support platforms without C99, 23 years later.
This commit is contained in:
Arseny Kapoulkine 2022-07-21 21:17:17 -07:00
parent ab8453c572
commit 3b5c1fb022
2 changed files with 10 additions and 0 deletions

View File

@ -736,7 +736,12 @@ struct temp_file
temp_file()
{
static int index = 0;
#if __cplusplus >= 201103
snprintf(path, sizeof(path), "%stempfile%d", test_runner::_temp_path, index++);
#else
sprintf(path, "%stempfile%d", test_runner::_temp_path, index++);
#endif
}
~temp_file()

View File

@ -795,7 +795,12 @@ struct test_walker: xml_tree_walker
std::basic_string<char_t> depthstr() const
{
char buf[32];
#if __cplusplus >= 201103
snprintf(buf, sizeof(buf), "%d", depth());
#else
sprintf(buf, "%d", depth());
#endif
#ifdef PUGIXML_WCHAR_MODE
wchar_t wbuf[32];