Integer Precision for JSON <-> Protobuf conversions.

Add `PICOJSON_USE_INT64` and `__STDC_FORMAT_MACROS` flag to mesos
compilation flags.

Review: https://reviews.apache.org/r/38030


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7ebbdd02
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7ebbdd02
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7ebbdd02

Branch: refs/heads/master
Commit: 7ebbdd0219315b926a66b7d5d03e07fa4ece334f
Parents: 1c56438
Author: Joseph Wu <[email protected]>
Authored: Fri Sep 18 12:11:19 2015 -0400
Committer: Joris Van Remoortere <[email protected]>
Committed: Fri Sep 18 12:37:18 2015 -0400

----------------------------------------------------------------------
 src/Makefile.am | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7ebbdd02/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 2286366..834f69a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -106,6 +106,14 @@ MESOS_CPPFLAGS += -I../include/mesos
 MESOS_CPPFLAGS += -I../$(BOOST)
 MESOS_CPPFLAGS += -I../$(PICOJSON)
 
+# Enable the INT64 support for PicoJson.
+# NOTE: PicoJson requires __STDC_FORMAT_MACROS to be defined before importing
+# 'inttypes.h'.  Since other libraries may also import this header, it must
+# be globally defined so that PicoJson has access to the macros, regardless
+# of the order of inclusion.
+MESOS_CPPFLAGS += -DPICOJSON_USE_INT64
+MESOS_CPPFLAGS += -D__STDC_FORMAT_MACROS
+
 MESOS_CPPFLAGS += -I../$(PROTOBUF)/src
 MESOS_CPPFLAGS += -I../$(GLOG)/src
 

Reply via email to