Merge pull request #8637 from dschopf/fix-qnx-7.0-support
Fix QNX 7.0 support #8593
This commit is contained in:
commit
8d8ba6acc3
@ -496,7 +496,7 @@ void RepeatedEnumFieldGenerator::GenerateConstinitInitializer(
|
|||||||
format("$name$_()");
|
format("$name$_()");
|
||||||
if (descriptor_->is_packed() &&
|
if (descriptor_->is_packed() &&
|
||||||
HasGeneratedMethods(descriptor_->file(), options_)) {
|
HasGeneratedMethods(descriptor_->file(), options_)) {
|
||||||
format("\n, _$name$_cached_byte_size_()");
|
format("\n, _$name$_cached_byte_size_(0)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ void RepeatedPrimitiveFieldGenerator::GenerateConstinitInitializer(
|
|||||||
format("$name$_()");
|
format("$name$_()");
|
||||||
if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
|
if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
|
||||||
HasGeneratedMethods(descriptor_->file(), options_)) {
|
HasGeneratedMethods(descriptor_->file(), options_)) {
|
||||||
format("\n, _$name$_cached_byte_size_()");
|
format("\n, _$name$_cached_byte_size_(0)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,9 +393,9 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UninterpretedOptionDefaultTypeI
|
|||||||
constexpr SourceCodeInfo_Location::SourceCodeInfo_Location(
|
constexpr SourceCodeInfo_Location::SourceCodeInfo_Location(
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
||||||
: path_()
|
: path_()
|
||||||
, _path_cached_byte_size_()
|
, _path_cached_byte_size_(0)
|
||||||
, span_()
|
, span_()
|
||||||
, _span_cached_byte_size_()
|
, _span_cached_byte_size_(0)
|
||||||
, leading_detached_comments_()
|
, leading_detached_comments_()
|
||||||
, leading_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
|
, leading_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
|
||||||
, trailing_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
|
, trailing_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
|
||||||
@ -423,7 +423,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SourceCodeInfoDefaultTypeIntern
|
|||||||
constexpr GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(
|
constexpr GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
||||||
: path_()
|
: path_()
|
||||||
, _path_cached_byte_size_()
|
, _path_cached_byte_size_(0)
|
||||||
, source_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
|
, source_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
|
||||||
, begin_(0)
|
, begin_(0)
|
||||||
, end_(0){}
|
, end_(0){}
|
||||||
|
@ -136,8 +136,10 @@
|
|||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
#include <sys/endian.h> // __BYTE_ORDER
|
#include <sys/endian.h> // __BYTE_ORDER
|
||||||
#else
|
#else
|
||||||
|
#if !defined(__QNX__)
|
||||||
#include <endian.h> // __BYTE_ORDER
|
#include <endian.h> // __BYTE_ORDER
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
|
#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
|
||||||
(defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
|
(defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN)) && \
|
||||||
!defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
|
!defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
|
||||||
|
@ -116,7 +116,11 @@ class CallOnceInitializedMutex {
|
|||||||
// mutexes.
|
// mutexes.
|
||||||
class GOOGLE_PROTOBUF_CAPABILITY("mutex") PROTOBUF_EXPORT WrappedMutex {
|
class GOOGLE_PROTOBUF_CAPABILITY("mutex") PROTOBUF_EXPORT WrappedMutex {
|
||||||
public:
|
public:
|
||||||
|
#if defined(__QNX__)
|
||||||
|
constexpr WrappedMutex() = default;
|
||||||
|
#else
|
||||||
constexpr WrappedMutex() {}
|
constexpr WrappedMutex() {}
|
||||||
|
#endif
|
||||||
void Lock() GOOGLE_PROTOBUF_ACQUIRE() { mu_.lock(); }
|
void Lock() GOOGLE_PROTOBUF_ACQUIRE() { mu_.lock(); }
|
||||||
void Unlock() GOOGLE_PROTOBUF_RELEASE() { mu_.unlock(); }
|
void Unlock() GOOGLE_PROTOBUF_RELEASE() { mu_.unlock(); }
|
||||||
// Crash if this Mutex is not held exclusively by this thread.
|
// Crash if this Mutex is not held exclusively by this thread.
|
||||||
|
@ -46,7 +46,11 @@
|
|||||||
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
|
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
|
||||||
#elif defined(__QNX__)
|
#elif defined(__QNX__)
|
||||||
#define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
|
#define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
|
||||||
|
#else
|
||||||
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
|
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
|
||||||
|
#endif
|
||||||
#elif defined(_M_ARM) || defined(__ARMEL__)
|
#elif defined(_M_ARM) || defined(__ARMEL__)
|
||||||
#define GOOGLE_PROTOBUF_ARCH_ARM 1
|
#define GOOGLE_PROTOBUF_ARCH_ARM 1
|
||||||
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
|
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
|
||||||
|
@ -62,8 +62,10 @@
|
|||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
#include <sys/endian.h> // __BYTE_ORDER
|
#include <sys/endian.h> // __BYTE_ORDER
|
||||||
#else
|
#else
|
||||||
|
#if !defined(__QNX__)
|
||||||
#include <endian.h> // __BYTE_ORDER
|
#include <endian.h> // __BYTE_ORDER
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
|
#if ((defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \
|
||||||
(defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || \
|
(defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || \
|
||||||
(defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN)) && \
|
(defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN)) && \
|
||||||
|
Loading…
Reference in New Issue
Block a user