Skip to content

Commit 2c872ec

Browse files
committed
Merge pull request open-source-parsers#406 from magnific0/master
std::snprintf not part of std for MinGW32 using c++11
2 parents b860cc3 + bc9b445 commit 2c872ec

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/lib_json/json_reader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030
#elif defined(__ANDROID__) || defined(__QNXNTO__)
3131
#define snprintf snprintf
3232
#elif __cplusplus >= 201103L
33+
#if !defined(__MINGW32__)
3334
#define snprintf std::snprintf
3435
#endif
36+
#endif
3537

3638
#if defined(__QNXNTO__)
3739
#define sscanf std::sscanf

src/lib_json/json_writer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@
5757
#elif defined(__ANDROID__) || defined(__QNXNTO__)
5858
#define snprintf snprintf
5959
#elif __cplusplus >= 201103L
60+
#if !defined(__MINGW32__)
6061
#define snprintf std::snprintf
6162
#endif
63+
#endif
6264

6365
#if defined(__BORLANDC__)
6466
#include <float.h>

0 commit comments

Comments
 (0)