Commit 656877e1 authored by Kenton Varda's avatar Kenton Varda

Merge branch 'master' of github.com:kentonv/capnproto

parents af899ceb deb72f5e
......@@ -63,7 +63,11 @@ else()
#
# We have to use -std=gnu++0x isntead of -std=c++11 because otherwise we lose
# GNU extensions that we need.
add_compile_options(-std=gnu++0x -Wall -Wextra -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter -pthread)
add_compile_options(-std=gnu++0x -Wall -Wextra -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter)
if (NOT ANDROID)
add_compile_options(-pthread)
endif()
endif()
# Source =======================================================================
......
......@@ -427,8 +427,8 @@ struct List<AnyPointer, Kind::OTHER> {
inline Builder(decltype(nullptr)): builder(ElementSize::POINTER) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline AnyPointer::Builder operator[](uint index) {
......@@ -592,8 +592,8 @@ public:
inline Builder(decltype(nullptr)): builder(ElementSize::INLINE_COMPOSITE) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline AnyStruct::Builder operator[](uint index) {
......
......@@ -113,7 +113,7 @@ public:
: Params::Builder(builder), hook(kj::mv(hook)) {}
inline Request(decltype(nullptr)): Params::Builder(nullptr) {}
RemotePromise<Results> send();
RemotePromise<Results> send() KJ_WARN_UNUSED_RESULT;
// Send the call and return a promise for the results.
private:
......@@ -678,8 +678,8 @@ struct List<T, Kind::INTERFACE> {
inline Builder(decltype(nullptr)) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline typename T::Client operator[](uint index) {
......
......@@ -143,8 +143,8 @@ struct List<T, Kind::PRIMITIVE> {
inline Builder(decltype(nullptr)) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline T operator[](uint index) {
......@@ -239,8 +239,8 @@ struct List<T, Kind::STRUCT> {
inline Builder(decltype(nullptr)) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline typename T::Builder operator[](uint index) {
......@@ -362,8 +362,8 @@ struct List<List<T>, Kind::LIST> {
inline Builder(decltype(nullptr)) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline typename List<T>::Builder operator[](uint index) {
......@@ -470,8 +470,8 @@ struct List<T, Kind::BLOB> {
inline Builder(decltype(nullptr)) {}
inline explicit Builder(_::ListBuilder builder): builder(builder) {}
inline operator Reader() { return Reader(builder.asReader()); }
inline Reader asReader() { return Reader(builder.asReader()); }
inline operator Reader() const { return Reader(builder.asReader()); }
inline Reader asReader() const { return Reader(builder.asReader()); }
inline uint size() const { return builder.size() / ELEMENTS; }
inline typename T::Builder operator[](uint index) {
......
......@@ -58,7 +58,7 @@ set(kj-std_headers
)
add_library(kj ${kj_sources})
add_library(CapnProto::kj ALIAS kj)
if(UNIX)
if(UNIX AND NOT ANDROID)
target_link_libraries(kj PUBLIC pthread)
endif()
#make sure the lite flag propagates to all users (internal + external) of this library
......
......@@ -1229,7 +1229,7 @@ public:
// OK, we know the cmsghdr is valid, at least.
// Find the start of the message payload.
const byte* begin = CMSG_DATA(cmsg);
const byte* begin = (const byte *)CMSG_DATA(cmsg);
// Cap the message length to the available space.
const byte* end = pos + kj::min(available, cmsg->cmsg_len);
......
......@@ -44,6 +44,10 @@
#include <sys/types.h>
#endif
#if !_WIN32
#include <sys/uio.h>
#endif
namespace kj {
namespace miniposix {
......
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