Skip to content

Commit e312846

Browse files
committed
Fix for c++ builder 12.2
1 parent 7c4c845 commit e312846

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/wsjcpp_yaml.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Official Source Code: https://github.com/wsjcpp/wsjcpp-yaml
3131
#include <fstream>
3232
#include <algorithm>
3333
#include <iomanip>
34+
#if defined(__CODEGEARC__) && !defined(_WIN64)
35+
#include <stdlib.h>
36+
#endif
3437

3538
// ---------------------------------------------------------------------
3639

@@ -42,7 +45,12 @@ std::string WSJCPP_INT_TO_STR(int number) {
4245
0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,
4346
0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0
4447
};
45-
_itoa(number, buffer, 10 );
48+
#if __CODEGEARC__ == 0x0770
49+
// 12.2
50+
_itoa(number, buffer, 10);
51+
#else
52+
itoa(number, buffer, 10);
53+
#endif
4654
return std::string(buffer);
4755
#else
4856
return std::to_string(number);

0 commit comments

Comments
 (0)