aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/google/protobuf/compiler/js/js_generator.cc3
-rw-r--r--src/google/protobuf/stubs/platform_macros.h6
-rw-r--r--src/google/protobuf/util/json_util.cc3
3 files changed, 10 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc
index d8282e40..7109ed5b 100755
--- a/src/google/protobuf/compiler/js/js_generator.cc
+++ b/src/google/protobuf/compiler/js/js_generator.cc
@@ -3477,7 +3477,8 @@ void Generator::GenerateFile(const GeneratorOptions& options,
GenerateExtension(options, printer, *it);
}
- if (options.import_style == GeneratorOptions::kImportCommonJs) {
+ // if provided is empty, do not export anything
+ if (options.import_style == GeneratorOptions::kImportCommonJs && !provided.empty()) {
printer->Print("goog.object.extend(exports, $package$);\n",
"package", GetFilePath(options, file));
}
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index c3a64dd2..ff4dea7b 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -99,6 +99,7 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
#if defined(__APPLE__)
#define GOOGLE_PROTOBUF_OS_APPLE
+#include <Availability.h>
#include <TargetConditionals.h>
#if TARGET_OS_IPHONE
#define GOOGLE_PROTOBUF_OS_IPHONE
@@ -125,4 +126,9 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
#define GOOGLE_PROTOBUF_NO_THREADLOCAL
#endif
+#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+// __thread keyword requires at least 10.7
+#define GOOGLE_PROTOBUF_NO_THREADLOCAL
+#endif
+
#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
diff --git a/src/google/protobuf/util/json_util.cc b/src/google/protobuf/util/json_util.cc
index f81a7a30..9ad073d8 100644
--- a/src/google/protobuf/util/json_util.cc
+++ b/src/google/protobuf/util/json_util.cc
@@ -127,7 +127,8 @@ class StatusErrorListener : public converter::ErrorListener {
virtual void InvalidName(const converter::LocationTrackerInterface& loc,
StringPiece unknown_name, StringPiece message) {
status_ = util::Status(util::error::INVALID_ARGUMENT,
- loc.ToString() + ": " + string(message));
+ loc.ToString() + ": invalid name " +
+ string(unknown_name) + ": " + string(message));
}
virtual void InvalidValue(const converter::LocationTrackerInterface& loc,