Commit cc883350 authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

document.h: define __STDC_CONSTANT_MACROS

The C++ standard does not include the C99 macros used to set the (U)INT64
constants in document.h and reader.h (see adf66292 and ce1fece2).

Many implementations include their definition when the
__STDC_CONSTANT_MACROS preprocessor symbol is defined.

See e.g. http://www.cprogramdevelop.com/5272623/,
needed to successfully build in travis-ci.org's environment.
parent 43628f6f
......@@ -10,13 +10,19 @@
///////////////////////////////////////////////////////////////////////////////
// RAPIDJSON_NO_INT64DEFINE
// Here defines int64_t and uint64_t types in global namespace.
// Here defines int64_t and uint64_t types in global namespace as well as the
// (U)INT64_C constant macros.
// If user have their own definition, can define RAPIDJSON_NO_INT64DEFINE to disable this.
#ifndef RAPIDJSON_NO_INT64DEFINE
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS 1 // required by C++ standard
#endif
#ifdef _MSC_VER
#include "msinttypes/stdint.h"
#include "msinttypes/inttypes.h"
#else
// Other compilers should have this.
#include <stdint.h>
#include <inttypes.h>
#endif
#endif // RAPIDJSON_NO_INT64TYPEDEF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment