You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2018/06/26 13:36:00 UTC
[1/3] mesos git commit: Always defined `PICOJSON_USE_INT64`.
Repository: mesos
Updated Branches:
refs/heads/master 9407d5468 -> 784825b33
Always defined `PICOJSON_USE_INT64`.
The macro `PICOJSON_USE_INT64` must always be defined when attempting
to use stout's JSON facilities since they unconditionally depend on
these features.
Previously, we relied on the Mesos build system to set that macro from
the command line, but since we don't generate a separate pkg-config
file for stout there is no way to convey this information to other
users of stout.
Even for users trying to use stout as part of a libmesos installation,
it might be surprising that it is required to read `CPPFLAGS` if only
the header-only stout part is to be used.
Review: https://reviews.apache.org/r/67632/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2a0d684a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2a0d684a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2a0d684a
Branch: refs/heads/master
Commit: 2a0d684a419cd57bed4b985b46bf537ba9fce63b
Parents: 9407d54
Author: Benno Evers <be...@mesosphere.com>
Authored: Tue Jun 26 13:56:12 2018 +0200
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Tue Jun 26 14:35:47 2018 +0200
----------------------------------------------------------------------
3rdparty/stout/Makefile.am | 5 +----
3rdparty/stout/include/stout/json.hpp | 4 ++++
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/2a0d684a/3rdparty/stout/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/stout/Makefile.am b/3rdparty/stout/Makefile.am
index 5a9db57..44710c2 100644
--- a/3rdparty/stout/Makefile.am
+++ b/3rdparty/stout/Makefile.am
@@ -93,10 +93,7 @@ $(LIB_GMOCK): $(GMOCK)-build-stamp
BUNDLED_DEPS += $(GMOCK)-build-stamp
endif
-# Enable the INT64 support for PicoJSON.
-PICOJSON_INCLUDE_FLAGS = \
- -DPICOJSON_USE_INT64 \
- -D__STDC_FORMAT_MACROS
+PICOJSON_INCLUDE_FLAGS = -D__STDC_FORMAT_MACROS
if WITH_BUNDLED_LIBARCHIVE
LIBARCHIVE_INCLUDE_FLAGS = -I$(LIBARCHIVE)/libarchive
http://git-wip-us.apache.org/repos/asf/mesos/blob/2a0d684a/3rdparty/stout/include/stout/json.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/json.hpp b/3rdparty/stout/include/stout/json.hpp
index 5e738cf..c374e29 100644
--- a/3rdparty/stout/include/stout/json.hpp
+++ b/3rdparty/stout/include/stout/json.hpp
@@ -19,6 +19,10 @@
// libraries may import <inttypes.h> before we import <picojson.h>.
// Hence, we undefine the flag here to prevent the redefinition error.
#undef __STDC_FORMAT_MACROS
+// We also need to define `PICOJSON_USE_INT64`, since we're
+// unconditionally using the `picojson::value::get<uint64_t>()` and
+// `picojson::value::is<uint64_t>()` functions below.
+#define PICOJSON_USE_INT64
#include <picojson.h>
#define __STDC_FORMAT_MACROS
[2/3] mesos git commit: Removed `PICOJSON_USE_INT64` from libprocess
build system.
Posted by bb...@apache.org.
Removed `PICOJSON_USE_INT64` from libprocess build system.
It is no longer necessary, since the macro is now set directly within
`stout/json.hpp`.
Review: https://reviews.apache.org/r/67633/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4520541f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4520541f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4520541f
Branch: refs/heads/master
Commit: 4520541fb8453181e26424e7aa8b8513c175d6cb
Parents: 2a0d684
Author: Benno Evers <be...@mesosphere.com>
Authored: Tue Jun 26 13:56:18 2018 +0200
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Tue Jun 26 14:36:18 2018 +0200
----------------------------------------------------------------------
3rdparty/libprocess/Makefile.am | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/4520541f/3rdparty/libprocess/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/Makefile.am b/3rdparty/libprocess/Makefile.am
index 8910416..de69d04 100644
--- a/3rdparty/libprocess/Makefile.am
+++ b/3rdparty/libprocess/Makefile.am
@@ -157,9 +157,7 @@ LIB_EV = -lev
endif
endif
-PICOJSON_INCLUDE_FLAGS = \
- -DPICOJSON_USE_INT64 \
- -D__STDC_FORMAT_MACROS
+PICOJSON_INCLUDE_FLAGS = -D__STDC_FORMAT_MACROS
if WITH_BUNDLED_PICOJSON
PICOJSON_INCLUDE_FLAGS += -I$(PICOJSON)
BUNDLED_DEPS += $(PICOJSON)-stamp
[3/3] mesos git commit: Removed `PICOJSON_USE_INT64` from Mesos build
system.
Posted by bb...@apache.org.
Removed `PICOJSON_USE_INT64` from Mesos build system.
It is no longer necessary, since the macro is now defined directly
within `stout/json.hpp`.
Review: https://reviews.apache.org/r/67634/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/784825b3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/784825b3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/784825b3
Branch: refs/heads/master
Commit: 784825b33d9230a898a221ec5baed62f9c34dd44
Parents: 4520541
Author: Benno Evers <be...@mesosphere.com>
Authored: Tue Jun 26 13:56:23 2018 +0200
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Tue Jun 26 15:05:20 2018 +0200
----------------------------------------------------------------------
3rdparty/CMakeLists.txt | 2 --
mesos.pc.in | 2 +-
src/Makefile.am | 2 --
3 files changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/784825b3/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 1360d18..8128808 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -414,14 +414,12 @@ add_library(picojson INTERFACE)
add_dependencies(picojson ${PICOJSON_TARGET})
target_include_directories(picojson INTERFACE ${PICOJSON_ROOT})
-# 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.
target_compile_definitions(
picojson INTERFACE
- PICOJSON_USE_INT64
__STDC_FORMAT_MACROS)
ExternalProject_Add(
http://git-wip-us.apache.org/repos/asf/mesos/blob/784825b3/mesos.pc.in
----------------------------------------------------------------------
diff --git a/mesos.pc.in b/mesos.pc.in
index 61d6d0b..4544201 100644
--- a/mesos.pc.in
+++ b/mesos.pc.in
@@ -11,5 +11,5 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
-Cflags: -I${includedir} -DPICOJSON_USE_INT64 -D__STDC_FORMAT_MACROS @MODULE_CFLAGS@
+Cflags: -I${includedir} -D__STDC_FORMAT_MACROS @MODULE_CFLAGS@
Libs: -L${libdir} -lmesos @MODULE_LDFLAGS@
http://git-wip-us.apache.org/repos/asf/mesos/blob/784825b3/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 2bcee1e..bd94a64 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -143,12 +143,10 @@ MESOS_CPPFLAGS += -I../include/mesos
# library each time. (Currently, we don't support platforms where this is not
# possible.)
-# 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
if WITH_BUNDLED_BOOST