aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Langlois <pierre.langlois@arm.com>2015-03-09 10:39:53 +0000
committerPierre Langlois <pierre.langlois@arm.com>2016-03-04 17:46:18 +0000
commitdca91a8c666240d3d9b5e916e28843833c320010 (patch)
tree31f48d4727b54cb715e123dd68851d18117af25a
parent5b44c43b068671be8db6ffbdd11ff0ff69ce381c (diff)
downloadkdbinder-dca91a8c666240d3d9b5e916e28843833c320010.tar.gz
libkdbidner: kdbus: include <sys/limits.h> for CHAR_BIT
CHAR_BIT is defined in <sys/limits.h> and is needed by <vector> and <sstream>. Sadly, they do not include it automatically. Change-Id: I1e2826e85e86e4c272651f088ec0d37b36a6102e
-rw-r--r--include/kdbinder/kdbus/connection.h5
-rw-r--r--include/kdbinder/kdbus/message.h5
-rw-r--r--libs/kdbinder/binder.md2
-rw-r--r--libs/kdbinder/kdbus.md4
-rw-r--r--libs/kdbinder/kdbus/command.h1
-rw-r--r--libs/kdbinder/kdbus/connection.cpp5
6 files changed, 13 insertions, 9 deletions
diff --git a/include/kdbinder/kdbus/connection.h b/include/kdbinder/kdbus/connection.h
index 6914e30..eaee72f 100644
--- a/include/kdbinder/kdbus/connection.h
+++ b/include/kdbinder/kdbus/connection.h
@@ -19,9 +19,10 @@
#include <kdbinder/kdbus/bus.h>
#include <kdbinder/kdbus/message.h>
-#define CHAR_BIT 8
+// TODO: We need to include <sys/limits.h> because <vector> needs
+// CHAR_BIT defined.
+#include <sys/limits.h>
#include <vector>
-#undef CHAR_BIT
#include <string>
#include <memory>
diff --git a/include/kdbinder/kdbus/message.h b/include/kdbinder/kdbus/message.h
index 7fb4b49..45811cf 100644
--- a/include/kdbinder/kdbus/message.h
+++ b/include/kdbinder/kdbus/message.h
@@ -19,9 +19,10 @@
#include <kdbinder/kdbus/item.h>
#include <cstdlib>
-#define CHAR_BIT 8
+// TODO: We need to include <sys/limits.h> because <vector> needs
+// CHAR_BIT defined.
+#include <sys/limits.h>
#include <vector>
-#undef CHAR_BIT
struct kdbus_msg;
diff --git a/libs/kdbinder/binder.md b/libs/kdbinder/binder.md
index c28ae79..a841243 100644
--- a/libs/kdbinder/binder.md
+++ b/libs/kdbinder/binder.md
@@ -1,4 +1,4 @@
Binder API
==========
-TODO(pielan01): Document the supported Binder API.
+TODO: Document the supported Binder API.
diff --git a/libs/kdbinder/kdbus.md b/libs/kdbinder/kdbus.md
index 88147d7..516918b 100644
--- a/libs/kdbinder/kdbus.md
+++ b/libs/kdbinder/kdbus.md
@@ -100,7 +100,7 @@ This item is used to give a bus a name.
### ItemBloomParameter: `KDBUS_ITEM_BLOOM_PARAMETER`
-TODO(pielan01): Document the mandatory bloom parameter.
+TODO: Document the mandatory bloom parameter.
ItemBloomParameter(uint64_t size, uint64_t n_hash);
@@ -279,7 +279,7 @@ an error code and an error string. On success, the error code is zero,
otherwise it corresponds to the error code returned by the underlying KDBUS
command.
-TODO(pielan01): document every error code for each commands.
+TODO: document every error code for each commands.
Every method interacting with the bus will return a `Reply`.
diff --git a/libs/kdbinder/kdbus/command.h b/libs/kdbinder/kdbus/command.h
index 081e771..49cb1f9 100644
--- a/libs/kdbinder/kdbus/command.h
+++ b/libs/kdbinder/kdbus/command.h
@@ -22,6 +22,7 @@
#include <kdbus.h>
#include <alloca.h>
#include <errno.h>
+#include <sys/limits.h>
#include <vector>
#include <memory>
diff --git a/libs/kdbinder/kdbus/connection.cpp b/libs/kdbinder/kdbus/connection.cpp
index b4aeb43..80f4b6d 100644
--- a/libs/kdbinder/kdbus/connection.cpp
+++ b/libs/kdbinder/kdbus/connection.cpp
@@ -27,10 +27,11 @@
#include <sys/mman.h>
#include <errno.h>
-#define CHAR_BIT 8
+// TODO: We need to include <sys/limits.h> because <vector> and
+// <sstream> need CHAR_BIT defined.
+#include <sys/limits.h>
#include <vector>
#include <sstream>
-#undef CHAR_BIT
#include <string>