00001
00002
00003
00004
00005
00006 #ifndef JSON_CONFIG_H_INCLUDED
00007 #define JSON_CONFIG_H_INCLUDED
00008
00010
00011
00013
00017
00018
00019
00020
00021 #ifndef JSON_USE_EXCEPTION
00022 #define JSON_USE_EXCEPTION 1
00023 #endif
00024
00028
00029
00030 #ifdef JSON_IN_CPPTL
00031 #include <cpptl/config.h>
00032 #ifndef JSON_USE_CPPTL
00033 #define JSON_USE_CPPTL 1
00034 #endif
00035 #endif
00036
00037 #ifdef JSON_IN_CPPTL
00038 #define JSON_API CPPTL_API
00039 #elif defined(JSON_DLL_BUILD)
00040 #if defined(_MSC_VER)
00041 #define JSON_API __declspec(dllexport)
00042 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
00043 #endif // if defined(_MSC_VER)
00044 #elif defined(JSON_DLL)
00045 #if defined(_MSC_VER)
00046 #define JSON_API __declspec(dllimport)
00047 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
00048 #endif // if defined(_MSC_VER)
00049 #endif // ifdef JSON_IN_CPPTL
00050 #if !defined(JSON_API)
00051 #define JSON_API
00052 #endif
00053
00054
00055
00056
00057
00058
00059 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
00060
00061
00062 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
00063
00064
00065
00066
00067 #pragma warning(disable : 4786)
00068 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
00069
00070 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
00072 #define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
00073 #elif defined(__clang__) && defined(__has_feature)
00074 #if __has_feature(attribute_deprecated_with_message)
00075 #define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
00076 #endif
00077 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
00078 #define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
00079 #elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
00080 #define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
00081 #endif
00082
00083 #if !defined(JSONCPP_DEPRECATED)
00084 #define JSONCPP_DEPRECATED(message)
00085 #endif // if !defined(JSONCPP_DEPRECATED)
00086
00087 namespace Json {
00088 typedef int Int;
00089 typedef unsigned int UInt;
00090 #if defined(JSON_NO_INT64)
00091 typedef int LargestInt;
00092 typedef unsigned int LargestUInt;
00093 #undef JSON_HAS_INT64
00094 #else // if defined(JSON_NO_INT64)
00095
00096 #if defined(_MSC_VER) // Microsoft Visual Studio
00097 typedef __int64 Int64;
00098 typedef unsigned __int64 UInt64;
00099 #else // if defined(_MSC_VER) // Other platforms, use long long
00100 typedef long long int Int64;
00101 typedef unsigned long long int UInt64;
00102 #endif // if defined(_MSC_VER)
00103 typedef Int64 LargestInt;
00104 typedef UInt64 LargestUInt;
00105 #define JSON_HAS_INT64
00106 #endif // if defined(JSON_NO_INT64)
00107 }
00108
00109 #endif // JSON_CONFIG_H_INCLUDED