Skip to content

Make 64-bit int work with 'long int' and 'int64_t' for 64 bit builds (Issue #64) #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions include/json/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#define JSONCPP_DEPRECATED(message)
#endif // if !defined(JSONCPP_DEPRECATED)

#include <cstdint>
namespace Json {
typedef int Int;
typedef unsigned int UInt;
Expand All @@ -99,9 +100,12 @@ typedef unsigned int LargestUInt;
#if defined(_MSC_VER) // Microsoft Visual Studio
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#else // if defined(_MSC_VER) // Other platforms, use long long
typedef long long int Int64;
typedef unsigned long long int UInt64;
#elif __cplusplus >= 201103L // Using C++11
typedef int64_t Int64;
typedef uint64_t UInt64;
#else // Other platforms, use long long
typedef long long Int64;
typedef unsigned long long Uint64;
#endif // if defined(_MSC_VER)
typedef Int64 LargestInt;
typedef UInt64 LargestUInt;
Expand Down