Skip to content

Commit ae8dc10

Browse files
committed
Make 64-bit int work with 'long int' and 'int64_t' for 64 bit builds (Issue open-source-parsers#64)
1 parent e384e49 commit ae8dc10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/json/config.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#define JSONCPP_DEPRECATED(message)
8888
#endif // if !defined(JSONCPP_DEPRECATED)
8989

90+
#include <stdint.h>
9091
namespace Json {
9192
typedef int Int;
9293
typedef unsigned int UInt;
@@ -100,8 +101,8 @@ typedef unsigned int LargestUInt;
100101
typedef __int64 Int64;
101102
typedef unsigned __int64 UInt64;
102103
#else // if defined(_MSC_VER) // Other platforms, use long long
103-
typedef long long int Int64;
104-
typedef unsigned long long int UInt64;
104+
typedef int64_t Int64;
105+
typedef uint64_t UInt64;
105106
#endif // if defined(_MSC_VER)
106107
typedef Int64 LargestInt;
107108
typedef UInt64 LargestUInt;

0 commit comments

Comments
 (0)