@@ -90,8 +90,6 @@ license you like.
9090
9191#ifndef JSON_CONFIG_H_INCLUDED
9292#define JSON_CONFIG_H_INCLUDED
93- #include < stddef.h>
94- #include < string> // typdef String
9593
9694// / If defined, indicates that json library is embedded in CppTL library.
9795// # define JSON_IN_CPPTL 1
@@ -124,12 +122,12 @@ license you like.
124122#ifdef JSON_IN_CPPTL
125123#define JSON_API CPPTL_API
126124#elif defined(JSON_DLL_BUILD)
127- #if defined(_MSC_VER) || defined(__MINGW32__)
125+ #if defined(_MSC_VER)
128126#define JSON_API __declspec (dllexport)
129127#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
130128#endif // if defined(_MSC_VER)
131129#elif defined(JSON_DLL)
132- #if defined(_MSC_VER) || defined(__MINGW32__)
130+ #if defined(_MSC_VER)
133131#define JSON_API __declspec (dllimport)
134132#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
135133#endif // if defined(_MSC_VER)
@@ -143,83 +141,34 @@ license you like.
143141// Storages, and 64 bits integer support is disabled.
144142// #define JSON_NO_INT64 1
145143
146- #if defined(_MSC_VER) // MSVC
147- # if _MSC_VER <= 1200 // MSVC 6
148- // Microsoft Visual Studio 6 only support conversion from __int64 to double
149- // (no conversion from unsigned __int64).
150- # define JSON_USE_INT64_DOUBLE_CONVERSION 1
151- // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
152- // characters in the debug information)
153- // All projects I've ever seen with VS6 were using this globally (not bothering
154- // with pragma push/pop).
155- # pragma warning(disable : 4786)
156- # endif // MSVC 6
157-
158- # if _MSC_VER >= 1500 // MSVC 2008
159- // / Indicates that the following function is deprecated.
160- # define JSONCPP_DEPRECATED (message ) __declspec(deprecated(message))
161- # endif
162-
163- #endif // defined(_MSC_VER)
164-
165- #if defined(_MSC_VER) && _MSC_VER <= 1600 // MSVC <= 2010
166- # define JSONCPP_OVERRIDE
167- #else
168- # define JSONCPP_OVERRIDE override
169- #endif // MSVC <= 2010
170-
171-
172- #ifndef JSON_HAS_RVALUE_REFERENCES
173-
174- #if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010
175- #define JSON_HAS_RVALUE_REFERENCES 1
176- #endif // MSVC >= 2010
177-
178- #ifdef __clang__
179- #if __has_feature(cxx_rvalue_references)
180- #define JSON_HAS_RVALUE_REFERENCES 1
181- #endif // has_feature
182-
183- #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
184- #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
185- #define JSON_HAS_RVALUE_REFERENCES 1
186- #endif // GXX_EXPERIMENTAL
187-
188- #endif // __clang__ || __GNUC__
189-
190- #endif // not defined JSON_HAS_RVALUE_REFERENCES
191-
192- #ifndef JSON_HAS_RVALUE_REFERENCES
193- #define JSON_HAS_RVALUE_REFERENCES 0
144+ #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
145+ // Microsoft Visual Studio 6 only support conversion from __int64 to double
146+ // (no conversion from unsigned __int64).
147+ #define JSON_USE_INT64_DOUBLE_CONVERSION 1
148+ // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
149+ // characters in the debug information)
150+ // All projects I've ever seen with VS6 were using this globally (not bothering
151+ // with pragma push/pop).
152+ #pragma warning(disable : 4786)
153+ #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
154+
155+ #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
156+ // / Indicates that the following function is deprecated.
157+ #define JSONCPP_DEPRECATED (message ) __declspec(deprecated(message))
158+ #elif defined(__clang__) && defined(__has_feature)
159+ #if __has_feature(attribute_deprecated_with_message)
160+ #define JSONCPP_DEPRECATED (message ) __attribute__ ((deprecated(message)))
161+ #endif
162+ #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
163+ #define JSONCPP_DEPRECATED (message ) __attribute__ ((deprecated(message)))
164+ #elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
165+ #define JSONCPP_DEPRECATED (message ) __attribute__((__deprecated__))
194166#endif
195-
196- #ifdef __clang__
197- #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
198- # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
199- # define JSONCPP_DEPRECATED (message ) __attribute__ ((deprecated(message)))
200- # elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
201- # define JSONCPP_DEPRECATED (message ) __attribute__((__deprecated__))
202- # endif // GNUC version
203- #endif // __clang__ || __GNUC__
204167
205168#if !defined(JSONCPP_DEPRECATED)
206169#define JSONCPP_DEPRECATED (message )
207170#endif // if !defined(JSONCPP_DEPRECATED)
208171
209- #if __GNUC__ >= 6
210- # define JSON_USE_INT64_DOUBLE_CONVERSION 1
211- #endif
212-
213- #if !defined(JSON_IS_AMALGAMATION)
214-
215- # include " version.h"
216-
217- # if JSONCPP_USING_SECURE_MEMORY
218- # include " allocator.h" // typedef Allocator
219- # endif
220-
221- #endif // if !defined(JSON_IS_AMALGAMATION)
222-
223172namespace Json {
224173typedef int Int;
225174typedef unsigned int UInt;
@@ -240,19 +189,6 @@ typedef Int64 LargestInt;
240189typedef UInt64 LargestUInt;
241190#define JSON_HAS_INT64
242191#endif // if defined(JSON_NO_INT64)
243- #if JSONCPP_USING_SECURE_MEMORY
244- #define JSONCPP_STRING std::basic_string<char , std::char_traits<char >, Json::SecureAllocator<char > >
245- #define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char , std::char_traits<char >, Json::SecureAllocator<char > >
246- #define JSONCPP_OSTREAM std::basic_ostream<char , std::char_traits<char >>
247- #define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char , std::char_traits<char >, Json::SecureAllocator<char > >
248- #define JSONCPP_ISTREAM std::istream
249- #else
250- #define JSONCPP_STRING std::string
251- #define JSONCPP_OSTRINGSTREAM std::ostringstream
252- #define JSONCPP_OSTREAM std::ostream
253- #define JSONCPP_ISTRINGSTREAM std::istringstream
254- #define JSONCPP_ISTREAM std::istream
255- #endif // if JSONCPP_USING_SECURE_MEMORY
256192} // end namespace Json
257193
258194#endif // JSON_CONFIG_H_INCLUDED
0 commit comments