Merge pull request #653 from airtimemedia/master

Various compilation fixes
This commit is contained in:
Feng Xiao 2015-08-03 10:19:32 -07:00
commit dc80689af3
8 changed files with 9 additions and 13 deletions

View File

@ -24,6 +24,7 @@ set(libprotobuf_lite_files
add_library(libprotobuf-lite ${libprotobuf_lite_files})
target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT})
target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src)
set_target_properties(libprotobuf-lite PROPERTIES
COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite)

View File

@ -54,6 +54,7 @@ set(libprotobuf_files
add_library(libprotobuf ${libprotobuf_lite_files} ${libprotobuf_files})
target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES})
target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src)
set_target_properties(libprotobuf PROPERTIES
COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS
OUTPUT_NAME ${LIB_PREFIX}protobuf)

View File

@ -156,9 +156,7 @@ ImmutableMapFieldGenerator(const FieldDescriptor* descriptor,
int messageBitIndex,
int builderBitIndex,
Context* context)
: descriptor_(descriptor), messageBitIndex_(messageBitIndex),
builderBitIndex_(builderBitIndex), context_(context),
name_resolver_(context->GetNameResolver()) {
: descriptor_(descriptor), name_resolver_(context->GetNameResolver()) {
SetMessageVariables(descriptor, messageBitIndex, builderBitIndex,
context->GetFieldGeneratorInfo(descriptor),
name_resolver_, &variables_);

View File

@ -68,9 +68,6 @@ class ImmutableMapFieldGenerator : public ImmutableFieldGenerator {
private:
const FieldDescriptor* descriptor_;
map<string, string> variables_;
const int messageBitIndex_;
const int builderBitIndex_;
Context* context_;
ClassNameResolver* name_resolver_;
};

View File

@ -139,9 +139,7 @@ ImmutableMapFieldLiteGenerator(const FieldDescriptor* descriptor,
int messageBitIndex,
int builderBitIndex,
Context* context)
: descriptor_(descriptor), messageBitIndex_(messageBitIndex),
builderBitIndex_(builderBitIndex), context_(context),
name_resolver_(context->GetNameResolver()) {
: descriptor_(descriptor), name_resolver_(context->GetNameResolver()) {
SetMessageVariables(descriptor, messageBitIndex, builderBitIndex,
context->GetFieldGeneratorInfo(descriptor),
name_resolver_, &variables_);

View File

@ -67,9 +67,6 @@ class ImmutableMapFieldLiteGenerator : public ImmutableFieldLiteGenerator {
private:
const FieldDescriptor* descriptor_;
map<string, string> variables_;
const int messageBitIndex_;
const int builderBitIndex_;
Context* context_;
ClassNameResolver* name_resolver_;
};

View File

@ -172,7 +172,7 @@ class Map {
!defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID)
template<class NodeType, class... Args>
void construct(NodeType* p, Args&&... args) {
new (p) NodeType(std::forward<Args>(args)...);
new ((void*)p) NodeType(std::forward<Args>(args)...);
}
template<class NodeType>

View File

@ -30,6 +30,10 @@
#ifndef GOOGLE_PROTOBUF_STUBS_MUTEX_H_
#define GOOGLE_PROTOBUF_STUBS_MUTEX_H_
#ifdef GOOGLE_PROTOBUF_NO_THREADLOCAL
#include <pthread.h>
#endif
#include <google/protobuf/stubs/macros.h>
// ===================================================================