Commit 32d7830e authored by Feng Xiao's avatar Feng Xiao

Fix C++ build for down-integration.

parent d36c0c53
...@@ -206,6 +206,7 @@ RELATIVE_WELL_KNOWN_PROTOS = [ ...@@ -206,6 +206,7 @@ RELATIVE_WELL_KNOWN_PROTOS = [
"google/protobuf/any.proto", "google/protobuf/any.proto",
"google/protobuf/api.proto", "google/protobuf/api.proto",
"google/protobuf/compiler/plugin.proto", "google/protobuf/compiler/plugin.proto",
"google/protobuf/compiler/profile.proto",
"google/protobuf/descriptor.proto", "google/protobuf/descriptor.proto",
"google/protobuf/duration.proto", "google/protobuf/duration.proto",
"google/protobuf/empty.proto", "google/protobuf/empty.proto",
...@@ -350,6 +351,7 @@ cc_library( ...@@ -350,6 +351,7 @@ cc_library(
"src/google/protobuf/compiler/php/php_generator.cc", "src/google/protobuf/compiler/php/php_generator.cc",
"src/google/protobuf/compiler/plugin.cc", "src/google/protobuf/compiler/plugin.cc",
"src/google/protobuf/compiler/plugin.pb.cc", "src/google/protobuf/compiler/plugin.pb.cc",
"src/google/protobuf/compiler/profile.pb.cc",
"src/google/protobuf/compiler/python/python_generator.cc", "src/google/protobuf/compiler/python/python_generator.cc",
"src/google/protobuf/compiler/ruby/ruby_generator.cc", "src/google/protobuf/compiler/ruby/ruby_generator.cc",
"src/google/protobuf/compiler/subprocess.cc", "src/google/protobuf/compiler/subprocess.cc",
...@@ -401,6 +403,9 @@ RELATIVE_TEST_PROTOS = [ ...@@ -401,6 +403,9 @@ RELATIVE_TEST_PROTOS = [
"google/protobuf/unittest_enormous_descriptor.proto", "google/protobuf/unittest_enormous_descriptor.proto",
"google/protobuf/unittest_import.proto", "google/protobuf/unittest_import.proto",
"google/protobuf/unittest_import_public.proto", "google/protobuf/unittest_import_public.proto",
"google/protobuf/unittest_lazy_dependencies.proto",
"google/protobuf/unittest_lazy_dependencies_custom_option.proto",
"google/protobuf/unittest_lazy_dependencies_enum.proto",
"google/protobuf/unittest_lite_imports_nonlite.proto", "google/protobuf/unittest_lite_imports_nonlite.proto",
"google/protobuf/unittest_mset.proto", "google/protobuf/unittest_mset.proto",
"google/protobuf/unittest_mset_wire_format.proto", "google/protobuf/unittest_mset_wire_format.proto",
...@@ -477,6 +482,7 @@ cc_test( ...@@ -477,6 +482,7 @@ cc_test(
"src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc", "src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc",
"src/google/protobuf/compiler/cpp/cpp_unittest.cc", "src/google/protobuf/compiler/cpp/cpp_unittest.cc",
"src/google/protobuf/compiler/cpp/metadata_test.cc", "src/google/protobuf/compiler/cpp/metadata_test.cc",
"src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc",
"src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc", "src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc",
"src/google/protobuf/compiler/importer_unittest.cc", "src/google/protobuf/compiler/importer_unittest.cc",
"src/google/protobuf/compiler/java/java_doc_comment_unittest.cc", "src/google/protobuf/compiler/java/java_doc_comment_unittest.cc",
......
...@@ -36,6 +36,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\parser.h" in ...@@ -36,6 +36,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\parser.h" in
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\php\php_generator.h" include\google\protobuf\compiler\php\php_generator.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\php\php_generator.h" include\google\protobuf\compiler\php\php_generator.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.h" include\google\protobuf\compiler\plugin.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.h" include\google\protobuf\compiler\plugin.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.pb.h" include\google\protobuf\compiler\plugin.pb.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.pb.h" include\google\protobuf\compiler\plugin.pb.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\profile.pb.h" include\google\protobuf\compiler\profile.pb.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\python\python_generator.h" include\google\protobuf\compiler\python\python_generator.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\python\python_generator.h" include\google\protobuf\compiler\python\python_generator.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\ruby\ruby_generator.h" include\google\protobuf\compiler\ruby\ruby_generator.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\ruby\ruby_generator.h" include\google\protobuf\compiler\ruby\ruby_generator.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.h" include\google\protobuf\descriptor.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.h" include\google\protobuf\descriptor.h
...@@ -114,6 +115,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\text_format.h" includ ...@@ -114,6 +115,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\text_format.h" includ
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\timestamp.pb.h" include\google\protobuf\timestamp.pb.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\timestamp.pb.h" include\google\protobuf\timestamp.pb.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\type.pb.h" include\google\protobuf\type.pb.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\type.pb.h" include\google\protobuf\type.pb.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\unknown_field_set.h" include\google\protobuf\unknown_field_set.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\unknown_field_set.h" include\google\protobuf\unknown_field_set.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\delimited_message_util.h" include\google\protobuf\util\delimited_message_util.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\field_comparator.h" include\google\protobuf\util\field_comparator.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\field_comparator.h" include\google\protobuf\util\field_comparator.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\field_mask_util.h" include\google\protobuf\util\field_mask_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\field_mask_util.h" include\google\protobuf\util\field_mask_util.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\json_util.h" include\google\protobuf\util\json_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\util\json_util.h" include\google\protobuf\util\json_util.h
......
...@@ -95,57 +95,58 @@ namespace Google.Protobuf.Reflection { ...@@ -95,57 +95,58 @@ namespace Google.Protobuf.Reflection {
"X3ByZWZpeBgoIAEoCRJDChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsy", "X3ByZWZpeBgoIAEoCRJDChR1bmludGVycHJldGVkX29wdGlvbhjnByADKAsy",
"JC5nb29nbGUucHJvdG9idWYuVW5pbnRlcnByZXRlZE9wdGlvbiI6CgxPcHRp", "JC5nb29nbGUucHJvdG9idWYuVW5pbnRlcnByZXRlZE9wdGlvbiI6CgxPcHRp",
"bWl6ZU1vZGUSCQoFU1BFRUQQARINCglDT0RFX1NJWkUQAhIQCgxMSVRFX1JV", "bWl6ZU1vZGUSCQoFU1BFRUQQARINCglDT0RFX1NJWkUQAhIQCgxMSVRFX1JV",
"TlRJTUUQAyoJCOgHEICAgIACSgQIJhAnIuwBCg5NZXNzYWdlT3B0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X3ZhbHVlGAYgASgB", "ZGVzY3JpcHRvcjtkZXNjcmlwdG9yogIDR1BCqgIaR29vZ2xlLlByb3RvYnVm",
"EhQKDHN0cmluZ192YWx1ZRgHIAEoDBIXCg9hZ2dyZWdhdGVfdmFsdWUYCCAB", "LlJlZmxlY3Rpb24="));
"KAkaMwoITmFtZVBhcnQSEQoJbmFtZV9wYXJ0GAEgAigJEhQKDGlzX2V4dGVu",
"c2lvbhgCIAIoCCLVAQoOU291cmNlQ29kZUluZm8SOgoIbG9jYXRpb24YASAD",
"KAsyKC5nb29nbGUucHJvdG9idWYuU291cmNlQ29kZUluZm8uTG9jYXRpb24a",
"hgEKCExvY2F0aW9uEhAKBHBhdGgYASADKAVCAhABEhAKBHNwYW4YAiADKAVC",
"AhABEhgKEGxlYWRpbmdfY29tbWVudHMYAyABKAkSGQoRdHJhaWxpbmdfY29t",
"bWVudHMYBCABKAkSIQoZbGVhZGluZ19kZXRhY2hlZF9jb21tZW50cxgGIAMo",
"CSKnAQoRR2VuZXJhdGVkQ29kZUluZm8SQQoKYW5ub3RhdGlvbhgBIAMoCzIt",
"Lmdvb2dsZS5wcm90b2J1Zi5HZW5lcmF0ZWRDb2RlSW5mby5Bbm5vdGF0aW9u",
"Gk8KCkFubm90YXRpb24SEAoEcGF0aBgBIAMoBUICEAESEwoLc291cmNlX2Zp",
"bGUYAiABKAkSDQoFYmVnaW4YAyABKAUSCwoDZW5kGAQgASgFQowBChNjb20u",
"Z29vZ2xlLnByb3RvYnVmQhBEZXNjcmlwdG9yUHJvdG9zSAFaPmdpdGh1Yi5j",
"b20vZ29sYW5nL3Byb3RvYnVmL3Byb3RvYy1nZW4tZ28vZGVzY3JpcHRvcjtk",
"ZXNjcmlwdG9yogIDR1BCqgIaR29vZ2xlLlByb3RvYnVmLlJlZmxlY3Rpb24="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
......
...@@ -46,6 +46,8 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -46,6 +46,8 @@ namespace Google.Protobuf.WellKnownTypes {
/// two Timestamp values is a Duration and it can be added or subtracted /// two Timestamp values is a Duration and it can be added or subtracted
/// from a Timestamp. Range is approximately +-10,000 years. /// from a Timestamp. Range is approximately +-10,000 years.
/// ///
/// # Examples
///
/// Example 1: Compute Duration from two Timestamps in pseudo code. /// Example 1: Compute Duration from two Timestamps in pseudo code.
/// ///
/// Timestamp start = ...; /// Timestamp start = ...;
...@@ -85,6 +87,16 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -85,6 +87,16 @@ namespace Google.Protobuf.WellKnownTypes {
/// td = datetime.timedelta(days=3, minutes=10) /// td = datetime.timedelta(days=3, minutes=10)
/// duration = Duration() /// duration = Duration()
/// duration.FromTimedelta(td) /// duration.FromTimedelta(td)
///
/// # JSON Mapping
///
/// In JSON format, the Duration type is encoded as a string rather than an
/// object, where the string ends in the suffix "s" (indicating seconds) and
/// is preceded by the number of seconds, with nanoseconds expressed as
/// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
/// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
/// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
/// microsecond should be expressed in JSON format as "3.000001s".
/// </summary> /// </summary>
public sealed partial class Duration : pb::IMessage<Duration> { public sealed partial class Duration : pb::IMessage<Duration> {
private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration()); private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration());
...@@ -124,7 +136,8 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -124,7 +136,8 @@ namespace Google.Protobuf.WellKnownTypes {
private long seconds_; private long seconds_;
/// <summary> /// <summary>
/// Signed seconds of the span of time. Must be from -315,576,000,000 /// Signed seconds of the span of time. Must be from -315,576,000,000
/// to +315,576,000,000 inclusive. /// to +315,576,000,000 inclusive. Note: these bounds are computed from:
/// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
/// </summary> /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Seconds { public long Seconds {
......
...@@ -51,6 +51,8 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -51,6 +51,8 @@ namespace Google.Protobuf.WellKnownTypes {
/// and from RFC 3339 date strings. /// and from RFC 3339 date strings.
/// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). /// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
/// ///
/// # Examples
///
/// Example 1: Compute Timestamp from POSIX `time()`. /// Example 1: Compute Timestamp from POSIX `time()`.
/// ///
/// Timestamp timestamp; /// Timestamp timestamp;
...@@ -89,6 +91,29 @@ namespace Google.Protobuf.WellKnownTypes { ...@@ -89,6 +91,29 @@ namespace Google.Protobuf.WellKnownTypes {
/// ///
/// timestamp = Timestamp() /// timestamp = Timestamp()
/// timestamp.GetCurrentTime() /// timestamp.GetCurrentTime()
///
/// # JSON Mapping
///
/// In JSON format, the Timestamp type is encoded as a string in the
/// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
/// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
/// where {year} is always expressed using four digits while {month}, {day},
/// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
/// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
/// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
/// is required, though only UTC (as indicated by "Z") is presently supported.
///
/// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
/// 01:30 UTC on January 15, 2017.
///
/// In JavaScript, one can convert a Date object to this format using the
/// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
/// method. In Python, a standard `datetime.datetime` object can be converted
/// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
/// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
/// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
/// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
/// to obtain a formatter capable of generating timestamps in this format.
/// </summary> /// </summary>
public sealed partial class Timestamp : pb::IMessage<Timestamp> { public sealed partial class Timestamp : pb::IMessage<Timestamp> {
private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp()); private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp());
......
...@@ -59,6 +59,8 @@ typedef GPB_ENUM(GPBDuration_FieldNumber) { ...@@ -59,6 +59,8 @@ typedef GPB_ENUM(GPBDuration_FieldNumber) {
* two Timestamp values is a Duration and it can be added or subtracted * two Timestamp values is a Duration and it can be added or subtracted
* from a Timestamp. Range is approximately +-10,000 years. * from a Timestamp. Range is approximately +-10,000 years.
* *
* # Examples
*
* Example 1: Compute Duration from two Timestamps in pseudo code. * Example 1: Compute Duration from two Timestamps in pseudo code.
* *
* Timestamp start = ...; * Timestamp start = ...;
...@@ -98,12 +100,23 @@ typedef GPB_ENUM(GPBDuration_FieldNumber) { ...@@ -98,12 +100,23 @@ typedef GPB_ENUM(GPBDuration_FieldNumber) {
* td = datetime.timedelta(days=3, minutes=10) * td = datetime.timedelta(days=3, minutes=10)
* duration = Duration() * duration = Duration()
* duration.FromTimedelta(td) * duration.FromTimedelta(td)
*
* # JSON Mapping
*
* In JSON format, the Duration type is encoded as a string rather than an
* object, where the string ends in the suffix "s" (indicating seconds) and
* is preceded by the number of seconds, with nanoseconds expressed as
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
* microsecond should be expressed in JSON format as "3.000001s".
**/ **/
@interface GPBDuration : GPBMessage @interface GPBDuration : GPBMessage
/** /**
* Signed seconds of the span of time. Must be from -315,576,000,000 * Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. * to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
**/ **/
@property(nonatomic, readwrite) int64_t seconds; @property(nonatomic, readwrite) int64_t seconds;
......
...@@ -64,6 +64,8 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) { ...@@ -64,6 +64,8 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) {
* and from RFC 3339 date strings. * and from RFC 3339 date strings.
* See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
* *
* # Examples
*
* Example 1: Compute Timestamp from POSIX `time()`. * Example 1: Compute Timestamp from POSIX `time()`.
* *
* Timestamp timestamp; * Timestamp timestamp;
...@@ -103,6 +105,29 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) { ...@@ -103,6 +105,29 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) {
* *
* timestamp = Timestamp() * timestamp = Timestamp()
* timestamp.GetCurrentTime() * timestamp.GetCurrentTime()
*
* # JSON Mapping
*
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required, though only UTC (as indicated by "Z") is presently supported.
*
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
* with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
* can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
* to obtain a formatter capable of generating timestamps in this format.
**/ **/
@interface GPBTimestamp : GPBMessage @interface GPBTimestamp : GPBMessage
......
...@@ -135,7 +135,7 @@ for HEADER in $PUBLIC_HEADERS; do ...@@ -135,7 +135,7 @@ for HEADER in $PUBLIC_HEADERS; do
done | sort | uniq | sed "s/^/mkdir include\\\\/" >> $EXTRACT_INCLUDES_BAT done | sort | uniq | sed "s/^/mkdir include\\\\/" >> $EXTRACT_INCLUDES_BAT
for HEADER in $PUBLIC_HEADERS; do for HEADER in $PUBLIC_HEADERS; do
WINPATH=$(echo $HEADER | sed 's;/;\\;g') WINPATH=$(echo $HEADER | sed 's;/;\\;g')
echo "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT echo "copy \"\${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH\" include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT
done done
################################################################################ ################################################################################
......
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