gcc fix
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@258 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
c6e143aba7
commit
79f4f270a5
2 changed files with 9 additions and 0 deletions
|
@ -55,7 +55,12 @@ void TestCase(const string& fmt, T value) {
|
|||
char buf[4096];
|
||||
std::string s;
|
||||
const int i1 = SPrintf(s, fmt.c_str())(value);
|
||||
#ifdef _MSC_VER
|
||||
const int i2 = _snprintf(buf, sizeof(buf), fmt.c_str(), value);
|
||||
#else
|
||||
const int i2 = snprintf(buf, sizeof(buf), fmt.c_str(), value);
|
||||
#endif
|
||||
|
||||
if (i1 != i2 || s != buf) {
|
||||
cout <<
|
||||
"\nReference: " << i2 <<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue