This file contains a lot of code that doesn't compile for Xbox One and doesn't appear to be necessary for usage on that platform. _WIN32 is defined for the Xbox One platform.
It appears this file was including winsock2.h just to get the timeval struct definition. There are platforms, such as Xbox One, that don't use winsock but do compile with _MSC_VER set, so just drop in the struct definition we needed instead of including all of winsock. This fixes compilation of this file for Xbox One. Without this change, there were numerous `timeval` complaints such as
```
1>c:\dev\protobuf\src\google\protobuf\util\time_util.h(153): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int (compiling source file C:\dev\protobuf\src\google\protobuf\util\time_util.cc)
1>c:\dev\protobuf\src\google\protobuf\util\time_util.h(153): error C2143: syntax error: missing ',' before '&' (compiling source file C:\dev\protobuf\src\google\protobuf\util\time_util.cc)
```
etc.
* Compiler changes (extensions)
* Generated changes (extensions)
* Library changes (extensions)
* Adjusted a summary to indicate ContainingType can be null for extensions
* Compiler changes (custom option review + access level review)
* Generated code changes (custom options + access review)
* Library changes (custom options + access review)
* Support C# 6 with library changes
* Access HasValue by property
* Set access level of all extension classes to internal (revert in next PR)
* Added null checks to custom options
* Rebase on master and regenerate Conformance
* Removed second dictionary from ExtensionSet
* Rebased compiler changes
* Rebased generated code changes
* Rebased library changes + review changes
* Add more safety checks to extension accessors
* Remove instances where extension sets were unnecessarily allocated
* Remove cleared items from sets
Empty sets are now made null
IExtensionMessage -> IExtendableMessage
* Remove dead code from IExtensionValue impls
* Clean both repeated and single value extensions
* Add GetOrRegister method for repeated fields and allow clearing repeated extensions
* Add type safe ClearExtension methods, remove non-generic IExtendableMessage interface.
* Simplify ExtensionSet.TryMergeFieldFrom
* Rebase on master to resolve conflicts
* Fix Makefile.am
* Add ObjectIntPair to Makefile.am
Some compilers, such as PS4's clang, were giving errors such as:
C:\dev\protobuf\src\google/protobuf/parse_context.h(227,5): error : no type named 'uintptr_t' in namespace 'std'; did you mean simply 'uintptr_t'?
Adding the necessary include for integer types fixes these.
GCC 8 added a -Wclass-memaccess that is enabled in -Wall that warns when
making direct memory modifications to non-trivial objects. The objects
that are modified here are only "non-trivial" in non-interesting ways
(e.g., removal of copy constructor) and can be safely modified as is
being done.
This simply explicitly casts the pointers before calling memset to
indicate that they should be treated as raw memory.
* external/com_google_protobuf/src/google/protobuf/stubs/strutil.cc:1122:9: runtime error: negation of -9223372036854775808 cannot be represented in type 'google::protobuf::int64' (aka 'long'); cast to an unsigned type to negate this value to itself
* Bad external/com_google_protobuf/src/google/protobuf/text_format.cc:1320:14: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:62:62: note: nonnull attribute specified here
Signed-off-by: Harvey Tuch <htuch@google.com>
This actually has always been using the first branch because
`__cpluscplus` is not a real definition (contrast with the real spelling
of `__cplusplus`).
We need to mark messages as final soon, but before we do that we need to
provide a temporary opt-out mechanism to accommodate existing code that
inherits from generated messages. For 3.7.1 let's stop marking messages
final but in 3.8 we can reintroduce "final" with an opt-out option.
The bazel-bin/ and bazel-genfiles/ directories are going to be merged
soon. That change was causing some test failures on Windows, and I
believe it is because the logic for locating test data files was getting
confused and mistakenly looking for them under bazel-bin/. This commit
updates that logic to look for a more specific file (descriptor.cc)
which does not appear under any Bazel-related directories.
It sounds like the more official solution is to use the Bazel runfiles
library (i.e. //tools/cpp/runfiles). However, I decided not to do that
because we currently still support multiple build systems, and if we
used a separate solution for Bazel then I suspect we would need even
more #ifdefs in the code to handle the different systems.
* add check for reserved keywords in extensions
* add all reserved keywords
* use string without std::
* add test and update name in lite version
* test updates
* Fix macros in header of generated code
* Define PROTOBUF_MIN_PROTOC_VERSION in port_def.inc
* Remove duplicated GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION from common.h
* Send error if the error has been defined
* Undef the new macro