Commit Graph

1461 Commits

Author SHA1 Message Date
Feng Xiao
ed14fe423b
Merge pull request #3934 from xfxyjwf/builtsources
Remove the use of BUILT_SOURCES
2018-01-25 15:37:00 -08:00
Thomas Van Lenten
3e1587fd4b Add an explicit import of stdatomic.h.
The generated code for enums needs atomics support, so generate the
import instead of relying on it via transitive imports. This will
make future changes to this likely likely to break generated code
and runtime support are mixed.

Followup to https://github.com/google/protobuf/pull/4184.
2018-01-25 12:18:39 -05:00
Feng Xiao
c337d9f929 Remove the use of BUILT_SOURCES
Fixes https://github.com/google/protobuf/issues/3912

[BUILT_SOURCES](https://www.gnu.org/software/automake/manual/html_node/Sources.html)
is used with [Automake's automatic dependency tracking](https://www.gnu.org/software/automake/manual/html_node/Dependencies.html#Dependencies)
but doesn't work well in protobuf when cross-compiling. Their presence
causes maek to always generate them even when they are not requested
and as a result causes cross-compilation to fail because the built protoc
cannot be used to generate unittest protos (see: https://github.com/google/protobuf/issues/3912).

Removing it with explicit dependencies fixes the build issue when running
'make', 'make all', 'make install' at cross-compilation. It doesn't affect
'make protoc' because BUILT_SOURCES only works for the implicit targets
'all', 'check' or 'install'.
2018-01-24 17:20:01 -08:00
Jonathan Dierksen
a721bf6d29 Migrate away from deprecated OSAtomic APIs. (#4184)
* Migrate away from deprecated OSAtomic APIs.
2018-01-22 16:26:39 -05:00
Adam Cozzette
b77aa8011d
Merge pull request #4148 from datacompboy/patch-2
Add more tests to time_test
2018-01-08 10:41:54 -08:00
Anton Fedorov
091eeb1261
Update time_test.cc
Better test coverage for datetime validation.
2018-01-05 22:12:00 +01:00
Anton Fedorov
473c5cff76
Fix ValidateDateTime: check day instead month
Found with PVS-Studio static analyser, see 
https://www.viva64.com/en/b/0550/
2018-01-05 22:09:44 +01:00
Jisi Liu
ec826c5a59 Merge remote-tracking branch 'origin/3.5.x' into master 2018-01-03 09:28:58 -08:00
Jisi Liu
383a4941d5 Merge remote-tracking branch 'origin/3.5.x' into master 2018-01-03 09:28:40 -08:00
Jisi Liu
4f3d8657c3 remove nullptr 2018-01-02 14:13:54 -08:00
Jisi Liu
d69f33304f
Merge pull request #4080 from pherl/arm64
Add support for Windows ARM64 build
2017-12-20 15:06:14 -08:00
Miradham Kamilov
ad8a82ee75 Add support for Windows ARM64 build 2017-12-20 14:52:14 -08:00
Jisi Liu
b5f09c1ee0
Merge pull request #4077 from mkamilov/master
Add support for Windows ARM64 build
2017-12-20 14:48:30 -08:00
Ubuntu
ac1fdd1637 line breaks adjsted 2017-12-20 09:23:16 +00:00
Ubuntu
e68caa3e6a formatting issues 2017-12-20 09:14:44 +00:00
Jisi Liu
d106399d39
Merge pull request #4072 from google/jieluo
Cherrypick for csharp, including:
2017-12-19 17:45:56 -08:00
Jie Luo
b308580bb1 Cherrypick for csharp, including:
Add preserve UnknownFields
Compare floating point values bitwise
Add auto-generated header to C# generated files
2017-12-19 15:38:02 -08:00
Jisi Liu
19d0e9934c Fix string::back() usage in googletest.cc 2017-12-19 15:23:37 -08:00
Jisi Liu
eff55ece08
Merge pull request #4074 from pherl/mapat
Replace C++11 only method std::map::at
2017-12-19 14:41:13 -08:00
Jisi Liu
501093d778 Replace C++11 only method std::map::at 2017-12-19 12:20:13 -08:00
Jisi Liu
050fc9a437 Update version number to 3.5.1 2017-12-19 11:00:33 -08:00
Ubuntu
ffa18ad28f resolve issue 4032 and added a unit test 2017-12-19 11:57:44 +00:00
Miradham Kamilov
03fb09932b Add support for Windows ARM64 build 2017-12-19 14:01:58 +09:00
Adam Cozzette
269884a1eb
Merge pull request #4040 from bazurbat/3.5.x
Create containing directory before generating well_known_types_embed.cc
2017-12-15 10:27:30 -08:00
Adam Cozzette
396336eb96
Merge pull request #4046 from acozzette/deprecated-valueof-issue-2054
Java: generate an annotation to suppress deprecation warnings
2017-12-14 15:53:23 -08:00
Jisi Liu
1237c3f1f7
Merge pull request #4045 from pherl/deprecate
Add deprecation annotation for oneof case.
2017-12-14 12:20:26 -08:00
Adam Cozzette
03501110cc Generate an annotation to suppress deprecation warnings
The valueOf method on enums is deprecated, but for compatibility reasons
the generated code has to keep using it. We can use an annotation to
suppress the deprecation warnings.
2017-12-13 16:41:43 -08:00
Jan Tattermusch
426cf6f31e Add auto-generated header to C# generated files (#4038)
* Add auto-generated header to C# generated files

* regenerate C# protos
2017-12-13 14:36:29 -08:00
Feng Xiao
a4f68d479a
Merge pull request #4044 from xfxyjwf/issue3268
Avoid double underscores in macro name
2017-12-13 14:29:20 -08:00
Adam Cozzette
00ac5c1ab6
Merge pull request #4041 from acozzette/fix-license-issue-1775
Added our standard license header to structurally_valid.cc and its test
2017-12-13 14:16:50 -08:00
Jisi Liu
22e1cfd84a Add deprecation annotation for oneof case. 2017-12-13 14:09:50 -08:00
Feng Xiao
b3ac4417b7 Update generated code. 2017-12-13 13:49:26 -08:00
Jie Luo
bfd254e14f
Add unknown field support for csharp (#3936)
Add unknown field support for csharp
2017-12-13 13:48:58 -08:00
Feng Xiao
50ef6a623e Avoid two consecutive underscores in macro name.
Fixes https://github.com/google/protobuf/issues/3268
2017-12-13 13:40:19 -08:00
Jisi Liu
82724e2109
Merge pull request #4042 from pherl/cpp_enum
Use matching enum type for IsPOD.
2017-12-13 13:29:18 -08:00
Feng Xiao
0a7120ac32
Merge pull request #4037 from xfxyjwf/issue2880
Clarify default value behavior in JSON conversion.
2017-12-13 13:25:38 -08:00
Jisi Liu
6b01e6440c Explicitly propagate the status of Flush().
Before the change, an implicit Flush() will be triggered in the
destructor of the input stream. However, the return code of Flush() is
not discarded. This change makes sure when Flush() fails, we will
return false.
2017-12-13 13:06:29 -08:00
Jisi Liu
7ef21dd81b Use matching enum type for IsPOD. 2017-12-13 13:00:02 -08:00
Adam Cozzette
ecab9c65fb Added our standard license header to structurally_valid.cc and its test
This fixes issue #1775.
2017-12-13 10:01:14 -08:00
Oleg Kolosov
edcf15e7f4 Create containing directory before generating well_known_types_embed.cc
This fixes the following build error:

oldpwd=`pwd` && cd .../protobuf/src && \
$oldpwd/js_embed google/protobuf/compiler/js/well_known_types/any.js google/protobuf/compiler/js/well_known_types/struct.js google/protobuf/compiler/js/well_known_types/timestamp.js > $oldpwd/google/protobuf/compiler/js/well_known_types_embed.cc
/bin/bash: line 1: .../protobuf/target/src/google/protobuf/compiler/js/well_known_types_embed.cc: No such file or directory
Makefile:8201: recipe for target 'google/protobuf/compiler/js/well_known_types_embed.cc' failed

which is observed during the cross-compilation since the version 3.2.
2017-12-13 12:37:24 +01:00
Feng Xiao
5ce724bceb
Merge pull request #4036 from xfxyjwf/issue3093
Update comments for Timestamp JSON format.
2017-12-12 17:52:32 -08:00
Jisi Liu
0f9bfa8244
Merge pull request #4016 from jquesnelle/string-access-ub
fix undefined behavior in C++03
2017-12-12 17:16:51 -08:00
Feng Xiao
6c27550df0 Clarify default value behavior in JSON conversion.
Make it clear default value is only omitted for proto3.
2017-12-12 15:11:40 -08:00
Feng Xiao
8489612dad Update comments for Timestamp JSON format.
Clarify that JSON parser are required to accept both UTC and other
timezone offsets.

Fixes issue 3093
2017-12-12 14:32:28 -08:00
Jon Skeet
3e5bd2fd24 C# code generation changes to use bitwise comparisons for doubles 2017-12-09 09:49:24 +00:00
Adam Cozzette
a426833d1a
Merge pull request #4000 from Kwizatz/master
Using binary one's complement to negate an unsigned int
2017-12-08 13:34:56 -08:00
Jeffrey Quesnelle
f5b086273a use const char* instead of const std::string& in normalize() 2017-12-07 19:02:35 -05:00
Adam Cozzette
63a0afca70 Use the portable version of Log2Floor for Clang with older Android NDK versions
This is necessary for avoiding a strange compiler error that we have
already run into with older versions of Clang on NaCl.
2017-12-07 14:35:40 -08:00
Jeffrey Quesnelle
b32c2a80e0 fix undefined behavior in C++03 2017-12-07 16:30:24 -05:00
Rodrigo Hernandez
24493eef93 Using binary one's complement to negate an unsigned int
This removes a Visual Studio warning:

warning C4146: unary minus operator applied to unsigned type, result
still unsigned.
2017-12-07 13:29:20 -06:00