Merge tag 'refs/tags/sync-piper' into sync-stage
diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc
index 2cee9da..8c20b79 100644
--- a/src/google/protobuf/compiler/js/js_generator.cc
+++ b/src/google/protobuf/compiler/js/js_generator.cc
@@ -406,7 +406,7 @@
           GetSnakeFilename(scc->GetRepresentative()->file()->name()));
       (*long_name_dict)[scc->GetRepresentative()] =
           StrCat(snake_name, "_long_sccs_",
-                 static_cast<uint64>((*long_name_dict).size()));
+                 static_cast<uint64_t>((*long_name_dict).size()));
     }
     filename_base = (*long_name_dict)[scc->GetRepresentative()];
   }
@@ -575,7 +575,7 @@
 }
 
 // Decodes a codepoint in \x0000 -- \xFFFF.
-uint16 DecodeUTF8Codepoint(uint8* bytes, size_t* length) {
+uint16_t DecodeUTF8Codepoint(uint8_t* bytes, size_t* length) {
   if (*length == 0) {
     return 0;
   }
@@ -620,13 +620,13 @@
 bool EscapeJSString(const std::string& in, std::string* out) {
   size_t decoded = 0;
   for (size_t i = 0; i < in.size(); i += decoded) {
-    uint16 codepoint = 0;
+    uint16_t codepoint = 0;
     // Decode the next UTF-8 codepoint.
     size_t have_bytes = in.size() - i;
-    uint8 bytes[3] = {
-        static_cast<uint8>(in[i]),
-        static_cast<uint8>(((i + 1) < in.size()) ? in[i + 1] : 0),
-        static_cast<uint8>(((i + 2) < in.size()) ? in[i + 2] : 0),
+    uint8_t bytes[3] = {
+        static_cast<uint8_t>(in[i]),
+        static_cast<uint8_t>(((i + 1) < in.size()) ? in[i + 1] : 0),
+        static_cast<uint8_t>(((i + 2) < in.size()) ? in[i + 2] : 0),
     };
     codepoint = DecodeUTF8Codepoint(bytes, &have_bytes);
     if (have_bytes == 0) {
@@ -814,13 +814,13 @@
       // integer values as signed integer values. In order to exactly match the
       // output, we need to reinterpret as base-2 signed. Ugh.
       return MaybeNumberString(
-          field, StrCat(static_cast<int32>(field->default_value_uint32())));
+          field, StrCat(static_cast<int32_t>(field->default_value_uint32())));
     case FieldDescriptor::CPPTYPE_INT64:
       return MaybeNumberString(field, StrCat(field->default_value_int64()));
     case FieldDescriptor::CPPTYPE_UINT64:
       // See above note for uint32 -- reinterpreting as signed.
       return MaybeNumberString(
-          field, StrCat(static_cast<int64>(field->default_value_uint64())));
+          field, StrCat(static_cast<int64_t>(field->default_value_uint64())));
     case FieldDescriptor::CPPTYPE_ENUM:
       return StrCat(field->default_value_enum()->number());
     case FieldDescriptor::CPPTYPE_BOOL:
diff --git a/src/google/protobuf/compiler/js/js_generator.h b/src/google/protobuf/compiler/js/js_generator.h
index cd9631a..c7a942a 100644
--- a/src/google/protobuf/compiler/js/js_generator.h
+++ b/src/google/protobuf/compiler/js/js_generator.h
@@ -151,7 +151,7 @@
                    const std::string& parameter, GeneratorContext* context,
                    std::string* error) const override;
 
-  uint64 GetSupportedFeatures() const override {
+  uint64_t GetSupportedFeatures() const override {
     return FEATURE_PROTO3_OPTIONAL;
   }